|
Contiki 3.x
|
Neighbor discovery (RFC 4861) More...
#include <string.h>#include "net/ipv6/uip-icmp6.h"#include "net/ipv6/uip-nd6.h"#include "net/ipv6/uip-ds6.h"#include "net/ip/uip-nameserver.h"#include "lib/random.h"#include "net/ip/uip-debug.h"Go to the source code of this file.
Macros | |
| #define | UIP_ND6_OPT_HDR_BUF ((uip_nd6_opt_hdr *)&uip_buf[uip_l2_l3_icmp_hdr_len + nd6_opt_offset]) |
| Pointer to ND option. | |
Pointers to the header structures. | |
All pointers except UIP_IP_BUF depend on uip_ext_len, which at packet reception, is the total length of the extension headers. The pointer to ND6 options header also depends on nd6_opt_offset, which we set in each function. Care should be taken when manipulating these buffers about the value of these length variables | |
| #define | UIP_IP_BUF ((struct uip_ip_hdr *)&uip_buf[UIP_LLH_LEN]) |
| Pointer to IP header. | |
| #define | UIP_ICMP_BUF ((struct uip_icmp_hdr *)&uip_buf[uip_l2_l3_hdr_len]) |
| Pointer to ICMP header. | |
| #define | UIP_ND6_RS_BUF ((uip_nd6_rs *)&uip_buf[uip_l2_l3_icmp_hdr_len]) |
| #define | UIP_ND6_RA_BUF ((uip_nd6_ra *)&uip_buf[uip_l2_l3_icmp_hdr_len]) |
| #define | UIP_ND6_NS_BUF ((uip_nd6_ns *)&uip_buf[uip_l2_l3_icmp_hdr_len]) |
| #define | UIP_ND6_NA_BUF ((uip_nd6_na *)&uip_buf[uip_l2_l3_icmp_hdr_len]) |
Functions | |
| static int | extract_lladdr_from_llao_aligned (uip_lladdr_t *dest) |
| Pointer to a prefix list entry. | |
| void | uip_nd6_ns_output (uip_ipaddr_t *src, uip_ipaddr_t *dest, uip_ipaddr_t *tgt) |
| Send a neighbor solicitation, send a Neighbor Advertisement. More... | |
| void | uip_nd6_rs_output (void) |
| Send a Router Solicitation. More... | |
| void | ra_input (void) |
| Process a Router Advertisement. More... | |
| void | uip_nd6_init () |
| Initialise the uIP ND core. | |
Variables | |
| static uint8_t * | nd6_opt_llao |
| Offset from the end of the icmpv6 header to the option in uip_buf. | |
| static uip_ds6_nbr_t * | nbr |
| Pointer to llao option in uip_buf. | |
| static uip_ds6_defrt_t * | defrt |
| Pointer to a nbr cache entry. | |
| static uip_ds6_addr_t * | addr |
| Pointer to a router list entry. | |
| static uip_nd6_opt_prefix_info * | nd6_opt_prefix_info |
| Pointer to an interface address. | |
| static uip_ipaddr_t | ipaddr |
| Pointer to prefix information option in uip_buf. | |
Neighbor discovery (RFC 4861)
Definition in file uip-nd6.c.
| void ra_input | ( | void | ) |
Process a Router Advertisement.
Definition at line 848 of file uip-nd6.c.
References extract_lladdr_from_llao_aligned(), ipaddr, NBR_INCOMPLETE, nd6_opt_llao, NULL, stimer_remaining(), stimer_set(), uip_ds6_addr_add(), uip_ds6_compute_reachable_time(), uip_ds6_if, uip_ds6_nbr_add(), uip_ds6_set_addr_iid(), UIP_ICMP_BUF, UIP_IP_BUF, uip_ipaddr_copy, uip_is_addr_linklocal, uip_len, uip_lladdr, UIP_LLADDR_LEN, uip_nameserver_update(), UIP_ND6_HOP_LIMIT, UIP_ND6_INFINITE_LIFETIME, UIP_ND6_OPT_HDR_BUF, and UIP_STAT.
1.8.6