Main Page   Modules   Alphabetical List   Data Structures   File List   Data Fields   Globals   Related Pages   Examples  

PPP
[PPP]

PPP Driver. More...

Data Structures

struct  _PPPDCB
 PPP interface structure. More...

struct  _PPPDCB
 PPP interface structure. More...


Typedefs

typedef _PPPDCB PPPDCB
 PPP interface type.


Functions

int NutPppInit (NUTDEVICE *dev)
 Initialize the PPP state machine.

int NutPppIOCtl (NUTDEVICE *dev, int req, void *conf)
 Perform PPP control functions.

int PPPPutPacket (NUTDEVICE *dev, NETBUF *nb)
 Actually send a PPP packet.

__BEGIN_DECLS 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.

 NutPppSm (void *arg)
 PPP state machine timeout thread.

 PPPRx (void *arg)
 PPP receiver thread.


Variables

NUTDEVICE devPpp
 Device information structure.

IFNET ifn_ppp
 Network interface information structure.


Detailed Description

PPP Driver.


Typedef Documentation

typedef struct _PPPDCB PPPDCB
 

PPP interface type.


Function Documentation

int NutPppInit NUTDEVICE   dev
 

Initialize the PPP state machine.

__BEGIN_DECLS void NutPppInput NUTDEVICE   dev,
NETBUF   nb
 

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.

Note:
This routine is called by the device driver on incoming PPP frames. Applications typically do not call this function.
Parameters:
dev Identifies the device that received the frame.
nb Pointer to a network buffer structure containing the PPP frame.

int NutPppIOCtl NUTDEVICE   dev,
int    req,
void *    conf
 

Perform PPP control functions.

Parameters:
dev Identifies the device that receives the device-control function.
req Requested control function. May be set to one of the following constants:
  • LCP_OPEN
  • LCP_CLOSE
  • LCP_LOWERUP
  • LCP_LOWERDOWN Any other function will be passed to the physical driver.
conf Points to a buffer that contains any data required for the given control function or receives data from that function.
Returns:
0 on success, -1 otherwise.

int NutPppOutput NUTDEVICE   dev,
u_short    type,
u_char   ha,
NETBUF   nb
 

Send PPP frame.

Send a PPP frame of a given type using the specified device.

Parameters:
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.
Returns:
0 on success, -1 in case of any errors.

NutPppSm void *    arg
 

PPP state machine timeout thread.

Handles timeouts for LCP and IPCP.

int PPPPutPacket NUTDEVICE   dev,
NETBUF   nb
 

Actually send a PPP packet.

Deprecated. Will be included in the AHDLC driver.

Parameters:
nb Network buffer structure containing the packet to be sent. The structure must have been allocated by a previous call NutNetBufAlloc(). This routine will automatically release the buffer in case of an error.
Returns:
0 on success, -1 in case of any errors. Errors will automatically release the network buffer structure.

Bug:
Never returns an error.

PPPRx void *    arg
 

PPP receiver thread.

Deprecated. Will be included in the AHDLC driver.

It runs with high priority.


Variable Documentation

NUTDEVICE devPpp  
 

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().

IFNET ifn_ppp
 

Network interface information structure.


© 2000-2003 by egnite Software GmbH - visit http://www.ethernut.de/