The IPv6 representation of a network interface. More...
#include <ipv6-interface.h>
Public Member Functions | |
Ipv6Interface () | |
Constructs an Ipv6Interface. | |
virtual | ~Ipv6Interface () |
Destructor. | |
void | SetNode (Ptr< Node > node) |
Set node associated with interface. | |
void | SetDevice (Ptr< NetDevice > device) |
Set the NetDevice. | |
virtual Ptr< NetDevice > | GetDevice () const |
Get the NetDevice. | |
void | SetMetric (uint16_t metric) |
Set the metric. | |
uint16_t | GetMetric () const |
Get the metric. | |
bool | IsUp () const |
Is the interface UP ? | |
bool | IsDown () const |
Is the interface DOWN ? | |
void | SetUp () |
Enable this interface. | |
void | SetDown () |
Disable this interface. | |
bool | IsForwarding () const |
If the interface allows forwarding packets. | |
void | SetForwarding (bool forward) |
Set forwarding enabled or not. | |
void | SetCurHopLimit (uint8_t curHopLimit) |
Set the current hop limit. | |
uint8_t | GetCurHopLimit () const |
Get the current hop limit value. | |
void | SetBaseReachableTime (uint16_t baseReachableTime) |
Set the base reachable time. | |
uint16_t | GetBaseReachableTime () const |
Get the base reachable time. | |
void | SetReachableTime (uint16_t reachableTime) |
Set the reachable time. | |
uint16_t | GetReachableTime () const |
Get the reachable time. | |
void | SetRetransTimer (uint16_t retransTimer) |
Set the retransmission timer. | |
uint16_t | GetRetransTimer () const |
Get the retransmission timer. | |
void | Send (Ptr< Packet > p, Ipv6Address dest) |
Send a packet through this interface. | |
bool | AddAddress (Ipv6InterfaceAddress iface) |
Add an IPv6 address. | |
Ipv6InterfaceAddress | GetLinkLocalAddress () const |
Get link-local address from IPv6 interface. | |
Ipv6InterfaceAddress | GetAddress (uint32_t index) const |
Get an address from IPv6 interface. | |
Ipv6InterfaceAddress | GetAddressMatchingDestination (Ipv6Address dst) |
Get an address which is in the same network prefix as destination. | |
uint32_t | GetNAddresses (void) const |
Get number of addresses on this IPv6 interface. | |
Ipv6InterfaceAddress | RemoveAddress (uint32_t index) |
Remove an address from interface. | |
void | SetState (Ipv6Address address, Ipv6InterfaceAddress::State_e state) |
Update state of an interface address. | |
void | SetNsDadUid (Ipv6Address address, uint32_t uid) |
Update NS DAD packet UID of an interface address. | |
Static Public Member Functions | |
static TypeId | GetTypeId () |
Get the type ID. | |
Protected Member Functions | |
virtual void | DoDispose () |
Dispose this object. | |
Private Member Functions | |
void | DoSetup () |
Initialize interface. | |
Private Attributes | |
Ipv6InterfaceAddressList | m_addresses |
The addresses assigned to this interface. | |
bool | m_ifup |
The state of this interface. | |
bool | m_forwarding |
Forwarding state. | |
uint16_t | m_metric |
The metric. | |
Ptr< Node > | m_node |
Node associated with this interface. | |
Ptr< NetDevice > | m_device |
NetDevice associated with this interface. | |
Ptr< NdiscCache > | m_ndCache |
Neighbor cache. | |
uint8_t | m_curHopLimit |
Current hop limit. | |
uint16_t | m_baseReachableTime |
Base value used for computing the random reachable time value (in millisecond). | |
uint16_t | m_reachableTime |
Reachable time (in millisecond). The time a neighbor is considered reachable after receiving a reachability confirmation. | |
uint16_t | m_retransTimer |
Retransmission timer (in millisecond). Time between retransmission of NS. |
The IPv6 representation of a network interface.
By default IPv6 interfaces are created in the "down" state with IP "fe80::1" and a /64 prefix. Before becoming useable, the user must invoke SetUp on them once the final IPv6 address and mask has been set.
bool ns3::Ipv6Interface::AddAddress | ( | Ipv6InterfaceAddress | iface | ) |
Add an IPv6 address.
iface | address to add |
Ipv6InterfaceAddress ns3::Ipv6Interface::GetAddress | ( | uint32_t | index | ) | const |
Get an address from IPv6 interface.
index | index |
Ipv6InterfaceAddress ns3::Ipv6Interface::GetAddressMatchingDestination | ( | Ipv6Address | dst | ) |
Get an address which is in the same network prefix as destination.
dst | destination address |
uint16_t ns3::Ipv6Interface::GetBaseReachableTime | ( | ) | const |
Get the base reachable time.
uint8_t ns3::Ipv6Interface::GetCurHopLimit | ( | ) | const |
Get the current hop limit value.
Ipv6InterfaceAddress ns3::Ipv6Interface::GetLinkLocalAddress | ( | ) | const |
Get link-local address from IPv6 interface.
uint16_t ns3::Ipv6Interface::GetMetric | ( | ) | const |
Get the metric.
uint32_t ns3::Ipv6Interface::GetNAddresses | ( | void | ) | const |
Get number of addresses on this IPv6 interface.
uint16_t ns3::Ipv6Interface::GetReachableTime | ( | ) | const |
Get the reachable time.
uint16_t ns3::Ipv6Interface::GetRetransTimer | ( | ) | const |
Get the retransmission timer.
static TypeId ns3::Ipv6Interface::GetTypeId | ( | void | ) | [static] |
Get the type ID.
This method returns the TypeId associated to ns3::Ipv6Interface.
No Attributes defined for this type.
No TraceSources defined for this type.
Reimplemented from ns3::Object.
bool ns3::Ipv6Interface::IsDown | ( | ) | const |
Is the interface DOWN ?
bool ns3::Ipv6Interface::IsForwarding | ( | ) | const |
If the interface allows forwarding packets.
bool ns3::Ipv6Interface::IsUp | ( | ) | const |
Is the interface UP ?
Ipv6InterfaceAddress ns3::Ipv6Interface::RemoveAddress | ( | uint32_t | index | ) |
Remove an address from interface.
index | index to remove |
void ns3::Ipv6Interface::Send | ( | Ptr< Packet > | p, | |
Ipv6Address | dest | |||
) |
Send a packet through this interface.
p | packet to send | |
dest | next hop address of packet. |
void ns3::Ipv6Interface::SetBaseReachableTime | ( | uint16_t | baseReachableTime | ) |
Set the base reachable time.
baseReachableTime | the value to set |
void ns3::Ipv6Interface::SetCurHopLimit | ( | uint8_t | curHopLimit | ) |
Set the current hop limit.
curHopLimit | the value to set |
void ns3::Ipv6Interface::SetForwarding | ( | bool | forward | ) |
Set forwarding enabled or not.
forward | forwarding state |
void ns3::Ipv6Interface::SetMetric | ( | uint16_t | metric | ) |
Set the metric.
metric | configured routing metric (cost) of this interface |
Set node associated with interface.
node | node |
void ns3::Ipv6Interface::SetNsDadUid | ( | Ipv6Address | address, | |
uint32_t | uid | |||
) |
Update NS DAD packet UID of an interface address.
address | IPv6 address | |
uid | packet UID |
void ns3::Ipv6Interface::SetReachableTime | ( | uint16_t | reachableTime | ) |
Set the reachable time.
reachableTime | value to set |
void ns3::Ipv6Interface::SetRetransTimer | ( | uint16_t | retransTimer | ) |
Set the retransmission timer.
retransTimer | value to set |
void ns3::Ipv6Interface::SetState | ( | Ipv6Address | address, | |
Ipv6InterfaceAddress::State_e | state | |||
) |
Update state of an interface address.
address | IPv6 address | |
state | new state |