The uIP IPv6 stack provides new Internet communication abilities to Contiki. More...
Data Structures | |
struct | uip_ds6_nbr |
An entry in the nbr cache. More... | |
struct | uip_ds6_defrt |
An entry in the default router list. More... | |
struct | uip_ds6_prefix |
A prefix list entry. More... | |
struct | uip_ds6_addr |
* More... | |
struct | uip_ds6_aaddr |
Anycast address. More... | |
struct | uip_ds6_maddr |
A multicast address. More... | |
struct | uip_ds6_route |
An entry in the routing table. More... | |
struct | uip_ds6_netif |
Interface structure (contains all the interface variables). More... | |
struct | uip_ds6_element |
Generic type for a DS6, to use a common loop though all DS. More... | |
struct | uip_icmp6_error |
ICMPv6 Error message constant part. More... | |
struct | uip_nd6_neighbor |
An entry in the neighbor cache. More... | |
struct | uip_nd6_defrouter |
An entry in the default router list. More... | |
struct | uip_nd6_prefix |
A prefix list entry. More... | |
struct | uip_nd6_ns |
A neighbor solicitation constant part. More... | |
struct | uip_nd6_na |
A neighbor advertisement constant part. More... | |
struct | uip_nd6_rs |
A router solicitation constant part. More... | |
struct | uip_nd6_ra |
A router advertisement constant part. More... | |
struct | uip_nd6_redirect |
A redirect message constant part. More... | |
struct | uip_nd6_opt_hdr |
ND option header. More... | |
struct | uip_nd6_opt_prefix_info |
ND option prefix information. More... | |
struct | uip_nd6_opt_mtu |
ND option MTU. More... | |
Files | |
file | uip-ds6.c |
IPv6 data structures handling functions Comprises part of the Neighbor discovery (RFC 4861) and auto configuration (RFC 4862 )state machines. | |
file | uip-ds6.h |
Network interface and stateless autoconfiguration (RFC 4862). | |
file | uip-icmp6.c |
ICMPv6 echo request and error messages (RFC 4443). | |
file | uip-icmp6.h |
ICMPv6 echo request and error messages (RFC 4443). | |
file | uip-nd6.c |
Neighbor discovery (RFC 4861). | |
file | uip-nd6.h |
Neighbor discovery (RFC 4861). | |
file | uip6.c |
The uIP TCP/IPv6 stack code. | |
file | rpl-dag.c |
Logic for Directed Acyclic Graphs in RPL. | |
file | rpl-icmp6.c |
ICMP6 I/O for RPL control messages. | |
file | rpl-of-etx.c |
The minrank-hysteresis objective function (OCP 1). | |
file | rpl-of0.c |
An implementation of RPL's objective function 0. | |
file | rpl-timers.c |
RPL timer management. | |
file | rpl.c |
ContikiRPL, an implementation of IETF ROLL RPL. | |
Defines | |
#define | UIP_DS6_NBR_NBS 0 |
Configuration. | |
#define | NBR_INCOMPLETE 0 |
Possible states for the nbr cache entries. | |
#define | ADDR_TENTATIVE 0 |
Possible states for the an address (RFC 4862). | |
#define | ADDR_ANYTYPE 0 |
How the address was acquired: Autoconf, DHCP or manually. | |
#define | UIP_DS6_PERIOD (CLOCK_SECOND/10) |
General DS6 definitions. | |
#define | UIP_DS6_ROUTE_STATE_TYPE rpl_route_entry_t |
define some additional RPL related route state and neighbor callback for RPL - if not a DS6_ROUTE_STATE is already set | |
#define | UIP_ICMP6_ECHO_REQUEST_LEN 4 |
Echo Request constant part length. | |
#define | UIP_ICMP6_ERROR_LEN 4 |
ICMPv6 Error message constant part length. | |
#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. | |
Typedefs | |
typedef struct uip_ds6_nbr | uip_ds6_nbr_t |
An entry in the nbr cache. | |
typedef struct uip_ds6_defrt | uip_ds6_defrt_t |
An entry in the default router list. | |
typedef struct uip_ds6_prefix | uip_ds6_prefix_t |
A prefix list entry. | |
typedef struct uip_ds6_addr | uip_ds6_addr_t |
* | |
typedef struct uip_ds6_aaddr | uip_ds6_aaddr_t |
Anycast address. | |
typedef struct uip_ds6_maddr | uip_ds6_maddr_t |
A multicast address. | |
typedef struct uip_ds6_route | uip_ds6_route_t |
An entry in the routing table. | |
typedef struct uip_ds6_netif | uip_ds6_netif_t |
Interface structure (contains all the interface variables). | |
typedef struct uip_ds6_element | uip_ds6_element_t |
Generic type for a DS6, to use a common loop though all DS. | |
Enumerations | |
enum | uip_neighbor_state |
Possible states for the neighbor cache entries. More... | |
Functions | |
void | uip_ds6_init (void) |
Initialize data structures. | |
void | uip_ds6_periodic (void) |
Periodic processing of data structures. | |
uint8_t | uip_ds6_list_loop (uip_ds6_element_t *list, uint8_t size, uint16_t elementsize, uip_ipaddr_t *ipaddr, uint8_t ipaddrlen, uip_ds6_element_t **out_element) |
Generic loop routine on an abstract data structure, which generalizes all data structures used in DS6. | |
void | uip_ds6_select_src (uip_ipaddr_t *src, uip_ipaddr_t *dst) |
Source address selection, see RFC 3484. | |
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 | |
uint8_t | get_match_length (uip_ipaddr_t *src, uip_ipaddr_t *dst) |
Get the number of matching bits of two addresses. | |
void | uip_ds6_dad (uip_ds6_addr_t *ifaddr) |
Perform Duplicate Address Selection on one address. | |
int | uip_ds6_dad_failed (uip_ds6_addr_t *ifaddr) |
Callback when DAD failed. | |
void | uip_ds6_send_rs (void) |
Send periodic RS to find router. | |
uint32_t | uip_ds6_compute_reachable_time (void) |
Compute the reachable time based on base reachable time, see RFC 4861. | |
u16_t | uip_chksum (u16_t *data, u16_t len) |
Calculate the Internet checksum over a buffer. | |
u16_t | uip_ipchksum (void) |
Calculate the IP header checksum of the packet header in uip_buf. | |
u16_t | uip_icmp6chksum (void) |
Calculate the ICMP checksum of the packet in uip_buf. | |
void | uip_init (void) |
uIP initialization function. | |
struct uip_udp_conn * | uip_udp_new (const uip_ipaddr_t *ripaddr, u16_t rport) |
Set up a new UDP connection. | |
void | uip_process (u8_t flag) |
u16_t | uip_htons (u16_t val) |
Convert 16-bit quantity from host byte order to network byte order. | |
void | uip_send (const void *data, int len) |
Send data on the current connection. | |
Variables | |
struct etimer | uip_ds6_timer_rs |
Timer for maintenance of data structures. | |
uip_ds6_netif_t | uip_ds6_if |
struct etimer | uip_ds6_timer_rs |
Timer for maintenance of data structures. | |
uip_ds6_route_t | uip_ds6_routing_table [UIP_DS6_ROUTE_NB] |
Prefix list. | |
"DS6" Data structures | |
| |
uip_ds6_netif_t | uip_ds6_if |
uip_ds6_nbr_t | uip_ds6_nbr_cache [UIP_DS6_NBR_NB] |
The single interface. | |
uip_ds6_defrt_t | uip_ds6_defrt_list [UIP_DS6_DEFRT_NB] |
Neighor cache. | |
uip_ds6_prefix_t | uip_ds6_prefix_list [UIP_DS6_PREFIX_NB] |
Default rt list. | |
uip_ds6_route_t | uip_ds6_routing_table [UIP_DS6_ROUTE_NB] |
Prefix list. | |
Layer 2 variables | |
| |
uip_lladdr_t | uip_lladdr = {{0x00,0x06,0x98,0x00,0x02,0x32}} |
Host L2 address. | |
Layer 3 variables | |
| |
u8_t * | uip_next_hdr |
Type of the next header in IPv6 header or extension headers. | |
u8_t | uip_ext_bitmap = 0 |
bitmap we use to record which IPv6 headers we have already seen | |
u8_t | uip_ext_len = 0 |
length of the extension headers read. | |
u8_t | uip_ext_opt_offset = 0 |
length of the header options read | |
Buffer variables | |
| |
uip_buf_t | uip_aligned_buf |
Packet buffer for incoming and outgoing packets. | |
void * | uip_appdata |
Pointer to the application data in the packet buffer. | |
void * | uip_sappdata |
u16_t | uip_len |
The length of the packet in the uip_buf buffer. | |
u16_t | uip_slen |
General variables | |
| |
u8_t | uip_flags |
struct uip_conn * | uip_conn |
Pointer to the current TCP connection. | |
UDP variables | |
| |
struct uip_udp_conn * | uip_udp_conn |
The current UDP connection. | |
struct uip_udp_conn | uip_udp_conns [UIP_UDP_CONNS] |
Neighbor Cache basic routines | |
| |
uip_ds6_nbr_t * | uip_ds6_nbr_add (uip_ipaddr_t *ipaddr, uip_lladdr_t *lladdr, uint8_t isrouter, uint8_t state) |
void | uip_ds6_nbr_rm (uip_ds6_nbr_t *nbr) |
uip_ds6_nbr_t * | uip_ds6_nbr_lookup (uip_ipaddr_t *ipaddr) |
Default router list basic routines | |
| |
uip_ds6_defrt_t * | uip_ds6_defrt_add (uip_ipaddr_t *ipaddr, unsigned long interval) |
void | uip_ds6_defrt_rm (uip_ds6_defrt_t *defrt) |
uip_ds6_defrt_t * | uip_ds6_defrt_lookup (uip_ipaddr_t *ipaddr) |
uip_ipaddr_t * | uip_ds6_defrt_choose (void) |
Prefix list basic routines | |
| |
uip_ds6_prefix_t * | uip_ds6_prefix_add (uip_ipaddr_t *ipaddr, uint8_t ipaddrlen, unsigned long interval) |
void | uip_ds6_prefix_rm (uip_ds6_prefix_t *prefix) |
uip_ds6_prefix_t * | uip_ds6_prefix_lookup (uip_ipaddr_t *ipaddr, uint8_t ipaddrlen) |
uint8_t | uip_ds6_is_addr_onlink (uip_ipaddr_t *ipaddr) |
Unicast address list basic routines | |
| |
uip_ds6_addr_t * | uip_ds6_addr_add (uip_ipaddr_t *ipaddr, unsigned long vlifetime, uint8_t type) |
void | uip_ds6_addr_rm (uip_ds6_addr_t *addr) |
uip_ds6_addr_t * | uip_ds6_addr_lookup (uip_ipaddr_t *ipaddr) |
uip_ds6_addr_t * | uip_ds6_get_link_local (int8_t state) |
uip_ds6_addr_t * | uip_ds6_get_global (int8_t state) |
Multicast address list basic routines | |
| |
uip_ds6_maddr_t * | uip_ds6_maddr_add (uip_ipaddr_t *ipaddr) |
void | uip_ds6_maddr_rm (uip_ds6_maddr_t *maddr) |
uip_ds6_maddr_t * | uip_ds6_maddr_lookup (uip_ipaddr_t *ipaddr) |
Anycast address list basic routines | |
| |
uip_ds6_aaddr_t * | uip_ds6_aaddr_add (uip_ipaddr_t *ipaddr) |
void | uip_ds6_aaddr_rm (uip_ds6_aaddr_t *aaddr) |
uip_ds6_aaddr_t * | uip_ds6_aaddr_lookup (uip_ipaddr_t *ipaddr) |
Routing Table basic routines | |
| |
uip_ds6_route_t * | uip_ds6_route_lookup (uip_ipaddr_t *destipaddr) |
uip_ds6_route_t * | uip_ds6_route_add (uip_ipaddr_t *ipaddr, uint8_t length, uip_ipaddr_t *nexthop, uint8_t metric) |
void | uip_ds6_route_rm (uip_ds6_route_t *route) |
void | uip_ds6_route_rm_by_nexthop (uip_ipaddr_t *nexthop) |
ICMPv6 RFC4443 Message processing and sending | |
| |
void | uip_icmp6_echo_request_input (void) |
\ brief Process an echo request | |
void | uip_icmp6_error_output (u8_t type, u8_t code, u32_t param) |
Send an icmpv6 error message. | |
void | uip_icmp6_send (uip_ipaddr_t *dest, int type, int code, int payload_len) |
Send an icmpv6 message. | |
ND Neighbor Cache, Router List and Prefix List handling functions | |
| |
void | uip_nd6_init (void) |
Initialize Neighbor Discovery structures. | |
void | uip_nd6_periodic (void) |
Periodic processing of Neighbor Discovery Structures. | |
struct uip_nd6_neighbor * | uip_nd6_nbrcache_lookup (uip_ipaddr_t *ipaddr) |
Look for a neighbor cache entry corresponding to a specific IP address. | |
struct uip_nd6_neighbor * | uip_nd6_nbrcache_add (uip_ipaddr_t *ipaddr, uip_lladdr_t *lladdr, u8_t isrouter, uip_neighbor_state state) |
Add a neighbor cache entry. | |
struct uip_nd6_defrouter * | uip_nd6_choose_defrouter (void) |
Returns a default router. | |
struct uip_nd6_defrouter * | uip_nd6_defrouter_lookup (struct uip_nd6_neighbor *neighbor) |
Find a default router corresponding to a given neighbor cache entry. | |
void | uip_nd6_defrouter_rm (struct uip_nd6_defrouter *router) |
Remove a default router. | |
struct uip_nd6_defrouter * | uip_nd6_defrouter_add (struct uip_nd6_neighbor *neighbor, unsigned long interval) |
Add a default router. | |
u8_t | uip_nd6_is_addr_onlink (uip_ipaddr_t *ipaddr) |
Check if an IP address in on-link by looking at prefix list. | |
struct uip_nd6_prefix * | uip_nd6_prefix_lookup (uip_ipaddr_t *ipaddr) |
Find a given prefix. | |
struct uip_nd6_prefix * | uip_nd6_prefix_add (uip_ipaddr_t *ipaddr, u8_t length, unsigned long interval) |
Add a prefix. | |
void | uip_nd6_prefix_rm (struct uip_nd6_prefix *prefix) |
Remove a prefix from th eprefix list. | |
ND Messages Processing and Generation | |
| |
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 | |
Macros to check if an IP address (unicast, multicast or anycast) is mine | |
compute random reachable timer | |
#define | uip_ds6_is_my_addr(addr) (uip_ds6_addr_lookup(addr) != NULL) |
#define | uip_ds6_is_my_maddr(addr) (uip_ds6_maddr_lookup(addr) != NULL) |
#define | uip_ds6_is_my_aaddr(addr) (uip_ds6_aaddr_lookup(addr) != NULL) |
ICMPv6 message types | |
| |
#define | ICMP6_DST_UNREACH 1 |
dest unreachable | |
#define | ICMP6_PACKET_TOO_BIG 2 |
packet too big | |
#define | ICMP6_TIME_EXCEEDED 3 |
time exceeded | |
#define | ICMP6_PARAM_PROB 4 |
ip6 header bad | |
#define | ICMP6_ECHO_REQUEST 128 |
Echo request. | |
#define | ICMP6_ECHO_REPLY 129 |
Echo reply. | |
#define | ICMP6_RS 133 |
Router Solicitation. | |
#define | ICMP6_RA 134 |
Router Advertisement. | |
#define | ICMP6_NS 135 |
Neighbor Solicitation. | |
#define | ICMP6_NA 136 |
Neighbor advertisement. | |
#define | ICMP6_REDIRECT 137 |
Redirect. | |
#define | ICMP6_RPL 155 |
RPL. | |
ICMPv6 Destination Unreachable message codes | |
| |
#define | ICMP6_DST_UNREACH_NOROUTE 0 |
no route to destination | |
#define | ICMP6_DST_UNREACH_ADMIN 1 |
administratively prohibited | |
#define | ICMP6_DST_UNREACH_NOTNEIGHBOR 2 |
not a neighbor(obsolete) | |
#define | ICMP6_DST_UNREACH_BEYONDSCOPE 2 |
beyond scope of source address | |
#define | ICMP6_DST_UNREACH_ADDR 3 |
address unreachable | |
#define | ICMP6_DST_UNREACH_NOPORT 4 |
port unreachable | |
ICMPv6 Time Exceeded message codes | |
| |
#define | ICMP6_TIME_EXCEED_TRANSIT 0 |
ttl==0 in transit | |
#define | ICMP6_TIME_EXCEED_REASSEMBLY 1 |
ttl==0 in reass | |
ICMPv6 Parameter Problem message codes | |
| |
#define | ICMP6_PARAMPROB_HEADER 0 |
erroneous header field | |
#define | ICMP6_PARAMPROB_NEXTHEADER 1 |
unrecognized next header | |
#define | ICMP6_PARAMPROB_OPTION 2 |
unrecognized 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]) |
General | |
| |
#define | UIP_ND6_HOP_LIMIT 255 |
HOP LIMIT to be used when sending ND messages (255). | |
#define | UIP_ND6_INFINITE_LIFETIME 0xFFFFFFFF |
INFINITE lifetime. | |
Configuration options | |
| |
#define | UIP_CONF_ND6_MAX_NEIGHBORS 4 |
max number of entries in the neighbor cache | |
#define | UIP_CONF_ND6_MAX_DEFROUTERS 2 |
max number of entries in the default router cache | |
#define | UIP_CONF_ND6_MAX_PREFIXES 2 |
max number of entries in the prefix list | |
RFC 4861 Host constant | |
| |
#define | UIP_ND6_MAX_RTR_SOLICITATION_DELAY 1 |
#define | UIP_ND6_RTR_SOLICITATION_INTERVAL 4 |
#define | UIP_ND6_MAX_RTR_SOLICITATIONS 3 |
RFC 4861 Router constants | |
| |
#define | UIP_ND6_SEND_RA 1 |
#define | UIP_ND6_MAX_RA_INTERVAL 600 |
#define | UIP_ND6_MIN_RA_INTERVAL (UIP_ND6_MAX_RA_INTERVAL / 3) |
#define | UIP_ND6_M_FLAG 0 |
#define | UIP_ND6_O_FLAG 0 |
#define | UIP_ND6_ROUTER_LIFETIME 3 * UIP_ND6_MAX_RA_INTERVAL |
#define | UIP_ND6_MAX_INITIAL_RA_INTERVAL 16 |
#define | UIP_ND6_MAX_INITIAL_RAS 3 |
#define | UIP_ND6_MIN_DELAY_BETWEEN_RAS 3 |
#define | UIP_ND6_MAX_RA_DELAY_TIME_MS 500 |
RFC 4861 Node constant | |
| |
#define | UIP_ND6_MAX_MULTICAST_SOLICIT 3 |
#define | UIP_ND6_MAX_UNICAST_SOLICIT 3 |
#define | UIP_ND6_REACHABLE_TIME 30000 |
#define | UIP_ND6_RETRANS_TIMER 1000 |
#define | UIP_ND6_DELAY_FIRST_PROBE_TIME 5 |
#define | UIP_ND6_MIN_RANDOM_FACTOR(x) (x / 2) |
#define | UIP_ND6_MAX_RANDOM_FACTOR(x) ((x) + (x) / 2) |
ND6 option types | |
| |
#define | UIP_ND6_OPT_SLLAO 1 |
#define | UIP_ND6_OPT_TLLAO 2 |
#define | UIP_ND6_OPT_PREFIX_INFO 3 |
#define | UIP_ND6_OPT_REDIRECTED_HDR 4 |
#define | UIP_ND6_OPT_MTU 5 |
#define | UIP_ND6_OPT_TYPE_OFFSET 0 |
#define | UIP_ND6_OPT_LEN_OFFSET 1 |
#define | UIP_ND6_OPT_DATA_OFFSET 2 |
ND6 message length (excluding options) | |
| |
#define | UIP_ND6_NA_LEN 20 |
#define | UIP_ND6_NS_LEN 20 |
#define | UIP_ND6_RA_LEN 12 |
#define | UIP_ND6_RS_LEN 4 |
ND6 option length in bytes | |
| |
#define | UIP_ND6_OPT_HDR_LEN 2 |
#define | UIP_ND6_OPT_PREFIX_INFO_LEN 32 |
#define | UIP_ND6_OPT_MTU_LEN 8 |
#define | UIP_ND6_OPT_LLAO_LEN 8 |
length of a ND6 LLAO option for default L2 type (e.g. | |
Neighbor Advertisement flags masks | |
| |
#define | UIP_ND6_NA_FLAG_ROUTER 0x80 |
#define | UIP_ND6_NA_FLAG_SOLICITED 0x40 |
#define | UIP_ND6_NA_FLAG_OVERRIDE 0x20 |
#define | UIP_ND6_RA_FLAG_ONLINK 0x80 |
#define | UIP_ND6_RA_FLAG_AUTONOMOUS 0x40 |
Buffer defines | |
| |
#define | FBUF ((struct uip_tcpip_hdr *)&uip_reassbuf[0]) |
#define | UIP_IP_BUF ((struct uip_ip_hdr *)&uip_buf[UIP_LLH_LEN]) |
#define | UIP_ICMP_BUF ((struct uip_icmp_hdr *)&uip_buf[uip_l2_l3_hdr_len]) |
#define | UIP_UDP_BUF ((struct uip_udp_hdr *)&uip_buf[uip_l2_l3_hdr_len]) |
#define | UIP_TCP_BUF ((struct uip_tcp_hdr *)&uip_buf[uip_l2_l3_hdr_len]) |
#define | UIP_EXT_BUF ((struct uip_ext_hdr *)&uip_buf[uip_l2_l3_hdr_len]) |
#define | UIP_ROUTING_BUF ((struct uip_routing_hdr *)&uip_buf[uip_l2_l3_hdr_len]) |
#define | UIP_FRAG_BUF ((struct uip_frag_hdr *)&uip_buf[uip_l2_l3_hdr_len]) |
#define | UIP_HBHO_BUF ((struct uip_hbho_hdr *)&uip_buf[uip_l2_l3_hdr_len]) |
#define | UIP_DESTO_BUF ((struct uip_desto_hdr *)&uip_buf[uip_l2_l3_hdr_len]) |
#define | UIP_EXT_HDR_OPT_BUF ((struct uip_ext_hdr_opt *)&uip_buf[uip_l2_l3_hdr_len + uip_ext_opt_offset]) |
#define | UIP_EXT_HDR_OPT_PADN_BUF ((struct uip_ext_hdr_opt_padn *)&uip_buf[uip_l2_l3_hdr_len + uip_ext_opt_offset]) |
#define | UIP_ICMP6_ERROR_BUF ((struct uip_icmp6_error *)&uip_buf[uip_l2_l3_icmp_hdr_len]) |
TCP defines | |
| |
#define | TCP_FIN 0x01 |
#define | TCP_SYN 0x02 |
#define | TCP_RST 0x04 |
#define | TCP_PSH 0x08 |
#define | TCP_ACK 0x10 |
#define | TCP_URG 0x20 |
#define | TCP_CTL 0x3f |
#define | TCP_OPT_END 0 |
#define | TCP_OPT_NOOP 1 |
#define | TCP_OPT_MSS 2 |
#define | TCP_OPT_MSS_LEN 4 |
The uIP IPv6 stack provides new Internet communication abilities to Contiki.
This document describes Ipv6 specific features. For features that are common to the IPv4 and IPv6 code please refer to uIP.
Ipv6 is to replace IPv4 in a near future. Indeed, to move to a real Internet of Things a larger address space is required. This extended address space (2^128 instead of 2^32) is one of the key features of IPv6 together with its simplified header format, its improved support for extensions and options, and its new QoS and security capabilities.
The uip IPv6 stack implementation targets constrained devices such as sensors. The code size is around 11.5Kbyte and the RAM usage around 1.7Kbyte (see below for more detailed information). Our implementation follows closely RFC 4294 IPv6 Node Requirements whose goal is to allow "IPv6 to function well and interoperate in a large number of situations and deployments".
The implementation currently does not support any router features (it does not forward packets, send RAs...)
This section gives a short overview of the different protocols that are part of the uIP IPv6 stack. A complete description can be found in the corresponding IETF standards which are available at http://www.ietf.org/rfc.html.
The IP packets are processed in the uip_process function. After a few validity checks on the IPv6 header, the extension headers are processed until an upper layer (ICMPv6, UDP or TCP) header is found. We support 4 extension headers:
The IPv6 header, extension headers, and options are defined in uip.h.
Although we can receive packets with the extension headers listed above, we do not offer support to send packets with extension headers.
Fragment Reassembly
This part of the code is very similar to the IPv4 fragmentation code. The only difference is that the fragmented packet is not assumed to be a TCP packet. As a result, we use a different timer to time-out reassembly if all fragments have not been received after UIP_REASS_MAXAGE = 60s.
An IPv6 address has 128 bits and is defined as follows:
We assume that each node has a single interface of type uip_netif.
Each interface can have up to UIP_NETIF_MAX_ADDRESSES unicast IPv6 addresses including its link-local address. It also has a solicited-node multicast address. We assume that the unicast addresses are obtained via stateless address autoconfiguration so that the solicited-node address is the same for all the unicast addresses. Indeed, the solicited-node multicast address is formed by combining the prefix FF02::1:FF00:0/104 and the last 24-bits of the corresponding IPv6 address. When using stateless address autoconfiguration these bits are always equal to the last 24-bits of the link-layer address.
We do not support applications using multicast. Nevertheless, our node should join the all-nodes multicast address, as well as its solicited-node multicast address. Joining the all-nodes multicast address does not require any action. Joining the solicited-node multicast address is done using Multicast Listener Discovery (MLD or MLDv2). More exactly, the node should send a MLD report packet. However this step can be safely skipped and we do so.
IPv6 nodes on the same link use Neighbor Discovery to discover each other's presence, to determine each other's link-layer addresses, to find routers, and to maintain reachability information about the paths to active neighbors (citation from the abstract of RFC 4861).
Neighbor Discovery (ND) replaces ARP in IPv4 but does much more.
Neighbor discovery messages
The structures corresponding to the different message headers and options are in uip-nd6.h. The functions used to send / process this messages are also described in uip-nd6.h although the actual code is in uip-nd6-io.c.
Neighbor discovery structures
We use the following neighbor discovery structures (declared in uip-nd6.c):
Each of this structure has its own add, remove and lookup functions. To update an entry in a ND structure, we first do a lookup to obtain a pointer to the entry, we then directly modify the different entry fields.
Neighbor discovery processes
RFC 4862 defines two main processes:
When an interface becomes active, its link-local address is created by combining the FE80::0/64 prefix and the interface ID. DAD is then performed for this link-local address. Available routers are discovered by sending up to UIP_ND6_MAX_RTR_SOLICITATIONS RS packets. Address autoconfiguration is then performed based on the prefix information received in the RA. The interface initialization is performed in uip_netif_init.
We support ICMPv6 Error messages as well as Echo Reply and Echo Request messages. The application used for sending Echo Requests (see ping6.c) is not part of the IP stack.
The ICMPv6 message headers and constants are defined in uip-icmp6.h.
The IPv6 stack (like the IPv4 stack) is a Contiki process
PROCESS(tcpip_process, "TCP/IP stack");
In addition to the periodic timer that is used by TCP, five IPv6 specific timers are attached to this process:
Both uip_nd6_timer_periodic and uip_netif_timer_periodic run continuously. This could be avoided by using callback timers to handle ND and Netif structures timeouts.
This section just lists all IPv6 related compile time flags. Each flag function is documented in this page in the appropriate section.
/*Boolean flags*/ UIP_CONF_IPV6 UIP_CONF_IPV6_CHECKS UIP_CONF_IPV6_QUEUE_PKT UIP_CONF_IPV6_REASSEMBLY /*Integer flags*/ UIP_NETIF_MAX_ADDRESSES UIP_ND6_MAX_PREFIXES UIP_ND6_MAX_NEIGHBORS UIP_ND6_MAX_DEFROUTER
The IPv6 code uses the same single global buffer as the IPv4 code. This buffer should be large enough to contain one packet of maximum size, i.e., UIP_LINK_MTU = 1280 bytes. When fragment reassembly is enabled an additional buffer of the same size is used.
The only difference with the IPv4 code is the per neighbor buffering that is available when UIP_CONF_QUEUE_PKT is set to 1. This additional buffering is used to queue one packet per neighbor while performing address resolution for it. This is a very costly feature as it increases the RAM usage by approximately UIP_ND6_MAX_NEIGHBORS * UIP_LINK_MTU bytes.
UIP_CONF_IPV6 1 UIP_CONF_IPV6_CHECKS 1 UIP_CONF_IPV6_QUEUE_PKT 0 UIP_CONF_IPV6_REASSEMBLY 0 UIP_NETIF_MAX_ADDRESSES 3 UIP_ND6_MAX_PREFIXES 3 UIP_ND6_MAX_NEIGHBORS 4 UIP_ND6_MAX_DEFROUTER 2
The total IPv6 code size is approximately 11.5Kbyte and the RAM usage around 1.8Kbyte. For an additional NEIGHBOR count 35bytes, 25 for an additional PREFIX, 7 for an additional DEFROUTER, and 25 for an additional ADDRESS.
The IPv6 stack can potentially run on very different link layers (ethernet, 802.15.4, 802.11, etc). The link-layer influences the following IP layer objects:
struct uip_eth_addr { u8_t addr[6]; }; typedef struct uip_eth_addr uip_lladdr_t; #define UIP_LLADDR_LEN 6
uip_lladdr_t uip_lladdr = {{0x00,0x06,0x98,0x00,0x02,0x32}};
Moreover, tcpip_output should point to the link-layer function used to send a packet. Similarly, the link-layer should call tcpip_input when an IP packet is received.
The code corresponding to the desired link layer is selected at compilation time (see for example the UIP_LL_802154 flag).
The TCP and the UDP protocol are part of the uIP stack and were left unchanged by the IPv6 implementation. For the application layer, please refer to the application program interface.
This section describes which parts of RFC4294 we are compliant with. For each section, we put between brackets the requirement level.
When all IPv6 related compile flags are set, our stack is fully compliant with RFC4294 (i.e. we implemement all the MUSTs), except for MLD support and redirect function support.
Sub IP layer
We support RFC2464 transmission of IPv6 packets over Ethernet
We will soon support RFC4944 transmission of IPv6 packets over 802.15.4
IP layer
DNS (RFC 1034, 1035, 3152, 3363, 3596) and DHCPv6 (RFC 3315) (conditional MUST)
no support
IPv4 Transition mechanisms RFC 4213 (conditional MUST)
no support
Mobile IP RFC 3775 (MAY / SHOULD)
no support
IPSec RFC 4301 4302 4303 2410 2404 2451 3602(MUSTs) 4305 (SHOULD)
no support
SNMP (MAY)
no support
IPv6ready is the certification authority for IPv6 implementations (http://www.ipv6ready.org). It delivers two certificates (phase 1 and phase 2).
When all the IPv6 related compile flags are set, we pass all the tests for phase 1.
We pass all the tests for phase 2 except:
#define uip_ds6_is_my_addr | ( | addr | ) | (uip_ds6_addr_lookup(addr) != NULL) |
Definition at line 415 of file uip-ds6.h.
Referenced by uip_nd6_ns_input(), uip_nd6_ns_output(), and uip_process().
#define UIP_DS6_NBR_NBS 0 |
Configuration.
For all tables (Neighbor cache, Prefix List, Routing Table, Default Router List, Unicast address list, multicast address list, anycast address list), we define:
#define UIP_ND6_NA_FLAG_ROUTER 0x80 |
Definition at line 179 of file uip-nd6.h.
Referenced by uip_nd6_na_input().
#define UIP_ND6_NA_LEN 20 |
Definition at line 143 of file uip-nd6.h.
Referenced by uip_nd6_na_input(), and uip_nd6_ns_input().
#define UIP_ND6_OPT_LLAO_LEN 8 |
length of a ND6 LLAO option for default L2 type (e.g.
Ethernet)
Definition at line 171 of file uip-nd6.h.
Referenced by uip_nd6_ns_input(), uip_nd6_ns_output(), and uip_nd6_rs_output().
#define UIP_ND6_OPT_SLLAO 1 |
Definition at line 128 of file uip-nd6.h.
Referenced by mac_translateIcmpLinkLayer(), uip_nd6_ns_input(), uip_nd6_ns_output(), uip_nd6_ra_input(), and uip_nd6_rs_output().
#define UIP_ND6_RS_BUF ((uip_nd6_rs *)&uip_buf[uip_l2_l3_icmp_hdr_len]) |
typedef struct uip_ds6_addr uip_ds6_addr_t |
*
Unicast address structure
enum uip_neighbor_state |
Possible states for the neighbor cache entries.
NO_STATE is for implementation purposes: a router entry contains a pointer to a neighbor entry, which holds its ip address. If we do not know the LL address of the router, we do not have to create a neighbor entry as per RFC 4861. However, we still need to have the IP of the router stored in a neighbor entry, hence we create an entry in the NO_STATE state
Calculate the Internet checksum over a buffer.
The Internet checksum is the one's complement of the one's complement sum of all 16-bit words in the buffer.
See RFC1071.
buf | A pointer to the buffer over which the checksum is to be computed. | |
len | The length of the buffer over which the checksum is to be computed. |
The Internet checksum is the one's complement of the one's complement sum of all 16-bit words in the buffer.
See RFC1071.
buf | A pointer to the buffer over which the checksum is to be computed. | |
len | The length of the buffer over which the checksum is to be computed. |
uip_ds6_aaddr_t * uip_ds6_aaddr_add | ( | uip_ipaddr_t * | ipaddr | ) |
uip_ds6_addr_t * uip_ds6_addr_add | ( | uip_ipaddr_t * | ipaddr, | |
unsigned long | vlifetime, | |||
uint8_t | type | |||
) |
Referenced by main(), and uip_nd6_ra_input().
uip_ds6_defrt_t * uip_ds6_defrt_add | ( | uip_ipaddr_t * | ipaddr, | |
unsigned long | interval | |||
) |
Referenced by uip_nd6_ra_input().
uip_ds6_maddr_t * uip_ds6_maddr_add | ( | uip_ipaddr_t * | ipaddr | ) |
uip_ds6_nbr_t * uip_ds6_nbr_add | ( | uip_ipaddr_t * | ipaddr, | |
uip_lladdr_t * | lladdr, | |||
uint8_t | isrouter, | |||
uint8_t | state | |||
) |
Referenced by uip_nd6_ns_input(), and uip_nd6_ra_input().
uip_ds6_prefix_t * uip_ds6_prefix_add | ( | uip_ipaddr_t * | ipaddr, | |
uint8_t | length, | |||
unsigned long | interval | |||
) |
Referenced by main(), and uip_nd6_ra_input().
uip_ds6_route_t * uip_ds6_route_lookup | ( | uip_ipaddr_t * | destipaddr | ) |
Convert 16-bit quantity from host byte order to network byte order.
This function is primarily used for converting variables from host byte order to network byte order. For converting constants to network byte order, use the UIP_HTONS() macro instead.
Definition at line 2193 of file uip6.c.
References UIP_HTONS.
void uip_icmp6_echo_request_input | ( | void | ) |
\ brief Process an echo request
Perform a few checks, then send an Echo reply. The reply is built here.
Referenced by uip_process().
Send an icmpv6 error message.
type | type of the error message | |
code | of the error message | |
type | 32 bit parameter of the error message, semantic depends on error |
Referenced by uip_process().
void uip_icmp6_send | ( | uip_ipaddr_t * | dest, | |
int | type, | |||
int | code, | |||
int | payload_len | |||
) |
Send an icmpv6 message.
dest | destination address of the message | |
type | type of the message | |
code | of the message | |
payload_len | length of the payload |
u16_t uip_icmp6chksum | ( | void | ) |
Calculate the ICMP checksum of the packet in uip_buf.
Definition at line 378 of file uip6.c.
Referenced by mac_translateIcmpLinkLayer(), uip_nd6_ns_input(), uip_nd6_ns_output(), uip_nd6_rs_output(), and uip_process().
void uip_init | ( | void | ) |
uIP initialization function.
This function should be called at boot up to initilize the uIP TCP/IP stack.
Definition at line 402 of file uip6.c.
References uip_udp_conn::lport, uip_conn::tcpstateflags, UIP_CONNS, uip_ds6_init(), UIP_LISTENPORTS, and UIP_UDP_CONNS.
u16_t uip_ipchksum | ( | void | ) |
struct uip_nd6_defrouter* uip_nd6_defrouter_add | ( | struct uip_nd6_neighbor * | neighbor, | |
unsigned long | interval | |||
) | [read] |
Add a default router.
neighbor | the corresponding neighbor cache entry | |
interval | the lifetime of the router |
struct uip_nd6_defrouter* uip_nd6_defrouter_lookup | ( | struct uip_nd6_neighbor * | neighbor | ) | [read] |
Find a default router corresponding to a given neighbor cache entry.
neighbor | the neighbor cache entry |
void uip_nd6_defrouter_rm | ( | struct uip_nd6_defrouter * | router | ) |
Remove a default router.
router | to be removed |
u8_t uip_nd6_is_addr_onlink | ( | uip_ipaddr_t * | ipaddr | ) |
Check if an IP address in on-link by looking at prefix list.
ipaddr | an IP address |
void uip_nd6_na_input | ( | void | ) |
Process a Neighbor Advertisement.
we might have to send a pkt that had been buffered while address resolution was performed (if we support buffering, see UIP_CONF_QUEUE_PKT)
As per RFC 4861, on link layer that have addresses, TLLAO options MUST be included when responding to multicast solicitations, SHOULD be included in response to unicast (here we assume it is for now)
NA can be received after sending NS for DAD, Address resolution or NUD. Can be unsolicited as well. It can trigger update of the state of the neighbor in the neighbor cache, router in the router list. If the NS was for DAD, it means DAD failed
Definition at line 389 of file uip-nd6.c.
References ADDR_TENTATIVE, NBR_INCOMPLETE, stimer_set(), uip_ds6_dad_failed(), uip_ds6_if, UIP_ICMP_BUF, UIP_IP_BUF, uip_len, UIP_ND6_HOP_LIMIT, UIP_ND6_NA_FLAG_ROUTER, UIP_ND6_NA_LEN, UIP_ND6_OPT_HDR_BUF, and UIP_STAT.
Referenced by uip_process().
struct uip_nd6_neighbor* uip_nd6_nbrcache_add | ( | uip_ipaddr_t * | ipaddr, | |
uip_lladdr_t * | lladdr, | |||
u8_t | isrouter, | |||
uip_neighbor_state | state | |||
) | [read] |
Add a neighbor cache entry.
ipaddr | the IP address of the entry | |
lladdr | the layer 2 address of the entry | |
isrouter | true is the entry is a router | |
state | the state of the entry |
struct uip_nd6_neighbor* uip_nd6_nbrcache_lookup | ( | uip_ipaddr_t * | ipaddr | ) | [read] |
Look for a neighbor cache entry corresponding to a specific IP address.
ipaddr | the specific IP address |
void uip_nd6_ns_input | ( | void | ) |
Process a neighbor solicitation.
The NS can be received in 3 cases (procedures):
We do:
If we need to send a NA in response (i.e. the NS was done for NUD, or address resolution, or DAD and there is a conflict), we do it in this function: set src, dst, tgt address in the three cases, then for all cases set the rest, including SLLAO
Definition at line 155 of file uip-nd6.c.
References ADDR_TENTATIVE, ICMP6_NA, NBR_INCOMPLETE, uip_ds6_dad_failed(), uip_ds6_is_my_addr, uip_ds6_nbr_add(), uip_ds6_select_src(), uip_ext_len, uip_icmp6chksum(), UIP_ICMP_BUF, UIP_IP_BUF, uip_ipaddr_copy, uip_len, UIP_ND6_HOP_LIMIT, UIP_ND6_NA_LEN, UIP_ND6_OPT_HDR_BUF, UIP_ND6_OPT_LLAO_LEN, UIP_ND6_OPT_SLLAO, and UIP_STAT.
Referenced by uip_process().
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.
src | pointer to the src of the NS if known | |
dest | pointer to ip address to send the NS, for DAD or ADDR Resol, MUST be NULL, for NUD, must be correct unicast dest | |
tgt | pointer to ip address to fill the target address field, must not be NULL |
Definition at line 328 of file uip-nd6.c.
References ICMP6_NS, uip_ds6_is_my_addr, uip_ds6_select_src(), uip_ext_len, uip_icmp6chksum(), UIP_ICMP_BUF, UIP_IP_BUF, uip_ipaddr_copy, uip_len, UIP_ND6_HOP_LIMIT, UIP_ND6_OPT_LLAO_LEN, UIP_ND6_OPT_SLLAO, and UIP_STAT.
struct uip_nd6_prefix* uip_nd6_prefix_add | ( | uip_ipaddr_t * | ipaddr, | |
u8_t | length, | |||
unsigned long | interval | |||
) | [read] |
Add a prefix.
ipaddr | the IP address of the prefix | |
length | the length of the prefix | |
interval | the lifetime of the prefix |
struct uip_nd6_prefix* uip_nd6_prefix_lookup | ( | uip_ipaddr_t * | ipaddr | ) | [read] |
Find a given prefix.
ipaddr | an IP address |
void uip_nd6_prefix_rm | ( | struct uip_nd6_prefix * | prefix | ) |
Remove a prefix from th eprefix list.
prefix | pointer to the prefix to be removed |
void uip_nd6_ra_input | ( | void | ) |
process a Router Advertisement
Definition at line 746 of file uip-nd6.c.
References NBR_INCOMPLETE, stimer_remaining(), stimer_set(), uip_ds6_addr_add(), uip_ds6_compute_reachable_time(), uip_ds6_defrt_add(), uip_ds6_if, uip_ds6_nbr_add(), uip_ds6_prefix_add(), uip_ds6_set_addr_iid(), UIP_ICMP_BUF, UIP_IP_BUF, uip_ipaddr_copy, uip_len, uip_lladdr, UIP_ND6_HOP_LIMIT, UIP_ND6_INFINITE_LIFETIME, UIP_ND6_OPT_HDR_BUF, UIP_ND6_OPT_SLLAO, and UIP_STAT.
Referenced by uip_process().
void uip_nd6_rs_output | ( | void | ) |
Send a Router Solicitation.
src is chosen through the uip_netif_select_src function. If src is unspecified (i.e. we do not have a preferred address yet), then we do not put a SLLAO option (MUST NOT in RFC 4861). Otherwise we do.
RS message format, possible option is SLLAO, MUST NOT be included if source = unspecified SHOULD be included otherwise
Definition at line 706 of file uip-nd6.c.
References ICMP6_RS, uip_ds6_select_src(), uip_icmp6chksum(), UIP_ICMP_BUF, UIP_IP_BUF, uip_len, UIP_ND6_HOP_LIMIT, UIP_ND6_OPT_LLAO_LEN, UIP_ND6_OPT_SLLAO, and UIP_STAT.
void uip_process | ( | u8_t | flag | ) |
Definition at line 866 of file uip6.c.
References ICMP6_DST_UNREACH, ICMP6_DST_UNREACH_NOPORT, ICMP6_DST_UNREACH_NOTNEIGHBOR, ICMP6_ECHO_REPLY, ICMP6_ECHO_REQUEST, ICMP6_NA, ICMP6_NS, ICMP6_PACKET_TOO_BIG, ICMP6_PARAM_PROB, ICMP6_PARAMPROB_HEADER, ICMP6_PARAMPROB_NEXTHEADER, ICMP6_RA, ICMP6_RPL, ICMP6_RS, ICMP6_TIME_EXCEED_TRANSIT, ICMP6_TIME_EXCEEDED, uip_conn::initialmss, uip_conn::len, uip_conn::lport, uip_udp_conn::lport, uip_conn::mss, uip_conn::nrtx, uip_conn::rcv_nxt, uip_conn::ripaddr, uip_udp_conn::ripaddr, uip_conn::rport, uip_udp_conn::rport, uip_conn::rto, uip_conn::sa, uip_conn::snd_nxt, uip_conn::sv, uip_conn::tcpstateflags, uip_conn::timer, uip_udp_conn::ttl, uip_add32(), UIP_APPCALL, uip_appdata, uip_ds6_if, uip_ds6_is_my_addr, uip_ds6_select_src(), uip_ext_bitmap, uip_ext_len, UIP_HTONS, uip_icmp6_echo_request_input(), uip_icmp6_error_output(), uip_icmp6chksum(), UIP_ICMP_BUF, UIP_IP_BUF, uip_ipaddr_cmp, uip_ipaddr_copy, uip_len, UIP_LINK_MTU, UIP_LLH_LEN, UIP_MAXRTX, UIP_MAXSYNRTX, uip_nd6_na_input(), uip_nd6_ns_input(), uip_nd6_ra_input(), uip_next_hdr, UIP_RECEIVE_WINDOW, UIP_RTO, UIP_STAT, UIP_TCP_MSS, uip_tcpchksum(), UIP_TIME_WAIT_TIMEOUT, UIP_UDP_CONNS, and uip_udpchksum().
void uip_send | ( | const void * | data, | |
int | len | |||
) |
Send data on the current connection.
This function is used to send out a single segment of TCP data. Only applications that have been invoked by uIP for event processing can send data.
The amount of data that actually is sent out after a call to this function is determined by the maximum amount of data TCP allows. uIP will automatically crop the data so that only the appropriate amount of data is sent. The function uip_mss() can be used to query uIP for the amount of data that actually will be sent.
data | A pointer to the data which is to be sent. | |
len | The maximum amount of data bytes to be sent. |
Definition at line 2205 of file uip6.c.
References UIP_BUFSIZE, and UIP_LLH_LEN.
struct uip_udp_conn* uip_udp_new | ( | const uip_ipaddr_t * | ripaddr, | |
u16_t | rport | |||
) | [read] |
Set up a new UDP connection.
This function sets up a new UDP connection. The function will automatically allocate an unused local port for the new connection. However, another port can be chosen by using the uip_udp_bind() call, after the uip_udp_new() function has been called.
Example:
uip_ipaddr_t addr; struct uip_udp_conn *c; uip_ipaddr(&addr, 192,168,2,1); c = uip_udp_new(&addr, UIP_HTONS(12345)); if(c != NULL) { uip_udp_bind(c, UIP_HTONS(12344)); }
ripaddr | The IP address of the remote host. | |
rport | The remote port number in network byte order. |
Definition at line 498 of file uip6.c.
References uip_udp_conn::lport, uip_udp_conn::ripaddr, uip_udp_conn::rport, uip_udp_conn::ttl, uip_ds6_if, UIP_HTONS, uip_htons(), uip_ipaddr_copy, UIP_TTL, and UIP_UDP_CONNS.
void* uip_appdata |
Pointer to the application data in the packet buffer.
This pointer points to the application data when the application is called. If the application wishes to send data, the application may use this space to write the data into before calling uip_send().
Definition at line 75 of file uip-ds6.c.
Referenced by main(), menu_process(), uip_nd6_na_input(), uip_nd6_ra_input(), uip_process(), and uip_udp_new().
u8_t uip_ext_len = 0 |
length of the extension headers read.
The length of the extension headers.
updated each time we process a header
Definition at line 143 of file uip6.c.
Referenced by tcpip_input(), uip_nd6_ns_input(), uip_nd6_ns_output(), and uip_process().
The length of the packet in the uip_buf buffer.
The global variable uip_len holds the length of the packet in the uip_buf buffer.
When the network device driver calls the uIP input function, uip_len should be set to the length of the packet in the uip_buf buffer.
When sending packets, the device driver should use the contents of the uip_len variable to determine the length of the outgoing packet.
Type of the next header in IPv6 header or extension headers.
Can be the next header field in the IPv6 header or in an extension header. When doing fragment reassembly, we must change the value of the next header field in the header before the fragmentation header, hence we need a pointer to this field.
Definition at line 136 of file uip6.c.
Referenced by uip_process().