|
A Discrete-Event Network Simulator
|
API
|
Go to the documentation of this file.
22 #ifndef IPV4_INTERFACE_H
23 #define IPV4_INTERFACE_H
27 #include "ns3/object.h"
35 class Ipv4InterfaceAddress;
38 class TrafficControlLayer;
122 bool IsUp (
void)
const;
Ipv4Interface & operator=(const Ipv4Interface &o)
Assignment operator.
a unique identifier for an interface.
Ptr< TrafficControlLayer > m_tc
The associated TrafficControlLayer.
Ptr< Node > m_node
The associated node.
uint16_t GetMetric(void) const
bool IsUp(void) const
These are IP interface states and may be distinct from NetDevice states, such as found in real implem...
Every class exported by the ns3 library is enclosed in the ns3 namespace.
uint16_t m_metric
Interface metric.
Ptr< NetDevice > GetDevice(void) const
The IPv4 representation of a network interface.
void SetArpCache(Ptr< ArpCache > arpCache)
Set ARP cache used by this interface.
Ptr< ArpCache > GetArpCache() const
bool IsForwarding(void) const
Ipv4 addresses are stored in host order in this class.
uint32_t GetNAddresses(void) const
bool m_ifup
The state of this interface.
std::list< Ipv4InterfaceAddress >::iterator Ipv4InterfaceAddressListI
Const Container Iterator for the Ipv4InterfaceAddresses.
void DoSetup(void)
Initialize interface.
void SetMetric(uint16_t metric)
virtual void DoDispose(void)
Destructor implementation.
void SetDown(void)
Disable this interface.
void SetForwarding(bool val)
a class to store IPv4 address information on an interface
A base class which provides memory management and object aggregation.
Ipv4Interface()
By default, Ipv4 interface are created in the "down" state with no IP addresses.
void Send(Ptr< Packet > p, const Ipv4Header &hdr, Ipv4Address dest)
void SetUp(void)
Enable this interface.
Ipv4Interface(const Ipv4Interface &o)
Copy constructor.
Ipv4InterfaceAddress RemoveAddress(uint32_t index)
bool AddAddress(Ipv4InterfaceAddress address)
Ipv4InterfaceAddress GetAddress(uint32_t index) const
Ptr< ArpCache > m_cache
ARP cache.
std::list< Ipv4InterfaceAddress >::const_iterator Ipv4InterfaceAddressListCI
Container Iterator for the Ipv4InterfaceAddresses.
void SetNode(Ptr< Node > node)
Set node associated with interface.
void SetTrafficControl(Ptr< TrafficControlLayer > tc)
Set the TrafficControlLayer.
static TypeId GetTypeId(void)
Get the type ID.
Ptr< NetDevice > m_device
The associated NetDevice.
bool m_forwarding
Forwarding state.
std::list< Ipv4InterfaceAddress > Ipv4InterfaceAddressList
Container for the Ipv4InterfaceAddresses.
void SetDevice(Ptr< NetDevice > device)
Set the NetDevice.
Ipv4InterfaceAddressList m_ifaddrs
Address list.