Low-Level PPP Support
C-4
C.1.4 Supported Protocols
In keeping with trying to maintain a small footprint, the PPP software supports
a subset of the general PPP protocols. The following are supported:
-
Link Control Protocol (LCP)
-
Internet Protocol Control Protocol (IPCP)
-
Password Authentication Protocol (PAP)
-
Challenge Handshake Authentication Protocol (CHAP) using MD5
-
Internet Protocol (IP)
C.1.5 SI Module Callback Function
The PPP support API is used for connection instance creation and destruction,
and to pass received packets to the stack. In order to get information about
PPP back from the stack, and in order to allow the stack to request the trans-
mission of PPP packets, the SI module supplies a callback function. A pointer
to this callback is passed to PPP as a parameter to pppNew().
NOTE: This function is called in kernel mode. Please refer to Appendix A for
programming in kernel mode.
C.1.5.1 SIControl Function Declaration
Syntax
void SIControl( HANDLE hSI, uint Message, UINT32 Data, HANDLE hPkt );
Parameter(s)
hSI
Handle to SI private data
Message
Message code describing the PPP event
Data
Additional data concerning the message
hPkt
Handle to a packet when Message is
SI_MSG_SENDPACKET
Return Value
nothing
Description
This function is called when a PPP needs to notify the serial interface (SI) of
a change in status, or when it needs SI to transmit a packet.
The hSI parameter is a handle (pointer to a void) that is originally passed to
PPP via pppNew(). This value allows the SI module to know which of its own
connection instances is in use. The PPP instance handle in use is not supplied,
but rather should be obtained by reference from the supplied SI handle. If the
programmer of the SI module does not wish to track handles, then this parame-
ter may be NULL (always as originally supplied to pppNew()). This is NOT the
handle to the PPP instance that is passed to other functions in the PPP API.
The purpose of the callback is determined by the value of the Message param-
eter. The following message values are defined for the this parameter: