Contiki-NG
|
The structure of a routing protocol driver. More...
#include <os/net/routing/routing.h>
Data Fields | |
void(* | init )(void) |
Initialize the routing protocol. | |
void(* | root_set_prefix )(uip_ipaddr_t *prefix, uip_ipaddr_t *iid) |
Set the prefix, for nodes that will operate as root. More... | |
int(* | root_start )(void) |
Set the node as root and start a network. More... | |
int(* | node_is_root )(void) |
Tells whether the node is a network root or not. More... | |
int(* | get_root_ipaddr )(uip_ipaddr_t *ipaddr) |
Returns the IPv6 address of the network root, if any. More... | |
int(* | get_sr_node_ipaddr )(uip_ipaddr_t *addr, const uip_sr_node_t *node) |
Returns the global IPv6 address of a source routing node. More... | |
void(* | leave_network )(void) |
Leave the network the node is part of. More... | |
int(* | node_has_joined )(void) |
Tells whether the node is currently part of a network. More... | |
int(* | node_is_reachable )(void) |
Tells whether the node is currently reachable as part of the network. More... | |
void(* | global_repair )(const char *str) |
Triggers a global topology repair. More... | |
void(* | local_repair )(const char *str) |
Triggers a RPL local topology repair. More... | |
void(* | ext_header_remove )(void) |
Removes all extension headers that pertain to the routing protocol. | |
int(* | ext_header_update )(void) |
Adds/updates routing protocol extension headers to current uIP packet. More... | |
int(* | ext_header_hbh_update )(int uip_ext_opt_offset) |
Process and update the routing protocol hob-by-hop extention headers of the current uIP packet. More... | |
int(* | ext_header_srh_update )(void) |
Process and update SRH in-place, i.e. More... | |
int(* | ext_header_srh_get_next_hop )(uip_ipaddr_t *ipaddr) |
Look for next hop from SRH of current uIP packet. More... | |
void(* | link_callback )(const linkaddr_t *addr, int status, int numtx) |
Called by lower layers after every packet transmission. More... | |
void(* | neighbor_state_changed )(uip_ds6_nbr_t *nbr) |
Called by uIP to notify addition/removal of IPv6 neighbor entries. More... | |
void(* | drop_route )(uip_ds6_route_t *route) |
Called by uIP if it has decided to drop a route because. More... | |
void(* routing_driver::drop_route) (uip_ds6_route_t *route) |
Called by uIP if it has decided to drop a route because.
route | The route that will be dropped after this function returns |
Definition at line 174 of file routing.h.
Referenced by rpl_get_leaf_only(), rpl_link_callback(), rpl_set_prefix(), and tcpip_input().
int(* routing_driver::ext_header_hbh_update) (int uip_ext_opt_offset) |
Process and update the routing protocol hob-by-hop extention headers of the current uIP packet.
uip_ext_opt_offset | The offset within the uIP packet where extension headers start |
Definition at line 139 of file routing.h.
Referenced by ext_hdr_options_process().
int(* routing_driver::ext_header_srh_get_next_hop) (uip_ipaddr_t *ipaddr) |
Look for next hop from SRH of current uIP packet.
ipaddr | A pointer to the address where to store the next hop. |
Definition at line 152 of file routing.h.
Referenced by tcpip_input().
int(* routing_driver::ext_header_srh_update) (void) |
Process and update SRH in-place, i.e.
internal address swapping as per RFC6554
Definition at line 145 of file routing.h.
Referenced by uip_process().
int(* routing_driver::ext_header_update) (void) |
Adds/updates routing protocol extension headers to current uIP packet.
Definition at line 129 of file routing.h.
Referenced by tcpip_ipv6_output().
int(* routing_driver::get_root_ipaddr) (uip_ipaddr_t *ipaddr) |
Returns the IPv6 address of the network root, if any.
ipaddr | A pointer where to copy the IP address of the root |
Definition at line 82 of file routing.h.
Referenced by rpl_link_callback(), and uip_sr_is_addr_reachable().
int(* routing_driver::get_sr_node_ipaddr) (uip_ipaddr_t *addr, const uip_sr_node_t *node) |
Returns the global IPv6 address of a source routing node.
ipaddr | A pointer where to copy the IP address of the node |
node | The source routing node |
Definition at line 90 of file routing.h.
Referenced by rpl_ext_header_srh_update(), rpl_get_leaf_only(), rpl_link_callback(), rpl_set_prefix(), uip_sr_link_snprint(), uip_sr_num_nodes(), and uip_sr_periodic().
void(* routing_driver::global_repair) (const char *str) |
Triggers a global topology repair.
str | A textual description of the cause for triggering a repair |
Definition at line 113 of file routing.h.
Referenced by rpl_link_callback().
void(* routing_driver::leave_network) (void) |
Leave the network the node is part of.
Definition at line 95 of file routing.h.
Referenced by rpl_link_callback().
Called by lower layers after every packet transmission.
addr | The link-layer addrress of the packet destination |
status | The transmission status (see os/net/mac/mac.h) |
numtx | The total number of transmission attempts |
Definition at line 160 of file routing.h.
Referenced by packet_sent().
void(* routing_driver::local_repair) (const char *str) |
Triggers a RPL local topology repair.
str | A textual description of the cause for triggering a repair |
Definition at line 119 of file routing.h.
Referenced by rpl_link_callback().
void(* routing_driver::neighbor_state_changed) (uip_ds6_nbr_t *nbr) |
Called by uIP to notify addition/removal of IPv6 neighbor entries.
addr | The link-layer addrress of the packet destination |
status | The transmission status (see os/net/mac/mac.h) |
numtx | The total number of transmission attempts |
Definition at line 168 of file routing.h.
Referenced by rpl_get_leaf_only(), rpl_set_prefix(), and uip_ds6_nbr_add().
int(* routing_driver::node_has_joined) (void) |
int(* routing_driver::node_is_reachable) (void) |
Tells whether the node is currently reachable as part of the network.
Definition at line 107 of file routing.h.
Referenced by coap_endpoint_is_connected().
int(* routing_driver::node_is_root) (void) |
void(* routing_driver::root_set_prefix) (uip_ipaddr_t *prefix, uip_ipaddr_t *iid) |