1.2.5.8 PPP Driver Library
The Point-to-Point Protocol (PPP) is implemented as a driver object that provides APIs for:
Notifying of an PPP request operation result
Sending an PPP echo request containing user supplied data
Cancelling a previously sent PPP echo request
Registering a PPP Handler
Deregisters a previously registered PPP handler
Returning a copy of the current PPP statistics
Sending an administrative event
Getting the PPP local IPv4 address
Getting the PPP remote IPv4 address
Getting the PPP current state
Abstraction Model
The Point-to-Point Protocol (PPP) provides a standard method for transporting multi-protocol datagrams over point-to-point links. PPP is comprised of three main components:
A method for encapsulating multi-protocol datagrams.
A Link Control Protocol (LCP) for establishing, configuring, and testing the data-link connection.
A family of Network Control Protocols (NCPs) for establishing and configuring different network-layer protocols.
PPP uses HDLC(High-level Data Link Control) which needs an object to transport PPP frames over a serial interface: asynchronous, synchronous, modems, etc. Currently the asynchronous serial line is supported using the UART plib with ring buffer.
The Point-to-Point Protocol is designed for simple links which transport packets between two peers. These links provide full-duplex simultaneous bi-directional operation, and are assumed to deliver packets in order. It is intended that PPP provide a common solution for easy connection of a wide variety of hosts, bridges and routers.
In the process of configuring, maintaining and terminating the point-to-point link, the PPP link goes through several distinct phases which are specified in the following simplified state diagram:
![PPP_PhaseDiagram](GUID-E5E49B1F-4969-4B4F-B2A9-256C0131A031-low.png)
Library Interface
Name | Description |
---|---|
Macros | |
_DRV_PPP_H _ | This is macro _DRV_PPP_H _ |
Enumerations | |
PPP_STATE | PPP Transition States |
PPP_CTRL_PROTO | PPP control protocol identifier |
PPP_ECHO_RESULT | result of an PPP Echo Request call |
PPP_EVENT | PPP event occurring during the driver operation |
Types | |
PPP_REQUEST_HANDLE | a handle that a client can use after the event handler has been registered |
PPP_EVENT_HANDLE | PPP event handle |
PPP_EVENT_HANDLER | PPP event handler prototype |
PPP_STAT_HANDLE | PPP statistics handle |
PPP_STAT_HANDLER | PPP statistics handler prototype |
Structures | |
PPP_ECHO_REQUEST | Contains the data needed for an PPP request operation |
PPP_STATISTICS | Contains the statistics data maintained by the PPP module |
Functions | |
PPP_ECHO_CALLBACK | Callback function notifying of an PPP request operation result |
PPP_EchoRequest | Sends an PPP echo request containing user supplied data |
PPP_EchoRequestCancel | Cancels a previously sent PPP echo request |
PPP_EventHandlerRegister | Registers a PPP Handler |
PPP_EventHandlerDeregister | Deregisters a previously registered PPP handler |
PPP_StatisticsGet | Returns a copy of the current PPP statistics |
PPP_StatHandlerRegister | Registers a PPP Handler |
PPP_StatHandlerDeregister | Deregisters a previously registered PPP handler |
PPP_SendAdminEvent | Sends an administrative event |
PPP_GetLocalIpv4Addr | Gets the PPP local IPv4 address |
PPP_GetRemoteIpv4Addr | Gets the PPP remote IPv4 address |
PPP_GetState | Gets the PPP current state |