#include <node.h>
Classes | |
struct | ProtocolHandlerEntry |
Public Types | |
typedef Callback< void, Ptr < NetDevice > > | DeviceAdditionListener |
typedef Callback< void, Ptr < NetDevice >, Ptr< const Packet >, uint16_t, const Address &, const Address &, NetDevice::PacketType > | ProtocolHandler |
Public Member Functions | |
Node () | |
Node (uint32_t systemId) | |
virtual | ~Node () |
uint32_t | AddApplication (Ptr< Application > application) |
uint32_t | AddDevice (Ptr< NetDevice > device) |
Ptr< Application > | GetApplication (uint32_t index) const |
Ptr< NetDevice > | GetDevice (uint32_t index) const |
uint32_t | GetId (void) const |
uint32_t | GetNApplications (void) const |
uint32_t | GetNDevices (void) const |
uint32_t | GetSystemId (void) const |
void | RegisterDeviceAdditionListener (DeviceAdditionListener listener) |
void | RegisterProtocolHandler (ProtocolHandler handler, uint16_t protocolType, Ptr< NetDevice > device, bool promiscuous=false) |
void | UnregisterDeviceAdditionListener (DeviceAdditionListener listener) |
void | UnregisterProtocolHandler (ProtocolHandler handler) |
![]() | |
Object () | |
virtual | ~Object () |
void | AggregateObject (Ptr< Object > other) |
void | Dispose (void) |
AggregateIterator | GetAggregateIterator (void) const |
virtual TypeId | GetInstanceTypeId (void) const |
template<typename T > | |
Ptr< T > | GetObject (void) const |
template<typename T > | |
Ptr< T > | GetObject (TypeId tid) const |
void | Start (void) |
![]() | |
SimpleRefCount () | |
SimpleRefCount (const SimpleRefCount &o) | |
uint32_t | GetReferenceCount (void) const |
SimpleRefCount & | operator= (const SimpleRefCount &o) |
void | Ref (void) const |
void | Unref (void) const |
![]() | |
virtual | ~ObjectBase () |
void | GetAttribute (std::string name, AttributeValue &value) const |
bool | GetAttributeFailSafe (std::string name, AttributeValue &attribute) const |
void | SetAttribute (std::string name, const AttributeValue &value) |
bool | SetAttributeFailSafe (std::string name, const AttributeValue &value) |
bool | TraceConnect (std::string name, std::string context, const CallbackBase &cb) |
bool | TraceConnectWithoutContext (std::string name, const CallbackBase &cb) |
bool | TraceDisconnect (std::string name, std::string context, const CallbackBase &cb) |
bool | TraceDisconnectWithoutContext (std::string name, const CallbackBase &cb) |
Static Public Member Functions | |
static bool | ChecksumEnabled (void) |
static TypeId | GetTypeId (void) |
Protected Member Functions | |
virtual void | DoDispose (void) |
virtual void | DoStart (void) |
![]() | |
Object (const Object &o) | |
virtual void | NotifyNewAggregate (void) |
Private Types | |
typedef std::vector < DeviceAdditionListener > | DeviceAdditionListenerList |
typedef std::vector< struct Node::ProtocolHandlerEntry > | ProtocolHandlerList |
Private Member Functions | |
void | Construct (void) |
bool | NonPromiscReceiveFromDevice (Ptr< NetDevice > device, Ptr< const Packet >, uint16_t protocol, const Address &from) |
void | NotifyDeviceAdded (Ptr< NetDevice > device) |
bool | PromiscReceiveFromDevice (Ptr< NetDevice > device, Ptr< const Packet >, uint16_t protocol, const Address &from, const Address &to, NetDevice::PacketType packetType) |
bool | ReceiveFromDevice (Ptr< NetDevice > device, Ptr< const Packet >, uint16_t protocol, const Address &from, const Address &to, NetDevice::PacketType packetType, bool promisc) |
Private Attributes | |
std::vector< Ptr< Application > > | m_applications |
DeviceAdditionListenerList | m_deviceAdditionListeners |
std::vector< Ptr< NetDevice > > | m_devices |
ProtocolHandlerList | m_handlers |
uint32_t | m_id |
uint32_t | m_sid |
This class holds together:
Every Node created is added to the NodeList automatically.
ns3::Node is accessible through the following paths with Config::Set and Config::Connect:
No TraceSources are defined for this type.
typedef Callback<void,Ptr<NetDevice> > ns3::Node::DeviceAdditionListener |
|
private |
typedef Callback<void,Ptr<NetDevice>, Ptr<const Packet>,uint16_t,const Address &, const Address &, NetDevice::PacketType> ns3::Node::ProtocolHandler |
A protocol handler
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. Note: If the L2 protocol does not use L2 addresses, the address reported here is the value of device->GetAddress(). |
packetType | type of packet received (broadcast/multicast/unicast/otherhost); Note: this value is only valid for promiscuous mode protocol handlers. |
|
private |
ns3::Node::Node | ( | ) |
Definition at line 69 of file node.cc.
References Construct(), and NS_LOG_FUNCTION.
ns3::Node::Node | ( | uint32_t | systemId | ) |
systemId | a unique integer used for parallel simulations. |
Definition at line 77 of file node.cc.
References Construct(), and NS_LOG_FUNCTION.
|
virtual |
Definition at line 92 of file node.cc.
References NS_LOG_FUNCTION.
uint32_t ns3::Node::AddApplication | ( | Ptr< Application > | application | ) |
application | Application to associate to this node. |
Associated this Application to this Node.
Definition at line 141 of file node.cc.
References GetId(), m_applications, NS_LOG_FUNCTION, ns3::Simulator::ScheduleWithContext(), ns3::Seconds(), ns3::Application::SetNode(), and ns3::Object::Start().
Referenced by ns3::EpcHelper::AddEnb(), ns3::aodv::LoopbackTestCase::DoRun(), Ns3TcpNoDelayTestCase::DoRun(), Ns3TcpSocketTestCase1::DoRun(), NscTcpLossTestCase1::DoRun(), Ns3TcpSocketTestCase2::DoRun(), NscTcpLossTestCase2::DoRun(), Ns3TcpCwndTestCase1::DoRun(), ns3::EpcS1uUlTestCase::DoRun(), Ns3TcpCwndTestCase2::DoRun(), ns3::EpcHelper::EpcHelper(), ns3::Ping6Helper::Install(), ns3::UdpServerHelper::Install(), ns3::UdpClientHelper::Install(), ns3::UdpTraceClientHelper::Install(), ns3::V4PingHelper::InstallPriv(), ns3::PacketSinkHelper::InstallPriv(), ns3::UdpEchoServerHelper::InstallPriv(), ns3::BulkSendHelper::InstallPriv(), ns3::OnOffHelper::InstallPriv(), ns3::UdpEchoClientHelper::InstallPriv(), and main().
device | NetDevice to associate to this node. |
Associate this device to this node.
Definition at line 112 of file node.cc.
References GetId(), m_devices, ns3::MakeCallback(), NonPromiscReceiveFromDevice(), NotifyDeviceAdded(), NS_LOG_FUNCTION, ns3::Simulator::ScheduleWithContext(), ns3::Seconds(), ns3::NetDevice::SetIfIndex(), ns3::NetDevice::SetNode(), ns3::NetDevice::SetReceiveCallback(), and ns3::Object::Start().
Referenced by TcpTestCase::AddSimpleNetDevice(), AddSimpleNetDevice(), TcpTestCase::AddSimpleNetDevice6(), BuildSimpleTopology(), ns3::MeshHelper::CreateInterface(), ns3::WifiTest::CreateOne(), ns3::InterferenceHelperSequenceTest::CreateOne(), PointToPointTest::DoRun(), IpAddressHelperTestCasev6::DoRun(), StaticRoutingSlash32TestCase::DoRun(), ns3::Ipv4L3ProtocolTestCase::DoRun(), UdpClientServerTestCase::DoRun(), ns3::Ipv6L3ProtocolTestCase::DoRun(), Ipv6PacketInfoTagTest::DoRun(), Ipv4HeaderTest::DoRun(), Ipv4PacketInfoTagTest::DoRun(), Ipv4RawSocketImplTest::DoRun(), Ipv4FragmentationTest::DoRun(), Ipv6FragmentationTest::DoRun(), UdpTraceClientServerTestCase::DoRun(), UdpSocketImplTest::DoRun(), UdpEchoClientSetFillTestCase::DoRun(), GlobalRoutingSlash32TestCase::DoRun(), ns3::Bug555TestCase::DoRun(), Udp6SocketImplTest::DoRun(), ns3::EpcHelper::EpcHelper(), ns3::BridgeHelper::Install(), ns3::TapBridgeHelper::Install(), ns3::WaveformGeneratorHelper::Install(), ns3::PointToPointHelper::Install(), ns3::AdhocAlohaNoackIdealPhyHelper::Install(), ns3::SpectrumAnalyzerHelper::Install(), ns3::WifiHelper::Install(), ns3::MeshHelper::Install(), ns3::WimaxHelper::Install(), ns3::UanHelper::Install(), ns3::EmuHelper::InstallPriv(), ns3::CsmaHelper::InstallPriv(), ns3::LteSimpleHelper::InstallSingleEnbDevice(), ns3::LteHelper::InstallSingleEnbDevice(), ns3::LteSimpleHelper::InstallSingleUeDevice(), main(), ns3::Ipv4L3Protocol::SetupLoopback(), ns3::Ipv6L3Protocol::SetupLoopback(), and Tunnel::Tunnel().
|
static |
Definition at line 260 of file node.cc.
References ns3::g_checksumEnabled, ns3::BooleanValue::Get(), ns3::GlobalValue::GetValue(), and NS_LOG_FUNCTION_NOARGS.
Referenced by ns3::CsmaNetDevice::AddHeader(), ns3::Ipv4L3Protocol::BuildHeader(), ns3::Ipv4L3Protocol::DoFragmentation(), ns3::UdpL4Protocol::Receive(), ns3::TcpL4Protocol::Receive(), ns3::Ipv4L3Protocol::Receive(), ns3::CsmaNetDevice::Receive(), ns3::V4Ping::Send(), ns3::UdpL4Protocol::Send(), ns3::TcpL4Protocol::Send(), ns3::Icmpv4L4Protocol::SendMessage(), ns3::TcpL4Protocol::SendPacket(), and ns3::Ipv4L3Protocol::SendWithHeader().
|
private |
Definition at line 86 of file node.cc.
References ns3::NodeList::Add(), m_id, and NS_LOG_FUNCTION.
Referenced by Node().
|
protectedvirtual |
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.
Definition at line 167 of file node.cc.
References ns3::Object::Dispose(), m_applications, m_deviceAdditionListeners, m_devices, m_handlers, and NS_LOG_FUNCTION.
|
protectedvirtual |
This method is called only once by Object::Start. If the user calls Object::Start multiple times, DoStart is called only the first time.
Subclasses are expected to override this method and chain up to their parent's implementation once they are done. It is safe to call GetObject and AggregateObject from within this method.
Reimplemented from ns3::Object.
Definition at line 191 of file node.cc.
References m_applications, m_devices, NS_LOG_FUNCTION, and ns3::Object::Start().
Ptr< Application > ns3::Node::GetApplication | ( | uint32_t | index | ) | const |
index |
Definition at line 152 of file node.cc.
References m_applications, NS_ASSERT_MSG, and NS_LOG_FUNCTION.
Referenced by ns3::EpcHelper::ActivateEpsBearer(), ns3::EpcHelper::AddEnb(), ns3::OnOffHelper::AssignStreams(), and ns3::V4Ping::GetApplicationId().
index | the index of the requested NetDevice |
The indexes used by the GetDevice method start at one and end at GetNDevices ()
Definition at line 126 of file node.cc.
References m_devices, NS_ASSERT_MSG, and NS_LOG_FUNCTION.
Referenced by ns3::Ipv4NixVectorRouting::BFS(), ns3::Socket::BindToNetDevice(), ns3::Ipv4NixVectorRouting::BuildNixVector(), ns3::Ipv4NixVectorRouting::BuildNixVectorLocal(), ns3::AnimationInterface::ConnectLte(), ns3::GlobalRouter::DiscoverLSAs(), ns3::PacketSocket::DoBind(), ns3::AcousticModemEnergyTestCase::DoRun(), ns3::InterferenceHelperSequenceTest::DoRun(), ns3::UanHelper::EnableAscii(), ns3::AsciiTraceHelperForDevice::EnableAsciiImpl(), ns3::AthstatsHelper::EnableAthstats(), ns3::PcapHelperForDevice::EnablePcap(), ns3::Ipv4NixVectorRouting::FindNetDeviceForNixIndex(), ns3::Ipv4NixVectorRouting::FindTotalNeighbors(), ns3::PacketSocket::GetMinMtu(), ns3::AnimationInterface::GetNetDeviceFromContext(), ns3::PacketSocket::GetSockName(), ns3::AcousticModemEnergyModel::HandleEnergyDepletion(), ns3::Ipv4NixVectorRouting::NetDeviceIsBridged(), ns3::GlobalRouter::NetDeviceIsBridged(), PrintGnuplottableEnbListToFile(), PrintGnuplottableUeListToFile(), ns3::MpiInterface::ReceiveMessages(), ns3::Ipv4NixVectorRouting::RouteInput(), ns3::Ipv4NixVectorRouting::RouteOutput(), ns3::AcousticModemEnergyTestCase::SendOnePacket(), ns3::AcousticModemEnergyDepletionTestCase::SendOnePacket(), ns3::PacketSocket::SendTo(), ns3::LteEnbRrc::SendUeConfigurationUpdate(), ns3::Ipv4L3Protocol::SetupLoopback(), ns3::Ipv6L3Protocol::SetupLoopback(), ns3::AnimationInterface::StartAnimation(), ns3::PyViz::TraceNetDevRxCommon(), and ns3::PyViz::TraceNetDevTxCommon().
uint32_t ns3::Node::GetId | ( | void | ) | const |
This unique id happens to be also the index of the Node into the NodeList.
Definition at line 98 of file node.cc.
References m_id, and NS_LOG_FUNCTION.
Referenced by AddApplication(), AddDevice(), ns3::GlobalRouter::AnotherRouterOnLink(), ns3::Ipv4NixVectorRouting::BFS(), ns3::Ipv4NixVectorRouting::BuildNixVector(), ns3::Ipv4NixVectorRouting::BuildNixVectorLocal(), ns3::AcousticModemEnergyModel::ChangeState(), ns3::AnimationInterface::ConnectLteEnb(), ns3::AnimationInterface::ConnectLteUe(), ns3::MobilityHelper::CourseChanged(), ns3::Ipv4GlobalRoutingHelper::Create(), ns3::GlobalRouteManagerImpl::DeleteGlobalRoutes(), ns3::AnimationInterface::DevTxTrace(), ns3::GlobalRouter::DiscoverLSAs(), WifiMsduAggregatorThroughputTest::DoRun(), Ipv4FragmentationTest::DoRun(), Ipv6FragmentationTest::DoRun(), ns3::UanHelper::EnableAscii(), ns3::AsciiTraceHelperForDevice::EnableAsciiImpl(), ns3::EmuHelper::EnableAsciiInternal(), ns3::PointToPointHelper::EnableAsciiInternal(), ns3::CsmaHelper::EnableAsciiInternal(), ns3::YansWifiPhyHelper::EnableAsciiInternal(), ns3::WimaxHelper::EnableAsciiInternal(), ns3::AsciiTraceHelperForIpv4::EnableAsciiIpv4Impl(), ns3::InternetStackHelper::EnableAsciiIpv4Internal(), ns3::AsciiTraceHelperForIpv6::EnableAsciiIpv6Impl(), ns3::InternetStackHelper::EnableAsciiIpv6Internal(), ns3::AthstatsHelper::EnableAthstats(), ns3::PcapHelperForDevice::EnablePcap(), ns3::PcapHelperForIpv4::EnablePcapIpv4(), ns3::PcapHelperForIpv6::EnablePcapIpv6(), ns3::UanPhyGen::EnergyDepletionHandler(), ns3::GlobalRouter::FindDesignatedRouterForLink(), ns3::GlobalRouter::FindInterfaceForDevice(), ns3::PcapHelper::GetFilenameFromDevice(), ns3::AsciiTraceHelper::GetFilenameFromDevice(), ns3::PcapHelper::GetFilenameFromInterfacePair(), ns3::AsciiTraceHelper::GetFilenameFromInterfacePair(), ns3::AnimationInterface::GetIpv4Address(), ns3::AnimationInterface::GetIpv4RoutingTable(), ns3::Ipv4NixVectorRouting::GetNixVector(), ns3::PyViz::GetPacketDropSamples(), ns3::AnimationInterface::GetPosition(), ns3::AnimPacketInfo::GetRxInfo(), ns3::PyViz::GetTransmissionSamples(), ns3::AcousticModemEnergyModel::HandleEnergyDepletion(), ns3::ArpCache::HandleWaitReplyTimeout(), ns3::BridgeHelper::Install(), ns3::TapBridgeHelper::Install(), ns3::SpectrumAnalyzerHelper::Install(), ns3::Ipv4L3Protocol::IpForward(), ns3::Ipv6L3Protocol::IpForward(), ns3::Ipv4L3Protocol::IpMulticastForward(), ns3::Ipv6L3Protocol::IpMulticastForward(), ns3::Ipv4FlowProbe::Ipv4FlowProbe(), ns3::ArpL3Protocol::Lookup(), main(), ns3::AnimationInterface::MobilityAutoCheck(), ns3::AnimationInterface::MobilityCourseChangeTrace(), ns3::AnimationInterface::OutputCsmaPacket(), ns3::AnimationInterface::OutputWirelessPacket(), ns3::GlobalRouter::ProcessBridgedBroadcastLink(), ns3::AnimPacketInfo::ProcessRxBegin(), ns3::AnimPacketInfo::ProcessRxEnd(), ns3::GlobalRouter::ProcessSingleBroadcastLink(), ns3::ArpL3Protocol::Receive(), ns3::Ipv6L3Protocol::Receive(), ns3::Ipv4L3Protocol::Receive(), ns3::TapBridge::ReceiveFromBridgedDevice(), ReceiveFromDevice(), ns3::MpiInterface::ReceiveMessages(), ns3::AnimPacketInfo::RemoveRxInfo(), ns3::Ipv4ListRouting::RouteInput(), ns3::Ipv6ListRouting::RouteInput(), ns3::Ipv4NixVectorRouting::RouteInput(), ns3::olsr::RoutingProtocol::RouteInput(), ns3::olsr::RoutingProtocol::RouteOutput(), ns3::SimpleChannel::Send(), ns3::ErrorChannel::Send(), ns3::V4Ping::Send(), ns3::LoopbackNetDevice::Send(), ns3::ArpL3Protocol::SendArpReply(), ns3::ArpL3Protocol::SendArpRequest(), Ipv4RawSocketImplTest::SendData(), UdpSocketImplTest::SendData(), Udp6SocketImplTest::SendData(), Ipv4RawSocketImplTest::SendData_IpHdr(), Ipv4HeaderTest::SendData_IpHdr_Dscp(), ns3::LoopbackNetDevice::SendFrom(), ns3::AnimationInterface::SetConstantPosition(), ns3::AnimationInterface::SetLinkDescription(), ns3::GlobalRoutingLSA::SetNode(), ns3::AnimationInterface::SetNodeColor(), ns3::AnimationInterface::SetNodeDescription(), showPosition(), ns3::GlobalRouteManagerImpl::SPFAddASExternal(), ns3::GlobalRouteManagerImpl::SPFIntraAddRouter(), ns3::GlobalRouteManagerImpl::SPFIntraAddStub(), ns3::GlobalRouteManagerImpl::SPFIntraAddTransit(), ns3::AnimationInterface::StartAnimation(), ns3::EmuNetDevice::StartDevice(), ns3::TapBridge::StartTapDevice(), ns3::SingleModelSpectrumChannel::StartTx(), ns3::MultiModelSpectrumChannel::StartTx(), ns3::PyViz::TraceNetDevRxCommon(), ns3::AnimationInterface::TrackIpv4Route(), ns3::PointToPointRemoteChannel::TransmitStart(), ns3::AnimationInterface::UpdateLinkDescription(), ns3::AnimationInterface::UpdateNodeColor(), ns3::AnimationInterface::UpdateNodeDescription(), ns3::AnimationInterface::UpdatePosition(), ns3::AnimationInterface::WifiPhyTxBeginTrace(), and WifiInterferenceTestCase::WifiSimpleInterference().
uint32_t ns3::Node::GetNApplications | ( | void | ) | const |
Definition at line 160 of file node.cc.
References m_applications, and NS_LOG_FUNCTION.
Referenced by ns3::EpcHelper::ActivateEpsBearer(), ns3::EpcHelper::AddEnb(), ns3::OnOffHelper::AssignStreams(), and ns3::V4Ping::GetApplicationId().
uint32_t ns3::Node::GetNDevices | ( | void | ) | const |
Definition at line 134 of file node.cc.
References m_devices, and NS_LOG_FUNCTION.
Referenced by ns3::Ipv4NixVectorRouting::BFS(), ns3::Socket::BindToNetDevice(), ns3::Ipv4NixVectorRouting::BuildNixVector(), ns3::Ipv4NixVectorRouting::BuildNixVectorLocal(), ns3::AnimationInterface::ConnectLte(), ns3::GlobalRouter::DiscoverLSAs(), ns3::UanHelper::EnableAscii(), ns3::AsciiTraceHelperForDevice::EnableAsciiImpl(), ns3::AthstatsHelper::EnableAthstats(), ns3::PcapHelperForDevice::EnablePcap(), ns3::Ipv4NixVectorRouting::FindNetDeviceForNixIndex(), ns3::Ipv4NixVectorRouting::FindTotalNeighbors(), ns3::PacketSocket::GetMinMtu(), ns3::Ipv4NixVectorRouting::NetDeviceIsBridged(), ns3::GlobalRouter::NetDeviceIsBridged(), PrintGnuplottableEnbListToFile(), PrintGnuplottableUeListToFile(), ns3::MpiInterface::ReceiveMessages(), ns3::PacketSocket::SendTo(), ns3::LteEnbRrc::SendUeConfigurationUpdate(), ns3::Ipv4L3Protocol::SetupLoopback(), ns3::Ipv6L3Protocol::SetupLoopback(), and ns3::AnimationInterface::StartAnimation().
uint32_t ns3::Node::GetSystemId | ( | void | ) | const |
Definition at line 105 of file node.cc.
References m_sid, and NS_LOG_FUNCTION.
Referenced by ns3::DistributedSimulatorImpl::CalculateLookAhead(), ns3::GlobalRouteManagerImpl::InitializeRoutes(), ns3::PointToPointHelper::Install(), and ns3::MpiInterface::SendPacket().
|
static |
Reimplemented from ns3::Object.
Definition at line 47 of file node.cc.
References ns3::TypeId::ATTR_GET, m_applications, m_devices, m_id, ns3::MakeObjectVectorAccessor(), and ns3::TypeId::SetParent().
|
private |
Definition at line 277 of file node.cc.
References ns3::NetDevice::GetAddress(), NS_LOG_FUNCTION, and ReceiveFromDevice().
Referenced by AddDevice().
Definition at line 344 of file node.cc.
References m_deviceAdditionListeners, and NS_LOG_FUNCTION.
Referenced by AddDevice().
|
private |
Definition at line 269 of file node.cc.
References NS_LOG_FUNCTION, and ReceiveFromDevice().
Referenced by RegisterProtocolHandler().
|
private |
Definition at line 285 of file node.cc.
References ns3::Simulator::GetContext(), GetId(), ns3::NetDevice::GetIfIndex(), ns3::Object::GetInstanceTypeId(), ns3::TypeId::GetName(), ns3::Packet::GetUid(), m_handlers, NS_ASSERT_MSG, NS_LOG_DEBUG, and NS_LOG_FUNCTION.
Referenced by NonPromiscReceiveFromDevice(), and PromiscReceiveFromDevice().
void ns3::Node::RegisterDeviceAdditionListener | ( | DeviceAdditionListener | listener | ) |
listener | the listener to add |
Add a new listener to the list of listeners for the device-added event. When a new listener is added, it is notified of the existance of all already-added devices to make discovery of devices easier.
Definition at line 317 of file node.cc.
References m_deviceAdditionListeners, m_devices, and NS_LOG_FUNCTION.
void ns3::Node::RegisterProtocolHandler | ( | ProtocolHandler | handler, |
uint16_t | protocolType, | ||
Ptr< NetDevice > | device, | ||
bool | promiscuous = false |
||
) |
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 |
Definition at line 211 of file node.cc.
References ns3::Node::ProtocolHandlerEntry::device, ns3::Node::ProtocolHandlerEntry::handler, m_devices, m_handlers, ns3::MakeCallback(), NS_LOG_FUNCTION, PromiscReceiveFromDevice(), ns3::Node::ProtocolHandlerEntry::promiscuous, ns3::Node::ProtocolHandlerEntry::protocol, and ns3::NetDevice::SetPromiscReceiveCallback().
Referenced by ns3::BridgeNetDevice::AddBridgePort(), ns3::MeshPointDevice::AddInterface(), ns3::Ipv4L3Protocol::AddInterface(), ns3::Ipv6L3Protocol::AddInterface(), ns3::PacketSocket::DoBind(), ns3::Ipv4L3Protocol::SetupLoopback(), and ns3::Ipv6L3Protocol::SetupLoopback().
void ns3::Node::UnregisterDeviceAdditionListener | ( | DeviceAdditionListener | listener | ) |
listener | the listener to remove |
Remove an existing listener from the list of listeners for the device-added event.
Definition at line 329 of file node.cc.
References m_deviceAdditionListeners, and NS_LOG_FUNCTION.
void ns3::Node::UnregisterProtocolHandler | ( | ProtocolHandler | handler | ) |
handler | the handler to unregister |
After this call returns, the input handler will never be invoked anymore.
Definition at line 245 of file node.cc.
References m_handlers, and NS_LOG_FUNCTION.
Referenced by ns3::PacketSocket::Close().
|
private |
Definition at line 228 of file node.h.
Referenced by AddApplication(), DoDispose(), DoStart(), GetApplication(), GetNApplications(), and GetTypeId().
|
private |
Definition at line 230 of file node.h.
Referenced by DoDispose(), NotifyDeviceAdded(), RegisterDeviceAdditionListener(), and UnregisterDeviceAdditionListener().
Definition at line 227 of file node.h.
Referenced by AddDevice(), DoDispose(), DoStart(), GetDevice(), GetNDevices(), GetTypeId(), RegisterDeviceAdditionListener(), and RegisterProtocolHandler().
|
private |
Definition at line 229 of file node.h.
Referenced by DoDispose(), ReceiveFromDevice(), RegisterProtocolHandler(), and UnregisterProtocolHandler().
|
private |
Definition at line 225 of file node.h.
Referenced by Construct(), GetId(), and GetTypeId().
|
private |
Definition at line 226 of file node.h.
Referenced by GetSystemId().