Low-Level PPP Support
C-10
//
FragSetBufParams( hFrag, PACKETSIZE, Offset );
// This handle is what we give to PPP
return( hPkt );
}
C.1.7 PPP API Functions
The following is the full description of the PPP functions described in this sec-
tion.
Create a New PPP Connection Instance
pppNew
Syntax
HANDLE pppNew( HANDLE hSI, uint pppFlags, uint mru, IPN IPServer, IPN
IPMask, IPN IPClient, char *Username, char *Password,
UINT32 cmap,
void (*pfnSICtrl)( HANDLE, uint, UINT32, HANDLE ) );
Parameter(s)
hSI
Handle to SI module to be passed back to callback functio
pppFlags
Connection option flags
mru
Maximum receive unit (max size of Payload)
IPServer
IP address of server in server mode (NULL in client mode)
IPMask
IP subnet mask of client in server mode (NULL in client mode)
IPClient
IP address of client in server mode (NULL in client mode)
Username
Pointer to username in client mode (NULL in server mode)
Password
Pointer to password in client mode (NULL in server mode)
cmap
32 bit local CMAP to pass to peer
pfnSICtrl
Pointer to SI module callback function
Return Value
Handle to new PPP connection instance, or NULL on error.
Description
This function is called to create a new PPP connection instance. The type of
connection created is determined by the calling parameters.
-
hSI – This is a private handle to created by the caller that points back to
the caller’s instance data. It is passed back to the caller via the callback
function pointed to by pfnSICtrl, and can be used to link back to caller’s
instance data when the callback is executed.
-
pppFlags – The flags determine what type of connection instance to
create, and what type of options to support in the connection instance. In
the pppFlags parameter, one and only one of the following flags must be
set:
PPPFLG_SERVER
Create PPP server connection instance
PPPFLG_CLIENT
Create PPP client connection instance