A network Node.
More...
#include <node.h>
List of all members.
Detailed Description
A network Node.
This class holds together:
- a list of NetDevice objects which represent the network interfaces of this node which are connected to other Node instances through Channel instances.
- a list of Application objects which represent the userspace traffic generation applications which interact with the Node through the Socket API.
- a node Id: a unique per-node identifier.
- a system Id: a unique Id used for parallel simulations.
Every Node created is added to the NodeList automatically.
Member Typedef Documentation
A protocol handler
- Parameters:
-
| device | a pointer to the net device which received the packet |
| packet | the packet received |
| protocol | the 16 bit protocol number associated with this packet. This protocol number is expected to be the same protocol number given to the Send method by the user on the sender side. |
| sender | the address of the sender |
| receiver | the address of the receiver; Note: this value is only valid for promiscuous mode protocol handlers. |
| packetType | type of packet received (broadcast/multicast/unicast/otherhost); Note: this value is only valid for promiscuous mode protocol handlers. |
Constructor & Destructor Documentation
Must be invoked by subclasses only.
ns3::Node::Node |
( |
uint32_t |
systemId |
) |
|
- Parameters:
-
| systemId | a unique integer used for parallel simulations. |
Must be invoked by subclasses only.
Member Function Documentation
- Parameters:
-
- Returns:
- the index of the Application within the Node's list of Application.
Associated this Application to this Node. This method is called automatically from Application::Application so the user has little reasons to call this method directly.
- Parameters:
-
- Returns:
- the index of the NetDevice into the Node's list of NetDevice.
Associate this device to this node.
static bool ns3::Node::ChecksumEnabled |
( |
void |
|
) |
[static] |
- Returns:
- true if checksums are enabled, false otherwise.
virtual void ns3::Node::DoDispose |
( |
void |
|
) |
[protected, virtual] |
The dispose method. Subclasses must override this method and must chain up to it by calling Node::DoDispose at the end of their own DoDispose method.
Reimplemented from ns3::Object.
- Parameters:
-
- Returns:
- the application associated to this requested index within this Node.
Ptr<NetDevice> ns3::Node::GetDevice |
( |
uint32_t |
index |
) |
const |
- Parameters:
-
- Returns:
- the requested NetDevice associated to this Node.
The indexes used by the GetDevice method start at one and end at GetNDevices ()
uint32_t ns3::Node::GetId |
( |
void |
|
) |
const |
- Returns:
- the unique id of this node.
This unique id happens to be also the index of the Node into the NodeList.
uint32_t ns3::Node::GetNApplications |
( |
void |
|
) |
const |
- Returns:
- the number of applications associated to this Node.
uint32_t ns3::Node::GetNDevices |
( |
void |
|
) |
const |
- Returns:
- the number of NetDevice instances associated to this Node.
uint32_t ns3::Node::GetSystemId |
( |
void |
|
) |
const |
- Returns:
- the system id for parallel simulations associated to this node.
static TypeId ns3::Node::GetTypeId |
( |
void |
|
) |
[static] |
This method returns the TypeId associated to ns3::Node.
This object is accessible through the following paths with Config::Set and Config::Connect:
Attributes defined for this type:
-
DeviceList: The list of devices associated to this Node.
-
ApplicationList: The list of applications associated to this Node.
-
Id: The id (unique integer) of this Node.
No TraceSources defined for this type.
Reimplemented from ns3::Object.
virtual void ns3::Node::NotifyDeviceAdded |
( |
Ptr< NetDevice > |
device |
) |
[private, virtual] |
- Parameters:
-
| device | the device added to this Node. |
This method is invoked whenever a user calls Node::AddDevice.
void ns3::Node::RegisterProtocolHandler |
( |
ProtocolHandler |
handler, |
|
|
uint16_t |
protocolType, |
|
|
Ptr< NetDevice > |
device, |
|
|
bool |
promiscuous = false | |
|
) |
| | |
- Parameters:
-
| handler | the handler to register |
| protocolType | the type of protocol this handler is interested in. This protocol type is a so-called EtherType, as registered here: http://standards.ieee.org/regauth/ethertype/eth.txt the value zero is interpreted as matching all protocols. |
| device | the device attached to this handler. If the value is zero, the handler is attached to all devices on this node. |
| promiscuous | whether to register a promiscuous mode handler |
- Parameters:
-
| handler | the handler to unregister |
After this call returns, the input handler will never be invoked anymore.
The documentation for this class was generated from the following files:
- src/node/node.h
- doc/introspected-doxygen.h