Network Component
Version 6.6
MDK-Professional Middleware for IP Networking
|
SLIP routines enable IP communication over a serial line. More...
Functions | |
netStatus | slip_close (void) |
Disconnect SLIP link between two modems. | |
netStatus | slip_connect (const char *dial_num) |
Start a dial-up connection to remote SLIP server. | |
netStatus | slip_listen (void) |
Start SLIP interface to accept incoming SLIP connections. | |
bool | slip_is_up (void) |
Determine the state of SLIP link. | |
SLIP routines enable IP communication over a serial line.
The Serial Line Internet Protocol (SLIP) is an encapsulation of the Internet Protocol designed to work over serial ports and modem connections. SLIP has been largely replaced by the Point-to-Point Protocol (PPP), which has more features and does not require a predefined IP address configuration. However, embedded applications running on microcontrollers are still using SLIP for encapsulating IP packets due to its very small overhead.
Standard TCP/IP datagrams are modified by adding a special "SLIP END" character to them, for distinguishing datagram boundaries in the binary data stream. To make use of SLIP, the UART has to be configured to 8 data bits, no parity, and either hardware flow control, or 3-wire null-modem settings.
netStatus slip_close | ( | void | ) |
Disconnect SLIP link between two modems.
The function slip_close disconnects the SLIP link between the two modems.
Code Example
netStatus slip_connect | ( | const char * | dial_num | ) |
Start a dial-up connection to remote SLIP server.
[in] | dial_num | phone number of remote SLIP server. |
The function slip_connect starts a dial-up connection to the remote SLIP server by starting the SLIP daemon in client mode.
The argument dial_num points to a NULL-terminated ASCII string containing the phone number of the remote SLIP server.
Code Example
bool slip_is_up | ( | void | ) |
Determine the state of SLIP link.
The function slip_is_up determines the state of SLIP link between the two modems. It returns true
if IP frames can be exchanged over the SLIP link.
Code Example
netStatus slip_listen | ( | void | ) |
Start SLIP interface to accept incoming SLIP connections.
The function slip_listen configures the SLIP interface to accept incoming SLIP connections by starting the SLIP daemon in server mode.
Code Example