The Pedigree Project
0.1
|
#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.
Classes | |
struct | slipif_priv |
Macros | |
#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 |
Enumerations | |
enum | slipif_recv_state { SLIP_RECV_NORMAL, SLIP_RECV_ESCAPE } |
Functions | |
err_t | slipif_init (struct netif *netif) |
void | slipif_poll (struct netif *netif) |
#define SLIP_MAX_SIZE 1500 |
Maximum packet size that is received by this netif
Definition at line 98 of file slipif.c.
Referenced by slipif_init().
#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.
Referenced by slipif_init().
SLIP netif initialization
Call the arch specific sio_open and remember the opened device in the state field of the netif.
netif | the lwip network interface structure for this slipif |
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().
void slipif_poll | ( | struct netif * | netif | ) |
Polls the serial device and feeds the IP layer with incoming packets.
netif | The lwip network interface structure for this slipif |
Definition at line 446 of file slipif.c.
References ERR_OK, netif::input, pbuf::len, pbuf::next, pbuf_free(), netif::state, SYS_ARCH_DECL_PROTECT, and pbuf::tot_len.