The IPv6 representation of a network interface. More...
#include <introspected-doxygen.h>
Inheritance diagram for ns3::Ipv6Interface:Public Member Functions | |
| Ipv6Interface () | |
| Constructs an Ipv6Interface. | |
| virtual | ~Ipv6Interface () |
| Destructor. | |
| bool | AddAddress (Ipv6InterfaceAddress iface) |
| Add an IPv6 address. More... | |
| Ipv6InterfaceAddress | GetAddress (uint32_t index) const |
| Get an address from IPv6 interface. More... | |
| Ipv6InterfaceAddress | GetAddressMatchingDestination (Ipv6Address dst) |
| Get an address which is in the same network prefix as destination. More... | |
| uint16_t | GetBaseReachableTime () const |
| Get the base reachable time. More... | |
| uint8_t | GetCurHopLimit () const |
| Get the current hop limit value. More... | |
| virtual Ptr< NetDevice > | GetDevice () const |
| Get the NetDevice. More... | |
| Ipv6InterfaceAddress | GetLinkLocalAddress () const |
| Get link-local address from IPv6 interface. More... | |
| uint16_t | GetMetric () const |
| Get the metric. More... | |
| uint32_t | GetNAddresses (void) const |
| Get number of addresses on this IPv6 interface. More... | |
| uint16_t | GetReachableTime () const |
| Get the reachable time. More... | |
| uint16_t | GetRetransTimer () const |
| Get the retransmission timer. More... | |
| bool | IsDown () const |
| Is the interface DOWN ? More... | |
| bool | IsForwarding () const |
| If the interface allows forwarding packets. More... | |
| bool | IsUp () const |
| Is the interface UP ? More... | |
| Ipv6InterfaceAddress | RemoveAddress (uint32_t index) |
| Remove an address from interface. More... | |
| void | Send (Ptr< Packet > p, Ipv6Address dest) |
| Send a packet through this interface. More... | |
| void | SetBaseReachableTime (uint16_t baseReachableTime) |
| Set the base reachable time. More... | |
| void | SetCurHopLimit (uint8_t curHopLimit) |
| Set the current hop limit. More... | |
| void | SetDevice (Ptr< NetDevice > device) |
| Set the NetDevice. More... | |
| void | SetDown () |
| Disable this interface. | |
| void | SetForwarding (bool forward) |
| Set forwarding enabled or not. More... | |
| void | SetMetric (uint16_t metric) |
| Set the metric. More... | |
| void | SetNode (Ptr< Node > node) |
| Set node associated with interface. More... | |
| void | SetNsDadUid (Ipv6Address address, uint32_t uid) |
| Update NS DAD packet UID of an interface address. More... | |
| void | SetReachableTime (uint16_t reachableTime) |
| Set the reachable time. More... | |
| void | SetRetransTimer (uint16_t retransTimer) |
| Set the retransmission timer. More... | |
| void | SetState (Ipv6Address address, Ipv6InterfaceAddress::State_e state) |
| Update state of an interface address. More... | |
| void | SetUp () |
| Enable this interface. | |
Public Member Functions inherited from ns3::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 | Initialize (void) |
Public Member Functions inherited from ns3::SimpleRefCount< Object, ObjectBase, ObjectDeleter > | |
| SimpleRefCount (const SimpleRefCount &o) | |
| uint32_t | GetReferenceCount (void) const |
| SimpleRefCount & | operator= (const SimpleRefCount &o) |
| void | Ref (void) const |
| void | Unref (void) const |
Public Member Functions inherited from ns3::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 TypeId | GetTypeId () |
| Get the type ID. More... | |
Static Public Member Functions inherited from ns3::Object | |
| static TypeId | GetTypeId (void) |
Static Public Member Functions inherited from ns3::SimpleRefCount< Object, ObjectBase, ObjectDeleter > | |
| static void | Cleanup (void) |
Static Public Member Functions inherited from ns3::ObjectBase | |
| static TypeId | GetTypeId (void) |
Protected Member Functions | |
| virtual void | DoDispose () |
| Dispose this object. | |
Protected Member Functions inherited from ns3::Object | |
| Object (const Object &o) | |
| virtual void | DoInitialize (void) |
| virtual void | NotifyNewAggregate (void) |
Protected Member Functions inherited from ns3::ObjectBase | |
| void | ConstructSelf (const AttributeConstructionList &attributes) |
| virtual void | NotifyConstructionCompleted (void) |
Private Types | |
|
typedef std::list < Ipv6InterfaceAddress > | Ipv6InterfaceAddressList |
|
typedef std::list < Ipv6InterfaceAddress > ::const_iterator | Ipv6InterfaceAddressListCI |
|
typedef std::list < Ipv6InterfaceAddress > ::iterator | Ipv6InterfaceAddressListI |
Private Member Functions | |
| void | DoSetup () |
| Initialize interface. | |
Private Attributes | |
| Ipv6InterfaceAddressList | m_addresses |
| The addresses assigned to this interface. | |
| uint16_t | m_baseReachableTime |
| Base value used for computing the random reachable time value (in millisecond). | |
| uint8_t | m_curHopLimit |
| Current hop limit. | |
| Ptr< NetDevice > | m_device |
| NetDevice associated with this interface. | |
| bool | m_forwarding |
| Forwarding state. | |
| bool | m_ifup |
| The state of this interface. | |
| uint16_t | m_metric |
| The metric. | |
| Ptr< NdiscCache > | m_ndCache |
| Neighbor cache. | |
| Ptr< Node > | m_node |
| Node associated with this interface. | |
| 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.
ns3::Ipv6Interface is accessible through the following paths with Config::Set and Config::Connect:
No Attributes are defined for this type.
No TraceSources are defined for this type.
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.
Definition at line 49 of file ipv6-interface.h.
| bool ns3::Ipv6Interface::AddAddress | ( | Ipv6InterfaceAddress | iface | ) |
Add an IPv6 address.
| iface | address to add |
Definition at line 183 of file ipv6-interface.cc.
References ns3::Icmpv6L4Protocol::DoDAD(), ns3::Icmpv6L4Protocol::FunctionDadTimeout(), ns3::Ipv6InterfaceAddress::GetAddress(), ns3::Object::GetObject(), ns3::Ipv6Address::IsAny(), ns3::Ipv6Address::IsLocalhost(), m_addresses, m_node, NS_LOG_FUNCTION_NOARGS, ns3::Simulator::Schedule(), and ns3::Seconds().
Referenced by ns3::Ipv6L3Protocol::AddAddress(), and DoSetup().
| Ipv6InterfaceAddress ns3::Ipv6Interface::GetAddress | ( | uint32_t | index | ) | const |
Get an address from IPv6 interface.
| index | index |
Definition at line 236 of file ipv6-interface.cc.
References m_addresses, NS_ASSERT_MSG, and NS_LOG_FUNCTION.
Referenced by ns3::Icmpv6L4Protocol::FunctionDadTimeout(), ns3::Ipv6L3Protocol::GetAddress(), ns3::Icmpv6L4Protocol::HandleNS(), and ns3::Ipv6L3Protocol::RemoveAutoconfiguredAddress().
| Ipv6InterfaceAddress ns3::Ipv6Interface::GetAddressMatchingDestination | ( | Ipv6Address | dst | ) |
Get an address which is in the same network prefix as destination.
| dst | destination address |
Definition at line 291 of file ipv6-interface.cc.
References ns3::Ipv6InterfaceAddress::GetAddress(), ns3::Ipv6InterfaceAddress::GetPrefix(), ns3::Ipv6Prefix::IsMatch(), m_addresses, and NS_LOG_FUNCTION.
Referenced by ns3::Icmpv6L4Protocol::Lookup().
| uint16_t ns3::Ipv6Interface::GetBaseReachableTime | ( | ) | const |
Get the base reachable time.
Definition at line 399 of file ipv6-interface.cc.
References m_baseReachableTime, and NS_LOG_FUNCTION_NOARGS.
| uint8_t ns3::Ipv6Interface::GetCurHopLimit | ( | ) | const |
Get the current hop limit value.
Definition at line 387 of file ipv6-interface.cc.
References m_curHopLimit, and NS_LOG_FUNCTION_NOARGS.
Get the NetDevice.
Definition at line 123 of file ipv6-interface.cc.
References m_device, and NS_LOG_FUNCTION_NOARGS.
Referenced by ns3::Ipv6L3Protocol::AddAutoconfiguredAddress(), ns3::Icmpv6L4Protocol::DoDAD(), DoSetup(), ns3::Icmpv6L4Protocol::FunctionDadTimeout(), ns3::Ipv6L3Protocol::GetMtu(), ns3::Ipv6L3Protocol::GetNetDevice(), ns3::Icmpv6L4Protocol::HandleNA(), ns3::Icmpv6L4Protocol::HandleNS(), ns3::Icmpv6L4Protocol::HandleRA(), ns3::Icmpv6L4Protocol::HandleRedirection(), ns3::Icmpv6L4Protocol::HandleRS(), ns3::Ipv6EndPointDemux::Lookup(), ns3::Ipv6L3Protocol::Receive(), ns3::Icmpv6L4Protocol::Receive(), ns3::Icmpv6L4Protocol::ReceiveLLA(), ns3::Ipv6L3Protocol::RemoveAutoconfiguredAddress(), and Send().
| Ipv6InterfaceAddress ns3::Ipv6Interface::GetLinkLocalAddress | ( | ) | const |
Get link-local address from IPv6 interface.
Definition at line 219 of file ipv6-interface.cc.
References m_addresses, NS_ASSERT_MSG, and NS_LOG_FUNCTION_NOARGS.
Referenced by ns3::Icmpv6L4Protocol::HandleEchoRequest(), ns3::Icmpv6L4Protocol::HandleNS(), and ns3::Icmpv6L4Protocol::Lookup().
| uint16_t ns3::Ipv6Interface::GetMetric | ( | void | ) | const |
Get the metric.
Definition at line 135 of file ipv6-interface.cc.
References m_metric, and NS_LOG_FUNCTION_NOARGS.
Referenced by ns3::Ipv6L3Protocol::GetMetric().
| uint32_t ns3::Ipv6Interface::GetNAddresses | ( | void | ) | const |
Get number of addresses on this IPv6 interface.
Definition at line 258 of file ipv6-interface.cc.
References m_addresses, and NS_LOG_FUNCTION_NOARGS.
Referenced by ns3::Icmpv6L4Protocol::FunctionDadTimeout(), ns3::Ipv6L3Protocol::GetNAddresses(), ns3::Icmpv6L4Protocol::HandleNS(), ns3::Icmpv6L4Protocol::Lookup(), and ns3::Ipv6L3Protocol::RemoveAutoconfiguredAddress().
| uint16_t ns3::Ipv6Interface::GetReachableTime | ( | ) | const |
Get the reachable time.
Definition at line 411 of file ipv6-interface.cc.
References m_reachableTime, and NS_LOG_FUNCTION_NOARGS.
| uint16_t ns3::Ipv6Interface::GetRetransTimer | ( | ) | const |
Get the retransmission timer.
Definition at line 423 of file ipv6-interface.cc.
References m_retransTimer, and NS_LOG_FUNCTION_NOARGS.
|
static |
Get the type ID.
Definition at line 39 of file ipv6-interface.cc.
References ns3::TypeId::SetParent().
| bool ns3::Ipv6Interface::IsDown | ( | void | ) | const |
Is the interface DOWN ?
Definition at line 147 of file ipv6-interface.cc.
References m_ifup, and NS_LOG_FUNCTION_NOARGS.
| bool ns3::Ipv6Interface::IsForwarding | ( | void | ) | const |
If the interface allows forwarding packets.
Definition at line 171 of file ipv6-interface.cc.
References m_forwarding, and NS_LOG_FUNCTION_NOARGS.
| bool ns3::Ipv6Interface::IsUp | ( | void | ) | const |
Is the interface UP ?
Definition at line 141 of file ipv6-interface.cc.
References m_ifup, and NS_LOG_FUNCTION_NOARGS.
Referenced by ns3::Ipv6L3Protocol::IsUp(), ns3::Ipv6L3Protocol::Receive(), and Send().
| Ipv6InterfaceAddress ns3::Ipv6Interface::RemoveAddress | ( | uint32_t | index | ) |
Remove an address from interface.
| index | index to remove |
Definition at line 264 of file ipv6-interface.cc.
References m_addresses, NS_ASSERT_MSG, and NS_LOG_FUNCTION.
| 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. |
Definition at line 310 of file ipv6-interface.cc.
References GetDevice(), ns3::Object::GetObject(), ns3::Ipv6Address::IsMulticast(), IsUp(), m_addresses, m_device, m_ndCache, m_node, NS_ASSERT, NS_ASSERT_MSG, NS_LOG_FUNCTION, NS_LOG_LOGIC, ns3::NetDevice::PACKET_HOST, and ns3::Ipv6L3Protocol::PROT_NUMBER.
Referenced by ns3::Icmpv6L4Protocol::DoDAD(), ns3::Icmpv6L4Protocol::HandleNA(), ns3::Icmpv6L4Protocol::HandleNS(), and ns3::Icmpv6L4Protocol::ReceiveLLA().
| void ns3::Ipv6Interface::SetBaseReachableTime | ( | uint16_t | baseReachableTime | ) |
Set the base reachable time.
| baseReachableTime | the value to set |
Definition at line 393 of file ipv6-interface.cc.
References m_baseReachableTime, and NS_LOG_FUNCTION.
| void ns3::Ipv6Interface::SetCurHopLimit | ( | uint8_t | curHopLimit | ) |
Set the current hop limit.
| curHopLimit | the value to set |
Definition at line 381 of file ipv6-interface.cc.
References m_curHopLimit, and NS_LOG_FUNCTION.
Set the NetDevice.
| device | NetDevice |
Definition at line 116 of file ipv6-interface.cc.
References DoSetup(), m_device, and NS_LOG_FUNCTION.
| void ns3::Ipv6Interface::SetForwarding | ( | bool | forward | ) |
Set forwarding enabled or not.
| forward | forwarding state |
Definition at line 177 of file ipv6-interface.cc.
References m_forwarding, and NS_LOG_FUNCTION.
Referenced by ns3::Ipv6L3Protocol::SetForwarding().
| void ns3::Ipv6Interface::SetMetric | ( | uint16_t | metric | ) |
Set the metric.
| metric | configured routing metric (cost) of this interface |
Definition at line 129 of file ipv6-interface.cc.
References m_metric, and NS_LOG_FUNCTION.
Referenced by ns3::Ipv6L3Protocol::SetMetric().
Set node associated with interface.
| node | node |
Definition at line 109 of file ipv6-interface.cc.
References DoSetup(), m_node, and NS_LOG_FUNCTION.
| void ns3::Ipv6Interface::SetNsDadUid | ( | Ipv6Address | address, |
| uint32_t | uid | ||
| ) |
Update NS DAD packet UID of an interface address.
| address | IPv6 address |
| uid | packet UID |
Definition at line 444 of file ipv6-interface.cc.
References m_addresses, and NS_LOG_FUNCTION.
Referenced by ns3::Icmpv6L4Protocol::DoDAD().
| void ns3::Ipv6Interface::SetReachableTime | ( | uint16_t | reachableTime | ) |
Set the reachable time.
| reachableTime | value to set |
Definition at line 405 of file ipv6-interface.cc.
References m_reachableTime, and NS_LOG_FUNCTION.
| void ns3::Ipv6Interface::SetRetransTimer | ( | uint16_t | retransTimer | ) |
Set the retransmission timer.
| retransTimer | value to set |
Definition at line 417 of file ipv6-interface.cc.
References m_retransTimer, and NS_LOG_FUNCTION.
| void ns3::Ipv6Interface::SetState | ( | Ipv6Address | address, |
| Ipv6InterfaceAddress::State_e | state | ||
| ) |
Update state of an interface address.
| address | IPv6 address |
| state | new state |
Definition at line 429 of file ipv6-interface.cc.
References m_addresses, and NS_LOG_FUNCTION.
Referenced by ns3::Icmpv6L4Protocol::FunctionDadTimeout(), and ns3::Icmpv6L4Protocol::HandleNA().