Go to the documentation of this file.
40 #define PAP_SUPPORT ENABLED
41 #elif (PAP_SUPPORT != ENABLED && PAP_SUPPORT != DISABLED)
42 #error PAP_SUPPORT parameter is not valid
46 #ifndef PAP_RESTART_TIMER
47 #define PAP_RESTART_TIMER 3000
48 #elif (PAP_RESTART_TIMER < 1000)
49 #error PAP_RESTART_TIMER parameter is not valid
53 #ifndef PAP_MAX_REQUESTS
54 #define PAP_MAX_REQUESTS 5
55 #elif (PAP_MAX_REQUESTS < 1)
56 #error PAP_MAX_REQUESTS parameter is not valid
97 #elif defined(__CWCC__) || defined(_WIN32)
145 #if defined(__CCRX__)
147 #elif defined(__CWCC__) || defined(_WIN32)
typedef __packed_struct
Authenticate-Request packet.
systime_t timestamp
Timestamp to manage retransmissions.
error_t papSendAuthAck(PppContext *context, uint8_t identifier)
Send Authenticate-Ack packet.
PAP finite state machine.
error_t papSendAuthNak(PppContext *context, uint8_t identifier)
Send Authenticate-Nak packet.
PapCode
Code field values.
@ PAP_CODE_AUTH_REQ
Authenticate-Request.
bool_t papCheckPassword(PppContext *context, const char_t *password)
Password verification.
size_t passwordLen
Length of the password in bytes.
uint_t peerState
Peer state.
uint_t restartCounter
Restart counter.
@ PAP_CODE_AUTH_ACK
Authenticate-Ack.
error_t papProcessAuthReq(PppContext *context, const PapAuthReqPacket *authReqPacket, size_t length)
Process Authenticate-Request packet.
error_t papStartAuth(PppContext *context)
Start PAP authentication.
uint_t localState
Local state.
uint32_t systime_t
System time.
const uint8_t * password
Peer's password.
error_t papProcessAuthNak(PppContext *context, const PapAuthNakPacket *authNakPacket, size_t length)
Process Authenticate-Nak packet.
PPP (Point-to-Point Protocol)
error_t papProcessAuthAck(PppContext *context, const PapAuthAckPacket *authAckPacket, size_t length)
Process Authenticate-Ack packet.
void papTick(PppContext *context)
PAP timer handler.
error_t papAbortAuth(PppContext *context)
Abort PAP authentication.
@ PAP_CODE_AUTH_NAK
Authenticate-Nak.
uint8_t identifier
Identifier used to match requests and replies.
error_t papSendAuthReq(PppContext *context)
Send Authenticate-Request packet.
void papProcessPacket(PppContext *context, const PppPacket *packet, size_t length)
Process an incoming PAP packet.