Webserver+3d print
Dependents:
Nucleo
« Back to documentation index
chap.c File Reference
CHAP (Challenge Handshake Authentication Protocol)
More...
Go to the source code of this file.
Functions
error_t chapStartAuth (PppContext *context)
Start CHAP authentication.
error_t chapAbortAuth (PppContext *context)
Abort CHAP authentication.
void chapTick (PppContext *context)
CHAP timer handler.
void chapProcessPacket (PppContext *context, const PppPacket *packet, size_t length)
Process an incoming CHAP packet.
error_t chapProcessChallenge (PppContext *context, const ChapChallengePacket *challengePacket, size_t length)
Process Challenge packet.
error_t chapProcessResponse (PppContext *context, const ChapResponsePacket *responsePacket, size_t length)
Process Response packet.
error_t chapProcessSuccess (PppContext *context, const ChapSuccessPacket *successPacket, size_t length)
Process Success packet.
error_t chapProcessFailure (PppContext *context, const ChapFailurePacket *failurePacket, size_t length)
Process Failure packet.
error_t chapSendChallenge (PppContext *context)
Send Challenge packet.
error_t chapSendResponse (PppContext *context, const uint8_t *value)
Send Response packet.
error_t chapSendSuccess (PppContext *context)
Send Success packet.
error_t chapSendFailure (PppContext *context)
Send Failure packet.
bool_t chapCheckPassword (PppContext *context, const char_t *password)
Password verification.
Detailed Description
CHAP (Challenge Handshake Authentication 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 chap.c .
Function Documentation
error_t chapAbortAuth
(
PppContext *
context )
Abort CHAP authentication.
Parameters:
Returns: Error code
Definition at line 89 of file chap.c .
bool_t chapCheckPassword
(
PppContext *
context ,
const char_t *
password
)
Password verification.
Parameters:
[in] context PPP context
[in] password NULL-terminated string containing the password to be checked
Returns: TRUE if the password is valid, else FALSE
Definition at line 710 of file chap.c .
error_t chapProcessChallenge
(
PppContext *
context ,
const ChapChallengePacket *
challengePacket ,
size_t
length
)
Process Challenge packet.
Parameters:
[in] context PPP context
[in] challengePacket Packet received from the peer
[in] length Length of the packet, in bytes
Returns: Error code
Definition at line 216 of file chap.c .
error_t chapProcessFailure
(
PppContext *
context ,
const ChapFailurePacket *
failurePacket ,
size_t
length
)
Process Failure packet.
Parameters:
[in] context PPP context
[in] failurePacket Packet received from the peer
[in] length Length of the packet, in bytes
Returns: Error code
Definition at line 443 of file chap.c .
void chapProcessPacket
(
PppContext *
context ,
const PppPacket *
packet ,
size_t
length
)
Process an incoming CHAP packet.
Parameters:
[in] context PPP context
[in] packet CHAP packet received from the peer
[in] length Length of the packet, in bytes
Definition at line 147 of file chap.c .
error_t chapProcessResponse
(
PppContext *
context ,
const ChapResponsePacket *
responsePacket ,
size_t
length
)
Process Response packet.
Parameters:
[in] context PPP context
[in] responsePacket Packet received from the peer
[in] length Length of the packet, in bytes
Returns: Error code
Definition at line 271 of file chap.c .
error_t chapProcessSuccess
(
PppContext *
context ,
const ChapSuccessPacket *
successPacket ,
size_t
length
)
Process Success packet.
Parameters:
[in] context PPP context
[in] successPacket Packet received from the peer
[in] length Length of the packet, in bytes
Returns: Error code
Definition at line 386 of file chap.c .
error_t chapSendChallenge
(
PppContext *
context )
Send Challenge packet.
Parameters:
Returns: Error code
Definition at line 478 of file chap.c .
error_t chapSendFailure
(
PppContext *
context )
Send Failure packet.
Parameters:
Returns: Error code
Definition at line 663 of file chap.c .
error_t chapSendResponse
(
PppContext *
context ,
const uint8_t *
value
)
Send Response packet.
Parameters:
[in] context PPP context
[in] value Response value
Returns: Error code
Definition at line 560 of file chap.c .
error_t chapSendSuccess
(
PppContext *
context )
Send Success packet.
Parameters:
Returns: Error code
Definition at line 617 of file chap.c .
error_t chapStartAuth
(
PppContext *
context )
Start CHAP authentication.
Parameters:
Returns: Error code
Definition at line 55 of file chap.c .
void chapTick
(
PppContext *
context )
CHAP timer handler.
Parameters:
Definition at line 108 of file chap.c .