These are the examples provided for [[/users/frank26080115/libraries/LPC1700CMSIS_Lib/]] Note, the entire "program" is not compilable!

Embed: (wiki syntax)

« Back to documentation index

The uIP TCP/IP stack

The uIP TCP/IP stack
[uIP]

uIP is an implementation of the TCP/IP protocol stack intended for small 8-bit and 16-bit microcontrollers. More...

Data Structures

struct  uip_conn
 Representation of a uIP TCP connection. More...
struct  uip_udp_conn
 Representation of a uIP UDP connection. More...
struct  uip_stats
 The structure holding the TCP/IP statistics that are gathered if UIP_STATISTICS is set to 1. More...

Modules

 uIP packet forwarding
 uIP TCP throughput booster hack
 

The basic uIP TCP implementation only allows each TCP connection to have a single TCP segment in flight at any given time.


 uIP configuration functions
 

The uIP configuration functions are used for setting run-time parameters in uIP such as IP addresses.


 uIP initialization functions
 

The uIP initialization functions are used for booting uIP.


 uIP device driver functions
 

These functions are used by a network device driver for interacting with uIP.


 uIP application functions
 

Functions used by an application running of top of uIP.


 uIP conversion functions
 

These functions can be used for converting between different data formats used by uIP.


 Variables used in uIP device drivers
 

uIP has a few global variables that are used in device drivers for uIP.


 uIP Address Resolution Protocol
 

The Address Resolution Protocol ARP is used for mapping between IP addresses and link level addresses such as the Ethernet MAC addresses.


 uIP
 Architecture specific uIP functions
 

The functions in the architecture specific module implement the IP check sum and 32-bit additions.


Files

file  uip.h
 

Header file for the uIP TCP/IP stack.


Typedefs

typedef u16_t uip_ip4addr_t [2]
 Repressentation of an IP address.

Functions

__packed __attribute__ ((__packed__)) struct uip_eth_addr
 Representation of a 48-bit Ethernet address.
u16_t uip_chksum (u16_t *buf, 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_tcpchksum (void)
 Calculate the TCP checksum of the packet in uip_buf and uip_appdata.
u16_t uip_udpchksum (void)
 Calculate the UDP checksum of the packet in uip_buf and uip_appdata.

Variables

void * uip_appdata
 Pointer to the application data in the packet buffer.
struct uip_connuip_conn
 Pointer to the current TCP connection.
struct uip_udp_connuip_udp_conn
 The current UDP connection.
struct uip_stats uip_stat
 The uIP TCP/IP statistics.

Detailed Description

uIP is an implementation of the TCP/IP protocol stack intended for small 8-bit and 16-bit microcontrollers.

{@

uIP provides the necessary protocols for Internet communication, with a very small code footprint and RAM requirements - the uIP code size is on the order of a few kilobytes and RAM usage is on the order of a few hundred bytes.


Typedef Documentation

typedef u16_t uip_ip4addr_t[2]

Repressentation of an IP address.

Definition at line 62 of file uip.h.


Function Documentation

__packed __attribute__ ( (__packed__)   )

Representation of a 48-bit Ethernet address.

Definition at line 1399 of file uip.h.

u16_t uip_chksum ( u16_t buf,
u16_t  len 
)

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.

Parameters:
bufA pointer to the buffer over which the checksum is to be computed.
lenThe length of the buffer over which the checksum is to be computed.
Returns:
The Internet checksum of the buffer.

Definition at line 327 of file uip.c.

u16_t uip_ipchksum ( void   )

Calculate the IP header checksum of the packet header in uip_buf.

The IP header checksum is the Internet checksum of the 20 bytes of the IP header.

Returns:
The IP header checksum of the IP header in the uip_buf buffer.

Definition at line 334 of file uip.c.

u16_t uip_tcpchksum ( void   )

Calculate the TCP checksum of the packet in uip_buf and uip_appdata.

The TCP checksum is the Internet checksum of data contents of the TCP segment, and a pseudo-header as defined in RFC793.

Returns:
The TCP checksum of the TCP segment in uip_buf and pointed to by uip_appdata.

Definition at line 380 of file uip.c.

u16_t uip_udpchksum ( void   )

Calculate the UDP checksum of the packet in uip_buf and uip_appdata.

The UDP checksum is the Internet checksum of data contents of the UDP segment, and a pseudo-header as defined in RFC768.

Returns:
The UDP checksum of the UDP segment in uip_buf and pointed to by uip_appdata.

Definition at line 387 of file uip.c.


Variable Documentation

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().

struct uip_conn* uip_conn

Pointer to the current TCP connection.

The uip_conn pointer can be used to access the current TCP connection.

The uIP TCP/IP statistics.

This is the variable in which the uIP TCP/IP statistics are gathered.

Definition at line 249 of file uip.c.

The current UDP connection.