_nib-arsm.h¶
-
void
_snd_ns
(const ipv6_addr_t * tgt, gnrc_netif_t * netif, const ipv6_addr_t * src, const ipv6_addr_t * dst)¶ Sends neighbor solicitation (including ARO if required)
Parameters
tgt: The target address of the neighbor solicitation. Must not be NULL or a multicast address. netif: Interface to send over. Must not be NULL. src: Source address for the neighbor solicitation. Will be chosen from the interface according to dst
, if NULL.dst: Destination address for neighbor solicitation. Must not be NULL.
-
void
_snd_uc_ns
(_nib_onl_entry_t * nbr, bool reset)¶ Sends unicast neighbor solicitation and reset corresponding timer event.
Note
Neighbor solicitations are used by the ARSM, but also by other mechanisms (e.g. duplicate address detection 6Lo address resolution). This is why it is defined here, but not exclusively available when
ipv6/nib/conf.h::GNRC_IPV6_NIB_CONF_ARSM
is set.Parameters
nbr: Neighbor to send neighbor solicitation to. reset: Reset probe counter.
-
void
_handle_sl2ao
(gnrc_netif_t * netif, const ipv6_hdr_t * ipv6, const icmpv6_hdr_t * icmpv6, const ndp_opt_t * sl2ao)¶ Handles SL2AO.
Note
This is here (but not only available with
ipv6/nib/conf.h::GNRC_IPV6_NIB_CONF_ARSM
set) since it is closely related to the ARSM, but ARSM isn’t the only mechanism using it (e.g. the 6Lo address registration uses it).Parameters
netif: Interface the SL2AO was sent over. ipv6: IPv6 header of the message carrying the SL2AO. icmpv6: ICMPv6 header of the message carrying the SL2AO. sl2ao: The SL2AO
-
void
_handle_snd_ns
(_nib_onl_entry_t * nbr)¶ Handler for
nib.h::GNRC_IPV6_NIB_SND_UC_NS
andnib.h::GNRC_IPV6_NIB_SND_UC_NS
event handler.Parameters
nbr: Neighbor to send the neighbor solicitation to.
-
void
_handle_state_timeout
(_nib_onl_entry_t * nbr)¶ Handler for
nib.h::GNRC_IPV6_NIB_DELAY_TIMEOUT
andnib.h::GNRC_IPV6_NIB_REACH_TIMEOUT
event handler.Parameters
nbr: Neighbor to handle the state timeout for to.
-
void
_probe_nbr
(_nib_onl_entry_t * nbr, bool reset)¶ Probes neighbor with neighbor solicitations.
Parameters
nbr: Neighbor to probe. reset: Reset probe counter.
-
void
_handle_adv_l2
(gnrc_netif_t * netif, _nib_onl_entry_t * nce, const icmpv6_hdr_t * icmpv6, const ndp_opt_t * tl2ao)¶ Handles advertised link-layer information.
This can either be an TL2AO or for a link-layer without addresses just a neighbor advertisement.
Parameters
netif: Interface the link-layer information was advertised over. nce: Neighbor cache entry that is updated by the advertised link-layer information. icmpv6: The ICMPv6 message (neighbor advertisement or redirect message) that carries the link-layer information. tl2ao: The TL2AO carrying the link-layer information. May be NULL for link-layers without addresses.
-
void
_recalc_reach_time
(gnrc_netif_ipv6_t * netif)¶ Recalculates the (randomized) reachable time of on a network interface.
See also
Parameters
netif: Interface to set reachable time for.
-
void
_set_reachable
(gnrc_netif_t * netif, _nib_onl_entry_t * nce)¶ Sets a neighbor cache entry reachable and starts the required event timers.
Parameters
netif: Interface to the NCE nce: The neighbor cache entry to set reachable
-
void
_init_iface_arsm
(gnrc_netif_t * netif)¶ Initializes interface for address registration state machine.
Parameters
netif: An interface
-
uint16_t
_get_nud_state
(_nib_onl_entry_t * nbr)¶ Gets neighbor unreachability state of a neighbor.
Parameters
nbr: Neighbor cache entry representing the neighbor. Return values
- Neighbor unreachability state of the
nbr
.
- Neighbor unreachability state of the
-
void
_set_nud_state
(gnrc_netif_t * netif, _nib_onl_entry_t * nbr, uint16_t state)¶ Sets neighbor unreachablility state of a neighbor.
Parameters
netif: The network interface (to signal routing protocol using gnrc_netif_t::ipv6::route_info_cb()) nbr: Neighbor cache entry representing the neighbor. state: Neighbor unreachability state for the neighbor.
-
bool
_is_reachable
(_nib_onl_entry_t * entry)¶ Checks if a node is in a reachable state.
A node is reachable if it is not in NUD state UNREACHABLE or INCOMPLETE
Parameters
entry: A node. Return values
- true, if
entry
is in a reachable state. - false, if
entry
is not in a reachable state.
- true, if