Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
praich
Ns 3 Dev
Commits
dab7ef68
Commit
dab7ef68
authored
16 years ago
by
Mathieu Lacage
Browse files
Options
Download
Plain Diff
merge with HEAD
parents
bf3ad68c
8cdde7b8
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/devices/bridge/bridge-channel.h
+6
-2
src/devices/bridge/bridge-channel.h
src/devices/bridge/bridge-net-device.h
+41
-2
src/devices/bridge/bridge-net-device.h
with
47 additions
and
4 deletions
+47
-4
src/devices/bridge/bridge-channel.h
View file @
dab7ef68
...
...
@@ -25,9 +25,13 @@
namespace
ns3
{
/**
* \ingroup
netdevic
e
* \ingroup
bridg
e
*
* \brief bridge net device for bridge things and testing
* \brief Virtual channel implementation for bridges (BridgeNetDevice).
*
* Just like BridgeNetDevice aggregates multiple NetDevices,
* BridgeChannel aggregates multiple channels and make them appear as
* a single channel to upper layers.
*/
class
BridgeChannel
:
public
Channel
{
...
...
This diff is collapsed.
Click to expand it.
src/devices/bridge/bridge-net-device.h
View file @
dab7ef68
...
...
@@ -31,9 +31,37 @@ namespace ns3 {
class
Node
;
/**
* \ingroup netdevice
* \ingroup devices
* \defgroup bridge Bridge
*
* \brief bridge net device for bridge things and testing
* \brief a virtual net device that bridges multiple LAN segments
*
* The BridgeNetDevice object is a "virtual" netdevice that aggregates
* multiple "real" netdevices and implements the data plane forwarding
* part of IEEE 802.1D. By adding a BridgeNetDevice to a Node, it
* will act as a "bridge", or "switch", to multiple LAN segments.
*
* By default the bridge netdevice implements a "learning bridge"
* algorithm (see 802.1D), where incoming unicast frames from one port
* may occasionally be forwarded throughout all other ports, but
* usually they are forwarded only to a single correct output port.
*
* \attention The Spanning Tree Protocol part of 802.1D is not
* implemented. Therefore, you have to be careful not to create
* bridging loops, or else the network will collapse.
*
* \attention Bridging is designed to work only with NetDevices
* modelling IEEE 802-style technologies, such as CsmaNetDevice and
* WifiNetDevice.
*
* \attention If including a WifiNetDevice in a bridge, the wifi
* device must be in Access Point mode. Adhoc mode is not supported
* with bridging.
*/
/**
* \ingroup bridge
* \brief a virtual net device that bridges multiple LAN segments
*/
class
BridgeNetDevice
:
public
NetDevice
{
...
...
@@ -41,6 +69,17 @@ public:
static
TypeId
GetTypeId
(
void
);
BridgeNetDevice
();
/** \brief Add a 'port' to a bridge device
*
* This method adds a new bridge port to a BridgeNetDevice, so that
* the new bridge port NetDevice becomes part of the bridge and L2
* frames start being forwarded to/from this NetDevice.
*
* \attention The netdevice that is being added as bridge port must
* _not_ have an IP address. In order to add IP connectivity to a
* bridging node you must enable IP on the BridgeNetDevice itself,
* never on its port netdevices.
*/
void
AddBridgePort
(
Ptr
<
NetDevice
>
bridgePort
);
// inherited from NetDevice base class.
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment
Menu
Projects
Groups
Snippets
Help