Webserver+3d print

Dependents:   Nucleo

Embed: (wiki syntax)

« Back to documentation index

ppp_misc.c File Reference

ppp_misc.c File Reference

PPP miscellaneous functions. More...

Go to the source code of this file.

Functions

error_t pppSendConfigureAckNak (PppContext *context, const PppConfigurePacket *configureReqPacket, PppProtocol protocol, PppCode code)
 Send Configure-Ack, Nak or Reject packet.
error_t pppSendTerminateReq (PppContext *context, uint8_t identifier, PppProtocol protocol)
 Send Terminate-Request packet.
error_t pppSendTerminateAck (PppContext *context, uint8_t identifier, PppProtocol protocol)
 Send Terminate-Ack packet.
error_t pppSendCodeRej (PppContext *context, const PppPacket *packet, uint8_t identifier, PppProtocol protocol)
 Send Code-Reject packet.
error_t pppSendProtocolRej (PppContext *context, uint8_t identifier, uint16_t protocol, const uint8_t *information, size_t length)
 Send Protocol-Reject packet.
error_t pppSendEchoRep (PppContext *context, const PppEchoPacket *echoReqPacket, PppProtocol protocol)
 Send Echo-Reply packet.
error_t pppAddOption (PppConfigurePacket *packet, uint8_t optionType, const void *optionValue, uint8_t optionLen)
 Add an option to a Configure packet.

Detailed Description

PPP miscellaneous functions.

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 ppp_misc.c.


Function Documentation

error_t pppAddOption ( PppConfigurePacket *  packet,
uint8_t  optionType,
const void *  optionValue,
uint8_t  optionLen 
)

Add an option to a Configure packet.

Parameters:
[in,out]packetPointer to the Configure packet
[in]optionTypeOption type
[in]optionValueOption value
[in]optionLenLength of the option value
Returns:
Error code

Definition at line 446 of file ppp_misc.c.

error_t pppSendCodeRej ( PppContext *  context,
const PppPacket *  packet,
uint8_t  identifier,
PppProtocol  protocol 
)

Send Code-Reject packet.

Parameters:
[in]contextPPP context
[in]packetUn-interpretable packet received from the peer
[in]identifierIdentifier field
[in]protocolProtocol field
Returns:
Error code

Definition at line 263 of file ppp_misc.c.

error_t pppSendConfigureAckNak ( PppContext *  context,
const PppConfigurePacket *  configureReqPacket,
PppProtocol  protocol,
PppCode  code 
)

Send Configure-Ack, Nak or Reject packet.

Parameters:
[in]contextPPP context
[in]configureReqPacketPointer to the incoming Configure-Request
[in]protocolProtocol field
[in]codeCode field
Returns:
Error code

Definition at line 54 of file ppp_misc.c.

error_t pppSendEchoRep ( PppContext *  context,
const PppEchoPacket *  echoReqPacket,
PppProtocol  protocol 
)

Send Echo-Reply packet.

Parameters:
[in]contextPPP context
[in]echoReqPacketEcho-Request packet received from the peer
[in]protocolProtocol field
Returns:
Error code

Definition at line 383 of file ppp_misc.c.

error_t pppSendProtocolRej ( PppContext *  context,
uint8_t  identifier,
uint16_t  protocol,
const uint8_t *  information,
size_t  length 
)

Send Protocol-Reject packet.

Parameters:
[in]contextPPP context
[in]identifierIdentifier field
[in]protocolRejected protocol
[in]informationRejected information
[in]lengthLength of the rejected information
Returns:
Error code

Definition at line 323 of file ppp_misc.c.

error_t pppSendTerminateAck ( PppContext *  context,
uint8_t  identifier,
PppProtocol  protocol 
)

Send Terminate-Ack packet.

Parameters:
[in]contextPPP context
[in]identifierIdentifier field
[in]protocolProtocol field
Returns:
Error code

Definition at line 213 of file ppp_misc.c.

error_t pppSendTerminateReq ( PppContext *  context,
uint8_t  identifier,
PppProtocol  protocol 
)

Send Terminate-Request packet.

Parameters:
[in]contextPPP context
[in]identifierIdentifier field
[in]protocolProtocol field
Returns:
Error code

Definition at line 164 of file ppp_misc.c.