All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Typedefs | Enumerations
otp.h File Reference
#include <sys/types.h>
+ Include dependency graph for otp.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  otp_pwe_chap
 
struct  otp_pwe_pap
 
struct  otp_reply_t
 
struct  otp_request_t
 
struct  otp_request_t.pwe
 
union  otp_request_t.pwe.u
 

Macros

#define OTP_MAX_CHALLENGE_LEN   16
 
#define OTP_MAX_CHAP_CHALLENGE_LEN   16
 
#define OTP_MAX_CHAP_RESPONSE_LEN   50
 
#define OTP_MAX_PASSCODE_LEN   47
 
#define OTP_MAX_USERNAME_LEN   31
 
#define OTP_RC_AUTH_ERR   3
 
#define OTP_RC_AUTHINFO_UNAVAIL   2
 
#define OTP_RC_IPIN   7
 
#define OTP_RC_MAXTRIES   4
 
#define OTP_RC_NEXTPASSCODE   6
 
#define OTP_RC_OK   0
 
#define OTP_RC_SERVICE_ERR   5
 
#define OTP_RC_USER_UNKNOWN   1
 

Typedefs

typedef struct otp_pwe_chap otp_pwe_chap_t
 
typedef struct otp_pwe_pap otp_pwe_pap_t
 
typedef enum otp_pwe otp_pwe_t
 
typedef struct otp_reply_t otp_reply_t
 
typedef struct otp_request_t otp_request_t
 

Enumerations

enum  otp_pwe {
  PWE_NONE = 0,
  PWE_PAP = 1,
  PWE_CHAP = 3,
  PWE_MSCHAP = 5,
  PWE_MSCHAP2 = 7
}
 

Data Structure Documentation

struct otp_pwe_chap

Definition at line 68 of file otp.h.

Data Fields
uint8_t challenge[OTP_MAX_CHAP_CHALLENGE_LEN] CHAP challenge.
size_t clen
uint8_t response[OTP_MAX_CHAP_RESPONSE_LEN]
size_t rlen
struct otp_pwe_pap

Definition at line 64 of file otp.h.

Data Fields
char passcode[OTP_MAX_PASSCODE_LEN+1]
struct otp_reply_t

Definition at line 95 of file otp.h.

Data Fields
char passcode[OTP_MAX_PASSCODE_LEN+1]
int rc
int version Should be 1.
struct otp_request_t

Definition at line 75 of file otp.h.

Data Fields
bool allow_async Async auth allowed?
bool allow_sync Sync auth allowed?
char challenge[OTP_MAX_CHALLENGE_LEN+1] USER challenge.
unsigned challenge_delay Min delay between async auths.
struct otp_request_t pwe
int resync Resync on async auth?
char username[OTP_MAX_USERNAME_LEN+1]
int version Should be 2.
struct otp_request_t.pwe

Definition at line 79 of file otp.h.

Data Fields
otp_pwe_t pwe
pwe u
union otp_request_t.pwe.u

Definition at line 82 of file otp.h.

Data Fields
otp_pwe_chap_t chap
otp_pwe_pap_t pap

Macro Definition Documentation

#define OTP_MAX_CHALLENGE_LEN   16

Definition at line 35 of file otp.h.

#define OTP_MAX_CHAP_CHALLENGE_LEN   16

Definition at line 53 of file otp.h.

#define OTP_MAX_CHAP_RESPONSE_LEN   50

Definition at line 54 of file otp.h.

#define OTP_MAX_PASSCODE_LEN   47

Definition at line 52 of file otp.h.

#define OTP_MAX_USERNAME_LEN   31

Definition at line 49 of file otp.h.

#define OTP_RC_AUTH_ERR   3

Definition at line 43 of file otp.h.

#define OTP_RC_AUTHINFO_UNAVAIL   2

Definition at line 42 of file otp.h.

#define OTP_RC_IPIN   7

Definition at line 47 of file otp.h.

#define OTP_RC_MAXTRIES   4

Definition at line 44 of file otp.h.

#define OTP_RC_NEXTPASSCODE   6

Definition at line 46 of file otp.h.

#define OTP_RC_OK   0

Definition at line 40 of file otp.h.

#define OTP_RC_SERVICE_ERR   5

Definition at line 45 of file otp.h.

#define OTP_RC_USER_UNKNOWN   1

Definition at line 41 of file otp.h.

Typedef Documentation

typedef struct otp_pwe_chap otp_pwe_chap_t
typedef struct otp_pwe_pap otp_pwe_pap_t
typedef enum otp_pwe otp_pwe_t
typedef struct otp_reply_t otp_reply_t
typedef struct otp_request_t otp_request_t

Enumeration Type Documentation

enum otp_pwe
Enumerator
PWE_NONE 
PWE_PAP 
PWE_CHAP 
PWE_MSCHAP 
PWE_MSCHAP2 

Definition at line 56 of file otp.h.