Main Page | Modules | Data Structures | Directories | File List | Data Fields | Globals

Network Stack (netstack.c)
[Network Library]


Detailed Description

 #include "net/netstack.h" 
Description
This library co-ordinates the various pieces of a typical IP network stack into one unit. Included are handling for ARP, ICMP, and IP packets. UDP and TCP packets are processed and passed to the user.
Note:
This is an example of how to use the various network libraries, and is meant to be useful out-of-the-box for most users. However, some users may find it restrictive and write their own handlers instead.

This is NOT a full-blown TCP/IP stack. It merely handles lower level stack functions so that UDP and TCP packets can be sent and received easily. End-to-end TCP functionality may be added in a future version. Until then, I can recommend using other embedded TCP/IP stacks like Adam Dunkel's uIP.


Defines

#define NET_BUFFERSIZE   500

Functions

void netstackService (void)
void netstackIPProcess (unsigned int len, ip_hdr *packet)
void netstackUDPIPProcess (unsigned int len, udpip_hdr *packet) __attribute__((weak))
void netstackTCPIPProcess (unsigned int len, tcpip_hdr *packet) __attribute__((weak))


Define Documentation

#define NET_BUFFERSIZE   500
 

NET_BUFFERSIZE is the common receive/process/transmit buffer Network packets larger than NET_BUFFERSIZE will not be accepted.

Definition at line 49 of file netstack.h.


Function Documentation

void netstackIPProcess unsigned int  len,
ip_hdr *  packet
 

netstackIPProcess handles distribution of IP received packets.

Definition at line 63 of file netstack.c.

void netstackService void   ) 
 

netstackService should be called in the main loop of the user program. The function will process one received network packet per call.

Definition at line 22 of file netstack.c.

void netstackTCPIPProcess unsigned int  len,
tcpip_hdr *  packet
 

Replace this weakly-defined function with a user function that accepts TCP/IP packets.

Definition at line 109 of file netstack.c.

void netstackUDPIPProcess unsigned int  len,
udpip_hdr *  packet
 

Replace this weakly-defined function with a user function that accepts UDP/IP packets.

Definition at line 102 of file netstack.c.


Generated on Mon Aug 22 04:29:30 2005 for Procyon AVRlib by  doxygen 1.4.2