Documentation

Documentation

Includes

netif/ppp/ppp_opts.h

#include "netif/ppp/ppp_opts.h"
#include "netif/ppp/ppp_opts.h"

ppp.h

#include "ppp.h"
#include "ppp.h"

Macros

Marco UPAP_H

#define UPAP_H


      

Marco UPAP_HEADERLEN

#define UPAP_HEADERLEN 4
/*
 * Packet header = Code, id, length.
 */

Marco UPAP_AUTHREQ

#define UPAP_AUTHREQ 1 /* Authenticate-Request */
/*
 * UPAP codes.
 */

Marco UPAP_AUTHACK

#define UPAP_AUTHACK 2 /* Authenticate-Ack */


      

Marco UPAP_AUTHNAK

#define UPAP_AUTHNAK 3 /* Authenticate-Nak */


      

Marco UPAPCS_INITIAL

#define UPAPCS_INITIAL 0 /* Connection down */
/*
 * Client states.
 */

Marco UPAPCS_CLOSED

#define UPAPCS_CLOSED 1 /* Connection up, haven't requested auth */


      

Marco UPAPCS_PENDING

#define UPAPCS_PENDING 2 /* Connection down, have requested auth */


      

Marco UPAPCS_AUTHREQ

#define UPAPCS_AUTHREQ 3 /* We've sent an Authenticate-Request */


      

Marco UPAPCS_OPEN

#define UPAPCS_OPEN 4 /* We've received an Ack */


      

Marco UPAPCS_BADAUTH

#define UPAPCS_BADAUTH 5 /* We've received a Nak */


      

Marco UPAPSS_INITIAL

#define UPAPSS_INITIAL 0 /* Connection down */
/*
 * Server states.
 */

Marco UPAPSS_CLOSED

#define UPAPSS_CLOSED 1 /* Connection up, haven't requested auth */


      

Marco UPAPSS_PENDING

#define UPAPSS_PENDING 2 /* Connection down, have requested auth */


      

Marco UPAPSS_LISTEN

#define UPAPSS_LISTEN 3 /* Listening for an Authenticate */


      

Marco UPAPSS_OPEN

#define UPAPSS_OPEN 4 /* We've sent an Ack */


      

Marco UPAPSS_BADAUTH

#define UPAPSS_BADAUTH 5 /* We've sent a Nak */


      

Marco UPAP_DEFTIMEOUT

#define UPAP_DEFTIMEOUT 3 /* Timeout (seconds) for retransmitting req */


      

Marco UPAP_DEFREQTIME

#define UPAP_DEFREQTIME 30 /* Time to wait for auth-req from peer */

      

Functions

Func upap_authwithpeer

void upap_authwithpeer(ppp_pcb *pcb, const char *user, const char *password);


      

Func upap_authpeer

void upap_authpeer(ppp_pcb *pcb);

      

Vars

Consts

Types

Typedefs

Typedef upap_state;

typedef struct upap_state {
   const char *us_user; /* User */
   u8_t us_userlen;	/* User length */
   const char *us_passwd; /* Password */
   u8_t us_passwdlen;	/* Password length */
   u8_t us_clientstate; /* Client state */
#if PPP_SERVER
   u8_t us_serverstate; /* Server state */
#endif /* PPP_SERVER */
   u8_t us_id;	        /* Current id */
   u8_t us_transmits;	/* Number of auth-reqs sent */
} upap_state;