RetroArch
Macros | Functions | Variables
ip_frag.c File Reference
#include <string.h>
#include "lwip/opt.h"
#include "lwip/ip.h"
#include "lwip/ip_frag.h"
#include "lwip/netif.h"
#include "lwip/stats.h"
Include dependency graph for ip_frag.c:

Macros

#define IP_REASS_BUFSIZE   5760
 
#define IP_REASS_MAXAGE   30
 
#define IP_REASS_TMO   1000
 
#define IP_REASS_FLAG_LASTFRAG   0x01
 
#define MAX_MTU   1500
 

Functions

static struct pbufcopy_from_pbuf (struct pbuf *p, u16_t *offset, u8_t *buffer, u16_t len)
 
void ip_reass_tmr (void)
 
struct pbufip_reass (struct pbuf *p)
 
err_t ip_frag (struct pbuf *p, struct netif *netif, struct ip_addr *dest)
 

Variables

static u8_t ip_reassbuf [IP_HLEN+IP_REASS_BUFSIZE]
 
static u8_t ip_reassbitmap [IP_REASS_BUFSIZE/(8 *8)+1]
 
static const u8_t bitmap_bits [8]
 
static u16_t ip_reasslen
 
static u8_t ip_reassflags
 
static u8_t ip_reasstmr
 
static u8_t buf [MEM_ALIGN_SIZE(MAX_MTU)]
 

Macro Definition Documentation

◆ IP_REASS_BUFSIZE

#define IP_REASS_BUFSIZE   5760

◆ IP_REASS_FLAG_LASTFRAG

#define IP_REASS_FLAG_LASTFRAG   0x01

◆ IP_REASS_MAXAGE

#define IP_REASS_MAXAGE   30

◆ IP_REASS_TMO

#define IP_REASS_TMO   1000

◆ MAX_MTU

#define MAX_MTU   1500

Function Documentation

◆ copy_from_pbuf()

static struct pbuf* copy_from_pbuf ( struct pbuf p,
u16_t offset,
u8_t buffer,
u16_t  len 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ ip_frag()

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

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ip_reass()

struct pbuf* ip_reass ( struct pbuf p)

Reassembles incoming IP fragments into an IP datagram.

Parameters
ppoints to a pbuf chain of the fragment
Returns
NULL if reassembly is incomplete, ? otherwise
Here is the call graph for this function:
Here is the caller graph for this function:

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

Variable Documentation

◆ bitmap_bits

const u8_t bitmap_bits[8]
static
Initial value:
= { 0xff, 0x7f, 0x3f, 0x1f,
0x0f, 0x07, 0x03, 0x01
}

◆ buf

◆ ip_reassbitmap

u8_t ip_reassbitmap[IP_REASS_BUFSIZE/(8 *8)+1]
static

◆ ip_reassbuf

u8_t ip_reassbuf[IP_HLEN+IP_REASS_BUFSIZE]
static

◆ ip_reassflags

u8_t ip_reassflags
static

◆ ip_reasslen

u16_t ip_reasslen
static

◆ ip_reasstmr

u8_t ip_reasstmr
static