PAP
[PPP]

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

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

Definition at line 91 of file papin.c.

References IpcpLowerUp(), PAPCS_AUTHREQ, and PAPCS_OPEN.

Referenced by NutPapInput().

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

Definition at line 104 of file papin.c.

References IpcpLowerDown(), PAPCS_AUTHREQ, and PAPCS_BADAUTH.

Referenced by NutPapInput().

void NutPapInput ( NUTDEVICE *  dev,
NETBUF *  nb 
)

Handle incoming PAP packets.

Parameters:
dev Identifies the device that received the packet.
nb Pointer to a network buffer structure containing the PAP packet.

Definition at line 122 of file papin.c.

References htons, NutNetBufFree(), PapRxAuthAck(), PapRxAuthNak(), PapRxAuthReq(), XCPHDR::xch_code, XCPHDR::xch_id, XCPHDR::xch_len, XCP_CONFACK, XCP_CONFNAK, and XCP_CONFREQ.

Referenced by NutPppInput().

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:
dev Identifies the device to use.
code Type subcode.
id Exchange identifier.
nb Network 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, NBAF_NETWORK, NutNetBufAlloc(), NutNetBufFree(), NutPppOutput(), PPP_PAP, XCPHDR::xch_code, XCPHDR::xch_id, and XCPHDR::xch_len.

Referenced by PapRxAuthReq(), and PapTxAuthReq().

void PapTxAuthReq ( NUTDEVICE *  dev,
uint8_t  id 
)

Definition at line 188 of file papout.c.

References memcpy(), NBAF_APPLICATION, NutNetBufAlloc(), NutPapOutput(), PAPCS_AUTHREQ, strlen(), and XCP_CONFREQ.

Referenced by NutPppSm().


© 2000-2010 by contributors - visit http://www.ethernut.de/