uip-nd6.c File Reference

Neighbor discovery (RFC 4861). More...

#include <string.h>
#include "net/uip-icmp6.h"
#include "net/uip-nd6.h"
#include "net/uip-ds6.h"
#include "lib/random.h"

Go to the source code of this file.

Defines

#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

void uip_nd6_ns_input (void)
 Process a neighbor solicitation.
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.
void uip_nd6_na_input (void)
 Process a Neighbor Advertisement.
void uip_nd6_rs_output (void)
 Send a Router Solicitation.
void uip_nd6_ra_input (void)
 process a Router Advertisement

Detailed Description

Neighbor discovery (RFC 4861).

Author:
Mathilde Durvy <mdurvy@cisco.com>
Julien Abeille <jabeille@cisco.com>

Definition in file uip-nd6.c.


Generated on Mon Apr 11 14:23:47 2011 for Contiki 2.5 by  doxygen 1.6.1