lwip-1.4.1 (partial)
slipif.c File Reference
SLIP Interface. More...
Go to the source code of this file.
Functions | |
err_t | slipif_output (struct netif *netif, struct pbuf *p, ip_addr_t *ipaddr) |
Send a pbuf doing the necessary SLIP encapsulation. | |
static struct pbuf * | slipif_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 slipif.c.
Function Documentation
err_t slipif_init | ( | struct netif * | netif ) |
SLIP netif initialization.
Call the arch specific sio_open and remember the opened device in the state field of the netif.
- Parameters:
-
netif the lwip network interface structure for this slipif
- Returns:
- ERR_OK if serial line could be opened, ERR_MEM if no memory could be allocated, ERR_IF is serial line couldn't be opened
- Note:
- netif->num must contain the number of the serial port to open (0 by default). If netif->state is != NULL, it is interpreted as an u8_t pointer pointing to the serial port number instead of netif->num.
static void slipif_loop_thread | ( | void * | nf ) | [static] |
err_t slipif_output | ( | struct netif * | netif, |
struct pbuf * | p, | ||
ip_addr_t * | ipaddr | ||
) |
Send a pbuf doing the necessary SLIP encapsulation.
Uses the serial layer's sio_send()
- Parameters:
-
netif the lwip network interface structure for this slipif p the pbuf chaing packet to send ipaddr the 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
void slipif_poll | ( | struct netif * | netif ) |
void slipif_process_rxqueue | ( | struct netif * | netif ) |
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().
This function can be called from ISR if SYS_LIGHTWEIGHT_PROT is enabled.
- Parameters:
-
netif The lwip network interface structure for this slipif data received character
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().
This function can be called from ISR if SYS_LIGHTWEIGHT_PROT is enabled.
- Parameters:
-
netif The lwip network interface structure for this slipif data received character len Number of received characters
static struct pbuf* slipif_rxbyte | ( | struct netif * | netif, |
u8_t | c | ||
) | [static, read] |
Handle the incoming SLIP stream character by character.
- Parameters:
-
netif the lwip network interface structure for this slipif c received 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
static void slipif_rxbyte_enqueue | ( | struct netif * | netif, |
u8_t | data | ||
) | [static] |
Generated on Wed Jul 13 2022 09:48:38 by 1.7.2