#ifndef MAIN_H #define MAIN_H 1 #include "tac_plus.h" #include /* for u_* */ #define NAS_PORT_MAX_LEN 255 struct session { int session_id; /* host specific unique session id */ int aborted; /* have we received an abort flag? */ int seq_no; /* seq. no. of last packet exchanged */ time_t last_exch; /* time of last packet exchange */ int sock; /* socket for this connection */ char *key; /* the key */ int keyline; /* line number key was found on */ char *peer; /* name of connected peer */ char *peer_addr; /* numerical name of connected peer */ /* it MAY (peer==peer_addr)! */ char *cfgfile; /* config file name */ char *acctfile; /* name of accounting file */ char *db_acct; /* name of db accounting string */ char port[NAS_PORT_MAX_LEN+1]; /* For error reporting */ u_char version; /* version of last packet read */ }; extern int debug; /* debugging flag */ extern int single; /* do not fork (for debugging) */ extern int console; /* log to console */ extern int parse_only; /* exit after parsing verbosely */ extern int sendauth_only; /* don't do sendauth */ /* Debugging flags */ #define DEBUG_PARSE_FLAG 2 #define DEBUG_FORK_FLAG 4 #define DEBUG_AUTHOR_FLAG 8 #define DEBUG_AUTHEN_FLAG 16 #define DEBUG_PASSWD_FLAG 32 #define DEBUG_ACCT_FLAG 64 #define DEBUG_CONFIG_FLAG 128 #define DEBUG_PACKET_FLAG 256 #define DEBUG_HEX_FLAG 512 #define DEBUG_MD5_HASH_FLAG 1024 #define DEBUG_XOR_FLAG 2048 #define DEBUG_CLEAN_FLAG 4096 #define DEBUG_SUBST_FLAG 8192 #define DEBUG_CFGEVAL_FLAG 16384 #define DEBUG_MAXSESS_FLAG 32768 #define DEBUG_LOCK_FLAG 65536 extern struct session session; /* the session */ extern int main TAC_ARGS((int argc, char **argv)); #endif /* MAIN_H */