lwIP 2.1.3 Lightweight IP stack

Data Structures | Functions
ip4_frag.h File Reference
`#include "lwip/opt.h"`
`#include "lwip/err.h"`
`#include "lwip/pbuf.h"`
`#include "lwip/netif.h"`
`#include "lwip/ip_addr.h"`
`#include "lwip/ip.h"`

## Data Structures
struct | ip_reassdata
struct | pbuf_custom_ref

## Functions
void | ip_reass_tmr (void)
struct pbuf * | ip4_reass (struct pbuf *p)
err_t | ip4_frag (struct pbuf *p, struct netif *netif, const ip4_addr_t *dest)

## Detailed Description

IP fragmentation/reassembly

## Function Documentation

## ◆ ip4_frag()

err_t ip4_frag | ( | struct pbuf * | p,
|  | struct netif * | netif,
|  | const ip4_addr_t * | dest
| ) |  |

Fragment an IP datagram if too large for the netif.

Chop the datagram in MTU sized chunks and send them in order by pointing PBUF_REFs into p.

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

## ◆ ip4_reass()

struct pbuf* ip4_reass | ( | struct pbuf * | p | ) |

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

## ◆ ip_reass_tmr()

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