An optimization of the ND protocol for 6LoWPANs. More...
#include "sixlowpan-nd-protocol.h"
Classes | |
| struct | AddressPendingRegistration |
| Struct holding data for the address currently being registered. More... | |
| struct | SixLowPanPendingRa |
| Struct holding data about a pending RA being processed. More... | |
| class | SixLowPanRaEntry |
| RA advertised from routers for 6LoWPAN ND. More... | |
| struct | SixLowPanRegisteredAddress |
| Struct holding data about registered addresses. More... | |
Public Types | |
| enum | RegStatus { SUCCESS = 0x0 , DUPLICATE_ADDRESS , NEIGHBOR_CACHE_FULL , MOVED , REMOVED , VALIDATION_REQUEST , DUPLICATE_SOURCE_ADDRESS , INVALID_SOURCE_ADDRESS , REGISTERED_ADDRESS_TOPOLOGICALLY_INCORRECT , SIXLBR_REGISTRY_SATURATED , VALIDATION_FAILED } |
| 6LoWPAN-ND EARO registration status codes More... | |
| Public Types inherited from ns3::IpL4Protocol | |
| typedef Callback< void, Ptr< Packet >, Ipv4Address, Ipv4Address, uint8_t, Ptr< Ipv4Route > > | DownTargetCallback |
| callback to send packets over IPv4 | |
| typedef Callback< void, Ptr< Packet >, Ipv6Address, Ipv6Address, uint8_t, Ptr< Ipv6Route > > | DownTargetCallback6 |
| callback to send packets over IPv6 | |
| enum | RxStatus { RX_OK , RX_CSUM_FAILED , RX_ENDPOINT_CLOSED , RX_ENDPOINT_UNREACH } |
| Rx status codes. More... | |
Public Member Functions | |
| SixLowPanNdProtocol () | |
| Constructor. | |
| ~SixLowPanNdProtocol () override | |
| Destructor. | |
| void | AddAdvertisedContext (Ptr< SixLowPanNetDevice > device, Ipv6Prefix context) |
| Add a context to be advertised on an interface (6LBR). | |
| int64_t | AssignStreams (int64_t stream) |
| Assign a fixed random variable stream number to the random variables used by this model. | |
| void | CreateBindingTable (Ptr< NetDevice > device, Ptr< Ipv6Interface > interface) |
| Create and register a binding table for the given device and interface. | |
| void | DoInitialize () override |
| Initialize() implementation. | |
| Ptr< SixLowPanNdBindingTable > | FindBindingTable (Ptr< Ipv6Interface > interface) |
| Find the binding table corresponding to the IPv6 interface. | |
| void | FunctionDadTimeout (Ipv6Interface *interface, Ipv6Address addr) override |
| Function called when DAD timeout. | |
| bool | IsBorderRouterOnInterface (Ptr< SixLowPanNetDevice > device) const |
| Checks if an interface is set as 6LBR. | |
| bool | Lookup (Ptr< Packet > p, const Ipv6Header &ipHeader, Ipv6Address dst, Ptr< NetDevice > device, Ptr< NdiscCache > cache, Address *hardwareDestination) override |
| Lookup in the ND cache for the IPv6 address (similar as ARP protocol). | |
| void | NotifyNewAggregate () override |
| This method is called by AggregateObject and completes the aggregation by setting the node in the ICMPv6 stack and adding ICMPv6 factory to IPv6 stack connected to the node. | |
| enum IpL4Protocol::RxStatus | Receive (Ptr< Packet > p, const Ipv6Header &header, Ptr< Ipv6Interface > interface) override |
| Receive method. | |
| void | RemoveAdvertisedContext (Ptr< SixLowPanNetDevice > device, Ipv6Prefix context) |
| Remove a context to be advertised on an interface (6LBR). | |
| void | SendSixLowPanMulticastRS (Ipv6Address src, Address hardwareAddress) |
| Send a Multicast RS (+ 6CIO) (RFC6775 5.3). | |
| void | SendSixLowPanNaWithEaro (Ipv6Address src, Ipv6Address dst, Ipv6Address target, uint16_t time, const std::vector< uint8_t > &rovr, Ptr< NetDevice > sixDevice, uint8_t status) |
| Send a NA for 6LoWPAN ND (+ EARO). | |
| void | SendSixLowPanNsWithEaro (Ipv6Address addrToRegister, Ipv6Address dst, Address dstMac, uint16_t time, const std::vector< uint8_t > &rovr, Ptr< NetDevice > sixDevice) |
| Send a NS for 6LoWPAN ND (+ EARO, SLLAO). | |
| void | SendSixLowPanRA (Ipv6Address src, Ipv6Address dst, Ptr< Ipv6Interface > interface) |
| Send a RA for 6LoWPAN ND (+ PIO, 6CO, 6CIO, ABRO, SLLAO). | |
| void | SetAdvertisedPrefix (Ptr< SixLowPanNetDevice > device, Ipv6Prefix prefix) |
| Set a prefix to be announced on an interface (6LBR). | |
| void | SetInterfaceAs6lbr (Ptr< SixLowPanNetDevice > device) |
| Set an interface to be used as a 6LBR. | |
| void | SetRovr (const std::vector< uint8_t > rovr) |
| Sets the ROVR for the node. | |
| Public Member Functions inherited from ns3::Icmpv6L4Protocol | |
| Icmpv6L4Protocol () | |
| Constructor. | |
| ~Icmpv6L4Protocol () override | |
| Destructor. | |
| int64_t | AssignStreams (int64_t stream) |
| Assign a fixed random variable stream number to the random variables used by this model. | |
| virtual Ptr< NdiscCache > | CreateCache (Ptr< NetDevice > device, Ptr< Ipv6Interface > interface) |
| Create a neighbor cache. | |
| void | DelayedSendMessage (Ptr< Packet > packet, Ipv6Address src, Ipv6Address dst, uint8_t ttl) |
| Helper function used during delayed solicitation. | |
| void | DoDAD (Ipv6Address target, Ptr< Ipv6Interface > interface) |
| Do the Duplication Address Detection (DAD). | |
| NdiscCache::Ipv6PayloadHeaderPair | ForgeEchoRequest (Ipv6Address src, Ipv6Address dst, uint16_t id, uint16_t seq, Ptr< Packet > data) |
| Forge an Echo Request. | |
| NdiscCache::Ipv6PayloadHeaderPair | ForgeNA (Ipv6Address src, Ipv6Address dst, Address *hardwareAddress, uint8_t flags) |
| Forge a Neighbor Advertisement. | |
| NdiscCache::Ipv6PayloadHeaderPair | ForgeNS (Ipv6Address src, Ipv6Address dst, Ipv6Address target, Address hardwareAddress) |
| Forge a Neighbor Solicitation. | |
| NdiscCache::Ipv6PayloadHeaderPair | ForgeRS (Ipv6Address src, Ipv6Address dst, Address hardwareAddress) |
| Forge a Router Solicitation. | |
| Time | GetDadTimeout () const |
| Get the DAD timeout. | |
| Time | GetDelayFirstProbe () const |
| Neighbor Discovery node constants : delay for the first probe. | |
| uint8_t | GetMaxMulticastSolicit () const |
| Neighbor Discovery node constants: max multicast solicitations. | |
| uint8_t | GetMaxUnicastSolicit () const |
| Neighbor Discovery node constants: max unicast solicitations. | |
| Ptr< Node > | GetNode () |
| Get the node. | |
| int | GetProtocolNumber () const override |
| Get the protocol number. | |
| Time | GetReachableTime () const |
| Neighbor Discovery node constants: reachable time. | |
| Time | GetRetransmissionTime () const |
| Neighbor Discovery node constants: retransmission timer. | |
| virtual int | GetVersion () const |
| Get the version of the protocol. | |
| bool | IsAlwaysDad () const |
| Is the node must do DAD. | |
| virtual bool | Lookup (Ipv6Address dst, Ptr< NetDevice > device, Ptr< NdiscCache > cache, Address *hardwareDestination) |
| Lookup in the ND cache for the IPv6 address. | |
| IpL4Protocol::RxStatus | Receive (Ptr< Packet > p, const Ipv4Header &header, Ptr< Ipv4Interface > interface) override |
| Receive method. | |
| void | SendEchoReply (Ipv6Address src, Ipv6Address dst, uint16_t id, uint16_t seq, Ptr< Packet > data) |
| Send a Echo Reply. | |
| void | SendErrorDestinationUnreachable (Ptr< Packet > malformedPacket, Ipv6Address dst, uint8_t code) |
| Send an error Destination Unreachable. | |
| void | SendErrorParameterError (Ptr< Packet > malformedPacket, Ipv6Address dst, uint8_t code, uint32_t ptr) |
| Send an error Parameter Error. | |
| void | SendErrorTimeExceeded (Ptr< Packet > malformedPacket, Ipv6Address dst, uint8_t code) |
| Send an error Time Exceeded. | |
| void | SendErrorTooBig (Ptr< Packet > malformedPacket, Ipv6Address dst, uint32_t mtu) |
| Send an error Too Big. | |
| void | SendMessage (Ptr< Packet > packet, Ipv6Address dst, Icmpv6Header &icmpv6Hdr, uint8_t ttl) |
| Send a packet via ICMPv6. | |
| void | SendMessage (Ptr< Packet > packet, Ipv6Address src, Ipv6Address dst, uint8_t ttl) |
| Send a packet via ICMPv6, note that packet already contains ICMPv6 header. | |
| void | SendNA (Ipv6Address src, Ipv6Address dst, Address *hardwareAddress, uint8_t flags) |
| Send a Neighbor Advertisement. | |
| virtual void | SendNS (Ipv6Address src, Ipv6Address dst, Ipv6Address target, Address hardwareAddress) |
| Send a Neighbor Solicitation. | |
| void | SendRedirection (Ptr< Packet > redirectedPacket, Ipv6Address src, Ipv6Address dst, Ipv6Address redirTarget, Ipv6Address redirDestination, Address redirHardwareTarget) |
| Send an ICMPv6 Redirection. | |
| void | SendRS (Ipv6Address src, Ipv6Address dst, Address hardwareAddress) |
| Send a Router Solicitation. | |
| void | SetDhcpv6Callback (Callback< void, uint32_t > cb) |
| Set DHCPv6 callback. | |
| void | SetNode (Ptr< Node > node) |
| Set the node. | |
| Public Member Functions inherited from ns3::IpL4Protocol | |
| ~IpL4Protocol () override | |
| virtual void | ReceiveIcmp (Ipv4Address icmpSource, uint8_t icmpTtl, uint8_t icmpType, uint8_t icmpCode, uint32_t icmpInfo, Ipv4Address payloadSource, Ipv4Address payloadDestination, const uint8_t payload[8]) |
| Called from lower-level layers to send the ICMP packet up in the stack. | |
| virtual void | ReceiveIcmp (Ipv6Address icmpSource, uint8_t icmpTtl, uint8_t icmpType, uint8_t icmpCode, uint32_t icmpInfo, Ipv6Address payloadSource, Ipv6Address payloadDestination, const uint8_t payload[8]) |
| Called from lower-level layers to send the ICMPv6 packet up in the stack. | |
| Public Member Functions inherited from ns3::Object | |
| Object () | |
| Caller graph was not generated because of its size. | |
| ~Object () override | |
| Destructor. | |
| void | AggregateObject (Ptr< Object > other) |
| Aggregate two Objects together. | |
| void | Dispose () |
| Dispose of this Object. | |
| AggregateIterator | GetAggregateIterator () const |
| Get an iterator to the Objects aggregated to this one. | |
| TypeId | GetInstanceTypeId () const final |
| Get the most derived TypeId for this Object. | |
| template<> | |
| Ptr< Object > | GetObject () const |
| Specialization of () for objects of type ns3::Object. | |
| template<typename T> | |
| Ptr< T > | GetObject () const |
| Get a pointer to the requested aggregated Object. | |
| template<> | |
| Ptr< Object > | GetObject (TypeId tid) const |
| Specialization of (TypeId tid) for objects of type ns3::Object. | |
| template<typename T> | |
| Ptr< T > | GetObject (TypeId tid) const |
| Get a pointer to the requested aggregated Object by TypeId. | |
| void | Initialize () |
| Invoke DoInitialize on all Objects aggregated to this one. | |
| bool | IsInitialized () const |
| Check if the object has been initialized. | |
| void | UnidirectionalAggregateObject (Ptr< Object > other) |
| Aggregate an Object to another Object. | |
| Public Member Functions inherited from ns3::SimpleRefCount< Object, ObjectBase, ObjectDeleter > | |
| SimpleRefCount () | |
| Default constructor. | |
| uint32_t | GetReferenceCount () const |
| Get the reference count of the object. | |
| SimpleRefCount & | operator= (const SimpleRefCount &o) |
| Assignment operator. | |
| void | Ref () const |
| Increment the reference count. | |
| void | Unref () const |
| Decrement the reference count. | |
| Public Member Functions inherited from ns3::ObjectBase | |
| virtual | ~ObjectBase () |
| Virtual destructor. | |
| void | GetAttribute (std::string name, AttributeValue &value, bool permissive=false) const |
| Get the value of an attribute, raising fatal errors if unsuccessful. | |
| bool | GetAttributeFailSafe (std::string name, AttributeValue &value) const |
| Get the value of an attribute without raising errors. | |
| void | SetAttribute (std::string name, const AttributeValue &value) |
| Set a single attribute, raising fatal errors if unsuccessful. | |
| bool | SetAttributeFailSafe (std::string name, const AttributeValue &value) |
| Set a single attribute without raising errors. | |
| bool | TraceConnect (std::string name, std::string context, const CallbackBase &cb) |
| Connect a TraceSource to a Callback with a context. | |
| bool | TraceConnectWithoutContext (std::string name, const CallbackBase &cb) |
| Connect a TraceSource to a Callback without a context. | |
| bool | TraceDisconnect (std::string name, std::string context, const CallbackBase &cb) |
| Disconnect from a TraceSource a Callback previously connected with a context. | |
| bool | TraceDisconnectWithoutContext (std::string name, const CallbackBase &cb) |
| Disconnect from a TraceSource a Callback previously connected without a context. | |
Static Public Member Functions | |
| static TypeId | GetTypeId () |
| Get the type ID. | |
| Static Public Member Functions inherited from ns3::Icmpv6L4Protocol | |
| static uint16_t | GetStaticProtocolNumber () |
| Get ICMPv6 protocol number. | |
| static TypeId | GetTypeId () |
| Get the type ID. | |
| Static Public Member Functions inherited from ns3::IpL4Protocol | |
| static TypeId | GetTypeId () |
| Get the type ID. | |
| Static Public Member Functions inherited from ns3::Object | |
| static TypeId | GetTypeId () |
| Register this type. | |
| Static Public Member Functions inherited from ns3::ObjectBase | |
| static TypeId | GetTypeId () |
| Get the type ID. | |
Static Public Attributes | |
| static constexpr uint8_t | MAX_RA_DELAY_TIME {2} |
| 6LR constant: maximum delay (in seconds) before responding to an RS. | |
| static constexpr uint8_t | MAX_RTR_ADVERTISEMENTS {3} |
| 6LR constant: maximum number of initial RA transmissions. | |
| static constexpr uint16_t | MIN_CONTEXT_CHANGE_DELAY {300} |
| 6LBR constant: minimum delay (in seconds) before a context change may be advertised after a previous change. | |
| static constexpr uint8_t | MIN_DELAY_BETWEEN_RAS {10} |
| 6LR constant: minimum delay (in seconds) between consecutive RAs. | |
| static constexpr uint8_t | MULTIHOP_HOPLIMIT {64} |
| Router constant: hop limit used for multihop DAR/DAC messages. | |
| Static Public Attributes inherited from ns3::Icmpv6L4Protocol | |
| static const uint8_t | PROT_NUMBER = 58 |
| ICMPv6 protocol number (58). | |
Protected Member Functions | |
| void | DoDispose () override |
| Dispose this object. | |
| Protected Member Functions inherited from ns3::Icmpv6L4Protocol | |
| Ptr< NdiscCache > | FindCache (Ptr< NetDevice > device) |
| Get the cache corresponding to the device. | |
| void | Forward (Ipv6Address source, Icmpv6Header icmp, uint32_t info, Ipv6Header ipHeader, const uint8_t payload[8]) |
| Notify an ICMPv6 reception to upper layers (if requested). | |
| IpL4Protocol::DownTargetCallback | GetDownTarget () const override |
| This method allows a caller to get the current down target callback set for this L4 protocol (IPv4 case). | |
| IpL4Protocol::DownTargetCallback6 | GetDownTarget6 () const override |
| This method allows a caller to get the current down target callback set for this L4 protocol (IPv6 case). | |
| void | HandleDestinationUnreachable (Ptr< Packet > p, const Ipv6Address &src, const Ipv6Address &dst, Ptr< Ipv6Interface > interface) |
| Receive Destination Unreachable method. | |
| void | HandleEchoRequest (Ptr< Packet > p, const Ipv6Address &src, const Ipv6Address &dst, Ptr< Ipv6Interface > interface) |
| Receive Echo Request method. | |
| void | HandleNA (Ptr< Packet > p, const Ipv6Address &src, const Ipv6Address &dst, Ptr< Ipv6Interface > interface) |
| Receive Neighbor Advertisement method. | |
| void | HandleNS (Ptr< Packet > p, const Ipv6Address &src, const Ipv6Address &dst, Ptr< Ipv6Interface > interface) |
| Receive Neighbor Solicitation method. | |
| void | HandlePacketTooBig (Ptr< Packet > p, const Ipv6Address &src, const Ipv6Address &dst, Ptr< Ipv6Interface > interface) |
| Receive Packet Too Big method. | |
| void | HandleParameterError (Ptr< Packet > p, const Ipv6Address &src, const Ipv6Address &dst, Ptr< Ipv6Interface > interface) |
| Receive Parameter Error method. | |
| void | HandleRA (Ptr< Packet > p, const Ipv6Address &src, const Ipv6Address &dst, Ptr< Ipv6Interface > interface) |
| Receive Router Advertisement method. | |
| void | HandleRedirection (Ptr< Packet > p, const Ipv6Address &src, const Ipv6Address &dst, Ptr< Ipv6Interface > interface) |
| Receive Redirection method. | |
| void | HandleRS (Ptr< Packet > p, const Ipv6Address &src, const Ipv6Address &dst, Ptr< Ipv6Interface > interface) |
| Receive Router Solicitation method. | |
| virtual void | HandleRsTimeout (Ipv6Address src, Ipv6Address dst, Address hardwareAddress) |
| Router Solicitation Timeout handler. | |
| void | HandleTimeExceeded (Ptr< Packet > p, const Ipv6Address &src, const Ipv6Address &dst, Ptr< Ipv6Interface > interface) |
| Receive Time Exceeded method. | |
| void | ReceiveLLA (Icmpv6OptionLinkLayerAddress lla, const Ipv6Address &src, const Ipv6Address &dst, Ptr< Ipv6Interface > interface) |
| Link layer address option processing. | |
| void | SetDownTarget (IpL4Protocol::DownTargetCallback cb) override |
| This method allows a caller to set the current down target callback set for this L4 protocol (IPv4 case). | |
| void | SetDownTarget6 (IpL4Protocol::DownTargetCallback6 cb) override |
| This method allows a caller to set the current down target callback set for this L4 protocol (IPv6 case). | |
| Protected Member Functions inherited from ns3::Object | |
| Object (const Object &o) | |
| Copy an Object. | |
| Protected Member Functions inherited from ns3::ObjectBase | |
| void | ConstructSelf (const AttributeConstructionList &attributes) |
| Complete construction of ObjectBase; invoked by derived classes. | |
| virtual void | NotifyConstructionCompleted () |
| Notifier called once the ObjectBase is fully constructed. | |
Private Types | |
| typedef Callback< void, Ipv6Address, bool, uint8_t > | AddressRegistrationCallback |
| Trace sink signature for address registration result. | |
| using | BindingTableList |
| container of BindingTables | |
| typedef Callback< void, Ipv6Address > | MulticastRsCallback |
| Trace sink signature for multicast RS sends. | |
| typedef Callback< void, Ptr< Packet > > | NaRxCallback |
| Trace sink signature for NA reception. | |
| enum | SixLowPanNodeStatus_e { SixLowPanNodeOnly , SixLowPanNode , SixLowPanBorderRouter } |
| Role of the node: 6LN, 6LR, 6LBR. More... | |
Private Member Functions | |
| void | AddressRegistration () |
| Address registration procedure. | |
| void | AddressRegistrationSuccess (Ipv6Address registrar) |
| Address registration success or failure. | |
| void | AddressRegistrationTimeout () |
| Address registration timeout handler. | |
| void | HandleSixLowPanNA (Ptr< Packet > packet, const Ipv6Address &src, const Ipv6Address &dst, Ptr< Ipv6Interface > interface) |
| NA handler for 6LoWPAN ND. | |
| void | HandleSixLowPanNS (Ptr< Packet > packet, const Ipv6Address &src, const Ipv6Address &dst, Ptr< Ipv6Interface > interface) |
| NS handler for 6LoWPAN ND. | |
| void | HandleSixLowPanRA (Ptr< Packet > packet, const Ipv6Address &src, const Ipv6Address &dst, Ptr< Ipv6Interface > interface) |
| RA handler for 6LoWPAN ND. | |
| void | HandleSixLowPanRS (Ptr< Packet > packet, const Ipv6Address &src, const Ipv6Address &dst, Ptr< Ipv6Interface > interface) |
| RS handler for 6LoWPAN ND. | |
Private Attributes | |
| Time | m_abroValidLifeTime |
| Default ABRO Valid Lifetime. | |
| uint8_t | m_addressRegistrationCounter = 0 |
| Number of retries of an address registration. | |
| EventId | m_addressRegistrationEvent |
| Address Registration event. | |
| Ptr< RandomVariableStream > | m_addressRegistrationJitter |
| Random jitter before sending address registrations. | |
| TracedCallback< Ipv6Address, bool, uint8_t > | m_addressRegistrationResultTrace |
| Traces address registration result (address, success/failure, status code). | |
| EventId | m_addressRegistrationTimeoutEvent |
| Address Registration timeout event. | |
| AddressPendingRegistration | m_addrPendingReg |
| Address currently being Registered. | |
| uint16_t | m_advance |
| How many seconds before registration expiry to begin re-registration. | |
| BindingTableList | m_bindingTableList |
| Binding Table for 6LoWPAN ND. | |
| Time | m_contextValidLifeTime |
| Default Context Valid Lifetime. | |
| Time | m_maxRtrSolicitationInterval |
| Maximum RS Retransmission interval. | |
| TracedCallback< Ipv6Address > | m_multicastRsTrace |
| Trace fired whenever a multicast RS is sent. | |
| TracedCallback< Ptr< Packet > > | m_naRxTrace |
| Trace fired whenever an NA packet is received. | |
| SixLowPanNodeStatus_e | m_nodeRole |
| Status of the node. | |
| std::list< SixLowPanPendingRa > | m_pendingRas |
| RA awaiting processing (address registration). | |
| Time | m_pioPreferredLifeTime |
| Default Prefix Information Preferred Lifetime. | |
| Time | m_pioValidLifeTime |
| Default Prefix Information Valid Lifetime. | |
| std::set< Ipv6Address > | m_raCache |
| Set of 6LBR addresses from which a RA has already been processed. | |
| std::map< Ptr< SixLowPanNetDevice >, Ptr< SixLowPanRaEntry > > | m_raEntries |
| Router Advertisement entries (if the node is a 6LBR). | |
| std::list< SixLowPanRegisteredAddress > | m_registeredAddresses |
| Addresses that have been registered. | |
| uint16_t | m_regTime |
| The amount of time (units of 60 seconds) that the router should retain the NCE for the node. | |
| Time | m_routerLifeTime |
| Default Router Lifetime. | |
| std::vector< uint8_t > | m_rovr |
| Node ROVR. | |
Friends | |
| class | SixLowPanNdNaEaroPacketTest |
| class | SixLowPanNdNsEaroPacketTest |
| class | SixLowPanNdNsNaTest |
| class | SixLowPanNdRaPacketTest |
| class | SixLowPanNdRovrTest |
| class | SixLowPanNdRsPacketTest |
Additional Inherited Members | |
| Protected Types inherited from ns3::Icmpv6L4Protocol | |
| typedef std::list< Ptr< NdiscCache > > | CacheList |
| container of NdiscCaches | |
| Protected Attributes inherited from ns3::Icmpv6L4Protocol | |
| bool | m_alwaysDad |
| Always do DAD ? | |
| CacheList | m_cacheList |
| A list of cache by device. | |
| ns3::TracedCallback< const Ipv6Address & > | m_dadFailureAddressTrace |
| The trace fired when a DAD fails, changing the address state to INVALID. | |
| ns3::TracedCallback< const Ipv6Address & > | m_dadSuccessAddressTrace |
| The trace fired when a DAD completes and no duplicate address has been detected. | |
| Time | m_dadTimeout |
| DAD timeout. | |
| Time | m_delayFirstProbe |
| Neighbor Discovery node constants: delay for the first probe. | |
| IpL4Protocol::DownTargetCallback6 | m_downTarget |
| callback to Ipv6::Send | |
| EventId | m_handleRsTimeoutEvent |
| RS timeout handler event. | |
| uint8_t | m_maxMulticastSolicit |
| Neighbor Discovery node constants: max multicast solicitations. | |
| uint8_t | m_maxUnicastSolicit |
| Neighbor Discovery node constants: max unicast solicitations. | |
| Ptr< Node > | m_node |
| The node. | |
| Time | m_reachableTime |
| Neighbor Discovery node constants: reachable time. | |
| Time | m_retransmissionTime |
| Neighbor Discovery node constants: retransmission timer. | |
| Time | m_rsFirstTransmissionTime |
| First multicast RS transmissions [RFC 7559]. | |
| Time | m_rsInitialRetransmissionTime |
| Initial multicast RS retransmission time [RFC 7559]. | |
| uint32_t | m_rsMaxRetransmissionCount |
| Maximum number of multicast RS retransmissions [RFC 7559]. | |
| Time | m_rsMaxRetransmissionDuration |
| Maximum duration of multicast RS retransmissions [RFC 7559]. | |
| Time | m_rsMaxRetransmissionTime |
| Maximum time between multicast RS retransmissions [RFC 7559]. | |
| Time | m_rsPrevRetransmissionTimeout |
| Previous multicast RS retransmissions timeout [RFC 7559]. | |
| uint32_t | m_rsRetransmissionCount {0} |
| Multicast RS retransmissions counter [RFC 7559]. | |
| Ptr< UniformRandomVariable > | m_rsRetransmissionJitter |
| Random jitter for RS retransmissions. | |
| Ptr< RandomVariableStream > | m_solicitationJitter |
| Random jitter before sending solicitations. | |
| Callback< void, uint32_t > | m_startDhcpv6 |
| The DHCPv6 callback when the M flag is set in a Router Advertisement. | |
| Related Symbols inherited from ns3::ObjectBase | |
| static TypeId | GetObjectIid () |
| Ensure the TypeId for ObjectBase gets fully configured to anchor the inheritance tree properly. | |
An optimization of the ND protocol for 6LoWPANs.
ns3::SixLowPanNdProtocol is accessible through the following paths with Config::Set and Config::Connect:
Time -9.22337e+18ns:+9.22337e+18ns Time -9.22337e+18ns:+9.22337e+18ns Time -9.22337e+18ns:+9.22337e+18ns Time -9.22337e+18ns:+9.22337e+18ns Time +0ns:+6.5535e+13ns Time -9.22337e+18ns:+9.22337e+18ns Time -9.22337e+18ns:+9.22337e+18ns Time -9.22337e+18ns:+9.22337e+18ns Time -9.22337e+18ns:+9.22337e+18ns Time -9.22337e+18ns:+9.22337e+18ns Time -9.22337e+18ns:+9.22337e+18ns Time -9.22337e+18ns:+9.22337e+18ns Time -9.22337e+18ns:+9.22337e+18ns Group: Internet
Size of this type is 824 bytes (on a 64-bit architecture).
Definition at line 45 of file sixlowpan-nd-protocol.h.
|
private |
Trace sink signature for address registration result.
Definition at line 650 of file sixlowpan-nd-protocol.h.
|
private |
container of BindingTables
Definition at line 712 of file sixlowpan-nd-protocol.h.
|
private |
Trace sink signature for multicast RS sends.
Definition at line 655 of file sixlowpan-nd-protocol.h.
|
private |
Trace sink signature for NA reception.
Definition at line 659 of file sixlowpan-nd-protocol.h.
6LoWPAN-ND EARO registration status codes
| Enumerator | |
|---|---|
| SUCCESS | Success. |
| DUPLICATE_ADDRESS | Duplicate Address. |
| NEIGHBOR_CACHE_FULL | Neighbor Cache Full. |
| MOVED | Registration failed because it is not the most recent. |
| REMOVED | Binding state was removed. |
| VALIDATION_REQUEST | Registering Node is challenged for owning the Registered Address or for being an acceptable proxy for the registration. |
| DUPLICATE_SOURCE_ADDRESS | Address used as the source of the NS(EARO) conflicts with an existing registration. |
| INVALID_SOURCE_ADDRESS | Address used as the source of the NS(EARO) is not a Link-Local Address. |
| REGISTERED_ADDRESS_TOPOLOGICALLY_INCORRECT | Address being registered is not usable on this link. |
| SIXLBR_REGISTRY_SATURATED | 6LBR Registry is saturated. |
| VALIDATION_FAILED | The proof of ownership of the Registered Address is not correct. |
Definition at line 58 of file sixlowpan-nd-protocol.h.
|
private |
Role of the node: 6LN, 6LR, 6LBR.
A Node starts either as a 6LN or as a 6LBR. A 6LN can become a 6LR.
| Enumerator | |
|---|---|
| SixLowPanNodeOnly | a 6LN that can not become a 6LR |
| SixLowPanNode | a 6LN that can (and want to) become a 6LR |
| SixLowPanBorderRouter | a 6LBR |
Definition at line 532 of file sixlowpan-nd-protocol.h.
| ns3::SixLowPanNdProtocol::SixLowPanNdProtocol | ( | ) |
Constructor.
Definition at line 53 of file sixlowpan-nd-protocol.cc.
References ns3::Icmpv6L4Protocol::Icmpv6L4Protocol(), m_nodeRole, NS_LOG_FUNCTION, and SixLowPanNode.
Referenced by GetTypeId().
|
override |
| void ns3::SixLowPanNdProtocol::AddAdvertisedContext | ( | Ptr< SixLowPanNetDevice > | device, |
| Ipv6Prefix | context ) |
Add a context to be advertised on an interface (6LBR).
| device | device to be used for advertisement |
| context | advertised context |
Definition at line 1056 of file sixlowpan-nd-protocol.cc.
References ns3::Create(), m_contextValidLifeTime, m_raEntries, ns3::Simulator::Now(), NS_LOG_FUNCTION, NS_LOG_LOGIC, and NS_LOG_WARN.
|
private |
Address registration procedure.
Definition at line 783 of file sixlowpan-nd-protocol.cc.
References AddressRegistrationTimeout(), ns3::Ipv6InterfaceAddress::GetAddress(), m_addressRegistrationCounter, m_addressRegistrationEvent, m_addressRegistrationJitter, m_addressRegistrationTimeoutEvent, m_addrPendingReg, m_advance, ns3::Icmpv6L4Protocol::m_node, m_pendingRas, m_registeredAddresses, m_regTime, ns3::Icmpv6L4Protocol::m_retransmissionTime, m_rovr, ns3::MilliSeconds(), ns3::Simulator::Now(), NS_ASSERT, NS_LOG_FUNCTION, ns3::Simulator::Schedule(), ns3::Seconds(), SendSixLowPanMulticastRS(), and SendSixLowPanNsWithEaro().
Referenced by AddressRegistrationSuccess(), AddressRegistrationTimeout(), and HandleSixLowPanRA().
|
private |
Address registration success or failure.
| registrar | node that performs the registration. Registered Node or a proxy. |
Definition at line 875 of file sixlowpan-nd-protocol.cc.
References AddressRegistration(), ns3::Ipv6Address::GetAny(), ns3::SixLowPanNdProtocol::SixLowPanRegisteredAddress::interface, ns3::SixLowPanNdProtocol::SixLowPanRegisteredAddress::llaHdr, m_addressRegistrationCounter, m_addressRegistrationEvent, m_addressRegistrationJitter, m_addressRegistrationTimeoutEvent, m_addrPendingReg, ns3::Icmpv6L4Protocol::m_node, m_pendingRas, m_registeredAddresses, m_regTime, ns3::MilliSeconds(), ns3::Minutes(), ns3::Now(), NS_ABORT_MSG_IF, NS_LOG_FUNCTION, ns3::SixLowPanNdProtocol::SixLowPanRegisteredAddress::pioHdr, ns3::Icmpv6L4Protocol::ReceiveLLA(), ns3::SixLowPanNdProtocol::SixLowPanRegisteredAddress::registeredAddr, ns3::SixLowPanNdProtocol::SixLowPanRegisteredAddress::registrar, ns3::SixLowPanNdProtocol::SixLowPanRegisteredAddress::registrationTimeout, and ns3::Simulator::Schedule().
Referenced by HandleSixLowPanNA().
|
private |
Address registration timeout handler.
Definition at line 957 of file sixlowpan-nd-protocol.cc.
References AddressRegistration(), m_addressRegistrationCounter, m_addrPendingReg, ns3::Icmpv6L4Protocol::m_maxUnicastSolicit, ns3::Icmpv6L4Protocol::m_node, NS_ABORT_MSG_IF, NS_LOG_FUNCTION, and NS_LOG_INFO.
Referenced by AddressRegistration().
| int64_t ns3::SixLowPanNdProtocol::AssignStreams | ( | int64_t | stream | ) |
Assign a fixed random variable stream number to the random variables used by this model.
Return the number of streams (possibly zero) that have been assigned.
| stream | first stream index to use |
Definition at line 141 of file sixlowpan-nd-protocol.cc.
References m_addressRegistrationJitter, and NS_LOG_FUNCTION.
| void ns3::SixLowPanNdProtocol::CreateBindingTable | ( | Ptr< NetDevice > | device, |
| Ptr< Ipv6Interface > | interface ) |
Create and register a binding table for the given device and interface.
| device | the net device |
| interface | the IPv6 interface |
Definition at line 743 of file sixlowpan-nd-protocol.cc.
References ns3::CreateObject(), m_bindingTableList, and NS_LOG_FUNCTION.
|
overrideprotectedvirtual |
Dispose this object.
Reimplemented from ns3::Icmpv6L4Protocol.
Definition at line 393 of file sixlowpan-nd-protocol.cc.
References ns3::Icmpv6L4Protocol::DoDispose(), m_addressRegistrationTimeoutEvent, ns3::Icmpv6L4Protocol::m_handleRsTimeoutEvent, and NS_LOG_FUNCTION.
|
overridevirtual |
Initialize() implementation.
This method is called only once by Initialize(). If the user calls Initialize() multiple times, DoInitialize() is called only the first time.
Subclasses are expected to override this method and chain up to their parent's implementation once they are done. It is safe to call GetObject() and AggregateObject() from within this method.
Reimplemented from ns3::Object.
Definition at line 149 of file sixlowpan-nd-protocol.cc.
References ns3::Object::DoInitialize(), m_addrPendingReg, m_nodeRole, m_raEntries, and SixLowPanBorderRouter.
| Ptr< SixLowPanNdBindingTable > ns3::SixLowPanNdProtocol::FindBindingTable | ( | Ptr< Ipv6Interface > | interface | ) |
Find the binding table corresponding to the IPv6 interface.
| interface | the IPv6 interface |
Definition at line 754 of file sixlowpan-nd-protocol.cc.
References m_bindingTableList, and NS_LOG_FUNCTION.
Referenced by HandleSixLowPanNS().
|
overridevirtual |
Function called when DAD timeout.
| interface | the interface |
| addr | the IPv6 address |
Reimplemented from ns3::Icmpv6L4Protocol.
Definition at line 770 of file sixlowpan-nd-protocol.cc.
References NS_LOG_FUNCTION.
|
static |
Get the type ID.
Definition at line 67 of file sixlowpan-nd-protocol.cc.
References ns3::Icmpv6L4Protocol::Icmpv6L4Protocol(), SixLowPanNdProtocol(), m_abroValidLifeTime, m_addressRegistrationJitter, m_addressRegistrationResultTrace, m_advance, m_contextValidLifeTime, m_maxRtrSolicitationInterval, m_multicastRsTrace, m_naRxTrace, m_pioPreferredLifeTime, m_pioValidLifeTime, m_regTime, m_routerLifeTime, ns3::MakePointerAccessor(), ns3::MakePointerChecker(), ns3::MakeTimeAccessor(), ns3::MakeTimeChecker(), ns3::MakeTraceSourceAccessor(), ns3::MakeUintegerAccessor(), ns3::MakeUintegerChecker(), ns3::Minutes(), ns3::Seconds(), and ns3::TypeId::SetParent().
|
private |
NA handler for 6LoWPAN ND.
| packet | the packet |
| src | source address |
| dst | destination address |
| interface | the interface from which the packet is coming |
Definition at line 521 of file sixlowpan-nd-protocol.cc.
References AddressRegistrationSuccess(), ns3::Ipv6Address::GetAny(), ns3::Icmpv6NA::GetIpv6Target(), ns3::Icmpv6OptionSixLowPanExtendedAddressRegistration::GetRovr(), ns3::Icmpv6OptionSixLowPanExtendedAddressRegistration::GetStatus(), ns3::Icmpv6L4Protocol::HandleNA(), m_addressRegistrationResultTrace, m_addrPendingReg, m_naRxTrace, m_rovr, NS_LOG_FUNCTION, NS_LOG_LOGIC, ParseAndValidateNaEaroPacket(), and SUCCESS.
Referenced by Receive().
|
private |
NS handler for 6LoWPAN ND.
| packet | the packet. |
| src | source address. |
| dst | destination address. |
| interface | the interface from which the packet is coming. |
Definition at line 403 of file sixlowpan-nd-protocol.cc.
References DUPLICATE_ADDRESS, ns3::DynamicCast(), FindBindingTable(), ns3::Icmpv6L4Protocol::FindCache(), ns3::Icmpv6OptionLinkLayerAddress::GetAddress(), ns3::Ipv6Address::GetAny(), ns3::Icmpv6NS::GetIpv6Target(), ns3::Icmpv6OptionSixLowPanExtendedAddressRegistration::GetRegTime(), ns3::Icmpv6OptionSixLowPanExtendedAddressRegistration::GetRovr(), ns3::Icmpv6L4Protocol::HandleNS(), ns3::Ipv6Address::IsLinkLocal(), ns3::Ipv6Address::IsMulticast(), ns3::Icmpv6L4Protocol::m_node, m_nodeRole, ns3::NdiscCache::Entry::MarkReachable(), NS_ASSERT_MSG, NS_LOG_FUNCTION, NS_LOG_LOGIC, ParseAndValidateNsEaroPacket(), SendSixLowPanNaWithEaro(), ns3::NdiscCache::Entry::SetMacAddress(), ns3::NdiscCache::Entry::SetRouter(), SixLowPanBorderRouter, and ns3::NdiscCache::Entry::StartReachableTimer().
Referenced by Receive().
|
private |
RA handler for 6LoWPAN ND.
| packet | the packet |
| src | source address |
| dst | destination address |
| interface | the interface from which the packet is coming |
Definition at line 642 of file sixlowpan-nd-protocol.cc.
References ns3::SixLowPanNdProtocol::SixLowPanPendingRa::addressesToBeRegistered, AddressRegistration(), ns3::DynamicCast(), ns3::Ipv6Address::GetAny(), ns3::Icmpv6OptionSixLowPanAuthoritativeBorderRouter::GetRouterAddress(), ns3::Icmpv6L4Protocol::HandleRA(), ns3::SixLowPanNdProtocol::SixLowPanPendingRa::interface, ns3::SixLowPanNdProtocol::SixLowPanPendingRa::llaHdr, ns3::Icmpv6L4Protocol::m_handleRsTimeoutEvent, m_pendingRas, m_raCache, ns3::Icmpv6L4Protocol::m_rsRetransmissionCount, ns3::Ipv6Address::MakeAutoconfiguredAddress(), NS_LOG_FUNCTION, NS_LOG_LOGIC, ParseAndValidateRaPacket(), and ns3::SixLowPanNdProtocol::SixLowPanPendingRa::source.
Referenced by Receive().
|
private |
RS handler for 6LoWPAN ND.
| packet | the packet |
| src | source address |
| dst | destination address |
| interface | the interface from which the packet is coming |
Definition at line 584 of file sixlowpan-nd-protocol.cc.
References ns3::DynamicCast(), ns3::Icmpv6L4Protocol::FindCache(), ns3::Icmpv6OptionLinkLayerAddress::GetAddress(), ns3::Ipv6Address::GetAny(), ns3::Icmpv6L4Protocol::HandleRS(), m_nodeRole, NS_ASSERT_MSG, NS_LOG_FUNCTION, NS_LOG_LOGIC, ParseAndValidateRsPacket(), SendSixLowPanRA(), SixLowPanNode, and SixLowPanNodeOnly.
Referenced by Receive().
| bool ns3::SixLowPanNdProtocol::IsBorderRouterOnInterface | ( | Ptr< SixLowPanNetDevice > | device | ) | const |
Checks if an interface is set as 6LBR.
| device | the interface to check |
Definition at line 1118 of file sixlowpan-nd-protocol.cc.
References m_raEntries, and NS_LOG_FUNCTION.
|
overridevirtual |
Lookup in the ND cache for the IPv6 address (similar as ARP protocol).
It also send NS request to target and store the waiting packet.
| p | the packet |
| ipHeader | IPv6 header |
| dst | destination address |
| device | device |
| cache | the neighbor cache |
| hardwareDestination | hardware address |
Reimplemented from ns3::Icmpv6L4Protocol.
Definition at line 713 of file sixlowpan-nd-protocol.cc.
References ns3::Icmpv6L4Protocol::FindCache(), and ns3::Icmpv6L4Protocol::Lookup().
|
staticprivate |
Construct NA (EARO) packet.
| src | source address |
| dst | destination address |
| naHdr | |
| earo |
Definition at line 1472 of file sixlowpan-nd-protocol.cc.
References ns3::Icmpv6Header::CalculatePseudoHeaderChecksum(), ns3::Create(), ns3::Icmpv6NA::GetSerializedSize(), and ns3::Icmpv6L4Protocol::PROT_NUMBER.
Referenced by ns3::SixLowPanNdNaEaroPacketTest::DoRun(), and SendSixLowPanNaWithEaro().
|
staticprivate |
Construct NS (EARO) packet.
| src | source address |
| dst | destination address |
| nsHdr | |
| slla | |
| tlla | |
| earo |
Definition at line 1449 of file sixlowpan-nd-protocol.cc.
References ns3::Icmpv6Header::CalculatePseudoHeaderChecksum(), ns3::Create(), ns3::Icmpv6NS::GetSerializedSize(), and ns3::Icmpv6L4Protocol::PROT_NUMBER.
Referenced by ns3::SixLowPanNdNsEaroPacketTest::DoRun(), and SendSixLowPanNsWithEaro().
|
staticprivate |
Constructs a RA packet (raEntry contains info for raHdr, pios, abro and contexts).
| src | source address |
| dst | destination address |
| slla | Source Link-Layer Address Option |
| cio | Capability Indication Option |
| raEntry | RA entry containing router advertisement information |
Definition at line 1490 of file sixlowpan-nd-protocol.cc.
References ns3::Icmpv6Header::CalculatePseudoHeaderChecksum(), ns3::Create(), ns3::Time::GetMinutes(), ns3::Icmpv6RA::GetSerializedSize(), ns3::Simulator::Now(), NS_LOG_FUNCTION, ns3::Icmpv6L4Protocol::PROT_NUMBER, ns3::Icmpv6OptionSixLowPanContext::SetCid(), ns3::Icmpv6OptionSixLowPanContext::SetContextPrefix(), ns3::Icmpv6OptionSixLowPanContext::SetFlagC(), and ns3::Icmpv6OptionSixLowPanContext::SetValidTime().
Referenced by ns3::SixLowPanNdRaPacketTest::DoRun(), and SendSixLowPanRA().
|
overridevirtual |
This method is called by AggregateObject and completes the aggregation by setting the node in the ICMPv6 stack and adding ICMPv6 factory to IPv6 stack connected to the node.
Reimplemented from ns3::Icmpv6L4Protocol.
Definition at line 162 of file sixlowpan-nd-protocol.cc.
References ns3::Object::GetObject(), ns3::Icmpv6L4Protocol::m_downTarget, ns3::Icmpv6L4Protocol::m_node, ns3::MakeCallback(), ns3::Object::NotifyNewAggregate(), NS_LOG_FUNCTION, ns3::Ipv6::Send(), ns3::Icmpv6L4Protocol::SetDownTarget6(), and ns3::Icmpv6L4Protocol::SetNode().
|
staticprivate |
Parses NA packet and populates params, returning true if packet is valid.
| p | Packet to be parsed |
| naHdr | populated with packet NA header |
| tlla | populated with packet Target Link-Layer Address Option if present |
| earo | populated with packet EARO if present |
| hasEaro | true if NA packet contains an EARO option |
Definition at line 1621 of file sixlowpan-nd-protocol.cc.
References ns3::Icmpv6Header::ICMPV6_OPT_EXTENDED_ADDRESS_REGISTRATION, ns3::Icmpv6Header::ICMPV6_OPT_LINK_LAYER_TARGET, and NS_LOG_FUNCTION.
Referenced by ns3::SixLowPanNdNaEaroPacketTest::DoRun(), ns3::SixLowPanNdRovrTest::DoRun(), and HandleSixLowPanNA().
|
staticprivate |
Parses NS packet and populates params, returning true if packet is a valid NS/NS(EARO) packet.
| p | Packet to be parsed |
| nsHdr | populated with packet nsHdr |
| slla | populated with packet SLLAO if present |
| tlla | populated with packet TLLAO if present |
| earo | populated with packet EARO if present |
| hasEaro | true if NS packet contains an EARO option |
Definition at line 1546 of file sixlowpan-nd-protocol.cc.
References ns3::Icmpv6OptionLinkLayerAddress::GetAddress(), ns3::Icmpv6Header::ICMPV6_OPT_EXTENDED_ADDRESS_REGISTRATION, ns3::Icmpv6Header::ICMPV6_OPT_LINK_LAYER_SOURCE, ns3::Icmpv6Header::ICMPV6_OPT_LINK_LAYER_TARGET, NS_LOG_FUNCTION, NS_LOG_LOGIC, and NS_LOG_WARN.
Referenced by ns3::SixLowPanNdNsEaroPacketTest::DoRun(), and HandleSixLowPanNS().
|
staticprivate |
Parses RA packet and populates params, returning true if packet is valid.
| p | Packet to be parsed |
| raHdr | populated with packet RA header |
| pios | populated with Prefix Information Options from the packet |
| abro | populated with Authoritative Border Router Option from the packet |
| slla | populated with Source Link-Layer Address Option if present |
| cio | populated with Capability Indication Option if present |
| contexts | populated with 6LoWPAN Context Options from the packet |
Definition at line 1714 of file sixlowpan-nd-protocol.cc.
References ns3::Ipv6Address::GetAny(), ns3::Icmpv6OptionSixLowPanAuthoritativeBorderRouter::GetRouterAddress(), ns3::Icmpv6Header::ICMPV6_OPT_AUTHORITATIVE_BORDER_ROUTER, ns3::Icmpv6Header::ICMPV6_OPT_CAPABILITY_INDICATION, ns3::Icmpv6Header::ICMPV6_OPT_LINK_LAYER_SOURCE, ns3::Icmpv6Header::ICMPV6_OPT_PREFIX, ns3::Icmpv6Header::ICMPV6_OPT_SIXLOWPAN_CONTEXT, NS_LOG_FUNCTION, NS_LOG_LOGIC, and NS_LOG_WARN.
Referenced by ns3::SixLowPanNdRaPacketTest::DoRun(), and HandleSixLowPanRA().
|
staticprivate |
Parses RS packet and populates params, returning true if packet is valid.
| p | Packet to be parsed |
| rsHdr | populated with packet RS header |
| slla | populated with packet Source Link-Layer Address Option if present |
| cio | populated with packet Capability Indication Option if present |
Definition at line 1662 of file sixlowpan-nd-protocol.cc.
References ns3::Icmpv6Header::ICMPV6_OPT_CAPABILITY_INDICATION, ns3::Icmpv6Header::ICMPV6_OPT_LINK_LAYER_SOURCE, NS_LOG_FUNCTION, and NS_LOG_LOGIC.
Referenced by ns3::SixLowPanNdRsPacketTest::DoRun(), and HandleSixLowPanRS().
|
overridevirtual |
Receive method.
| p | the packet |
| header | the IPv6 header |
| interface | the interface from which the packet is coming |
Reimplemented from ns3::Icmpv6L4Protocol.
Definition at line 362 of file sixlowpan-nd-protocol.cc.
References ns3::Ipv6Header::GetDestination(), ns3::Ipv6Header::GetSource(), HandleSixLowPanNA(), HandleSixLowPanNS(), HandleSixLowPanRA(), HandleSixLowPanRS(), ns3::Icmpv6Header::ICMPV6_ND_NEIGHBOR_ADVERTISEMENT, ns3::Icmpv6Header::ICMPV6_ND_NEIGHBOR_SOLICITATION, ns3::Icmpv6Header::ICMPV6_ND_ROUTER_ADVERTISEMENT, ns3::Icmpv6Header::ICMPV6_ND_ROUTER_SOLICITATION, NS_LOG_FUNCTION, ns3::Icmpv6L4Protocol::Receive(), and ns3::IpL4Protocol::RX_OK.
| void ns3::SixLowPanNdProtocol::RemoveAdvertisedContext | ( | Ptr< SixLowPanNetDevice > | device, |
| Ipv6Prefix | context ) |
Remove a context to be advertised on an interface (6LBR).
| device | device to be used for advertisement |
| context | advertised context |
Definition at line 1094 of file sixlowpan-nd-protocol.cc.
References m_raEntries, NS_LOG_FUNCTION, NS_LOG_LOGIC, and NS_LOG_WARN.
| void ns3::SixLowPanNdProtocol::SendSixLowPanMulticastRS | ( | Ipv6Address | src, |
| Address | hardwareAddress ) |
Send a Multicast RS (+ 6CIO) (RFC6775 5.3).
| src | source IPv6 address |
| hardwareAddress | the hardware address of the node |
Definition at line 255 of file sixlowpan-nd-protocol.cc.
References ns3::Icmpv6Header::CalculatePseudoHeaderChecksum(), ns3::Create(), ns3::Icmpv6L4Protocol::DelayedSendMessage(), ns3::Ipv6Address::GetAllRoutersMulticast(), ns3::Icmpv6RS::GetSerializedSize(), ns3::Icmpv6L4Protocol::m_handleRsTimeoutEvent, m_maxRtrSolicitationInterval, m_multicastRsTrace, ns3::Icmpv6L4Protocol::m_node, ns3::Icmpv6L4Protocol::m_rsMaxRetransmissionCount, ns3::Icmpv6L4Protocol::m_rsRetransmissionCount, ns3::Icmpv6L4Protocol::m_rsRetransmissionJitter, ns3::MilliSeconds(), NS_LOG_FUNCTION, NS_LOG_LOGIC, ns3::Icmpv6L4Protocol::PROT_NUMBER, ns3::Simulator::Schedule(), ns3::Seconds(), and SendSixLowPanMulticastRS().
Referenced by AddressRegistration(), ns3::SixLowPanHelper::InstallSixLowPanNdNode(), and SendSixLowPanMulticastRS().
| void ns3::SixLowPanNdProtocol::SendSixLowPanNaWithEaro | ( | Ipv6Address | src, |
| Ipv6Address | dst, | ||
| Ipv6Address | target, | ||
| uint16_t | time, | ||
| const std::vector< uint8_t > & | rovr, | ||
| Ptr< NetDevice > | sixDevice, | ||
| uint8_t | status ) |
Send a NA for 6LoWPAN ND (+ EARO).
| src | source IPv6 address |
| dst | destination IPv6 address |
| target | target IPv6 address |
| time | registration lifetime (EARO) |
| rovr | ROVR (EARO) |
| sixDevice | SixLowPan NetDevice |
| status | status (EARO) |
Definition at line 228 of file sixlowpan-nd-protocol.cc.
References MakeNaEaroPacket(), NS_LOG_FUNCTION, ns3::Icmpv6L4Protocol::SendMessage(), ns3::Icmpv6NA::SetFlagO(), ns3::Icmpv6NA::SetFlagR(), ns3::Icmpv6NA::SetFlagS(), and ns3::Icmpv6NA::SetIpv6Target().
Referenced by HandleSixLowPanNS().
| void ns3::SixLowPanNdProtocol::SendSixLowPanNsWithEaro | ( | Ipv6Address | addrToRegister, |
| Ipv6Address | dst, | ||
| Address | dstMac, | ||
| uint16_t | time, | ||
| const std::vector< uint8_t > & | rovr, | ||
| Ptr< NetDevice > | sixDevice ) |
Send a NS for 6LoWPAN ND (+ EARO, SLLAO).
| addrToRegister | source IPv6 address |
| dst | destination IPv6 address |
| dstMac | destination MAC address |
| time | registration lifetime (EARO) |
| rovr | ROVR (EARO) |
| sixDevice | SixLowPan NetDevice |
Definition at line 185 of file sixlowpan-nd-protocol.cc.
References ns3::Ipv6Address::IsMulticast(), ns3::Icmpv6L4Protocol::m_node, MakeNsEaroPacket(), NS_ASSERT_MSG, NS_LOG_FUNCTION, ns3::Icmpv6L4Protocol::PROT_NUMBER, ns3::Ipv6L3Protocol::PROT_NUMBER, ns3::Ipv6Header::SetDestination(), ns3::Ipv6Header::SetHopLimit(), ns3::Ipv6Header::SetNextHeader(), ns3::Ipv6Header::SetPayloadLength(), and ns3::Ipv6Header::SetSource().
Referenced by AddressRegistration(), and ns3::SixLowPanNdRovrTest::DoRun().
| void ns3::SixLowPanNdProtocol::SendSixLowPanRA | ( | Ipv6Address | src, |
| Ipv6Address | dst, | ||
| Ptr< Ipv6Interface > | interface ) |
Send a RA for 6LoWPAN ND (+ PIO, 6CO, 6CIO, ABRO, SLLAO).
| src | source IPv6 address |
| dst | destination IPv6 address |
| interface | the interface from which the packet will be sent |
Definition at line 318 of file sixlowpan-nd-protocol.cc.
References ns3::Icmpv6OptionSixLowPanCapabilityIndication::B, ns3::DynamicCast(), ns3::Icmpv6OptionSixLowPanCapabilityIndication::E, m_nodeRole, m_raEntries, MakeRaPacket(), NS_ABORT_MSG_IF, NS_LOG_FUNCTION, NS_LOG_LOGIC, ns3::Icmpv6L4Protocol::PROT_NUMBER, ns3::Ipv6Header::SetDestination(), ns3::Ipv6Header::SetHopLimit(), ns3::Ipv6Header::SetNextHeader(), ns3::Icmpv6OptionSixLowPanCapabilityIndication::SetOption(), ns3::Ipv6Header::SetPayloadLength(), ns3::Ipv6Header::SetSource(), and SixLowPanBorderRouter.
Referenced by HandleSixLowPanRS().
| void ns3::SixLowPanNdProtocol::SetAdvertisedPrefix | ( | Ptr< SixLowPanNetDevice > | device, |
| Ipv6Prefix | prefix ) |
Set a prefix to be announced on an interface (6LBR).
| device | device to be used for announcement |
| prefix | announced prefix |
Definition at line 1037 of file sixlowpan-nd-protocol.cc.
References ns3::Ipv6Prefix::ConvertToIpv6Address(), ns3::Create(), ns3::Ipv6Prefix::GetPrefixLength(), m_pioPreferredLifeTime, m_pioValidLifeTime, m_raEntries, NS_LOG_FUNCTION, and NS_LOG_LOGIC.
| void ns3::SixLowPanNdProtocol::SetInterfaceAs6lbr | ( | Ptr< SixLowPanNetDevice > | device | ) |
Set an interface to be used as a 6LBR.
| device | device to be used for announcement |
Definition at line 988 of file sixlowpan-nd-protocol.cc.
References ns3::Create(), ns3::Ipv6Address::GetAny(), ns3::Icmpv6L4Protocol::GetNode(), ns3::Object::GetObject(), ns3::Ipv6InterfaceAddress::GLOBAL, m_abroValidLifeTime, m_raEntries, m_routerLifeTime, NS_ABORT_MSG_IF, NS_LOG_FUNCTION, and NS_LOG_LOGIC.
| void ns3::SixLowPanNdProtocol::SetRovr | ( | const std::vector< uint8_t > | rovr | ) |
Sets the ROVR for the node.
| rovr | ROVR to set for this node |
Definition at line 776 of file sixlowpan-nd-protocol.cc.
References m_rovr, and NS_LOG_FUNCTION.
|
friend |
Definition at line 48 of file sixlowpan-nd-protocol.h.
References SixLowPanNdNaEaroPacketTest.
Referenced by SixLowPanNdNaEaroPacketTest.
|
friend |
Definition at line 47 of file sixlowpan-nd-protocol.h.
References SixLowPanNdNsEaroPacketTest.
Referenced by SixLowPanNdNsEaroPacketTest.
|
friend |
Definition at line 51 of file sixlowpan-nd-protocol.h.
References SixLowPanNdNsNaTest.
Referenced by SixLowPanNdNsNaTest.
|
friend |
Definition at line 49 of file sixlowpan-nd-protocol.h.
References SixLowPanNdRaPacketTest.
Referenced by SixLowPanNdRaPacketTest.
|
friend |
Definition at line 52 of file sixlowpan-nd-protocol.h.
References SixLowPanNdRovrTest.
Referenced by SixLowPanNdRovrTest.
|
friend |
Definition at line 50 of file sixlowpan-nd-protocol.h.
References SixLowPanNdRsPacketTest.
Referenced by SixLowPanNdRsPacketTest.
|
private |
Default ABRO Valid Lifetime.
Definition at line 559 of file sixlowpan-nd-protocol.h.
Referenced by GetTypeId(), and SetInterfaceAs6lbr().
|
private |
Number of retries of an address registration.
Definition at line 631 of file sixlowpan-nd-protocol.h.
Referenced by AddressRegistration(), AddressRegistrationSuccess(), and AddressRegistrationTimeout().
|
private |
Address Registration event.
Definition at line 637 of file sixlowpan-nd-protocol.h.
Referenced by AddressRegistration(), and AddressRegistrationSuccess().
|
private |
Random jitter before sending address registrations.
Definition at line 564 of file sixlowpan-nd-protocol.h.
Referenced by AddressRegistration(), AddressRegistrationSuccess(), AssignStreams(), and GetTypeId().
|
private |
Traces address registration result (address, success/failure, status code).
Definition at line 646 of file sixlowpan-nd-protocol.h.
Referenced by GetTypeId(), and HandleSixLowPanNA().
|
private |
Address Registration timeout event.
Definition at line 635 of file sixlowpan-nd-protocol.h.
Referenced by AddressRegistration(), AddressRegistrationSuccess(), and DoDispose().
|
private |
Address currently being Registered.
Definition at line 708 of file sixlowpan-nd-protocol.h.
Referenced by AddressRegistration(), AddressRegistrationSuccess(), AddressRegistrationTimeout(), DoInitialize(), and HandleSixLowPanNA().
|
private |
How many seconds before registration expiry to begin re-registration.
Definition at line 548 of file sixlowpan-nd-protocol.h.
Referenced by AddressRegistration(), and GetTypeId().
|
private |
Binding Table for 6LoWPAN ND.
Definition at line 715 of file sixlowpan-nd-protocol.h.
Referenced by CreateBindingTable(), and FindBindingTable().
|
private |
Default Context Valid Lifetime.
Definition at line 558 of file sixlowpan-nd-protocol.h.
Referenced by AddAdvertisedContext(), and GetTypeId().
|
private |
Maximum RS Retransmission interval.
Definition at line 710 of file sixlowpan-nd-protocol.h.
Referenced by GetTypeId(), and SendSixLowPanMulticastRS().
|
private |
Trace fired whenever a multicast RS is sent.
Definition at line 652 of file sixlowpan-nd-protocol.h.
Referenced by GetTypeId(), and SendSixLowPanMulticastRS().
|
private |
Trace fired whenever an NA packet is received.
Definition at line 657 of file sixlowpan-nd-protocol.h.
Referenced by GetTypeId(), and HandleSixLowPanNA().
|
private |
Status of the node.
Definition at line 553 of file sixlowpan-nd-protocol.h.
Referenced by SixLowPanNdProtocol(), DoInitialize(), HandleSixLowPanNS(), HandleSixLowPanRS(), and SendSixLowPanRA().
|
private |
RA awaiting processing (address registration).
Definition at line 673 of file sixlowpan-nd-protocol.h.
Referenced by AddressRegistration(), AddressRegistrationSuccess(), and HandleSixLowPanRA().
|
private |
Default Prefix Information Preferred Lifetime.
Definition at line 556 of file sixlowpan-nd-protocol.h.
Referenced by GetTypeId(), and SetAdvertisedPrefix().
|
private |
Default Prefix Information Valid Lifetime.
Definition at line 557 of file sixlowpan-nd-protocol.h.
Referenced by GetTypeId(), and SetAdvertisedPrefix().
|
private |
Set of 6LBR addresses from which a RA has already been processed.
Definition at line 640 of file sixlowpan-nd-protocol.h.
Referenced by HandleSixLowPanRA().
|
private |
Router Advertisement entries (if the node is a 6LBR).
Definition at line 643 of file sixlowpan-nd-protocol.h.
Referenced by AddAdvertisedContext(), DoInitialize(), IsBorderRouterOnInterface(), RemoveAdvertisedContext(), SendSixLowPanRA(), SetAdvertisedPrefix(), and SetInterfaceAs6lbr().
|
private |
Addresses that have been registered.
Definition at line 690 of file sixlowpan-nd-protocol.h.
Referenced by AddressRegistration(), and AddressRegistrationSuccess().
|
private |
The amount of time (units of 60 seconds) that the router should retain the NCE for the node.
Definition at line 543 of file sixlowpan-nd-protocol.h.
Referenced by AddressRegistration(), AddressRegistrationSuccess(), and GetTypeId().
|
private |
Default Router Lifetime.
Definition at line 555 of file sixlowpan-nd-protocol.h.
Referenced by GetTypeId(), and SetInterfaceAs6lbr().
|
private |
Node ROVR.
Definition at line 633 of file sixlowpan-nd-protocol.h.
Referenced by AddressRegistration(), HandleSixLowPanNA(), and SetRovr().
|
staticconstexpr |
6LR constant: maximum delay (in seconds) before responding to an RS.
RFC 6775, Table 1. Currently unused; reserved for future 6LR role implementation.
Definition at line 99 of file sixlowpan-nd-protocol.h.
|
staticconstexpr |
6LR constant: maximum number of initial RA transmissions.
RFC 6775, Table 1. Currently unused; reserved for future 6LR role implementation.
Definition at line 87 of file sixlowpan-nd-protocol.h.
|
staticconstexpr |
6LBR constant: minimum delay (in seconds) before a context change may be advertised after a previous change.
RFC 6775, Table 2.
Definition at line 81 of file sixlowpan-nd-protocol.h.
|
staticconstexpr |
6LR constant: minimum delay (in seconds) between consecutive RAs.
RFC 6775, Table 1. Currently unused; reserved for future 6LR role implementation.
Definition at line 93 of file sixlowpan-nd-protocol.h.
|
staticconstexpr |
Router constant: hop limit used for multihop DAR/DAC messages.
RFC 6775, Table 1.
Definition at line 104 of file sixlowpan-nd-protocol.h.