ip_frag.c File Reference


Data Structures

struct  ip_reass_helper

Functions

void ip_reass_tmr (void)
struct pbuf * ip_reass (struct pbuf *p)
err_t ip_frag (struct pbuf *p, struct netif *netif, struct ip_addr *dest)

Detailed Description

This is the IPv4 packet segmentation and reassembly implementation.

Function Documentation

err_t ip_frag ( struct pbuf *  p,
struct netif netif,
struct ip_addr *  dest 
)

Fragment an IP datagram if too large for the netif.

Chop the datagram in MTU sized chunks and send them in order by using a fixed size static memory buffer (PBUF_REF) or point PBUF_REFs into p (depending on IP_FRAG_USES_STATIC_BUF).

Parameters:
p ip packet to send
netif the netif on which to send
dest destination ip address to which to send
Returns:
ERR_OK if sent successfully, err_t otherwise

struct pbuf* ip_reass ( struct pbuf *  p  )  [read]

Reassembles incoming IP fragments into an IP datagram.

Parameters:
p points to a pbuf chain of the fragment
Returns:
NULL if reassembly is incomplete, ? otherwise

void ip_reass_tmr ( void   ) 

Reassembly timer base function for both NO_SYS == 0 and 1 (!).

Should be called every 1000 msec (defined by IP_TMR_INTERVAL).


Generated on Sun Mar 23 19:22:46 2008 for lwIP 1.3.0 by  doxygen 1.5.4