an Ipv4 Interface which uses ARP More...
#include <arp-ipv4-interface.h>
Public Member Functions | |
ArpIpv4Interface () | |
virtual | ~ArpIpv4Interface () |
void | SetNode (Ptr< Node > node) |
void | SetDevice (Ptr< NetDevice > device) |
virtual Ptr< NetDevice > | GetDevice (void) const |
Static Public Member Functions | |
static TypeId | GetTypeId (void) |
This method returns the TypeId associated to ns3::Ipv4Interface. | |
Private Member Functions | |
virtual void | SendTo (Ptr< Packet > p, Ipv4Address dest) |
virtual void | DoDispose (void) |
void | DoSetup (void) |
Private Attributes | |
Ptr< Node > | m_node |
Ptr< NetDevice > | m_device |
Ptr< ArpCache > | m_cache |
an Ipv4 Interface which uses ARP
If you need to use ARP on top of a specific NetDevice, you can use this Ipv4Interface subclass to wrap it for the Ipv4 class when calling Ipv4::AggregateObject.
Definition at line 40 of file arp-ipv4-interface.h.
ns3::ArpIpv4Interface::ArpIpv4Interface | ( | ) |
Definition at line 52 of file arp-ipv4-interface.cc.
References NS_LOG_FUNCTION.
ns3::ArpIpv4Interface::~ArpIpv4Interface | ( | ) | [virtual] |
Definition at line 59 of file arp-ipv4-interface.cc.
References NS_LOG_FUNCTION.
void ns3::ArpIpv4Interface::DoDispose | ( | void | ) | [private, virtual] |
This method is called by Object::Dispose or by the object's destructor, whichever comes first.
Subclasses are expected to implement their real destruction code in an overriden version of this method and chain up to their parent's implementation once they are done. i.e., for simplicity, the destructor of every subclass should be empty and its content should be moved to the associated DoDispose method.
Reimplemented from ns3::Ipv4Interface.
Definition at line 65 of file arp-ipv4-interface.cc.
References m_cache, m_device, and NS_LOG_FUNCTION.
void ns3::ArpIpv4Interface::DoSetup | ( | void | ) | [private] |
Definition at line 93 of file arp-ipv4-interface.cc.
References m_cache, m_device, and m_node.
Referenced by SetDevice(), and SetNode().
Implements ns3::Ipv4Interface.
Definition at line 87 of file arp-ipv4-interface.cc.
References m_device.
Referenced by SendTo().
TypeId ns3::ArpIpv4Interface::GetTypeId | ( | void | ) | [static] |
This method returns the TypeId associated to ns3::Ipv4Interface.
This object is accessible through the following paths with Config::Set and Config::Connect:
No Attributes defined for this type.
No TraceSources defined for this type.
Reimplemented from ns3::Ipv4Interface.
Definition at line 39 of file arp-ipv4-interface.cc.
References m_cache, and ns3::TypeId::SetParent().
void ns3::ArpIpv4Interface::SendTo | ( | Ptr< Packet > | p, | |
Ipv4Address | dest | |||
) | [private, virtual] |
Implements ns3::Ipv4Interface.
Definition at line 104 of file arp-ipv4-interface.cc.
References ns3::Ipv4Interface::GetAddress(), ns3::Ipv4Interface::GetBroadcast(), GetDevice(), ns3::Ipv4Interface::GetNetworkMask(), ns3::Ipv4Address::IsBroadcast(), ns3::Ipv4Address::IsMulticast(), ns3::Ipv4Address::IsSubnetDirectedBroadcast(), m_cache, m_device, m_node, NS_ASSERT, NS_ASSERT_MSG, NS_LOG_FUNCTION, NS_LOG_LOGIC, ns3::NetDevice::PACKET_HOST, and ns3::Ipv4L3Protocol::PROT_NUMBER.
Definition at line 80 of file arp-ipv4-interface.cc.
Definition at line 74 of file arp-ipv4-interface.cc.
Ptr<ArpCache> ns3::ArpIpv4Interface::m_cache [private] |
Definition at line 59 of file arp-ipv4-interface.h.
Referenced by DoDispose(), DoSetup(), GetTypeId(), and SendTo().
Ptr<NetDevice> ns3::ArpIpv4Interface::m_device [private] |
Definition at line 58 of file arp-ipv4-interface.h.
Referenced by DoDispose(), DoSetup(), GetDevice(), SendTo(), and SetDevice().
Ptr<Node> ns3::ArpIpv4Interface::m_node [private] |
Definition at line 57 of file arp-ipv4-interface.h.