Data Structures | |
struct | _PPPDCB |
PPP interface structure. More... | |
struct | _PPPDCB |
PPP interface structure. More... | |
Defines | |
#define | LCP_CLOSE 2 |
#define | LCP_DEFOPT_ASYNCMAP 0x000A0000UL |
#define | LCP_LOWERDOWN 4 |
#define | LCP_LOWERUP 3 |
#define | LCP_OPEN 1 |
#define | PPP_ACFC 0x02 |
#define | PPP_PFC 0x01 |
Typedefs | |
typedef _PPPDCB | PPPDCB |
PPP interface type. | |
Functions | |
void | IpcpClose (NUTDEVICE *dev) |
Trigger IPCP close event. | |
void | IpcpLowerDown (NUTDEVICE *dev) |
void | IpcpLowerUp (NUTDEVICE *dev) |
void | IpcpOpen (NUTDEVICE *dev) |
Trigger IPCP open event. | |
void | LcpClose (NUTDEVICE *dev) |
Trigger LCP close event. | |
void | LcpLowerDown (NUTDEVICE *dev) |
Trigger LCP lower down event. | |
void | LcpLowerUp (NUTDEVICE *dev) |
Trigger LCP lower up event. | |
void | LcpOpen (NUTDEVICE *dev) |
Trigger LCP open event. | |
int | NutPppInitStateMachine (NUTDEVICE *dev) |
Initialize the PPP state machine. | |
void | NutPppInput (NUTDEVICE *dev, NETBUF *nb) |
Handle incoming PPP frames. | |
int | NutPppOutput (NUTDEVICE *dev, u_short type, u_char *ha, NETBUF *nb) |
Send PPP frame. | |
THREAD (NutPppSm, arg) | |
Variables | |
NUTDEVICE | devPpp |
Device information structure. | |
NUTDEVICE | devPpp |
Device information structure. | |
IFNET | ifn_ppp |
Network interface information structure. | |
u_long | new_magic = 0x12345678 |
void IpcpClose | ( | NUTDEVICE * | dev | ) |
Trigger IPCP close event.
Disable the link.
Cancel timeouts and either initiate close or possibly go directly to the PPPS_CLOSED state.
dev | Pointer to the NUTDEVICE structure of the PPP device. |
void IpcpOpen | ( | NUTDEVICE * | dev | ) |
Trigger IPCP open event.
Link is allowed to come up.
dev | Pointer to the NUTDEVICE structure of the PPP device. |
void LcpClose | ( | NUTDEVICE * | dev | ) |
Trigger LCP close event.
Disable the link.
dev | Pointer to the NUTDEVICE structure of the PPP device. |
void LcpLowerDown | ( | NUTDEVICE * | dev | ) |
Trigger LCP lower down event.
dev | Pointer to the NUTDEVICE structure of the PPP device. |
void LcpLowerUp | ( | NUTDEVICE * | dev | ) |
Trigger LCP lower up event.
dev | Pointer to the NUTDEVICE structure of the PPP device. |
void LcpOpen | ( | NUTDEVICE * | dev | ) |
Trigger LCP open event.
Enable the link to come up. Typically triggered by the upper layer, when it is enabled.
dev | Pointer to the NUTDEVICE structure of the PPP device. |
int NutPppInitStateMachine | ( | NUTDEVICE * | dev | ) |
Initialize the PPP state machine.
Start the PPP timer thread, if not already running.
dev | Pointer to the NUTDEVICE structure of the PPP device. |
Handle incoming PPP frames.
Splits the PPP frame into the data link and the network part. Then the frame is routed to the proper handler, based on the type field in the header.
dev | Identifies the device that received the frame. | |
nb | Pointer to a network buffer structure containing the PPP frame. |
Send PPP frame.
Send a PPP frame of a given type using the specified device.
dev | Identifies the network device to use. | |
type | Type of this frame. | |
ha | Hardware address of the destination, ignored with PPP. | |
nb | Network buffer structure containing the packet to be sent. The structure must have been allocated by a previous call NutNetBufAlloc() and will be freed if this function returns with an error. |
Initial value:
{ 0, {'p', 'p', 'p', 0, 0, 0, 0, 0, 0} , IFTYP_NET, 0, 0, &ifn_ppp, &dcb_ppp, NutPppInit, NutPppIOCtl, NutPppRead, NutPppWrite, NutPppOpen, NutPppClose, 0 }
This is a virtual device driver has no underlying hardware and must not be registered. It will be initialized when the application calls NutNetIfConfig().
Device information structure.
This is a virtual device driver has no underlying hardware and must not be registered. It will be initialized when the application calls NutNetIfConfig().
Initial value:
{ IFT_PPP, {0, 0, 0, 0, 0, 0} , 0, 0, 0, PPP_MRU, 0, 0, NutPppInput, 0, NutPppOutput }