![]() |
Contiki-NG
|
RPL-lite is a lightweight implementation of RPL tailored for reliability. More...
Files | |
| file | rpl-conf.h |
| Public configuration and API declarations for ContikiRPL. | |
| file | rpl-const.h |
| Constants for RPL. | |
| file | rpl-dag-root.c |
| DAG root utility functions for RPL. | |
| file | rpl-dag-root.h |
| DAG root utility functions for RPL. | |
| file | rpl-dag.c |
| Logic for Directed Acyclic Graphs in RPL. | |
| file | rpl-dag.h |
| Header file for rpl-dag module. | |
| file | rpl-ext-header.c |
| Management of extension headers for ContikiRPL. | |
| file | rpl-ext-header.h |
| Header file for rpl-ext-header. | |
| file | rpl-icmp6.c |
| ICMP6 I/O for RPL control messages. | |
| file | rpl-icmp6.h |
| Header file for rpl-ext-header. | |
| file | rpl-mrhof.c |
| The Minimum Rank with Hysteresis Objective Function (MRHOF), RFC6719. | |
| file | rpl-neighbor.c |
| Logic for DAG neighbors in RPL. | |
| file | rpl-neighbor.h |
| Header file for rpl-neighbor module. | |
| file | rpl-of0.c |
| An implementation of RPL's objective function 0, RFC6552. | |
| file | rpl-timers.c |
| RPL timer management. | |
| file | rpl-timers.h |
| Header file for rpl-timers module. | |
| file | rpl-types.h |
| RPL types and macros. | |
| file | rpl.c |
| ContikiRPL, an implementation of RPL: IPv6 Routing Protocol for Low-Power and Lossy Networks (IETF RFC 6550) | |
Data Structures | |
| struct | rpl_metric_object_energy |
| Structure for RPL energy metric. More... | |
| struct | rpl_metric_container |
| Logical representation of a DAG Metric Container. More... | |
| struct | rpl_prefix |
| RPL prefix information. More... | |
| struct | rpl_nbr |
| All information related to a RPL neighbor. More... | |
| struct | rpl_of |
| API for RPL objective functions (OF) More... | |
| struct | rpl_dag |
| RPL DAG structure. More... | |
| struct | rpl_instance |
| RPL instance structure. More... | |
Macros | |
| #define | uip_create_linklocal_rplnodes_mcast(addr) uip_ip6addr((addr), 0xff02, 0, 0, 0, 0, 0, 0, 0x001a) |
| Set IP address addr to the link-local, all-rpl-nodes multicast address. | |
| #define | uip_is_addr_linklocal_rplnodes_mcast(addr) |
| Is IPv6 address addr the link-local, all-RPL-nodes multicast address? | |
| #define | RPL_LIFETIME(lifetime) |
| Compute lifetime, accounting for the lifetime unit. | |
| #define | ROOT_RANK curr_instance.min_hoprankinc |
| Rank of a root node. | |
| #define | DAG_RANK(fixpt_rank) ((fixpt_rank) / curr_instance.min_hoprankinc) |
| Return DAG RANK as per RFC 6550 (rank divided by min_hoprankinc) | |
Enumerations | |
| enum | rpl_dag_state |
| RPL DAG states. | |
Functions | |
| void | rpl_dag_root_print_links (const char *str) |
| Prints a summary of all routing links. | |
| void | rpl_dag_root_set_prefix (uip_ipaddr_t *prefix, uip_ipaddr_t *iid) |
| Set a prefix in case the node is later set as dag root. | |
| int | rpl_dag_root_start (void) |
| Set the node as root and start a DAG. | |
| int | rpl_dag_root_is_root (void) |
| Tells whether we are DAG root or not. | |
| const char * | rpl_dag_state_to_str (enum rpl_dag_state state) |
| Returns a textual description of the current DAG state. | |
| int | rpl_dag_get_root_ipaddr (uip_ipaddr_t *ipaddr) |
| Returns the IPv6 address of the RPL DAG root, if any. | |
| void | rpl_dag_leave (void) |
| Leaves the current DAG. | |
| void | rpl_dag_poison_and_leave (void) |
| Start poisoning and leave the DAG after a delay. | |
| void | rpl_dag_periodic (unsigned seconds) |
| A function called periodically. | |
| int | rpl_is_addr_in_our_dag (const uip_ipaddr_t *addr) |
| Tells whether a given global IPv6 address is in our current DAG. | |
| rpl_instance_t * | rpl_get_default_instance (void) |
| Returns pointer to the default instance (for compatibility with legagy RPL code) | |
| rpl_dag_t * | rpl_get_any_dag (void) |
| Returns pointer to any DAG (for compatibility with legagy RPL code) | |
| void | rpl_refresh_routes (const char *str) |
| Triggers a route fresh via DTSN increment. | |
| void | rpl_global_repair (const char *str) |
| Triggers a RPL global repair. | |
| void | rpl_local_repair (const char *str) |
| Triggers a RPL local repair. | |
| int | rpl_dag_ready_to_advertise (void) |
| Tells whether RPL is ready to advertise the DAG. | |
| void | rpl_dag_update_state (void) |
| Updates RPL internal state: selects preferred parent, updates rank & metreic container, triggers control traffic accordingly and updates uIP6 internal state. | |
| void | rpl_process_dio (uip_ipaddr_t *from, rpl_dio_t *dio) |
| Processes incoming DIO. | |
| void | rpl_process_dis (uip_ipaddr_t *from, int is_multicast) |
| Processes incoming DIS. | |
| void | rpl_process_dao (uip_ipaddr_t *from, rpl_dao_t *dao) |
| Processes incoming DAO. | |
| int | rpl_process_hbh (rpl_nbr_t *sender, uint16_t sender_rank, int loop_detected, int rank_error_signaled) |
| Processes Hop-by-Hop (HBH) Extension Header of a packet currently being forwrded. | |
| void | rpl_dag_init_root (uint8_t instance_id, uip_ipaddr_t *dag_id, uip_ipaddr_t *prefix, unsigned prefix_len, uint8_t flags) |
| Initializes DAG internal structure for a root node. | |
| void | rpl_dag_init (void) |
| Initializes rpl-dag module. | |
| void | rpl_process_dao_ack (uint8_t sequence, uint8_t status) |
| Processes incoming DAO-ACK. | |
| int | rpl_ext_header_srh_get_next_hop (uip_ipaddr_t *ipaddr) |
| Look for next hop from SRH of current uIP packet. | |
| int | rpl_ext_header_srh_update (void) |
| Process and update SRH in-place, i.e. | |
| int | rpl_ext_header_hbh_update (uint8_t *ext_buf, int opt_offset) |
| Process and update the RPL hop-by-hop extension headers of the current uIP packet. | |
| int | rpl_ext_header_update (void) |
| Adds/updates all RPL extension headers to current uIP packet. | |
| bool | rpl_ext_header_remove (void) |
| Removes all RPL extension headers. | |
| uip_ds6_nbr_t * | rpl_icmp6_update_nbr_table (uip_ipaddr_t *from, nbr_table_reason_t reason, void *data) |
| Updates IPv6 neighbor cache on incoming link-local RPL ICMPv6 messages. | |
| void | rpl_icmp6_dis_output (uip_ipaddr_t *addr) |
| Creates an ICMPv6 DIS packet and sends it. | |
| void | rpl_icmp6_dio_output (uip_ipaddr_t *uc_addr) |
| Creates an ICMPv6 DIO packet and sends it. | |
| void | rpl_icmp6_dao_output (uint8_t lifetime) |
| Creates an ICMPv6 DAO packet and sends it to the root, advertising the current preferred parent, and with our global address as prefix. | |
| void | rpl_icmp6_init (void) |
| Initializes rpl-icmp6 module, registers ICMPv6 handlers for all RPL ICMPv6 messages: DIO, DIS, DAO and DAO-ACK. | |
| void | rpl_icmp6_dao_ack_output (uip_ipaddr_t *dest, uint8_t sequence, uint8_t status) |
| Creates an ICMPv6 DAO-ACK packet and sends it to the originator of the ACK. | |
| int | rpl_neighbor_snprint (char *buf, int buflen, rpl_nbr_t *nbr) |
| Print a textual description of RPL neighbor into a string. | |
| void | rpl_neighbor_print_list (const char *str) |
| Prints a summary of all RPL neighbors and their properties. | |
| int | rpl_neighbor_count (void) |
| Returns the number of nodes in the RPL neighbor table. | |
| rpl_nbr_t * | rpl_neighbor_get_from_lladdr (uip_lladdr_t *addr) |
| Returns a neighbor from its link-layer address. | |
| int | rpl_neighbor_is_acceptable_parent (rpl_nbr_t *nbr) |
| Tells whether a nbr is acceptable as per the OF's definition. | |
| uint16_t | rpl_neighbor_get_link_metric (rpl_nbr_t *nbr) |
| Returns a neighbor's link metric. | |
| rpl_rank_t | rpl_neighbor_rank_via_nbr (rpl_nbr_t *nbr) |
| Returns our rank if selecting a given parent as preferred parent. | |
| const linkaddr_t * | rpl_neighbor_get_lladdr (rpl_nbr_t *nbr) |
| Returns a neighbors's link-layer address. | |
| uip_ipaddr_t * | rpl_neighbor_get_ipaddr (rpl_nbr_t *nbr) |
| Returns a neighbor's (link-local) IPv6 address. | |
| const struct link_stats * | rpl_neighbor_get_link_stats (rpl_nbr_t *nbr) |
| Returns a neighbor's link statistics. | |
| int | rpl_neighbor_is_fresh (rpl_nbr_t *nbr) |
| Tells wether we have fresh link information towards a given neighbor. | |
| int | rpl_neighbor_is_parent (rpl_nbr_t *nbr) |
| Tells whether a neighbor is in the parent set. | |
| void | rpl_neighbor_set_preferred_parent (rpl_nbr_t *nbr) |
| Set current RPL preferred parent and update DS6 default route accordingly. | |
| void | rpl_neighbor_remove_all (void) |
| Empty the RPL neighbor table. | |
| rpl_nbr_t * | rpl_neighbor_get_from_ipaddr (uip_ipaddr_t *addr) |
| Returns a neighbor from its link-local IPv6 address. | |
| rpl_nbr_t * | rpl_neighbor_select_best (void) |
| Returns the best candidate for preferred parent. | |
| void | rpl_neighbor_init (void) |
| Initialize rpl-dag-neighbor module. | |
| void | rpl_timers_schedule_periodic_dis (void) |
| Schedule periodic DIS with a random delay based on RPL_DIS_INTERVAL, until we join a DAG. | |
| void | rpl_timers_dio_reset (const char *str) |
| Reset DIO Trickle timer. | |
| void | rpl_timers_schedule_unicast_dio (rpl_nbr_t *target) |
| Schedule unicast DIO with no delay. | |
| void | rpl_timers_schedule_dao (void) |
| Schedule a DAO with random delay based on RPL_DAO_DELAY. | |
| void | rpl_timers_unschedule_leaving (void) |
| Cancel scheduled leaving if any. | |
| void | rpl_timers_schedule_leaving (void) |
| Schedule leaving after RPL_DELAY_BEFORE_LEAVING. | |
| void | rpl_timers_init (void) |
| Initialize rpl-timers module. | |
| void | rpl_timers_stop_dag_timers (void) |
| Stop all timers related to the DAG. | |
| void | rpl_timers_schedule_state_update (void) |
| Schedule a state update ASAP. | |
| void | rpl_timers_schedule_dao_ack (uip_ipaddr_t *target, uint16_t sequence) |
| Schedule a DAO-ACK with no delay. | |
| void | rpl_timers_notify_dao_ack (void) |
| Let the rpl-timers module know that the last DAO was ACKed. | |
| void | rpl_schedule_probing (void) |
| Schedule probing with delay RPL_PROBING_DELAY_FUNC() | |
| void | rpl_schedule_probing_now (void) |
| Schedule probing within a few seconds. | |
| static void | rpl_timers_unschedule_state_update (void) |
| Cancelled any scheduled state update. | |
| int | rpl_lollipop_greater_than (int a, int b) |
| Greater-than function for a lollipop counter. | |
| const uip_ipaddr_t * | rpl_get_global_address (void) |
| Get one of the node's global addresses. | |
| void | rpl_link_callback (const linkaddr_t *addr, int status, int numtx) |
| Called by lower layers after every packet transmission. | |
| int | rpl_has_joined (void) |
| Tells whether the node has joined a network or not. | |
| int | rpl_is_reachable (void) |
| Get the RPL's best guess on if we are reachable via have downward route or not. | |
| void | rpl_reset_prefix (rpl_prefix_t *last_prefix) |
| Removes current prefx. | |
| int | rpl_set_prefix_from_addr (uip_ipaddr_t *addr, unsigned len, uint8_t flags) |
| Set prefix from an IPv6 address. | |
| int | rpl_set_prefix (rpl_prefix_t *prefix) |
| Set prefix from an prefix data structure (from DIO) | |
| void | rpl_set_leaf_only (uint8_t value) |
| Changes the value of the rpl_leaf_only flag, which determines if a node acts only as a leaf in the network. | |
| uint8_t | rpl_get_leaf_only (void) |
| Get the value of the rpl_leaf_only flag. | |
RPL-lite is a lightweight implementation of RPL tailored for reliability.
Supports only non-storing mode, one instance and one DAG.
| int rpl_dag_get_root_ipaddr | ( | uip_ipaddr_t * | ipaddr | ) |
Returns the IPv6 address of the RPL DAG root, if any.
| ipaddr | A pointer where to copy the IP address of the DAG root |
Definition at line 89 of file rpl-dag.c.
References ipaddr, and uip_ipaddr_copy.
| void rpl_dag_init_root | ( | uint8_t | instance_id, |
| uip_ipaddr_t * | dag_id, | ||
| uip_ipaddr_t * | prefix, | ||
| unsigned | prefix_len, | ||
| uint8_t | flags ) |
Initializes DAG internal structure for a root node.
| instance_id | The instance ID |
| dag_id | The DAG ID |
| prefix | The prefix |
| prefix_len | The prefix length |
| flags | The prefix flags (from DIO) |
Definition at line 713 of file rpl-dag.c.
References rpl_dag_leave(), and rpl_timers_dio_reset().
Referenced by rpl_dag_root_start().
| void rpl_dag_periodic | ( | unsigned | seconds | ) |
A function called periodically.
Used to age the DAG (decrease lifetime and expire DAG accordingly)
| seconds | The number of seconds elapsted since last call |
Definition at line 138 of file rpl-dag.c.
References rpl_icmp6_dis_output(), rpl_neighbor_get_ipaddr(), and rpl_timers_schedule_state_update().
| int rpl_dag_ready_to_advertise | ( | void | ) |
Tells whether RPL is ready to advertise the DAG.
Definition at line 255 of file rpl-dag.c.
Referenced by rpl_timers_dio_reset().
| int rpl_dag_root_is_root | ( | void | ) |
Tells whether we are DAG root or not.
Definition at line 158 of file rpl-dag-root.c.
| void rpl_dag_root_print_links | ( | const char * | str | ) |
Prints a summary of all routing links.
| str | A descriptive text on the caller |
Definition at line 54 of file rpl-dag-root.c.
References uip_sr_link_snprint(), uip_sr_node_head(), uip_sr_node_next(), and uip_sr_num_nodes().
| void rpl_dag_root_set_prefix | ( | uip_ipaddr_t * | prefix, |
| uip_ipaddr_t * | iid ) |
Set a prefix in case the node is later set as dag root.
| prefix | The prefix. If NULL, uip_ds6_default_prefix() is used instead |
| iid | The IID. If NULL, it will be built from uip_ds6_set_addr_iid. |
Definition at line 113 of file rpl-dag-root.c.
| int rpl_dag_root_start | ( | void | ) |
Set the node as root and start a DAG.
Definition at line 124 of file rpl-dag-root.c.
References ipaddr, rpl_dag_init_root(), rpl_dag_update_state(), rpl_get_global_address(), uip_ds6_if, and uip_is_addr_linklocal.
| const char * rpl_dag_state_to_str | ( | enum rpl_dag_state | state | ) |
Returns a textual description of the current DAG state.
| state | The DAG state |
Definition at line 72 of file rpl-dag.c.
Referenced by rpl_neighbor_print_list().
| int rpl_ext_header_hbh_update | ( | uint8_t * | ext_buf, |
| int | opt_offset ) |
Process and update the RPL hop-by-hop extension headers of the current uIP packet.
| ext_buf | A pointer to the ext header buffer |
| opt_offset | The offset within the extension header where the option starts |
Definition at line 387 of file rpl-ext-header.c.
References rpl_process_hbh(), UIP_HTONS, and UIP_IP_BUF.
| bool rpl_ext_header_remove | ( | void | ) |
Removes all RPL extension headers.
Definition at line 545 of file rpl-ext-header.c.
References uip_buf, UIP_IP_BUF, uip_len, and UIP_PROTO_HBHO.
| int rpl_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 58 of file rpl-ext-header.c.
References ipaddr, rpl_is_addr_in_our_dag(), uip_buf, UIP_IP_BUF, uip_ipaddr_copy, uip_len, and uip_sr_get_node().
| int rpl_ext_header_srh_update | ( | void | ) |
Process and update SRH in-place, i.e.
internal address swapping as per RFC6554
Definition at line 155 of file rpl-ext-header.c.
References uip_buf, UIP_BUFSIZE, UIP_IP_BUF, uip_ipaddr_copy, and uip_len.
| int rpl_ext_header_update | ( | void | ) |
Adds/updates all RPL extension headers to current uIP packet.
Definition at line 517 of file rpl-ext-header.c.
References uip_ds6_if, UIP_IP_BUF, uip_is_addr_linklocal, and uip_is_addr_mcast.
| rpl_dag_t * rpl_get_any_dag | ( | void | ) |
| rpl_instance_t * rpl_get_default_instance | ( | void | ) |
| const uip_ipaddr_t * rpl_get_global_address | ( | void | ) |
Get one of the node's global addresses.
Definition at line 71 of file rpl.c.
References ipaddr, uip_ds6_if, and uip_is_addr_linklocal.
Referenced by rpl_dag_root_start(), rpl_icmp6_dao_output(), and rpl_neighbor_print_list().
| uint8_t rpl_get_leaf_only | ( | void | ) |
Get the value of the rpl_leaf_only flag.
Definition at line 242 of file rpl.c.
Referenced by rpl_icmp6_dio_output(), and rpl_timers_dio_reset().
| void rpl_global_repair | ( | const char * | str | ) |
Triggers a RPL global repair.
| str | A textual description of the cause for triggering a repair |
Definition at line 204 of file rpl-dag.c.
References rpl_neighbor_print_list().
| int rpl_has_joined | ( | void | ) |
| void rpl_icmp6_dao_ack_output | ( | uip_ipaddr_t * | dest, |
| uint8_t | sequence, | ||
| uint8_t | status ) |
Creates an ICMPv6 DAO-ACK packet and sends it to the originator of the ACK.
| dest | The DAO-ACK destination (was source of the DAO) |
| sequence | The sequence number of the DAO being ACKed |
| status | The status of the DAO-ACK (see RPL_DAO_ACK_* defines) |
| void rpl_icmp6_dao_output | ( | uint8_t | lifetime | ) |
Creates an ICMPv6 DAO packet and sends it to the root, advertising the current preferred parent, and with our global address as prefix.
| lifetime | The DAO lifetime. Use 0 to send a No-path DAO |
Definition at line 594 of file rpl-icmp6.c.
References ICMP6_RPL, rpl_dag_update_state(), rpl_get_global_address(), rpl_neighbor_get_ipaddr(), and uip_icmp6_send().
Referenced by rpl_dag_leave().
| void rpl_icmp6_dio_output | ( | uip_ipaddr_t * | uc_addr | ) |
Creates an ICMPv6 DIO packet and sends it.
Can be unicast or multicast
| uc_addr | The link-local address of the target host, if any. Else, a multicast DIO will be sent. |
Definition at line 358 of file rpl-icmp6.c.
References addr, ICMP6_RPL, rpl_dag_update_state(), rpl_get_leaf_only(), and uip_icmp6_send().
Referenced by rpl_process_dis().
| void rpl_icmp6_dis_output | ( | uip_ipaddr_t * | addr | ) |
Creates an ICMPv6 DIS packet and sends it.
Can be unicast or multicast.
| addr | The link-local address of the target host, if any. Else, a multicast DIS will be sent. |
Definition at line 151 of file rpl-icmp6.c.
References addr, ICMP6_RPL, rpl_dag_update_state(), and uip_icmp6_send().
Referenced by rpl_dag_periodic().
| uip_ds6_nbr_t * rpl_icmp6_update_nbr_table | ( | uip_ipaddr_t * | from, |
| nbr_table_reason_t | reason, | ||
| void * | data ) |
Updates IPv6 neighbor cache on incoming link-local RPL ICMPv6 messages.
| from | The source link-local IPv6 address |
| reason | What triggered the update (maps to RPL packet types) |
| data | Generic pointer, used for instance to store parsed DIO data |
Definition at line 113 of file rpl-icmp6.c.
References nbr, uip_ds6_nbr_add(), and uip_ds6_nbr_lookup().
| int rpl_is_addr_in_our_dag | ( | const uip_ipaddr_t * | addr | ) |
Tells whether a given global IPv6 address is in our current DAG.
| addr | The global IPv6 address to be tested |
Definition at line 158 of file rpl-dag.c.
References addr.
Referenced by rpl_ext_header_srh_get_next_hop().
| int rpl_is_reachable | ( | void | ) |
| void rpl_link_callback | ( | const linkaddr_t * | addr, |
| int | status, | ||
| int | numtx ) |
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 97 of file rpl.c.
References addr, nbr, rpl_neighbor_get_from_lladdr(), rpl_neighbor_get_link_metric(), and rpl_timers_schedule_state_update().
| void rpl_local_repair | ( | const char * | str | ) |
Triggers a RPL local repair.
| str | A textual description of the cause for triggering a repair |
Definition at line 240 of file rpl-dag.c.
References rpl_neighbor_remove_all(), rpl_timers_dio_reset(), and rpl_timers_schedule_state_update().
| int rpl_lollipop_greater_than | ( | int | a, |
| int | b ) |
| int rpl_neighbor_count | ( | void | ) |
Returns the number of nodes in the RPL neighbor table.
Definition at line 168 of file rpl-neighbor.c.
Referenced by rpl_neighbor_print_list().
| rpl_nbr_t * rpl_neighbor_get_from_ipaddr | ( | uip_ipaddr_t * | addr | ) |
Returns a neighbor from its link-local IPv6 address.
| addr | The link-local IPv6 address |
Definition at line 331 of file rpl-neighbor.c.
References addr, uip_ds6_nbr_get_ll(), and uip_ds6_nbr_lookup().
| rpl_nbr_t * rpl_neighbor_get_from_lladdr | ( | uip_lladdr_t * | addr | ) |
Returns a neighbor from its link-layer address.
| addr | The link-layer address |
Definition at line 212 of file rpl-neighbor.c.
References addr.
Referenced by rpl_link_callback().
| uip_ipaddr_t * rpl_neighbor_get_ipaddr | ( | rpl_nbr_t * | nbr | ) |
Returns a neighbor's (link-local) IPv6 address.
| nbr | The neighbor |
Definition at line 251 of file rpl-neighbor.c.
References nbr, rpl_neighbor_get_lladdr(), and uip_ds6_nbr_ipaddr_from_lladdr().
Referenced by rpl_dag_periodic(), rpl_dag_update_state(), rpl_icmp6_dao_output(), rpl_neighbor_select_best(), rpl_neighbor_set_preferred_parent(), and rpl_neighbor_snprint().
| uint16_t rpl_neighbor_get_link_metric | ( | rpl_nbr_t * | nbr | ) |
Returns a neighbor's link metric.
| nbr | The neighbor |
Definition at line 227 of file rpl-neighbor.c.
References nbr.
Referenced by rpl_link_callback(), and rpl_neighbor_snprint().
| const struct link_stats * rpl_neighbor_get_link_stats | ( | rpl_nbr_t * | nbr | ) |
Returns a neighbor's link statistics.
| nbr | The neighbor |
Definition at line 258 of file rpl-neighbor.c.
References nbr, and rpl_neighbor_get_lladdr().
Referenced by rpl_neighbor_is_fresh(), and rpl_neighbor_snprint().
| const linkaddr_t * rpl_neighbor_get_lladdr | ( | rpl_nbr_t * | nbr | ) |
Returns a neighbors's link-layer address.
| nbr | The neighbor |
Definition at line 245 of file rpl-neighbor.c.
References nbr.
Referenced by rpl_neighbor_get_ipaddr(), and rpl_neighbor_get_link_stats().
| int rpl_neighbor_is_acceptable_parent | ( | rpl_nbr_t * | nbr | ) |
Tells whether a nbr is acceptable as per the OF's definition.
| nbr | The neighbor |
Definition at line 218 of file rpl-neighbor.c.
References nbr.
Referenced by rpl_neighbor_snprint().
| int rpl_neighbor_is_fresh | ( | rpl_nbr_t * | nbr | ) |
Tells wether we have fresh link information towards a given neighbor.
| nbr | The neighbor |
Definition at line 265 of file rpl-neighbor.c.
References nbr, and rpl_neighbor_get_link_stats().
Referenced by rpl_neighbor_select_best().
| int rpl_neighbor_is_parent | ( | rpl_nbr_t * | nbr | ) |
Tells whether a neighbor is in the parent set.
| nbr | The neighbor to be tested |
Definition at line 272 of file rpl-neighbor.c.
References nbr.
| void rpl_neighbor_print_list | ( | const char * | str | ) |
Prints a summary of all RPL neighbors and their properties.
| str | A descriptive text on the caller |
Definition at line 143 of file rpl-neighbor.c.
References nbr, rpl_dag_state_to_str(), rpl_get_global_address(), rpl_neighbor_count(), and rpl_neighbor_snprint().
Referenced by rpl_dag_update_state(), rpl_global_repair(), and rpl_refresh_routes().
| rpl_rank_t rpl_neighbor_rank_via_nbr | ( | rpl_nbr_t * | nbr | ) |
Returns our rank if selecting a given parent as preferred parent.
| nbr | The neighbor |
Definition at line 236 of file rpl-neighbor.c.
References nbr.
Referenced by rpl_dag_update_state(), and rpl_neighbor_snprint().
| rpl_nbr_t * rpl_neighbor_select_best | ( | void | ) |
Returns the best candidate for preferred parent.
Definition at line 377 of file rpl-neighbor.c.
References rpl_neighbor_get_ipaddr(), rpl_neighbor_is_fresh(), and rpl_schedule_probing_now().
Referenced by rpl_dag_update_state().
| void rpl_neighbor_set_preferred_parent | ( | rpl_nbr_t * | nbr | ) |
Set current RPL preferred parent and update DS6 default route accordingly.
| nbr | The new preferred parent |
Definition at line 278 of file rpl-neighbor.c.
References nbr, and rpl_neighbor_get_ipaddr().
Referenced by rpl_dag_update_state(), and rpl_neighbor_remove_all().
| int rpl_neighbor_snprint | ( | char * | buf, |
| int | buflen, | ||
| rpl_nbr_t * | nbr ) |
Print a textual description of RPL neighbor into a string.
| buf | The buffer where to write content |
| buflen | The buffer len |
| nbr | A pointer to a RPL neighbor that will be written to the buffer |
Definition at line 90 of file rpl-neighbor.c.
References CLOCK_SECOND, clock_time(), log_6addr_compact_snprint(), nbr, rpl_neighbor_get_ipaddr(), rpl_neighbor_get_link_metric(), rpl_neighbor_get_link_stats(), rpl_neighbor_is_acceptable_parent(), rpl_neighbor_rank_via_nbr(), and uiplib_ipaddr_snprint().
Referenced by rpl_neighbor_print_list().
| void rpl_process_dao | ( | uip_ipaddr_t * | from, |
| rpl_dao_t * | dao ) |
Processes incoming DAO.
| from | The IPv6 address of the originator |
| dao | A pointer to a parsed DAO |
Definition at line 633 of file rpl-dag.c.
References rpl_timers_schedule_dao_ack(), uip_sr_expire_parent(), and uip_sr_update_node().
| void rpl_process_dao_ack | ( | uint8_t | sequence, |
| uint8_t | status ) |
Processes incoming DAO-ACK.
| sequence | The DAO-ACK sequence number |
| status | The DAO-ACK status (see RPL_DAO_ACK_* defines) |
| void rpl_process_dio | ( | uip_ipaddr_t * | from, |
| rpl_dio_t * | dio ) |
Processes incoming DIO.
| from | The IPv6 address of the originator |
| dio | A pointer to a parsed DIO |
Definition at line 600 of file rpl-dag.c.
References rpl_dag_update_state().
| void rpl_process_dis | ( | uip_ipaddr_t * | from, |
| int | is_multicast ) |
Processes incoming DIS.
| from | The IPv6 address of the originator |
| is_multicast | Set to 1 for multicast DIS, 0 for unicast DIS |
Definition at line 619 of file rpl-dag.c.
References rpl_icmp6_dio_output(), and rpl_timers_dio_reset().
| int rpl_process_hbh | ( | rpl_nbr_t * | sender, |
| uint16_t | sender_rank, | ||
| int | loop_detected, | ||
| int | rank_error_signaled ) |
Processes Hop-by-Hop (HBH) Extension Header of a packet currently being forwrded.
| sender | The IPv6 address of the originator |
| sender_rank | The rank advertised by the sender in the HBH header |
| loop_detected | 1 if we could detect a loop while forwarding, 0 otherwise |
| rank_error_signaled | 1 if the HBH header advertises a rank error, 0 otherwise |
Definition at line 680 of file rpl-dag.c.
References rpl_dag_update_state(), rpl_timers_dio_reset(), and rpl_timers_schedule_unicast_dio().
Referenced by rpl_ext_header_hbh_update().
| void rpl_refresh_routes | ( | const char * | str | ) |
Triggers a route fresh via DTSN increment.
| str | a textual description of the cause for refresh |
Definition at line 189 of file rpl-dag.c.
References rpl_neighbor_print_list().
| void rpl_reset_prefix | ( | rpl_prefix_t * | last_prefix | ) |
Removes current prefx.
| last_prefix | The last prefix (which is to be removed) |
Definition at line 141 of file rpl.c.
References ipaddr.
Referenced by rpl_dag_leave().
| void rpl_set_leaf_only | ( | uint8_t | value | ) |
| int rpl_set_prefix | ( | rpl_prefix_t * | prefix | ) |
Set prefix from an prefix data structure (from DIO)
| prefix | The prefix |
Definition at line 185 of file rpl.c.
References rpl_set_prefix_from_addr().
| int rpl_set_prefix_from_addr | ( | uip_ipaddr_t * | addr, |
| unsigned | len, | ||
| uint8_t | flags ) |
Set prefix from an IPv6 address.
| addr | The prefix |
| len | The prefix length |
| flags | The DIO prefix flags |
Definition at line 157 of file rpl.c.
References addr, flags, ipaddr, and uip_ds6_addr_add().
Referenced by rpl_set_prefix().
| void rpl_timers_dio_reset | ( | const char * | str | ) |
Reset DIO Trickle timer.
| str | A textual description of caused the DIO timer reset |
Definition at line 150 of file rpl-timers.c.
References rpl_dag_ready_to_advertise(), and rpl_get_leaf_only().
Referenced by rpl_dag_init_root(), rpl_dag_update_state(), rpl_local_repair(), rpl_process_dis(), and rpl_process_hbh().
| void rpl_timers_schedule_state_update | ( | void | ) |
Schedule a state update ASAP.
Useful to force an update from a context where updating directly would be unsafe.
Definition at line 555 of file rpl-timers.c.
References ctimer_set().
Referenced by rpl_dag_periodic(), rpl_dag_poison_and_leave(), rpl_link_callback(), and rpl_local_repair().