PAP
[PPP]

Collaboration diagram for PAP:


Detailed Description

Password authentication protocol.


Functions

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


Function Documentation

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

Definition at line 83 of file papin.c.

References NutPapOutput(), and XCP_CONFACK.

Referenced by NutPapInput().

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

Definition at line 88 of file papin.c.

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

Referenced by NutPapInput().

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

Definition at line 101 of file papin.c.

References _PPPDCB::dcb_auth_state, _NUTDEVICE::dev_dcb, 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 119 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().

int NutPapOutput ( NUTDEVICE dev,
u_char  code,
u_char  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 156 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().

void PapTxAuthReq ( NUTDEVICE dev,
u_char  id 
)

Definition at line 177 of file papout.c.

References _PPPDCB::dcb_auth_state, _PPPDCB::dcb_pass, _PPPDCB::dcb_reqid, _PPPDCB::dcb_user, _NUTDEVICE::dev_dcb, memcpy(), _NETBUF::nb_ap, NBAF_APPLICATION, NutNetBufAlloc(), NutPapOutput(), PAPCS_AUTHREQ, strlen(), _NBDATA::vp, and XCP_CONFREQ.

Referenced by NutPppSm().


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