The IPv4 representation of a network interface.
More...
#include <ipv4-interface.h>
List of all members.
Detailed Description
The IPv4 representation of a network interface.
This class roughly corresponds to the struct in_device of Linux; the main purpose is to provide address-family specific information (addresses) about an interface.
By default, Ipv4 interface are created in the "down" state no IP addresses. Before becoming useable, the user must add an address of some type and invoke Setup on them.
Member Function Documentation
- Parameters:
-
- Returns:
- true if succeeded
virtual void ns3::Ipv4Interface::DoDispose |
( |
void |
|
) |
[protected, 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.
It is safe to call GetObject from within this method.
Reimplemented from ns3::Object.
Ptr<ArpCache> ns3::Ipv4Interface::GetArpCache |
( |
|
) |
const |
- Returns:
- ARP cache used by this interface
- Returns:
- the underlying NetDevice. This method cannot return zero.
uint16_t ns3::Ipv4Interface::GetMetric |
( |
void |
|
) |
const |
- Returns:
- configured routing metric (cost) of this interface
Note: This is synonymous to the Metric value that ifconfig prints out. It is used by ns-3 global routing, but other routing daemons may choose to ignore it.
uint32_t ns3::Ipv4Interface::GetNAddresses |
( |
void |
|
) |
const |
- Returns:
- the number of Ipv4InterfaceAddresss stored on this interface
static TypeId ns3::Ipv4Interface::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:
-
/NodeList/[i]/$ns3::Ipv4L3Protocol/InterfaceList/[i]
-
/NodeList/[i]/DeviceList/[i]/$ns3::BaseStationNetDevice/BsIpcsPacketClassifier/$ns3::Ipv4/$ns3::Ipv4L3Protocol/InterfaceList/[i]
-
/NodeList/[i]/DeviceList/[i]/$ns3::BaseStationNetDevice/BsIpcsPacketClassifier/$ns3::Ipv4Interface
-
/NodeList/[i]/DeviceList/[i]/$ns3::BaseStationNetDevice/BsIpcsPacketClassifier/$ns3::Ipv4L3Protocol/InterfaceList/[i]
-
/NodeList/[i]/DeviceList/[i]/$ns3::BaseStationNetDevice/LinkManager/$ns3::Ipv4/$ns3::Ipv4L3Protocol/InterfaceList/[i]
-
/NodeList/[i]/DeviceList/[i]/$ns3::BaseStationNetDevice/LinkManager/$ns3::Ipv4Interface
-
/NodeList/[i]/DeviceList/[i]/$ns3::BaseStationNetDevice/LinkManager/$ns3::Ipv4L3Protocol/InterfaceList/[i]
-
/NodeList/[i]/DeviceList/[i]/$ns3::BaseStationNetDevice/SSManager/$ns3::Ipv4/$ns3::Ipv4L3Protocol/InterfaceList/[i]
-
/NodeList/[i]/DeviceList/[i]/$ns3::BaseStationNetDevice/SSManager/$ns3::Ipv4Interface
-
/NodeList/[i]/DeviceList/[i]/$ns3::BaseStationNetDevice/SSManager/$ns3::Ipv4L3Protocol/InterfaceList/[i]
-
/NodeList/[i]/DeviceList/[i]/$ns3::BaseStationNetDevice/ServiceFlowManager/$ns3::Ipv4/$ns3::Ipv4L3Protocol/InterfaceList/[i]
-
/NodeList/[i]/DeviceList/[i]/$ns3::BaseStationNetDevice/ServiceFlowManager/$ns3::Ipv4Interface
-
/NodeList/[i]/DeviceList/[i]/$ns3::BaseStationNetDevice/ServiceFlowManager/$ns3::Ipv4L3Protocol/InterfaceList/[i]
-
/NodeList/[i]/DeviceList/[i]/$ns3::SubscriberStationNetDevice/Classifier/$ns3::Ipv4/$ns3::Ipv4L3Protocol/InterfaceList/[i]
-
/NodeList/[i]/DeviceList/[i]/$ns3::SubscriberStationNetDevice/Classifier/$ns3::Ipv4Interface
-
/NodeList/[i]/DeviceList/[i]/$ns3::SubscriberStationNetDevice/Classifier/$ns3::Ipv4L3Protocol/InterfaceList/[i]
-
/NodeList/[i]/DeviceList/[i]/$ns3::SubscriberStationNetDevice/LinkManager/$ns3::Ipv4/$ns3::Ipv4L3Protocol/InterfaceList/[i]
-
/NodeList/[i]/DeviceList/[i]/$ns3::SubscriberStationNetDevice/LinkManager/$ns3::Ipv4Interface
-
/NodeList/[i]/DeviceList/[i]/$ns3::SubscriberStationNetDevice/LinkManager/$ns3::Ipv4L3Protocol/InterfaceList/[i]
-
/NodeList/[i]/DeviceList/[i]/$ns3::SubscriberStationNetDevice/SSScheduler/$ns3::Ipv4/$ns3::Ipv4L3Protocol/InterfaceList/[i]
-
/NodeList/[i]/DeviceList/[i]/$ns3::SubscriberStationNetDevice/SSScheduler/$ns3::Ipv4Interface
-
/NodeList/[i]/DeviceList/[i]/$ns3::SubscriberStationNetDevice/SSScheduler/$ns3::Ipv4L3Protocol/InterfaceList/[i]
-
/NodeList/[i]/DeviceList/[i]/$ns3::WimaxNetDevice/$ns3::BaseStationNetDevice/BsIpcsPacketClassifier/$ns3::Ipv4/$ns3::Ipv4L3Protocol/InterfaceList/[i]
-
/NodeList/[i]/DeviceList/[i]/$ns3::WimaxNetDevice/$ns3::BaseStationNetDevice/BsIpcsPacketClassifier/$ns3::Ipv4Interface
-
/NodeList/[i]/DeviceList/[i]/$ns3::WimaxNetDevice/$ns3::BaseStationNetDevice/BsIpcsPacketClassifier/$ns3::Ipv4L3Protocol/InterfaceList/[i]
-
/NodeList/[i]/DeviceList/[i]/$ns3::WimaxNetDevice/$ns3::BaseStationNetDevice/LinkManager/$ns3::Ipv4/$ns3::Ipv4L3Protocol/InterfaceList/[i]
-
/NodeList/[i]/DeviceList/[i]/$ns3::WimaxNetDevice/$ns3::BaseStationNetDevice/LinkManager/$ns3::Ipv4Interface
-
/NodeList/[i]/DeviceList/[i]/$ns3::WimaxNetDevice/$ns3::BaseStationNetDevice/LinkManager/$ns3::Ipv4L3Protocol/InterfaceList/[i]
-
/NodeList/[i]/DeviceList/[i]/$ns3::WimaxNetDevice/$ns3::BaseStationNetDevice/SSManager/$ns3::Ipv4/$ns3::Ipv4L3Protocol/InterfaceList/[i]
-
/NodeList/[i]/DeviceList/[i]/$ns3::WimaxNetDevice/$ns3::BaseStationNetDevice/SSManager/$ns3::Ipv4Interface
-
/NodeList/[i]/DeviceList/[i]/$ns3::WimaxNetDevice/$ns3::BaseStationNetDevice/SSManager/$ns3::Ipv4L3Protocol/InterfaceList/[i]
-
/NodeList/[i]/DeviceList/[i]/$ns3::WimaxNetDevice/$ns3::BaseStationNetDevice/ServiceFlowManager/$ns3::Ipv4/$ns3::Ipv4L3Protocol/InterfaceList/[i]
-
/NodeList/[i]/DeviceList/[i]/$ns3::WimaxNetDevice/$ns3::BaseStationNetDevice/ServiceFlowManager/$ns3::Ipv4Interface
-
/NodeList/[i]/DeviceList/[i]/$ns3::WimaxNetDevice/$ns3::BaseStationNetDevice/ServiceFlowManager/$ns3::Ipv4L3Protocol/InterfaceList/[i]
-
/NodeList/[i]/DeviceList/[i]/$ns3::WimaxNetDevice/$ns3::SubscriberStationNetDevice/Classifier/$ns3::Ipv4/$ns3::Ipv4L3Protocol/InterfaceList/[i]
-
/NodeList/[i]/DeviceList/[i]/$ns3::WimaxNetDevice/$ns3::SubscriberStationNetDevice/Classifier/$ns3::Ipv4Interface
-
/NodeList/[i]/DeviceList/[i]/$ns3::WimaxNetDevice/$ns3::SubscriberStationNetDevice/Classifier/$ns3::Ipv4L3Protocol/InterfaceList/[i]
-
/NodeList/[i]/DeviceList/[i]/$ns3::WimaxNetDevice/$ns3::SubscriberStationNetDevice/LinkManager/$ns3::Ipv4/$ns3::Ipv4L3Protocol/InterfaceList/[i]
-
/NodeList/[i]/DeviceList/[i]/$ns3::WimaxNetDevice/$ns3::SubscriberStationNetDevice/LinkManager/$ns3::Ipv4Interface
-
/NodeList/[i]/DeviceList/[i]/$ns3::WimaxNetDevice/$ns3::SubscriberStationNetDevice/LinkManager/$ns3::Ipv4L3Protocol/InterfaceList/[i]
-
/NodeList/[i]/DeviceList/[i]/$ns3::WimaxNetDevice/$ns3::SubscriberStationNetDevice/SSScheduler/$ns3::Ipv4/$ns3::Ipv4L3Protocol/InterfaceList/[i]
-
/NodeList/[i]/DeviceList/[i]/$ns3::WimaxNetDevice/$ns3::SubscriberStationNetDevice/SSScheduler/$ns3::Ipv4Interface
-
/NodeList/[i]/DeviceList/[i]/$ns3::WimaxNetDevice/$ns3::SubscriberStationNetDevice/SSScheduler/$ns3::Ipv4L3Protocol/InterfaceList/[i]
-
/NodeList/[i]/DeviceList/[i]/$ns3::WimaxNetDevice/BandwidthManager/$ns3::Ipv4/$ns3::Ipv4L3Protocol/InterfaceList/[i]
-
/NodeList/[i]/DeviceList/[i]/$ns3::WimaxNetDevice/BandwidthManager/$ns3::Ipv4Interface
-
/NodeList/[i]/DeviceList/[i]/$ns3::WimaxNetDevice/BandwidthManager/$ns3::Ipv4L3Protocol/InterfaceList/[i]
-
/NodeList/[i]/DeviceList/[i]/$ns3::WimaxNetDevice/BurstProfileManager/$ns3::Ipv4/$ns3::Ipv4L3Protocol/InterfaceList/[i]
-
/NodeList/[i]/DeviceList/[i]/$ns3::WimaxNetDevice/BurstProfileManager/$ns3::Ipv4Interface
-
/NodeList/[i]/DeviceList/[i]/$ns3::WimaxNetDevice/BurstProfileManager/$ns3::Ipv4L3Protocol/InterfaceList/[i]
-
/NodeList/[i]/DeviceList/[i]/$ns3::WimaxNetDevice/ConnectionManager/$ns3::Ipv4/$ns3::Ipv4L3Protocol/InterfaceList/[i]
-
/NodeList/[i]/DeviceList/[i]/$ns3::WimaxNetDevice/ConnectionManager/$ns3::Ipv4Interface
-
/NodeList/[i]/DeviceList/[i]/$ns3::WimaxNetDevice/ConnectionManager/$ns3::Ipv4L3Protocol/InterfaceList/[i]
Attributes defined for this type:
-
ArpCache: The arp cache for this ipv4 interface
No TraceSources defined for this type.
Reimplemented from ns3::Object.
bool ns3::Ipv4Interface::IsDown |
( |
void |
|
) |
const |
- Returns:
- true if this interface is disabled, false otherwise.
bool ns3::Ipv4Interface::IsForwarding |
( |
void |
|
) |
const |
- Returns:
- true if this interface is enabled for IP forwarding of input datagrams
bool ns3::Ipv4Interface::IsUp |
( |
void |
|
) |
const |
These are IP interface states and may be distinct from NetDevice states, such as found in real implementations (where the device may be down but IP interface state is still up).
- Returns:
- true if this interface is enabled, false otherwise.
- Parameters:
-
| p | packet to send |
| dest | next hop address of packet. |
This method will eventually call the private SendTo method which must be implemented by subclasses.
void ns3::Ipv4Interface::SetDown |
( |
void |
|
) |
|
void ns3::Ipv4Interface::SetForwarding |
( |
bool |
val |
) |
|
- Parameters:
-
| val | Whether to enable or disable IP forwarding for input datagrams |
void ns3::Ipv4Interface::SetMetric |
( |
uint16_t |
metric |
) |
|
- Parameters:
-
| metric | configured routing metric (cost) of this interface |
Note: This is synonymous to the Metric value that ifconfig prints out. It is used by ns-3 global routing, but other routing daemons choose to ignore it.
void ns3::Ipv4Interface::SetUp |
( |
void |
|
) |
|
The documentation for this class was generated from the following files:
- src/internet-stack/ipv4-interface.h
- doc/introspected-doxygen.h