Webserver+3d print

Dependents:   Nucleo

Embed: (wiki syntax)

« Back to documentation index

pap.c File Reference

pap.c File Reference

PAP (Password Authentication Protocol) More...

Go to the source code of this file.

Functions

error_t papStartAuth (PppContext *context)
 Start PAP authentication.
error_t papAbortAuth (PppContext *context)
 Abort PAP authentication.
void papTick (PppContext *context)
 PAP timer handler.
void papProcessPacket (PppContext *context, const PppPacket *packet, size_t length)
 Process an incoming PAP packet.
error_t papProcessAuthReq (PppContext *context, const PapAuthReqPacket *authReqPacket, size_t length)
 Process Authenticate-Request packet.
error_t papProcessAuthAck (PppContext *context, const PapAuthAckPacket *authAckPacket, size_t length)
 Process Authenticate-Ack packet.
error_t papProcessAuthNak (PppContext *context, const PapAuthNakPacket *authNakPacket, size_t length)
 Process Authenticate-Nak packet.
error_t papSendAuthReq (PppContext *context)
 Send Authenticate-Request packet.
error_t papSendAuthAck (PppContext *context, uint8_t identifier)
 Send Authenticate-Ack packet.
error_t papSendAuthNak (PppContext *context, uint8_t identifier)
 Send Authenticate-Nak packet.
bool_t papCheckPassword (PppContext *context, const char_t *password)
 Password verification.

Detailed Description

PAP (Password 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 pap.c.


Function Documentation

error_t papAbortAuth ( PppContext *  context )

Abort PAP authentication.

Parameters:
[in]contextPPP context
Returns:
Error code

Definition at line 85 of file pap.c.

bool_t papCheckPassword ( PppContext *  context,
const char_t *  password 
)

Password verification.

Parameters:
[in]contextPPP context
[in]passwordNULL-terminated string containing the password to be checked
Returns:
TRUE if the password is valid, else FALSE

Definition at line 600 of file pap.c.

error_t papProcessAuthAck ( PppContext *  context,
const PapAuthAckPacket *  authAckPacket,
size_t  length 
)

Process Authenticate-Ack packet.

Parameters:
[in]contextPPP context
[in]authAckPacketPacket received from the peer
[in]lengthLength of the packet, in bytes
Returns:
Error code

Definition at line 328 of file pap.c.

error_t papProcessAuthNak ( PppContext *  context,
const PapAuthNakPacket *  authNakPacket,
size_t  length 
)

Process Authenticate-Nak packet.

Parameters:
[in]contextPPP context
[in]authNakPacketPacket received from the peer
[in]lengthLength of the packet, in bytes
Returns:
Error code

Definition at line 385 of file pap.c.

error_t papProcessAuthReq ( PppContext *  context,
const PapAuthReqPacket *  authReqPacket,
size_t  length 
)

Process Authenticate-Request packet.

Parameters:
[in]contextPPP context
[in]authReqPacketPacket received from the peer
[in]lengthLength of the packet, in bytes
Returns:
Error code

Definition at line 212 of file pap.c.

void papProcessPacket ( PppContext *  context,
const PppPacket *  packet,
size_t  length 
)

Process an incoming PAP packet.

Parameters:
[in]contextPPP context
[in]packetPAP packet received from the peer
[in]lengthLength of the packet, in bytes

Definition at line 147 of file pap.c.

error_t papSendAuthAck ( PppContext *  context,
uint8_t  identifier 
)

Send Authenticate-Ack packet.

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

Definition at line 498 of file pap.c.

error_t papSendAuthNak ( PppContext *  context,
uint8_t  identifier 
)

Send Authenticate-Nak packet.

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

Definition at line 549 of file pap.c.

error_t papSendAuthReq ( PppContext *  context )

Send Authenticate-Request packet.

Parameters:
[in]contextPPP context
Returns:
Error code

Definition at line 420 of file pap.c.

error_t papStartAuth ( PppContext *  context )

Start PAP authentication.

Parameters:
[in]contextPPP context
Returns:
Error code

Definition at line 51 of file pap.c.

void papTick ( PppContext *  context )

PAP timer handler.

This routine must be periodically called by the TCP/IP stack to manage retransmissions

Parameters:
[in]contextPPP context

Definition at line 108 of file pap.c.