ReactOS  0.4.15-dev-439-g292f67a
netbuf.h File Reference
#include "lwip/opt.h"
#include "lwip/pbuf.h"
#include "lwip/ip_addr.h"
Include dependency graph for netbuf.h:

Go to the source code of this file.

Classes

struct  netbuf
 

Macros

#define NETBUF_FLAG_DESTADDR   0x01
 
#define NETBUF_FLAG_CHKSUM   0x02
 
#define netbuf_copy_partial(buf, dataptr, len, offset)   pbuf_copy_partial((buf)->p, (dataptr), (len), (offset))
 
#define netbuf_copy(buf, dataptr, len)   netbuf_copy_partial(buf, dataptr, len, 0)
 
#define netbuf_take(buf, dataptr, len)   pbuf_take((buf)->p, dataptr, len)
 
#define netbuf_len(buf)   ((buf)->p->tot_len)
 
#define netbuf_fromaddr(buf)   (&((buf)->addr))
 
#define netbuf_set_fromaddr(buf, fromaddr)   ip_addr_set((&(buf)->addr), fromaddr)
 
#define netbuf_fromport(buf)   ((buf)->port)
 

Functions

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

Macro Definition Documentation

◆ netbuf_copy

#define netbuf_copy (   buf,
  dataptr,
  len 
)    netbuf_copy_partial(buf, dataptr, len, 0)

Definition at line 81 of file netbuf.h.

◆ netbuf_copy_partial

#define netbuf_copy_partial (   buf,
  dataptr,
  len,
  offset 
)    pbuf_copy_partial((buf)->p, (dataptr), (len), (offset))

Definition at line 79 of file netbuf.h.

◆ NETBUF_FLAG_CHKSUM

#define NETBUF_FLAG_CHKSUM   0x02

This netbuf includes a checksum

Definition at line 46 of file netbuf.h.

◆ NETBUF_FLAG_DESTADDR

#define NETBUF_FLAG_DESTADDR   0x01

This netbuf has dest-addr/port set

Definition at line 44 of file netbuf.h.

◆ netbuf_fromaddr

#define netbuf_fromaddr (   buf)    (&((buf)->addr))

Definition at line 84 of file netbuf.h.

◆ netbuf_fromport

#define netbuf_fromport (   buf)    ((buf)->port)

Definition at line 86 of file netbuf.h.

◆ netbuf_len

#define netbuf_len (   buf)    ((buf)->p->tot_len)

Definition at line 83 of file netbuf.h.

◆ netbuf_set_fromaddr

#define netbuf_set_fromaddr (   buf,
  fromaddr 
)    ip_addr_set((&(buf)->addr), fromaddr)

Definition at line 85 of file netbuf.h.

◆ netbuf_take

#define netbuf_take (   buf,
  dataptr,
  len 
)    pbuf_take((buf)->p, dataptr, len)

Definition at line 82 of file netbuf.h.

Function Documentation

◆ netbuf_alloc()

void* netbuf_alloc ( struct netbuf buf,
u16_t  size 
)

◆ netbuf_chain()

void netbuf_chain ( struct netbuf head,
struct netbuf tail 
)

◆ netbuf_data()

err_t netbuf_data ( struct netbuf buf,
void **  dataptr,
u16_t len 
)

◆ netbuf_delete()

void netbuf_delete ( struct netbuf buf)

◆ netbuf_first()

void netbuf_first ( struct netbuf buf)

◆ netbuf_free()

void netbuf_free ( struct netbuf buf)

◆ netbuf_new()

struct netbuf* netbuf_new ( void  )

◆ netbuf_next()

s8_t netbuf_next ( struct netbuf buf)

◆ netbuf_ref()

err_t netbuf_ref ( struct netbuf buf,
const void dataptr,
u16_t  size 
)