Atmel Software Framework

lwip-1.4.1/src/include/lwip/netbuf.h File Reference
#include "lwip/opt.h"
#include "lwip/pbuf.h"
#include "lwip/ip_addr.h"

Data Structures

struct  netbuf
 

Macros

#define netbuf_copy(buf, dataptr, len)   netbuf_copy_partial(buf, dataptr, len, 0)
 
#define netbuf_copy_partial(buf, dataptr, len, offset)   pbuf_copy_partial((buf)->p, (dataptr), (len), (offset))
 
#define NETBUF_FLAG_CHKSUM   0x02
 This netbuf includes a checksum. More...
 
#define NETBUF_FLAG_DESTADDR   0x01
 This netbuf has dest-addr/port set. More...
 
#define netbuf_fromaddr(buf)   (&((buf)->addr))
 
#define netbuf_fromport(buf)   ((buf)->port)
 
#define netbuf_len(buf)   ((buf)->p->tot_len)
 
#define netbuf_set_fromaddr(buf, fromaddr)   ip_addr_set((&(buf)->addr), fromaddr)
 
#define netbuf_take(buf, dataptr, len)   pbuf_take((buf)->p, dataptr, len)
 

Functions

void * netbuf_alloc (struct netbuf *buf, u16_t size)
 
void netbuf_chain (struct netbuf *head, struct netbuf *tail)
 
err_t netbuf_data (struct netbuf *buf, void **dataptr, u16_t *len)
 
void netbuf_delete (struct netbuf *buf)
 
void netbuf_first (struct netbuf *buf)
 
void netbuf_free (struct netbuf *buf)
 
struct netbufnetbuf_new (void)
 
s8_t netbuf_next (struct netbuf *buf)
 
err_t netbuf_ref (struct netbuf *buf, const void *dataptr, u16_t size)
 

#define netbuf_copy (   buf,
  dataptr,
  len 
)    netbuf_copy_partial(buf, dataptr, len, 0)
#define netbuf_copy_partial (   buf,
  dataptr,
  len,
  offset 
)    pbuf_copy_partial((buf)->p, (dataptr), (len), (offset))
#define NETBUF_FLAG_CHKSUM   0x02

This netbuf includes a checksum.

#define NETBUF_FLAG_DESTADDR   0x01

This netbuf has dest-addr/port set.

#define netbuf_fromaddr (   buf)    (&((buf)->addr))
#define netbuf_fromport (   buf)    ((buf)->port)
#define netbuf_len (   buf)    ((buf)->p->tot_len)
#define netbuf_set_fromaddr (   buf,
  fromaddr 
)    ip_addr_set((&(buf)->addr), fromaddr)
#define netbuf_take (   buf,
  dataptr,
  len 
)    pbuf_take((buf)->p, dataptr, len)

void* netbuf_alloc ( struct netbuf buf,
u16_t  size 
)
void netbuf_chain ( struct netbuf head,
struct netbuf tail 
)
err_t netbuf_data ( struct netbuf buf,
void **  dataptr,
u16_t len 
)
void netbuf_delete ( struct netbuf buf)
void netbuf_first ( struct netbuf buf)
void netbuf_free ( struct netbuf buf)
struct netbuf* netbuf_new ( void  )
s8_t netbuf_next ( struct netbuf buf)
err_t netbuf_ref ( struct netbuf buf,
const void *  dataptr,
u16_t  size 
)