Documentation
Includes
lwip/opt.h
#include "lwip/opt.h"
lwip/pbuf.h
#include "lwip/pbuf.h"
lwip/ip_addr.h
#include "lwip/ip_addr.h"
lwip/ip6_addr.h
#include "lwip/ip6_addr.h"
Macros
Marco LWIP_HDR_NETBUF_H
#define LWIP_HDR_NETBUF_H
Marco NETBUF_FLAG_DESTADDR
#define NETBUF_FLAG_DESTADDR 1
Marco NETBUF_FLAG_CHKSUM
#define NETBUF_FLAG_CHKSUM 2
Marco netbuf_copy_partial(buf, dataptr, len, offset)
#define netbuf_copy_partial(buf, dataptr, len, offset) \
pbuf_copy_partial((buf)->p, (dataptr), (len), (offset))
Marco netbuf_copy(buf,dataptr,len)
#define netbuf_copy(buf,dataptr,len) netbuf_copy_partial(buf, dataptr, len, 0)
Marco netbuf_take(buf, dataptr, len)
#define netbuf_take(buf, dataptr, len) pbuf_take((buf)->p, dataptr, len)
Marco netbuf_len(buf)
#define netbuf_len(buf) ((buf)->p->tot_len)
Marco netbuf_fromaddr(buf)
#define netbuf_fromaddr(buf) (&((buf)->addr))
Marco netbuf_set_fromaddr(buf, fromaddr)
#define netbuf_set_fromaddr(buf, fromaddr) ip_addr_set(&((buf)->addr), fromaddr)
Marco netbuf_fromport(buf)
#define netbuf_fromport(buf) ((buf)->port)
Marco netbuf_destaddr(buf)
#define netbuf_destaddr(buf) (&((buf)->toaddr))
Marco netbuf_set_destaddr(buf, destaddr)
#define netbuf_set_destaddr(buf, destaddr) ip_addr_set(&((buf)->toaddr), destaddr)
Marco netbuf_destport(buf)
#define netbuf_destport(buf) (((buf)->flags & NETBUF_FLAG_DESTADDR) ? (buf)->toport_chksum : 0)
Marco netbuf_destport(buf)
#define netbuf_destport(buf) ((buf)->toport_chksum)
Marco netbuf_set_chksum(buf, chksum)
#define netbuf_set_chksum(buf, chksum) do { (buf)->flags = NETBUF_FLAG_CHKSUM; \
(buf)->toport_chksum = chksum; } while(0)
Functions
Vars
Variable netbuf
struct netbuf * netbuf_new (void);
Variable netbuf_delete
void netbuf_delete (struct netbuf *buf);
Variable netbuf_alloc
void * netbuf_alloc (struct netbuf *buf, u16_t size);
Variable netbuf_free
void netbuf_free (struct netbuf *buf);
Variable netbuf_ref
err_t netbuf_ref (struct netbuf *buf,
const void *dataptr, u16_t size);
Variable netbuf_chain
void netbuf_chain (struct netbuf *head, struct netbuf *tail);
Variable netbuf_data
err_t netbuf_data (struct netbuf *buf,
void **dataptr, u16_t *len);
Variable netbuf_next
s8_t netbuf_next (struct netbuf *buf);
Variable netbuf_first
void netbuf_first (struct netbuf *buf);
Consts
Types
Typedefs