Contiki-NG
Loading...
Searching...
No Matches
uip-nd6.c File Reference

Neighbor discovery (RFC 4861) More...

#include <string.h>
#include <inttypes.h>
#include "net/ipv6/uip-icmp6.h"
#include "net/ipv6/uip-nd6.h"
#include "net/ipv6/uip-ds6.h"
#include "net/ipv6/uip-nameserver.h"
#include "lib/random.h"
#include "sys/log.h"

Go to the source code of this file.

Macros

#define ND6_OPT(opt)   ((unsigned char *)(UIP_ICMP_PAYLOAD + (opt)))
 Pointer to ND option.
 
Pointers to the header structures.
#define UIP_ND6_RS_BUF   ((uip_nd6_rs *)UIP_ICMP_PAYLOAD)
 

Functions

static int extract_lladdr_from_llao_aligned (uip_lladdr_t *dest)
 Pointer to a prefix list entry.
 
void uip_nd6_rs_output (void)
 Neighbor Solicitation Processing.
 
void ra_input (void)
 Process a Router Advertisement.
 
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_tnbr
 Pointer to llao option in uip_buf.
 
static uip_ds6_addr_taddr
 Pointer to a nbr cache entry.
 
static uip_ds6_defrt_tdefrt
 Pointer to an interface address.
 
static uip_nd6_opt_prefix_infond6_opt_prefix_info
 Pointer to a router list entry.
 
static uip_ipaddr_t ipaddr
 Pointer to prefix information option in uip_buf.
 

Detailed Description

Neighbor discovery (RFC 4861)

Author
Mathilde Durvy mdurv.nosp@m.y@ci.nosp@m.sco.c.nosp@m.om
Julien Abeille jabei.nosp@m.lle@.nosp@m.cisco.nosp@m..com

Definition in file uip-nd6.c.

Function Documentation

◆ ra_input()

void ra_input ( void )

Process a Router Advertisement.

  • Possible actions when receiving a RA: add router to router list, recalculate reachable time, update link hop limit, update retrans timer.
  • If MTU option: update MTU.
  • If SLLAO option: update entry in neighbor cache
  • If prefix option: start autoconf, add prefix to prefix list

Definition at line 855 of file uip-nd6.c.

References addr, defrt, extract_lladdr_from_llao_aligned(), ipaddr, nbr, NBR_INCOMPLETE, nd6_opt_llao, nd6_opt_prefix_info, stimer_remaining(), stimer_set(), uip_ds6_addr_add(), uip_ds6_compute_reachable_time(), uip_ds6_if, uip_ds6_nbr_add(), uip_ds6_nbr_get_ll(), uip_ds6_nbr_lookup(), uip_ds6_nbr_update_ll(), 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, and UIP_STAT.