Kenji Arai / mbed-os_TYBLE16

Dependents:   TYBLE16_simple_data_logger TYBLE16_MP3_Air

Embed: (wiki syntax)

« Back to documentation index

lwip_slipif.c File Reference

lwip_slipif.c File Reference

SLIP Interface. More...

Go to the source code of this file.

Functions

static err_t slipif_output (struct netif *netif, struct pbuf *p)
 Send a pbuf doing the necessary SLIP encapsulation.
static err_t slipif_output_v4 (struct netif *netif, struct pbuf *p, const ip4_addr_t *ipaddr)
 Send a pbuf doing the necessary SLIP encapsulation.
static err_t slipif_output_v6 (struct netif *netif, struct pbuf *p, const ip6_addr_t *ipaddr)
 Send a pbuf doing the necessary SLIP encapsulation.
static struct pbufslipif_rxbyte (struct netif *netif, u8_t c)
 Handle the incoming SLIP stream character by character.
static void slipif_rxbyte_input (struct netif *netif, u8_t c)
 Like slipif_rxbyte, but passes completed packets to netif->input.
static void slipif_loop_thread (void *nf)
 The SLIP input thread.
err_t slipif_init (struct netif *netif)
 SLIP netif initialization.
void slipif_poll (struct netif *netif)
 Polls the serial device and feeds the IP layer with incoming packets.
void slipif_process_rxqueue (struct netif *netif)
 Feeds the IP layer with incoming packets that were receive.
static void slipif_rxbyte_enqueue (struct netif *netif, u8_t data)
 Like slipif_rxbyte, but queues completed packets.
void slipif_received_byte (struct netif *netif, u8_t data)
 Process a received byte, completed packets are put on a queue that is fed into IP through slipif_process_rxqueue().
void slipif_received_bytes (struct netif *netif, u8_t *data, u8_t len)
 Process multiple received byte, completed packets are put on a queue that is fed into IP through slipif_process_rxqueue().

Detailed Description

SLIP Interface.

Definition in file lwip_slipif.c.


Function Documentation

static void slipif_loop_thread ( void *  nf ) [static]

The SLIP input thread.

Feed the IP layer with incoming packets

Parameters:
nfthe lwip network interface structure for this slipif

Definition at line 330 of file lwip_slipif.c.

static err_t slipif_output ( struct netif netif,
struct pbuf p 
) [static]

Send a pbuf doing the necessary SLIP encapsulation.

Uses the serial layer's sio_send()

Parameters:
netifthe lwip network interface structure for this slipif
pthe pbuf chain packet to send
Returns:
always returns ERR_OK since the serial layer does not provide return values

Definition at line 116 of file lwip_slipif.c.

static err_t slipif_output_v4 ( struct netif netif,
struct pbuf p,
const ip4_addr_t ipaddr 
) [static]

Send a pbuf doing the necessary SLIP encapsulation.

Uses the serial layer's sio_send()

Parameters:
netifthe lwip network interface structure for this slipif
pthe pbuf chain packet to send
ipaddrthe ip address to send the packet to (not used for slipif)
Returns:
always returns ERR_OK since the serial layer does not provide return values

Definition at line 172 of file lwip_slipif.c.

static err_t slipif_output_v6 ( struct netif netif,
struct pbuf p,
const ip6_addr_t ipaddr 
) [static]

Send a pbuf doing the necessary SLIP encapsulation.

Uses the serial layer's sio_send()

Parameters:
netifthe lwip network interface structure for this slipif
pthe pbuf chain packet to send
ipaddrthe ip address to send the packet to (not used for slipif)
Returns:
always returns ERR_OK since the serial layer does not provide return values

Definition at line 191 of file lwip_slipif.c.

static struct pbuf* slipif_rxbyte ( struct netif netif,
u8_t  c 
) [static, read]

Handle the incoming SLIP stream character by character.

Parameters:
netifthe lwip network interface structure for this slipif
creceived character (multiple calls to this function will return a complete packet, NULL is returned before - used for polling)
Returns:
The IP packet when SLIP_END is received

Definition at line 207 of file lwip_slipif.c.

static void slipif_rxbyte_enqueue ( struct netif netif,
u8_t  data 
) [static]

Like slipif_rxbyte, but queues completed packets.

Parameters:
netifThe lwip network interface structure for this slipif
dataReceived serial byte

Definition at line 488 of file lwip_slipif.c.

static void slipif_rxbyte_input ( struct netif netif,
u8_t  c 
) [static]

Like slipif_rxbyte, but passes completed packets to netif->input.

Parameters:
netifThe lwip network interface structure for this slipif
creceived character

Definition at line 310 of file lwip_slipif.c.