Dependents:
Nucleo
« Back to documentation index
ipcp.c File Reference
IPCP (PPP Internet Protocol Control Protocol)
More...
Go to the source code of this file.
Functions
error_t ipcpOpen (PppContext *context)
IPCP Open event.
error_t ipcpClose (PppContext *context)
IPCP Close event.
void ipcpTick (PppContext *context)
IPCP timer handler.
void ipcpProcessPacket (PppContext *context, const PppPacket *packet, size_t length)
Process an incoming IPCP packet.
error_t ipcpProcessConfigureReq (PppContext *context, const PppConfigurePacket *configureReqPacket)
Process Configure-Request packet.
error_t ipcpProcessConfigureAck (PppContext *context, const PppConfigurePacket *configureAckPacket)
Process Configure-Ack packet.
error_t ipcpProcessConfigureNak (PppContext *context, const PppConfigurePacket *configureNakPacket)
Process Configure-Nak packet.
error_t ipcpProcessConfigureReject (PppContext *context, const PppConfigurePacket *configureRejPacket)
Process Configure-Reject packet.
error_t ipcpProcessTerminateReq (PppContext *context, const PppTerminatePacket *terminateReqPacket)
Process Terminate-Request packet.
error_t ipcpProcessTerminateAck (PppContext *context, const PppTerminatePacket *terminateAckPacket)
Process Terminate-Ack packet.
error_t ipcpProcessCodeRej (PppContext *context, const PppCodeRejPacket *codeRejPacket)
Process Code-Reject packet.
error_t ipcpProcessUnknownCode (PppContext *context, const PppPacket *packet)
Process packet with unknown code.
void ipcpThisLayerUp (PppContext *context)
This-Layer-Up callback function.
void ipcpThisLayerDown (PppContext *context)
This-Layer-Down callback function.
void ipcpThisLayerStarted (PppContext *context)
This-Layer-Started callback function.
void ipcpThisLayerFinished (PppContext *context)
This-Layer-Finished callback function.
void ipcpInitRestartCount (PppContext *context, uint_t value)
Initialize-Restart-Count callback function.
void ipcpZeroRestartCount (PppContext *context)
Zero-Restart-Count callback function.
error_t ipcpSendConfigureReq (PppContext *context)
Send-Configure-Request callback function.
error_t ipcpSendConfigureAck (PppContext *context, const PppConfigurePacket *configureReqPacket)
Send-Configure-Ack callback function.
error_t ipcpSendConfigureNak (PppContext *context, const PppConfigurePacket *configureReqPacket)
Send-Configure-Nak callback function.
error_t ipcpSendConfigureRej (PppContext *context, const PppConfigurePacket *configureReqPacket)
Send-Configure-Reject callback function.
error_t ipcpSendTerminateReq (PppContext *context)
Send-Terminate-Request callback function.
error_t ipcpSendTerminateAck (PppContext *context, const PppTerminatePacket *terminateReqPacket)
Send-Terminate-Ack callback function.
error_t ipcpSendCodeRej (PppContext *context, const PppPacket *packet)
Send-Code-Reject callback function.
error_t ipcpParseOption (PppContext *context, PppOption *option, size_t inPacketLen, PppConfigurePacket *outPacket)
Parse IPCP configuration option.
error_t ipcpParseIpAddressOption (PppContext *context, IpcpIpAddressOption *option, PppConfigurePacket *outPacket)
Parse IP-Address option.
Variables
const PppCallbacks ipcpCallbacks
IPCP FSM callbacks.
Detailed Description
IPCP (PPP Internet Protocol Control Protocol)
License
Copyright (C) 2010-2017 Oryx Embedded SARL. All rights reserved.
This file is part of CycloneTCP Open.
This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
Author: Oryx Embedded SARL (www.oryx-embedded.com)
Version: 1.7.6
Definition in file ipcp.c .
Function Documentation
error_t ipcpClose
(
PppContext *
context )
IPCP Close event.
Parameters:
Returns: Error code
Definition at line 95 of file ipcp.c .
void ipcpInitRestartCount
(
PppContext *
context ,
uint_t
value
)
Initialize-Restart-Count callback function.
Parameters:
[in] context PPP context
[in] value Restart counter value
Definition at line 713 of file ipcp.c .
error_t ipcpOpen
(
PppContext *
context )
IPCP Open event.
Parameters:
Returns: Error code
Definition at line 74 of file ipcp.c .
error_t ipcpParseIpAddressOption
(
PppContext *
context ,
IpcpIpAddressOption *
option ,
PppConfigurePacket *
outPacket
)
Parse IP-Address option.
Parameters:
[in] context PPP context
[in] option Option to be checked
[out] outPacket Pointer to the Configure-Nak or Configure-Reject packet
Returns: Error code
Definition at line 1033 of file ipcp.c .
error_t ipcpParseOption
(
PppContext *
context ,
PppOption *
option ,
size_t
inPacketLen ,
PppConfigurePacket *
outPacket
)
Parse IPCP configuration option.
Parameters:
[in] context PPP context
[in] option Option to be checked
[in] inPacketLen Remaining bytes to process in the incoming packet
[out] outPacket Pointer to the Configure-Ack, Nak or Reject packet
Returns: Error code
Definition at line 981 of file ipcp.c .
error_t ipcpProcessCodeRej
(
PppContext *
context ,
const PppCodeRejPacket *
codeRejPacket
)
Process Code-Reject packet.
Parameters:
[in] context PPP context
[in] codeRejPacket Packet received from the peer
Returns: Error code
Definition at line 547 of file ipcp.c .
error_t ipcpProcessConfigureAck
(
PppContext *
context ,
const PppConfigurePacket *
configureAckPacket
)
Process Configure-Ack packet.
Parameters:
[in] context PPP context
[in] configureAckPacket Packet received from the peer
Returns: Error code
Definition at line 319 of file ipcp.c .
error_t ipcpProcessConfigureNak
(
PppContext *
context ,
const PppConfigurePacket *
configureNakPacket
)
Process Configure-Nak packet.
Parameters:
[in] context PPP context
[in] configureNakPacket Packet received from the peer
Returns: Error code
Definition at line 345 of file ipcp.c .
error_t ipcpProcessConfigureReject
(
PppContext *
context ,
const PppConfigurePacket *
configureRejPacket
)
Process Configure-Reject packet.
Parameters:
[in] context PPP context
[in] configureRejPacket Packet received from the peer
Returns: Error code
Definition at line 434 of file ipcp.c .
error_t ipcpProcessConfigureReq
(
PppContext *
context ,
const PppConfigurePacket *
configureReqPacket
)
Process Configure-Request packet.
Parameters:
[in] context PPP context
[in] configureReqPacket Packet received from the peer
Returns: Error code
Definition at line 223 of file ipcp.c .
void ipcpProcessPacket
(
PppContext *
context ,
const PppPacket *
packet ,
size_t
length
)
Process an incoming IPCP packet.
Parameters:
[in] context PPP context
[in] packet IPCP packet received from the peer
[in] length Length of the packet, in bytes
Definition at line 149 of file ipcp.c .
error_t ipcpProcessTerminateAck
(
PppContext *
context ,
const PppTerminatePacket *
terminateAckPacket
)
Process Terminate-Ack packet.
Parameters:
[in] context PPP context
[in] terminateAckPacket Packet received from the peer
Returns: Error code
Definition at line 524 of file ipcp.c .
error_t ipcpProcessTerminateReq
(
PppContext *
context ,
const PppTerminatePacket *
terminateReqPacket
)
Process Terminate-Request packet.
Parameters:
[in] context PPP context
[in] terminateReqPacket Packet received from the peer
Returns: Error code
Definition at line 502 of file ipcp.c .
error_t ipcpProcessUnknownCode
(
PppContext *
context ,
const PppPacket *
packet
)
Process packet with unknown code.
Parameters:
[in] context PPP context
[in] packet Un-interpretable packet received from the peer
Returns: Error code
Definition at line 594 of file ipcp.c .
error_t ipcpSendCodeRej
(
PppContext *
context ,
const PppPacket *
packet
)
Send-Code-Reject callback function.
Parameters:
[in] context PPP context
[in] packet Un-interpretable packet received from the peer
Returns: Error code
Definition at line 959 of file ipcp.c .
error_t ipcpSendConfigureAck
(
PppContext *
context ,
const PppConfigurePacket *
configureReqPacket
)
Send-Configure-Ack callback function.
Parameters:
[in] context PPP context
[in] configureReqPacket Configure-Request packet received from the peer
Returns: Error code
Definition at line 837 of file ipcp.c .
error_t ipcpSendConfigureNak
(
PppContext *
context ,
const PppConfigurePacket *
configureReqPacket
)
Send-Configure-Nak callback function.
Parameters:
[in] context PPP context
[in] configureReqPacket Configure-Request packet received from the peer
Returns: Error code
Definition at line 856 of file ipcp.c .
error_t ipcpSendConfigureRej
(
PppContext *
context ,
const PppConfigurePacket *
configureReqPacket
)
Send-Configure-Reject callback function.
Parameters:
[in] context PPP context
[in] configureReqPacket Configure-Request packet received from the peer
Returns: Error code
Definition at line 875 of file ipcp.c .
error_t ipcpSendConfigureReq
(
PppContext *
context )
Send-Configure-Request callback function.
Parameters:
Returns: Error code
Definition at line 749 of file ipcp.c .
error_t ipcpSendTerminateAck
(
PppContext *
context ,
const PppTerminatePacket *
terminateReqPacket
)
Send-Terminate-Ack callback function.
Parameters:
[in] context PPP context
[in] terminateReqPacket Terminate-Request packet received from the peer
Returns: Error code
Definition at line 925 of file ipcp.c .
error_t ipcpSendTerminateReq
(
PppContext *
context )
Send-Terminate-Request callback function.
Parameters:
Returns: Error code
Definition at line 893 of file ipcp.c .
void ipcpThisLayerDown
(
PppContext *
context )
This-Layer-Down callback function.
Parameters:
Definition at line 661 of file ipcp.c .
void ipcpThisLayerFinished
(
PppContext *
context )
This-Layer-Finished callback function.
Parameters:
Definition at line 700 of file ipcp.c .
void ipcpThisLayerStarted
(
PppContext *
context )
This-Layer-Started callback function.
Parameters:
Definition at line 688 of file ipcp.c .
void ipcpThisLayerUp
(
PppContext *
context )
This-Layer-Up callback function.
Parameters:
Definition at line 614 of file ipcp.c .
void ipcpTick
(
PppContext *
context )
IPCP timer handler.
This routine must be periodically called by the TCP/IP stack to manage retransmissions
Parameters:
Definition at line 119 of file ipcp.c .
void ipcpZeroRestartCount
(
PppContext *
context )
Zero-Restart-Count callback function.
Parameters:
Definition at line 728 of file ipcp.c .
Variable Documentation
Initial value:
{
ipcpThisLayerUp ,
ipcpThisLayerDown ,
ipcpThisLayerStarted ,
ipcpThisLayerFinished ,
ipcpInitRestartCount ,
ipcpZeroRestartCount ,
ipcpSendConfigureReq ,
ipcpSendConfigureAck ,
ipcpSendConfigureNak ,
ipcpSendConfigureRej ,
ipcpSendTerminateReq ,
ipcpSendTerminateAck ,
ipcpSendCodeRej ,
NULL
}
IPCP FSM callbacks.
Definition at line 49 of file ipcp.c .