LCP
[PPP]

Link control protocol. More...

Collaboration diagram for LCP:

Functions

void LcpRxProtRej (NUTDEVICE *dev)
void NutLcpInput (NUTDEVICE *dev, NETBUF *nb)
 Handle incoming LCP packets.
int NutLcpOutput (NUTDEVICE *dev, uint8_t code, uint8_t id, NETBUF *nb)
 Send a LCP packet.
void LcpResetOptions (NUTDEVICE *dev)
void LcpTxConfReq (NUTDEVICE *dev, uint8_t id, uint8_t rejected)
void LcpTxProtRej (NUTDEVICE *dev, uint16_t protocol, NETBUF *nb)

Variables

uint32_t new_magic
uint32_t new_magic

Detailed Description

Link control protocol.


Function Documentation

void LcpRxProtRej ( NUTDEVICE *  dev  ) 
void NutLcpInput ( NUTDEVICE *  dev,
NETBUF *  nb 
)

Handle incoming LCP packets.

Packets not destined to us or packets with unsupported address type or item length are silently discarded.

Note:
This routine is called by the Ethernet layer on incoming ARP packets. Applications typically do not call this function.
Parameters:
dev Identifies the device that received the packet.
nb Pointer to a network buffer structure containing the ARP packet.

Definition at line 572 of file lcpin.c.

References htons, LCP_DRQ, LCP_ERP, LCP_ERQ, NutNetBufFree(), PPPS_INITIAL, PPPS_STARTING, XCPHDR::xch_code, XCPHDR::xch_id, XCPHDR::xch_len, XCP_CODEREJ, XCP_CONFACK, XCP_CONFNAK, XCP_CONFREJ, XCP_CONFREQ, XCP_TERMACK, and XCP_TERMREQ.

Referenced by NutPppInput().

int NutLcpOutput ( NUTDEVICE *  dev,
uint8_t  code,
uint8_t  id,
NETBUF *  nb 
)

Send a LCP 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 116 of file lcpout.c.

References htons, NBAF_NETWORK, NutNetBufAlloc(), NutNetBufFree(), NutPppOutput(), PPP_LCP, XCPHDR::xch_code, XCPHDR::xch_id, and XCPHDR::xch_len.

Referenced by LcpClose(), LcpTxConfReq(), LcpTxProtRej(), and NutPppSm().

void LcpResetOptions ( NUTDEVICE *  dev  ) 

Definition at line 134 of file lcpout.c.

References LCP_DEFOPT_ASYNCMAP, new_magic, and PPP_PAP.

Referenced by LcpTxConfReq().

void LcpTxConfReq ( NUTDEVICE *  dev,
uint8_t  id,
uint8_t  rejected 
)
void LcpTxProtRej ( NUTDEVICE *  dev,
uint16_t  protocol,
NETBUF *  nb 
)

Definition at line 198 of file lcpout.c.

References htons, LCP_PROTREJ, memcpy(), NBAF_APPLICATION, NutLcpOutput(), NutNetBufAlloc(), and NutNetBufFree().

Referenced by NutPppInput().


Variable Documentation

Definition at line 108 of file pppsm.c.

Referenced by LcpResetOptions(), and NutPppSm().

Definition at line 108 of file pppsm.c.


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