26 #include "ns3/object.h" 27 #include "ns3/callback.h" 29 #include "ns3/net-device.h" 69 Node(uint32_t systemId);
79 uint32_t
GetId (
void)
const;
174 uint16_t protocolType,
176 bool promiscuous=
false);
uint32_t AddApplication(Ptr< Application > application)
Associate an Application to this Node.
Simulation virtual time values and global simulation resolution.
Smart pointer class similar to boost::intrusive_ptr.
uint32_t GetId(void) const
virtual void DoInitialize(void)
Initialize() implementation.
DeviceAdditionListenerList m_deviceAdditionListeners
Device addition listeners in the node.
std::vector< DeviceAdditionListener > DeviceAdditionListenerList
Typedef for NetDevice addition listeners container.
Ptr< NetDevice > GetDevice(uint32_t index) const
Retrieve the index-th NetDevice associated to this node.
static bool ChecksumEnabled(void)
void NotifyDeviceAdded(Ptr< NetDevice > device)
Notifies all the DeviceAdditionListener about the new device added.
ProtocolHandler handler
the protocol handler
std::vector< Ptr< NetDevice > > m_devices
Devices associated to this node.
void(* Time)(Time oldValue, Time newValue)
TracedValue callback signature for Time.
void UnregisterProtocolHandler(ProtocolHandler handler)
a polymophic address class
std::vector< struct Node::ProtocolHandlerEntry > ProtocolHandlerList
Typedef for protocol handlers container.
bool NonPromiscReceiveFromDevice(Ptr< NetDevice > device, Ptr< const Packet > packet, uint16_t protocol, const Address &from)
Receive a packet from a device in non-promiscuous mode.
uint32_t m_sid
System id for this node.
virtual void DoDispose(void)
The dispose method.
Ptr< NetDevice > device
the NetDevice
Ptr< Application > GetApplication(uint32_t index) const
Retrieve the index-th Application associated to this node.
uint16_t protocol
the protocol number
Time GetLocalTime(void) const
In the future, ns3 nodes may have clock that returned a local time different from the virtual time Si...
ProtocolHandlerList m_handlers
Protocol handlers in the node.
void RegisterDeviceAdditionListener(DeviceAdditionListener listener)
Every class exported by the ns3 library is enclosed in the ns3 namespace.
uint32_t GetSystemId(void) const
std::vector< Ptr< Application > > m_applications
Applications associated to this node.
uint32_t m_id
Node id for this node.
void RegisterProtocolHandler(ProtocolHandler handler, uint16_t protocolType, Ptr< NetDevice > device, bool promiscuous=false)
static TypeId GetTypeId(void)
Get the type ID.
bool ReceiveFromDevice(Ptr< NetDevice > device, Ptr< const Packet >, uint16_t protocol, const Address &from, const Address &to, NetDevice::PacketType packetType, bool promisc)
Receive a packet from a device.
uint32_t AddDevice(Ptr< NetDevice > device)
Associate a NetDevice to this node.
void UnregisterDeviceAdditionListener(DeviceAdditionListener listener)
Callback< void, Ptr< NetDevice > > DeviceAdditionListener
A callback invoked whenever a device is added to a node.
uint32_t GetNApplications(void) const
A base class which provides memory management and object aggregation.
Callback< void, Ptr< NetDevice >, Ptr< const Packet >, uint16_t, const Address &, const Address &, NetDevice::PacketType > ProtocolHandler
A protocol handler.
PacketType
Packet types are used as they are in Linux.
a unique identifier for an interface.
void Construct(void)
Finish node's construction by setting the correct node ID.
uint32_t GetNDevices(void) const
bool promiscuous
true if it is a promiscuous handler
bool PromiscReceiveFromDevice(Ptr< NetDevice > device, Ptr< const Packet > packet, uint16_t protocol, const Address &from, const Address &to, NetDevice::PacketType packetType)
Receive a packet from a device in promiscuous mode.