lwIP  2.1.0
Lightweight IP stack
raw.h File Reference
#include "lwip/opt.h"
#include "lwip/pbuf.h"
#include "lwip/def.h"
#include "lwip/ip.h"
#include "lwip/ip_addr.h"
#include "lwip/ip6_addr.h"

Data Structures

struct  raw_pcb
 

Typedefs

typedef u8_t(* raw_recv_fn) (void *arg, struct raw_pcb *pcb, struct pbuf *p, const ip_addr_t *addr)
 

Functions

struct raw_pcbraw_new (u8_t proto)
 
struct raw_pcbraw_new_ip_type (u8_t type, u8_t proto)
 
void raw_remove (struct raw_pcb *pcb)
 
err_t raw_bind (struct raw_pcb *pcb, const ip_addr_t *ipaddr)
 
void raw_bind_netif (struct raw_pcb *pcb, const struct netif *netif)
 
err_t raw_connect (struct raw_pcb *pcb, const ip_addr_t *ipaddr)
 
void raw_disconnect (struct raw_pcb *pcb)
 
err_t raw_sendto (struct raw_pcb *pcb, struct pbuf *p, const ip_addr_t *ipaddr)
 
err_t raw_sendto_if_src (struct raw_pcb *pcb, struct pbuf *p, const ip_addr_t *dst_ip, struct netif *netif, const ip_addr_t *src_ip)
 
err_t raw_send (struct raw_pcb *pcb, struct pbuf *p)
 
void raw_recv (struct raw_pcb *pcb, raw_recv_fn recv, void *recv_arg)
 

Detailed Description

raw API (to be used from TCPIP thread)
See also RAW

Typedef Documentation

◆ raw_recv_fn

typedef u8_t(* raw_recv_fn) (void *arg, struct raw_pcb *pcb, struct pbuf *p, const ip_addr_t *addr)

Function prototype for raw pcb receive callback functions.

Parameters
arguser supplied argument (raw_pcb.recv_arg)
pcbthe raw_pcb which received data
pthe packet buffer that was received
addrthe remote IP address from which the packet was received
Returns
1 if the packet was 'eaten' (aka. deleted), 0 if the packet lives on If returning 1, the callback is responsible for freeing the pbuf if it's not used any more.