76 #include "lib/random.h"
86 #define UIP_LOG(m) uip_log(m)
104 #define UIP_IP_BUF ((struct uip_ip_hdr *)&uip_buf[UIP_LLH_LEN])
105 #define UIP_ICMP_BUF ((struct uip_icmp_hdr *)&uip_buf[uip_l2_l3_hdr_len])
107 #define UIP_ND6_RS_BUF ((uip_nd6_rs *)&uip_buf[uip_l2_l3_icmp_hdr_len])
108 #define UIP_ND6_RA_BUF ((uip_nd6_ra *)&uip_buf[uip_l2_l3_icmp_hdr_len])
109 #define UIP_ND6_NS_BUF ((uip_nd6_ns *)&uip_buf[uip_l2_l3_icmp_hdr_len])
110 #define UIP_ND6_NA_BUF ((uip_nd6_na *)&uip_buf[uip_l2_l3_icmp_hdr_len])
113 #define UIP_ND6_OPT_HDR_BUF ((uip_nd6_opt_hdr *)&uip_buf[uip_l2_l3_icmp_hdr_len + nd6_opt_offset])
114 #define UIP_ND6_OPT_PREFIX_BUF ((uip_nd6_opt_prefix_info *)&uip_buf[uip_l2_l3_icmp_hdr_len + nd6_opt_offset])
115 #define UIP_ND6_OPT_MTU_BUF ((uip_nd6_opt_mtu *)&uip_buf[uip_l2_l3_icmp_hdr_len + nd6_opt_offset])
116 #define UIP_ND6_OPT_RDNSS_BUF ((uip_nd6_opt_dns *)&uip_buf[uip_l2_l3_icmp_hdr_len + nd6_opt_offset])
119 #if UIP_ND6_SEND_NA || UIP_ND6_SEND_RA || !UIP_CONF_ROUTER
120 static uint8_t nd6_opt_offset;
127 #if !UIP_CONF_ROUTER // TBD see if we move it to ra_input
131 #if (!UIP_CONF_ROUTER || UIP_ND6_SEND_RA)
135 #if UIP_ND6_SEND_NA || UIP_ND6_SEND_RA || !UIP_CONF_ROUTER
150 create_llao(uint8_t *llao, uint8_t type) {
151 llao[UIP_ND6_OPT_TYPE_OFFSET] = type;
166 PRINTF(
"Received NS from ");
170 PRINTF(
" with target address ");
171 PRINT6ADDR((uip_ipaddr_t *) (&UIP_ND6_NS_BUF->tgtipaddr));
175 #if UIP_CONF_IPV6_CHECKS
179 PRINTF(
"NS received is bad\n");
186 nd6_opt_offset = UIP_ND6_NS_LEN;
187 while(uip_l3_icmp_hdr_len + nd6_opt_offset <
uip_len) {
188 #if UIP_CONF_IPV6_CHECKS
190 PRINTF(
"NS received is bad\n");
195 case UIP_ND6_OPT_SLLAO:
197 #if UIP_CONF_IPV6_CHECKS
200 PRINTF(
"NS received is bad\n");
206 nbr = uip_ds6_nbr_lookup(&
UIP_IP_BUF->srcipaddr);
209 0, NBR_STALE, NBR_TABLE_REASON_IPV6_ND,
NULL);
217 if(nbr_table_update_lladdr((
const linkaddr_t *)lladdr, (
const linkaddr_t *)&lladdr_aligned, 1) == 0) {
221 nbr->state = NBR_STALE;
224 nbr->state = NBR_STALE;
228 #if UIP_CONF_IPV6_CHECKS
233 PRINTF(
"ND option not supported in NS");
239 addr = uip_ds6_addr_lookup(&UIP_ND6_NS_BUF->tgtipaddr);
241 #if UIP_ND6_DEF_MAXDADNS > 0
244 #if UIP_CONF_IPV6_CHECKS
246 PRINTF(
"NS received is bad\n");
253 flags = UIP_ND6_NA_FLAG_OVERRIDE;
266 #if UIP_CONF_IPV6_CHECKS
267 if(uip_ds6_is_my_addr(&
UIP_IP_BUF->srcipaddr)) {
274 PRINTF(
"NS received is bad\n");
283 flags = UIP_ND6_NA_FLAG_SOLICITED | UIP_ND6_NA_FLAG_OVERRIDE;
288 if(uip_ds6_addr_lookup(&
UIP_IP_BUF->destipaddr) == addr) {
291 flags = UIP_ND6_NA_FLAG_SOLICITED | UIP_ND6_NA_FLAG_OVERRIDE;
294 #if UIP_CONF_IPV6_CHECKS
295 PRINTF(
"NS received is bad\n");
307 flags = flags | UIP_ND6_NA_FLAG_ROUTER;
321 UIP_ND6_NA_BUF->flagsreserved = flags;
322 memcpy(&UIP_ND6_NA_BUF->tgtipaddr, &addr->ipaddr,
sizeof(uip_ipaddr_t));
324 create_llao(&
uip_buf[uip_l2_l3_icmp_hdr_len + UIP_ND6_NA_LEN],
334 PRINTF(
"Sending NA to ");
338 PRINTF(
" with target address ");
339 PRINT6ADDR(&UIP_ND6_NA_BUF->tgtipaddr);
368 UIP_ND6_NS_BUF->reserved = 0;
375 if(!(uip_ds6_is_my_addr(tgt))) {
382 PRINTF(
"Dropping NS due to no suitable source address\n");
389 create_llao(&
uip_buf[uip_l2_l3_icmp_hdr_len + UIP_ND6_NS_LEN],
396 UIP_IP_BUF->len[1] = UIP_ICMPH_LEN + UIP_ND6_NS_LEN;
397 uip_len = UIP_IPH_LEN + UIP_ICMPH_LEN + UIP_ND6_NS_LEN;
404 PRINTF(
"Sending NS to ");
408 PRINTF(
" with target address ");
437 uint8_t is_solicited;
441 PRINTF(
"Received NA from ");
445 PRINTF(
" with target address ");
446 PRINT6ADDR((uip_ipaddr_t *) (&UIP_ND6_NA_BUF->tgtipaddr));
455 is_router = ((UIP_ND6_NA_BUF->flagsreserved & UIP_ND6_NA_FLAG_ROUTER));
457 ((UIP_ND6_NA_BUF->flagsreserved & UIP_ND6_NA_FLAG_SOLICITED));
459 ((UIP_ND6_NA_BUF->flagsreserved & UIP_ND6_NA_FLAG_OVERRIDE));
461 #if UIP_CONF_IPV6_CHECKS
466 PRINTF(
"NA received is bad\n");
472 nd6_opt_offset = UIP_ND6_NA_LEN;
474 while(uip_l3_icmp_hdr_len + nd6_opt_offset <
uip_len) {
475 #if UIP_CONF_IPV6_CHECKS
477 PRINTF(
"NA received is bad\n");
482 case UIP_ND6_OPT_TLLAO:
486 PRINTF(
"ND option not supported in NA\n");
491 addr = uip_ds6_addr_lookup(&UIP_ND6_NA_BUF->tgtipaddr);
494 #if UIP_ND6_DEF_MAXDADNS > 0
499 PRINTF(
"NA received is bad\n");
503 nbr = uip_ds6_nbr_lookup(&UIP_ND6_NA_BUF->tgtipaddr);
507 lladdr = uip_ds6_nbr_get_ll(nbr);
520 if(nbr_table_update_lladdr((
const linkaddr_t *)lladdr, (
const linkaddr_t *)&lladdr_aligned, 1) == 0) {
526 nbr->state = NBR_REACHABLE;
533 nbr->state = NBR_STALE;
535 nbr->isrouter = is_router;
537 if(!is_override && is_llchange) {
538 if(nbr->state == NBR_REACHABLE) {
539 nbr->state = NBR_STALE;
550 nbr_table_update_lladdr((
const linkaddr_t *) lladdr, (
const linkaddr_t *) &lladdr_aligned, 1) == 0) {
556 nbr->state = NBR_REACHABLE;
562 if(nbr->isrouter && !is_router) {
563 defrt = uip_ds6_defrt_lookup(&
UIP_IP_BUF->srcipaddr);
565 uip_ds6_defrt_rm(defrt);
568 nbr->isrouter = is_router;
571 #if UIP_CONF_IPV6_QUEUE_PKT
579 if(uip_packetqueue_buflen(&nbr->packethandle) != 0) {
580 uip_len = uip_packetqueue_buflen(&nbr->packethandle);
582 uip_packetqueue_free(&nbr->packethandle);
601 PRINTF(
"Received RS from ");
609 #if UIP_CONF_IPV6_CHECKS
616 PRINTF(
"RS received is bad\n");
623 nd6_opt_offset = UIP_ND6_RS_LEN;
626 while(uip_l3_icmp_hdr_len + nd6_opt_offset <
uip_len) {
627 #if UIP_CONF_IPV6_CHECKS
629 PRINTF(
"RS received is bad\n");
634 case UIP_ND6_OPT_SLLAO:
638 PRINTF(
"ND option not supported in RS\n");
645 #if UIP_CONF_IPV6_CHECKS
647 PRINTF(
"RS received is bad\n");
656 0, NBR_STALE, NBR_TABLE_REASON_IPV6_ND,
NULL);
668 0, NBR_STALE, NBR_TABLE_REASON_IPV6_ND,
NULL);
669 nbr->reachable = nbr_data.reachable;
670 nbr->sendns = nbr_data.sendns;
671 nbr->nscount = nbr_data.nscount;
675 #if UIP_CONF_IPV6_CHECKS
681 uip_ds6_send_ra_sollicited();
690 uip_nd6_ra_output(uip_ipaddr_t * dest)
710 UIP_ND6_RA_BUF->cur_ttl =
uip_ds6_if.cur_hop_limit;
712 UIP_ND6_RA_BUF->flags_reserved =
713 (UIP_ND6_M_FLAG << 7) | (UIP_ND6_O_FLAG << 6);
715 UIP_ND6_RA_BUF->router_lifetime =
uip_htons(UIP_ND6_ROUTER_LIFETIME);
718 UIP_ND6_RA_BUF->reachable_time = 0;
719 UIP_ND6_RA_BUF->retrans_timer = 0;
721 uip_len = UIP_IPH_LEN + UIP_ICMPH_LEN + UIP_ND6_RA_LEN;
722 nd6_opt_offset = UIP_ND6_RA_LEN;
728 if((prefix->isused) && (prefix->advertise)) {
729 UIP_ND6_OPT_PREFIX_BUF->type = UIP_ND6_OPT_PREFIX_INFO;
730 UIP_ND6_OPT_PREFIX_BUF->len = UIP_ND6_OPT_PREFIX_INFO_LEN / 8;
731 UIP_ND6_OPT_PREFIX_BUF->preflen = prefix->length;
732 UIP_ND6_OPT_PREFIX_BUF->flagsreserved1 = prefix->l_a_reserved;
733 UIP_ND6_OPT_PREFIX_BUF->validlt = uip_htonl(prefix->vlifetime);
734 UIP_ND6_OPT_PREFIX_BUF->preferredlt = uip_htonl(prefix->plifetime);
735 UIP_ND6_OPT_PREFIX_BUF->reserved2 = 0;
737 nd6_opt_offset += UIP_ND6_OPT_PREFIX_INFO_LEN;
738 uip_len += UIP_ND6_OPT_PREFIX_INFO_LEN;
749 UIP_ND6_OPT_MTU_BUF->type = UIP_ND6_OPT_MTU;
750 UIP_ND6_OPT_MTU_BUF->len = UIP_ND6_OPT_MTU_LEN >> 3;
751 UIP_ND6_OPT_MTU_BUF->reserved = 0;
753 UIP_ND6_OPT_MTU_BUF->mtu = uip_htonl(1500);
755 uip_len += UIP_ND6_OPT_MTU_LEN;
756 nd6_opt_offset += UIP_ND6_OPT_MTU_LEN;
761 uip_ipaddr_t *ip = &UIP_ND6_OPT_RDNSS_BUF->ip;
762 uip_ipaddr_t *dns =
NULL;
763 UIP_ND6_OPT_RDNSS_BUF->type = UIP_ND6_OPT_RDNSS;
764 UIP_ND6_OPT_RDNSS_BUF->reserved = 0;
773 UIP_ND6_OPT_RDNSS_BUF->len = UIP_ND6_OPT_RDNSS_LEN + (i << 1);
774 PRINTF(
"%d nameservers reported\n", i);
775 uip_len += UIP_ND6_OPT_RDNSS_BUF->len << 3;
776 nd6_opt_offset += UIP_ND6_OPT_RDNSS_BUF->len << 3;
788 PRINTF(
"Sending RA to ");
815 UIP_IP_BUF->len[1] = UIP_ICMPH_LEN + UIP_ND6_RS_LEN;
816 uip_len = uip_l3_icmp_hdr_len + UIP_ND6_RS_LEN;
822 create_llao(&
uip_buf[uip_l2_l3_icmp_hdr_len + UIP_ND6_RS_LEN],
830 PRINTF(
"Sendin RS to ");
852 PRINTF(
"Received RA from ");
859 #if UIP_CONF_IPV6_CHECKS
863 PRINTF(
"RA received is bad");
868 if(UIP_ND6_RA_BUF->cur_ttl != 0) {
869 uip_ds6_if.cur_hop_limit = UIP_ND6_RA_BUF->cur_ttl;
870 PRINTF(
"uip_ds6_if.cur_hop_limit %u\n",
uip_ds6_if.cur_hop_limit);
873 if(UIP_ND6_RA_BUF->reachable_time != 0) {
875 uip_ntohl(UIP_ND6_RA_BUF->reachable_time)) {
876 uip_ds6_if.base_reachable_time = uip_ntohl(UIP_ND6_RA_BUF->reachable_time);
880 if(UIP_ND6_RA_BUF->retrans_timer != 0) {
881 uip_ds6_if.retrans_timer = uip_ntohl(UIP_ND6_RA_BUF->retrans_timer);
885 nd6_opt_offset = UIP_ND6_RA_LEN;
886 while(uip_l3_icmp_hdr_len + nd6_opt_offset <
uip_len) {
888 PRINTF(
"RA received is bad");
892 case UIP_ND6_OPT_SLLAO:
893 PRINTF(
"Processing SLLAO option in RA\n");
895 nbr = uip_ds6_nbr_lookup(&
UIP_IP_BUF->srcipaddr);
902 1, NBR_STALE, NBR_TABLE_REASON_IPV6_ND,
NULL);
909 nbr->state = NBR_STALE;
914 if(nbr_table_update_lladdr((
const linkaddr_t *)lladdr, (
const linkaddr_t *)&lladdr_aligned, 1) == 0) {
918 nbr->state = NBR_STALE;
923 case UIP_ND6_OPT_MTU:
924 PRINTF(
"Processing MTU option in RA\n");
928 case UIP_ND6_OPT_PREFIX_INFO:
929 PRINTF(
"Processing PREFIX option in RA\n");
931 if((uip_ntohl(nd6_opt_prefix_info->validlt) >=
932 uip_ntohl(nd6_opt_prefix_info->preferredlt))
935 if(nd6_opt_prefix_info->flagsreserved1 & UIP_ND6_RA_FLAG_ONLINK) {
937 uip_ds6_prefix_lookup(&nd6_opt_prefix_info->prefix,
938 nd6_opt_prefix_info->preflen);
940 if(nd6_opt_prefix_info->validlt != 0) {
942 prefix = uip_ds6_prefix_add(&nd6_opt_prefix_info->prefix,
943 nd6_opt_prefix_info->preflen,
944 uip_ntohl(nd6_opt_prefix_info->
947 prefix = uip_ds6_prefix_add(&nd6_opt_prefix_info->prefix,
948 nd6_opt_prefix_info->preflen, 0);
952 switch (nd6_opt_prefix_info->validlt) {
954 uip_ds6_prefix_rm(prefix);
957 prefix->isinfinite = 1;
960 PRINTF(
"Updating timer of prefix ");
961 PRINT6ADDR(&prefix->ipaddr);
962 PRINTF(
" new value %lu\n", uip_ntohl(nd6_opt_prefix_info->validlt));
964 uip_ntohl(nd6_opt_prefix_info->validlt));
965 prefix->isinfinite = 0;
972 if((nd6_opt_prefix_info->flagsreserved1 & UIP_ND6_RA_FLAG_AUTONOMOUS)
973 && (nd6_opt_prefix_info->validlt != 0)
974 && (nd6_opt_prefix_info->preflen == UIP_DEFAULT_PREFIX_LEN)) {
978 addr = uip_ds6_addr_lookup(&
ipaddr);
979 if((addr !=
NULL) && (addr->type == ADDR_AUTOCONF)) {
982 if((uip_ntohl(nd6_opt_prefix_info->validlt) > 2 * 60 * 60) ||
983 (uip_ntohl(nd6_opt_prefix_info->validlt) >
985 PRINTF(
"Updating timer of address ");
986 PRINT6ADDR(&addr->ipaddr);
987 PRINTF(
" new value %lu\n",
988 uip_ntohl(nd6_opt_prefix_info->validlt));
990 uip_ntohl(nd6_opt_prefix_info->validlt));
993 PRINTF(
"Updating timer of address ");
994 PRINT6ADDR(&addr->ipaddr);
995 PRINTF(
" new value %lu\n", (
unsigned long)(2 * 60 * 60));
997 addr->isinfinite = 0;
999 addr->isinfinite = 1;
1002 if(uip_ntohl(nd6_opt_prefix_info->validlt) ==
1014 #if UIP_ND6_RA_RDNSS
1015 case UIP_ND6_OPT_RDNSS:
1016 if(UIP_ND6_RA_BUF->flags_reserved & (UIP_ND6_O_FLAG << 6)) {
1017 PRINTF(
"Processing RDNSS option\n");
1018 uint8_t naddr = (UIP_ND6_OPT_RDNSS_BUF->len - 1) / 2;
1019 uip_ipaddr_t *ip = (uip_ipaddr_t *)(&UIP_ND6_OPT_RDNSS_BUF->ip);
1020 PRINTF(
"got %d nameservers\n", naddr);
1021 while(naddr-- > 0) {
1022 PRINTF(
" nameserver: ");
1024 PRINTF(
" lifetime: %lx\n", uip_ntohl(UIP_ND6_OPT_RDNSS_BUF->lifetime));
1032 PRINTF(
"ND option not supported in RA");
1038 defrt = uip_ds6_defrt_lookup(&
UIP_IP_BUF->srcipaddr);
1039 if(UIP_ND6_RA_BUF->router_lifetime != 0) {
1046 long)(uip_ntohs(UIP_ND6_RA_BUF->router_lifetime)));
1049 (
unsigned long)(uip_ntohs(UIP_ND6_RA_BUF->router_lifetime)));
1053 uip_ds6_defrt_rm(defrt);
1057 #if UIP_CONF_IPV6_QUEUE_PKT
1066 if(nbr !=
NULL && uip_packetqueue_buflen(&nbr->packethandle) != 0) {
1067 uip_len = uip_packetqueue_buflen(&nbr->packethandle);
1069 uip_packetqueue_free(&nbr->packethandle);
1083 UIP_ICMP6_HANDLER(ns_input_handler,
ICMP6_NS, UIP_ICMP6_HANDLER_CODE_ANY,
1085 UIP_ICMP6_HANDLER(na_input_handler,
ICMP6_NA, UIP_ICMP6_HANDLER_CODE_ANY,
1089 #if UIP_CONF_ROUTER && UIP_ND6_SEND_RA
1090 UIP_ICMP6_HANDLER(rs_input_handler,
ICMP6_RS, UIP_ICMP6_HANDLER_CODE_ANY,
1094 #if !UIP_CONF_ROUTER
1095 UIP_ICMP6_HANDLER(ra_input_handler,
ICMP6_RA, UIP_ICMP6_HANDLER_CODE_ANY,
1116 #if UIP_CONF_ROUTER && UIP_ND6_SEND_RA
1121 #if !UIP_CONF_ROUTER
void uip_log(char *msg)
Print out a uIP log message.
Header file for IPv6 Neighbor discovery (RFC 4861)
uip_len
The length of the packet in the uip_buf buffer.
uip_ipaddr_t * uip_nameserver_get(uint8_t num)
Get a Nameserver ip address given in RA.
static uip_ipaddr_t ipaddr
Pointer to prefix information option in uip_buf.
#define ICMP6_NS
Neighbor Solicitation.
#define UIP_ND6_OPT_LLAO_LEN
length of a ND6 LLAO option for default L2 type (e.g.
static uip_ds6_addr_t * addr
Pointer to a router list entry.
static uint8_t * nd6_opt_llao
Offset from the end of the icmpv6 header to the option in uip_buf.
Header file for IPv6-related data structures.
void uip_nd6_rs_output(void)
Send a Router Solicitation.
uip_ds6_prefix_t uip_ds6_prefix_list[UIP_DS6_PREFIX_NB]
Prefix list.
void uip_icmp6_register_input_handler(uip_icmp6_input_handler_t *handler)
Register a handler which can handle a specific ICMPv6 message type.
#define uip_create_unspecified(a)
set IP address a to unspecified
uint16_t uip_nameserver_count(void)
Get the number of recorded name servers.
uint16_t uip_icmp6chksum(void)
Calculate the ICMP checksum of the packet in uip_buf.
#define UIP_LLADDR_LEN
Link layer address length.
An entry in the default router list.
#define uip_is_addr_unspecified(a)
Is IPv6 address a the unspecified address a is of type uip_ipaddr_t.
int uip_ds6_dad_failed(uip_ds6_addr_t *addr)
Callback when DAD failed.
#define NBR_INCOMPLETE
Possible states for the nbr cache entries.
#define uip_buf
Macro to access uip_aligned_buf as an array of bytes.
ND option prefix information.
#define uip_ipaddr_copy(dest, src)
Copy an IP address from one place to another.
static uip_ds6_defrt_t * defrt
Pointer to a nbr cache entry.
An entry in the nbr cache.
#define UIP_IP_BUF
Pointer to IP header.
#define UIP_STAT(s)
The uIP TCP/IP statistics.
void uip_nameserver_update(const uip_ipaddr_t *nameserver, uint32_t lifetime)
Initialize the module variables.
#define UIP_ND6_OPT_HDR_BUF
Pointer to ND option.
#define uip_is_addr_mcast(a)
is address a multicast address, see RFC 3513 a is of type uip_ipaddr_t*
#define uip_create_linklocal_allnodes_mcast(a)
set IP address a to the link local all-nodes multicast address
void uip_ds6_select_src(uip_ipaddr_t *src, uip_ipaddr_t *dst)
Source address selection, see RFC 3484.
static int extract_lladdr_from_llao_aligned(uip_lladdr_t *dest)
Pointer to a prefix list entry.
#define UIP_ND6_INFINITE_LIFETIME
INFINITE lifetime.
#define uip_create_solicited_node(a, b)
put in b the solicited node address corresponding to address a both a and b are of type uip_ipaddr_t*...
Unicast address structure.
#define uip_is_addr_solicited_node(a)
is addr (a) a solicited node multicast address, see RFC3513 a is of type uip_ipaddr_t* ...
uint32_t uip_ds6_compute_reachable_time(void)
Compute the reachable time based on base reachable time, see RFC 4861.
#define uip_create_linklocal_allrouters_mcast(a)
set IP address a to the link local all-routers multicast address
uint8_t uip_ext_len
The length of the extension headers.
#define NULL
The null pointer.
unsigned long stimer_remaining(struct stimer *t)
The time until the timer expires.
Header file for ICMPv6 message and error handing (RFC 4443)
static uip_ds6_nbr_t * nbr
Pointer to llao option in uip_buf.
void stimer_set(struct stimer *t, unsigned long interval)
Set a timer.
uint32_t uip_nameserver_next_expiration(void)
Get next expiration time.
uip_ds6_nbr_t * uip_ds6_nbr_add(const uip_ipaddr_t *ipaddr, const uip_lladdr_t *lladdr, uint8_t isrouter, uint8_t state, nbr_table_reason_t reason, void *data)
Neighbor Cache basic routines.
#define ADDR_TENTATIVE
Possible states for the an address (RFC 4862)
#define UIP_ICMP_BUF
Pointer to ICMP header.
#define UIP_ND6_HOP_LIMIT
HOP LIMIT to be used when sending ND messages (255)
void ra_input(void)
Process a Router Advertisement.
uip_ds6_addr_t * uip_ds6_addr_add(uip_ipaddr_t *ipaddr, unsigned long vlifetime, uint8_t type)
Add a unicast address to the interface.
#define UIP_NAMESERVER_INFINITE_LIFETIME
Infinite Lifetime indicator.
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.
uIP Name Server interface
A set of debugging macros for the IP stack
CCIF uip_lladdr_t uip_lladdr
Host L2 address.
CCIF unsigned long clock_seconds(void)
Get the current value of the platform seconds.
#define ICMP6_RA
Router Advertisement.
#define ICMP6_RS
Router Solicitation.
#define uip_is_addr_linklocal(a)
is addr (a) a link local unicast address, see RFC3513 i.e.
uip_ds6_netif_t uip_ds6_if
The single interface.
#define ICMP6_NA
Neighbor advertisement.
void uip_ds6_set_addr_iid(uip_ipaddr_t *ipaddr, uip_lladdr_t *lladdr)
set the last 64 bits of an IP address based on the MAC address
void uip_nd6_init()
Initialise the uIP ND core.
CCIF uint16_t uip_htons(uint16_t val)
Convert a 16-bit quantity from host byte order to network byte order.
static uip_nd6_opt_prefix_info * nd6_opt_prefix_info
Pointer to an interface address.