Kenji Arai / mbed-os_TYBLE16

Dependents:   TYBLE16_simple_data_logger TYBLE16_MP3_Air

Embed: (wiki syntax)

« Back to documentation index

raw.h File Reference

raw.h File Reference

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

Go to the source code of this file.

Data Structures

struct  raw_pcb
 the RAW protocol control block More...

Typedefs

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.

Functions

struct raw_pcbraw_new (u8_t proto)
 Create a RAW PCB.
struct raw_pcbraw_new_ip_type (u8_t type, u8_t proto)
 Create a RAW PCB for specific IP type.
void raw_remove (struct raw_pcb *pcb)
 Remove an RAW PCB.
err_t raw_bind (struct raw_pcb *pcb, const ip_addr_t *ipaddr)
 Bind a RAW PCB.
void raw_bind_netif (struct raw_pcb *pcb, const struct netif *netif)
 Bind an RAW PCB to a specific netif.
err_t raw_connect (struct raw_pcb *pcb, const ip_addr_t *ipaddr)
 Connect an RAW PCB.
void raw_disconnect (struct raw_pcb *pcb)
 Disconnect a RAW PCB.
err_t raw_sendto (struct raw_pcb *pcb, struct pbuf *p, const ip_addr_t *ipaddr)
 Send the raw IP packet to the given address.
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)
 Send the raw IP packet to the given address, using a particular outgoing netif and source IP address.
err_t raw_send (struct raw_pcb *pcb, struct pbuf *p)
 Send the raw IP packet to the address given by raw_connect()
void raw_recv (struct raw_pcb *pcb, raw_recv_fn recv, void *recv_arg)
 Set the callback function for received packets that match the raw PCB's protocol and binding.

Detailed Description

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

Definition in file raw.h.


Typedef Documentation

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.

Definition at line 71 of file raw.h.