Network Component
Version 6.6
MDK-Professional Middleware for IP Networking
|
PPP routines enable IP communication over a direct connection between two networking nodes. More...
Functions | |
netStatus | ppp_listen (const char *username, const char *password) |
Start PPP interface to accept incoming PPP connection. | |
netStatus | ppp_connect (const char *dial_num, const char *username, const char *password) |
Start a dial-up connection to remote PPP server. | |
netStatus | ppp_close (void) |
Disconnect PPP link between two modems. | |
bool | ppp_is_up (void) |
Determine the state of PPP link. | |
PPP routines enable IP communication over a direct connection between two networking nodes.
The Point-to-Point Protocol (PPP) is a data link protocol commonly used in establishing a direct connection between two networking nodes and has largely superseded the older Serial Line Internet Protocol (SLIP) and other standards. It can provide connection authentication, transmission encryption, and compression. PPP was designed to work with numerous network layer protocols, including for example Internet Protocol (IP).
PPP is used over many types of physical networks. In the Network Component of the Middleware, a serial connection over UART is the only supported type.
netStatus ppp_close | ( | void | ) |
Disconnect PPP link between two modems.
The function ppp_close disconnects the PPP link between two modems.
Code Example
netStatus ppp_connect | ( | const char * | dial_num, |
const char * | username, | ||
const char * | password | ||
) |
Start a dial-up connection to remote PPP server.
[in] | dial_num | phone number of remote PPP server. |
[in] | username | username for authentication. |
[in] | password | password for authentication. |
The function ppp_connect starts a dial-up connection to the remote PPP server by starting the PPP daemon in client mode.
The argument dial_num points to a NULL-terminated ASCII string containing the phone number of the remote PPP server.
The argument username points to the user name, whereas the argument password points to the password. The Network Core authenticates the user credentials using the Password Authentication Protocol (PAP). Both arguments are NULL-terminated ASCII strings.
Code Example
bool ppp_is_up | ( | void | ) |
Determine the state of PPP link.
The function ppp_is_up determines the state of PPP link between the two modems. It returns true if the PPP link state is "network" and IP frames can be exchanged.
Code Example
netStatus ppp_listen | ( | const char * | username, |
const char * | password | ||
) |
Start PPP interface to accept incoming PPP connection.
[in] | username | remote username for authentication. |
[in] | password | remote password for authentication. |
The function ppp_listen configures the PPP interface to accept incoming PPP connections by starting the PPP daemon in server mode.
The argument username points to the user name, and the argument password points to the password. The Network Core authenticates the user credentials using the Password Authentication Protocol (PAP). Both arguments are NULL-terminated ASCII strings.
Code Example