Nut/OS  4.10.3
API Reference
PAP

Password authentication protocol. More...

Collaboration diagram for PAP:

Functions

void PapRxAuthReq (NUTDEVICE *dev, uint8_t id, NETBUF *nb)
void PapRxAuthAck (NUTDEVICE *dev, uint8_t id, NETBUF *nb)
void PapRxAuthNak (NUTDEVICE *dev, uint8_t id, NETBUF *nb)
void NutPapInput (NUTDEVICE *dev, NETBUF *nb)
 Handle incoming PAP packets.
int NutPapOutput (NUTDEVICE *dev, uint8_t code, uint8_t id, NETBUF *nb)
 Send a PAP packet.
void PapTxAuthReq (NUTDEVICE *dev, uint8_t id)

Detailed Description

Password authentication protocol.


Function Documentation

void PapRxAuthReq ( NUTDEVICE dev,
uint8_t  id,
NETBUF nb 
)

Definition at line 86 of file papin.c.

References NutPapOutput(), and XCP_CONFACK.

Referenced by NutPapInput().

Here is the call graph for this function:

void PapRxAuthAck ( NUTDEVICE dev,
uint8_t  id,
NETBUF nb 
)

Definition at line 91 of file papin.c.

References _PPPDCB::dcb_auth_state, _NUTDEVICE::dev_dcb, IpcpLowerUp(), PAPCS_AUTHREQ, and PAPCS_OPEN.

Referenced by NutPapInput().

Here is the call graph for this function:

void PapRxAuthNak ( NUTDEVICE dev,
uint8_t  id,
NETBUF nb 
)

Definition at line 104 of file papin.c.

References _PPPDCB::dcb_auth_state, _NUTDEVICE::dev_dcb, IpcpLowerDown(), PAPCS_AUTHREQ, and PAPCS_BADAUTH.

Referenced by NutPapInput().

Here is the call graph for this function:

void NutPapInput ( NUTDEVICE dev,
NETBUF nb 
)

Handle incoming PAP packets.

Parameters:
devIdentifies the device that received the packet.
nbPointer to a network buffer structure containing the PAP packet.

Definition at line 122 of file papin.c.

References htons, _NETBUF::nb_ap, _NETBUF::nb_nw, NutNetBufFree(), PapRxAuthAck(), PapRxAuthNak(), PapRxAuthReq(), _NBDATA::sz, _NBDATA::vp, xcphdr::xch_code, xcphdr::xch_id, xcphdr::xch_len, XCP_CONFACK, XCP_CONFNAK, and XCP_CONFREQ.

Referenced by NutPppInput().

Here is the call graph for this function:

int NutPapOutput ( NUTDEVICE dev,
uint8_t  code,
uint8_t  id,
NETBUF nb 
)

Send a PAP packet.

Note:
Applications typically do not call this function.
Parameters:
devIdentifies the device to use.
codeType subcode.
idExchange identifier.
nbNetwork buffer structure containing the packet to send or null if the packet contains no information. The structure must have been allocated by a previous call NutNetBufAlloc() and will be freed when this function returns.
Returns:
0 on success, -1 in case of any errors.

Definition at line 167 of file papout.c.

References htons, _NETBUF::nb_ap, _NETBUF::nb_nw, _NETBUF::nb_tp, NBAF_NETWORK, NutNetBufAlloc(), NutNetBufFree(), NutPppOutput(), PPP_PAP, _NBDATA::sz, _NBDATA::vp, xcphdr::xch_code, xcphdr::xch_id, and xcphdr::xch_len.

Referenced by PapRxAuthReq(), and PapTxAuthReq().

Here is the call graph for this function:

void PapTxAuthReq ( NUTDEVICE dev,
uint8_t  id 
)