Nut/OS  4.10.3
API Reference
IPCP

IP control protocol. More...

Collaboration diagram for IPCP:

Functions

void IpcpRxConfReq (NUTDEVICE *dev, uint8_t id, NETBUF *nb)
void IpcpRxConfAck (NUTDEVICE *dev, uint8_t id, NETBUF *nb)
void IpcpRxTermReq (NUTDEVICE *dev, uint8_t id, NETBUF *nb)
void IpcpRxTermAck (NUTDEVICE *dev, uint8_t id, NETBUF *nb)
void IpcpRxProtRej (NUTDEVICE *dev)
void NutIpcpInput (NUTDEVICE *dev, NETBUF *nb)
 Handle incoming IPCP packets.
int NutIpcpOutput (NUTDEVICE *dev, uint8_t code, uint8_t id, NETBUF *nb)
 Send a IPCP packet.
void IpcpTxConfReq (NUTDEVICE *dev, uint8_t id)

Detailed Description

IP control protocol.


Function Documentation

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

Definition at line 429 of file ipcpin.c.

References _PPPDCB::dcb_ipcp_state, _NUTDEVICE::dev_dcb, IpcpLowerDown(), NutIpcpOutput(), NutNetBufFree(), PPPS_ACKRCVD, PPPS_ACKSENT, PPPS_OPENED, PPPS_REQSENT, PPPS_STOPPING, and XCP_TERMACK.

Referenced by NutIpcpInput().

Here is the call graph for this function:

void IpcpRxTermAck ( NUTDEVICE dev,
uint8_t  id,
NETBUF nb 
)
void IpcpRxProtRej ( NUTDEVICE dev)
void NutIpcpInput ( NUTDEVICE dev,
NETBUF nb 
)

Handle incoming IPCP 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:
devIdentifies the device that received the packet.
nbPointer to a network buffer structure containing the ARP packet.

Definition at line 533 of file ipcpin.c.

References _PPPDCB::dcb_ipcp_state, _NUTDEVICE::dev_dcb, htons, IpcpRxConfAck(), IpcpRxConfReq(), IpcpRxTermAck(), IpcpRxTermReq(), _NETBUF::nb_ap, _NETBUF::nb_nw, NutNetBufFree(), PPPS_INITIAL, PPPS_STARTING, _NBDATA::sz, _NBDATA::vp, 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().

Here is the call graph for this function:

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

Send a IPCP 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 117 of file ipcpout.c.

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

Referenced by IpcpClose(), IpcpRxConfAck(), IpcpRxConfReq(), IpcpRxProtRej(), IpcpRxTermReq(), IpcpTxConfReq(), LcpRxProtRej(), and NutPppSm().

Here is the call graph for this function: