5.6.1. network_interface_slip
— Serial Link Internet Protocol¶
Serial Line Internet Protocol (SLIP) is a link layer internet protocol used to transfer TCP/IP packets over a point-to-point serial line.
It is documented in RFC 1055.
Source code: src/inet/network_interface/slip.h
Example code: examples/inet/slip/main.c
Defines
-
NETWORK_INTERFACE_SLIP_FRAME_SIZE_MAX
¶
Enums
-
enum type
network_interface_slip_state_t
¶ Values:
- = 0
Functions
-
int
network_interface_slip_module_init
(void)¶ Initialize the slip module.
- Return
- zero(0) or negative error code.
-
int
network_interface_slip_init
(struct network_interface_slip_t *self_p, struct inet_ip_addr_t *ipaddr_p, struct inet_ip_addr_t *netmask_p, struct inet_ip_addr_t *gateway_p, void *chout_p)¶ Initialize given slip network interface with given configuration and output channel.
- Return
- zero(0) or negative error code.
- Parameters
self_p
: Slip to initialize.ipaddr_p
: Network interface IP address.netmask_p
: Network interface netmask.gateway_p
: Network interface gateway.chout_p
: Output channel.
-
int
network_interface_slip_input
(struct network_interface_slip_t *self_p, uint8_t data)¶ Input a byte into the SLIP IP stack. Normally a user thread reads one byte at a time from the UART and calls this functions with the read byte as argument.
- Return
- Number of bytes written to the input frame or negative error code.
- Parameters
self_p
: Slip to initialize.data
: Byte to input into the stack.
- struct
Public Members
-
network_interface_slip_state_t
network_interface_slip_t::
state
¶
-
struct pbuf *
network_interface_slip_t::
pbuf_p
¶
-
uint8_t *
network_interface_slip_t::
buf_p
¶
-
size_t
network_interface_slip_t::
size
¶
-
struct network_interface_slip_t::@54 network_interface_slip_t::frame
-
void *
network_interface_slip_t::
chout_p
¶
-
struct network_interface_t
network_interface_slip_t::
network_interface
¶
-
network_interface_slip_state_t