uip6.c File Reference

The uIP TCP/IPv6 stack code. More...

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

Go to the source code of this file.

Defines

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

Functions

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_connuip_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

Layer 2 variables



uip_lladdr_t uip_lladdr = {{0x00,0x06,0x98,0x00,0x02,0x32}}
 Host L2 address.
Layer 3 variables



u8_tuip_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_connuip_conn
 Pointer to the current TCP connection.
UDP variables



struct uip_udp_connuip_udp_conn
 The current UDP connection.
struct uip_udp_conn uip_udp_conns [UIP_UDP_CONNS]

Detailed Description

The uIP TCP/IPv6 stack code.

Author:
Adam Dunkels <adam@sics.se>
Julien Abeille <jabeille@cisco.com> (IPv6 related code)
Mathilde Durvy <mdurvy@cisco.com> (IPv6 related code)

Definition in file uip6.c.


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