PAP (Password Authentication Protocol) More...
Go to the source code of this file.
Data Structures | |
struct | PapFsm |
PAP finite state machine. More... | |
Macros | |
#define | PAP_SUPPORT ENABLED |
#define | PAP_RESTART_TIMER 3000 |
#define | PAP_MAX_REQUESTS 5 |
Enumerations | |
enum | PapState { PAP_STATE_0_INITIAL = 0, PAP_STATE_1_STARTED = 1, PAP_STATE_2_REQ_SENT = 2, PAP_STATE_3_REQ_RCVD = 3, PAP_STATE_4_ACK_SENT = 4, PAP_STATE_5_ACK_RCVD = 5, PAP_STATE_6_NAK_SENT = 6, PAP_STATE_7_NAK_RCVD = 7 } |
PAP states. More... | |
enum | PapCode { PAP_CODE_AUTH_REQ = 1, PAP_CODE_AUTH_ACK = 2, PAP_CODE_AUTH_NAK = 3 } |
Code field values. More... | |
Functions | |
error_t | papStartAuth (PppContext *context) |
Start PAP authentication. More... | |
error_t | papAbortAuth (PppContext *context) |
Abort PAP authentication. More... | |
void | papTick (PppContext *context) |
PAP timer handler. More... | |
void | papProcessPacket (PppContext *context, const PppPacket *packet, size_t length) |
Process an incoming PAP packet. More... | |
error_t | papProcessAuthReq (PppContext *context, const PapAuthReqPacket *authReqPacket, size_t length) |
Process Authenticate-Request packet. More... | |
error_t | papProcessAuthAck (PppContext *context, const PapAuthAckPacket *authAckPacket, size_t length) |
Process Authenticate-Ack packet. More... | |
error_t | papProcessAuthNak (PppContext *context, const PapAuthNakPacket *authNakPacket, size_t length) |
Process Authenticate-Nak packet. More... | |
error_t | papSendAuthReq (PppContext *context) |
Send Authenticate-Request packet. More... | |
error_t | papSendAuthAck (PppContext *context, uint8_t identifier) |
Send Authenticate-Ack packet. More... | |
error_t | papSendAuthNak (PppContext *context, uint8_t identifier) |
Send Authenticate-Nak packet. More... | |
bool_t | papCheckPassword (PppContext *context, const char_t *password) |
Password verification. More... | |
Variables | |
typedef | __packed_struct |
Authenticate-Request packet. More... | |
uint8_t | identifier |
uint16_t | length |
uint8_t | peerIdLength |
uint8_t | peerId [] |
PapAuthReqPacket | |
uint8_t | msgLength |
uint8_t | message [] |
PapAuthAckPacket | |
PapAuthNakPacket | |
Detailed Description
PAP (Password Authentication Protocol)
License
SPDX-License-Identifier: GPL-2.0-or-later
Copyright (C) 2010-2024 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.
- Version
- 2.4.4
Definition in file pap.h.
Macro Definition Documentation
◆ PAP_MAX_REQUESTS
◆ PAP_RESTART_TIMER
◆ PAP_SUPPORT
Enumeration Type Documentation
◆ PapCode
enum PapCode |
◆ PapState
enum PapState |
Function Documentation
◆ papAbortAuth()
error_t papAbortAuth | ( | PppContext * | context | ) |
◆ papCheckPassword()
bool_t papCheckPassword | ( | PppContext * | context, |
const char_t * | password | ||
) |
◆ papProcessAuthAck()
error_t papProcessAuthAck | ( | PppContext * | context, |
const PapAuthAckPacket * | authAckPacket, | ||
size_t | length | ||
) |
◆ papProcessAuthNak()
error_t papProcessAuthNak | ( | PppContext * | context, |
const PapAuthNakPacket * | authNakPacket, | ||
size_t | length | ||
) |
◆ papProcessAuthReq()
error_t papProcessAuthReq | ( | PppContext * | context, |
const PapAuthReqPacket * | authReqPacket, | ||
size_t | length | ||
) |
◆ papProcessPacket()
void papProcessPacket | ( | PppContext * | context, |
const PppPacket * | packet, | ||
size_t | length | ||
) |
◆ papSendAuthAck()
error_t papSendAuthAck | ( | PppContext * | context, |
uint8_t | identifier | ||
) |
◆ papSendAuthNak()
error_t papSendAuthNak | ( | PppContext * | context, |
uint8_t | identifier | ||
) |
◆ papSendAuthReq()
error_t papSendAuthReq | ( | PppContext * | context | ) |
◆ papStartAuth()
error_t papStartAuth | ( | PppContext * | context | ) |
◆ papTick()
void papTick | ( | PppContext * | context | ) |
Variable Documentation
◆ __packed_struct
typedef __packed_struct |