#include "netif/slipif.h"
#include "lwip/opt.h"
#include "lwip/def.h"
#include "lwip/pbuf.h"
#include "lwip/stats.h"
#include "lwip/snmp.h"
#include "lwip/sys.h"
#include "lwip/sio.h"
Go to the source code of this file.
|
| #define | SLIP_END 0xC0 /* 0300: start and end of every packet */ |
| |
| #define | SLIP_ESC 0xDB /* 0333: escape start (one byte escaped data follows) */ |
| |
| #define | SLIP_ESC_END 0xDC /* 0334: following escape: original byte is 0xC0 (END) */ |
| |
| #define | SLIP_ESC_ESC 0xDD /* 0335: following escape: original byte is 0xDB (ESC) */ |
| |
| #define | SLIP_MAX_SIZE 1500 |
| |
| #define | SLIP_SIO_SPEED(sio_fd) 0 |
| |
|
| enum | slipif_recv_state { SLIP_RECV_NORMAL
, SLIP_RECV_ESCAPE
} |
| |
SLIP Interface
Definition in file slipif.c.
◆ SLIP_END
| #define SLIP_END 0xC0 /* 0300: start and end of every packet */ |
◆ SLIP_ESC
| #define SLIP_ESC 0xDB /* 0333: escape start (one byte escaped data follows) */ |
◆ SLIP_ESC_END
| #define SLIP_ESC_END 0xDC /* 0334: following escape: original byte is 0xC0 (END) */ |
◆ SLIP_ESC_ESC
| #define SLIP_ESC_ESC 0xDD /* 0335: following escape: original byte is 0xDB (ESC) */ |
◆ SLIP_MAX_SIZE
| #define SLIP_MAX_SIZE 1500 |
Maximum packet size that is received by this netif
Definition at line 98 of file slipif.c.
◆ SLIP_SIO_SPEED
| #define SLIP_SIO_SPEED |
( |
|
sio_fd | ) |
0 |
Define this to the interface speed for SNMP (sio_fd is the sio_fd_t returned by sio_open). The default value of zero means 'unknown'.
Definition at line 106 of file slipif.c.
◆ slipif_recv_state
◆ slipif_init()
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.
Definition at line 380 of file slipif.c.
References ERR_IF, ERR_MEM, ERR_OK, LWIP_DEBUGF, mem_free(), mem_malloc(), netif::mtu, netif::name, netif::num, SLIP_DEBUG, SLIP_MAX_SIZE, SLIP_SIO_SPEED, SLIPIF_THREAD_NAME, SLIPIF_THREAD_PRIO, SLIPIF_THREAD_STACKSIZE, netif::state, and sys_thread_new().
◆ slipif_poll()
| void slipif_poll |
( |
struct netif * |
netif | ) |
|
Polls the serial device and feeds the IP layer with incoming packets.
- Parameters
-
| netif | The lwip network interface structure for this slipif |
Definition at line 446 of file slipif.c.
References netif::state.