/********************************************************************************************************************************/ /* Created: 16-Mar-2010 15:14:49 by OpenVMS SDL EV2-3 */ /* Source: 16-MAR-2010 15:14:44 DISK$SYSMAN:[LAISHEV.AAA-VMS]RADDEF.SDL;352 */ /********************************************************************************************************************************/ /*** MODULE RADDEF IDENT RADDEF-1-X ***/ #ifndef __RADDEF_LOADED #define __RADDEF_LOADED 1 #pragma __nostandard /* This file uses non-ANSI-Standard features */ #pragma __member_alignment __save #pragma __nomember_alignment #ifdef __INITIAL_POINTER_SIZE /* Defined whenever ptr size pragmas supported */ #pragma __required_pointer_size __save /* Save the previously-defined required ptr size */ #pragma __required_pointer_size __short /* And set ptr size default to 32-bit pointers */ #endif #ifdef __cplusplus extern "C" { #define __unknown_params ... #define __optional_params ... #else #define __unknown_params #define __optional_params ... #endif #ifndef __struct #if !defined(__VAXC) #define __struct struct #else #define __struct variant_struct #endif #endif #ifndef __union #if !defined(__VAXC) #define __union union #else #define __union variant_union #endif #endif /* */ /*++ */ /* FACILITY: RADIUS-VMS */ /* */ /* MODULE DESCRIPTION: */ /* */ /* This module contains a RADIUS constant definitions, data structures definitions, */ /* functions prototypes. */ /* */ /* AUTHORS: */ /* */ /* Ruslan R. Laishev */ /* Copyright © 1998-2010, Ruslan R. Laishev */ /* */ /* */ /* CREATION DATE: ??-OCT-1998 */ /* */ /* MODIFICATION HISTORY: */ /* */ /* ??-OCT-1998 RRL Initial rewriting. */ /* 20-DEC-1999 RRL Add MAXHOMES */ /* 1-FEB-2000 RRL Add NAS flags in client entry structure. */ /* 11-FEB-2000 RRL Add external AAA callouts support. */ /* 18-MAR-2000 RRL Add realm Check-Item attribute (8002). */ /* 25-MAR-2000 RRL Add into DICT_ATTR vendor field. */ /* 17-MAY-2000 RRL Add PW_AUTHTYPE_EXTERN */ /* 27-AUG-2000 RRL Add PW_AUTHTYPE_DOMAIN,dom_entry */ /* 30-SEP-2000 RRL Add strlower(),strupper() declarations. */ /* 4-OCT-2000 RRL Add conn_info to CLIENT type, */ /* add new check-item Right-Id (8003). */ /* 10-NOV-2000 RRL Add a /BDC_HOST support. */ /* 27-NOV-2000 RRL Add "sess" member to the realm structure. */ /* 22-DEC-2000 RRL Add the VENDOR codes literals. */ /* 8-JAN-2001 RRL Add some comments. */ /* 12-JAN-2001 RRL Add a receive buffer size in the home structure. */ /* 7-FEB-2001 RRL Add a 3Com and MS vendor constants. */ /* 15-JAN-2002 RRL Added definitions and structure to support Ascend filters. */ /* 20-MAR-2002 RRL Added MAXPKTSZ. */ /* 9-AUG-2002 RRL Added sentc,recvc field into CLNT_ENTRY structure, */ /* bauth_sock,bacct_sock into REALM_ENTRY structure; */ /* 11-AUG-2002 RRL Replaced sentc,recvc by load. */ /* 22-AUG-2002 RRL Added IMSI field to realm definition. */ /* 1-SEP-2002 RRL Added MAXIMSI. */ /* 4-NOV-2002 RRL Convert RADIUS.H to RADDEF.SDL */ /* 22-JUL-2003 RRL Fixed signed/unsigned inconsistence. */ /* 28-SEP-2003 RRL Added constants for the SIP DIGEST Authentication. */ /* 7-OCT-2003 RRL Changed default ports for RFC compliance: */ /* 1645 -> 1812 */ /* 1646 -> 1813 */ /* 23-OCT-2003 RRL Added accept/reject realm list into the client */ /* structure definition. */ /* 26-AUG-2004 RRL Retired conn_info field from clnt_entry structure. */ /* 8-SEP-2004 RRL Added GROUP field to the client structure. */ /* 12-APR-2005 RRL Added A12 stuff. */ /* 20-MAY-2005 RRL GROUP field ASCIC-32-> unsigned word */ /* 15-SEP-2005 RRL Some changes in A12 record structure. */ /* 13-SEP-2005 RRL Removed ldate field from the A12 record structure. */ /* 28-APR-2006 RRL Added protoypes for RADIUS-VMS DB. */ /* 8-JUN-2006 RRL Added prototypes for RADIUS_SUBS DB. */ /* 30-OCT-2006 RRL MAXIMSI: 128 -> 1024 */ /* 29-OCT-2007 RRL Added constant for attributes:Acct-Input-Gigawords,Acct-Output-Gigawords */ /* 7-MAY-2008 RRL Added EAP structures & constants. */ /* 7-JUN-2008 RRL A12, S[imple] IP -> DB */ /* */ /* {@tbs@}... */ /*-- */ /* */ /* From DESCRIP.H */ #ifdef __INITIAL_POINTER_SIZE # pragma __required_pointer_size __save # pragma __required_pointer_size 32 #endif /* ** Default to member aligned structures */ #pragma __member_alignment __save #pragma __member_alignment /* From HIDEDEFS.SDL */ #ifdef __NEW_STARLET typedef struct _dsc$descriptor { unsigned short int dsc$w_length; unsigned char dsc$b_dtype; unsigned char dsc$b_class; char *dsc$a_pointer; } DSC$DESCRIPTOR; #else /* __OLD_STARLET */ struct dsc$descriptor { unsigned short int dsc$w_length; unsigned char dsc$b_dtype; unsigned char dsc$b_class; char *dsc$a_pointer; } ; #endif /* #ifdef __NEW_STARLET */ #pragma __member_alignment __restore /*++ */ /** */ /** RADIUS REQUEST CODE CONSTANTS */ /** */ /*-- */ #define RADREQ$K_AUTHREQ 1 /* Request of Authentication */ #define RADREQ$K_AUTHACK 2 /* Authentication request is accepted */ #define RADREQ$K_AUTHREJ 3 /* Authentication request is rejected */ #define RADREQ$K_ACCREQ 4 /* Accounting data */ #define RADREQ$K_ACCACK 5 /* Accounting data is accepted */ #define RADREQ$K_PWDREQ 7 /* Password change request */ #define RADREQ$K_PWDACK 8 /* Password change is accepted */ #define RADREQ$K_PWDREJ 9 /* Password change is rejected */ /*++ */ /** */ /** General constants */ /** */ /*-- */ #define $K__1GB 1073741824 /*++ */ /** */ /** RADIUS RFC ATTRIBUTES */ /** */ /*-- */ #define ATTR$K_USER 1 #define ATTR$K_PASS 2 #define ATTR$K_PASSCHAP 3 #define ATTR$K_CLIENT_ID 4 #define ATTR$K_CLIENT_PORT_ID 5 #define ATTR$K_SERVICE_TYPE 6 #define ATTR$K_FRAMED_PROTOCOL 7 #define ATTR$K_FRAMED_ADDRESS 8 #define ATTR$K_FRAMED_NETMASK 9 #define ATTR$K_FILTERID 11 #define ATTR$K_CALLBACKID 20 #define ATTR$K_CLASS 25 #define ATTR$K_TERMINATION 29 #define ATTR$K_VSA 26 #define ATTR$K_CALLED_ID 30 #define ATTR$K_CALLING_ID 31 #define ATTR$K_VSA 26 #define ATTR$K_NAS_ID 32 #define ATTR$K_PROXY 33 #define ATTR$K_ACCT_STATUS 40 #define VAL$K_ACCT_START 1 #define VAL$K_ACCT_STOP 2 #define VAL$K_ACCT_UPDATE 3 #define ATTR$K_ACCT_DELAY 41 #define ATTR$K_ACCT_INPUT 42 #define ATTR$K_ACCT_OUTPUT 43 #define ATTR$K_ACCT_SID 44 #define ATTR$K_ACCT_DURATION 46 #define ATTR$K_ACCT_INPPKTS 47 #define ATTR$K_ACCT_OUTPKTS 48 #define ATTR$K_ACCT_TERMINATE_CAUSE 49 #define ATTR$K_ACCT_INP4GB 52 #define ATTR$K_ACCT_OUT4GB 53 #define ATTR$K_ACCT_EVENT_TIMESTAMP 55 #define ATTR$K_CHAP_CHALLENGE 60 #define ATTR$K_EAP_MSG 79 #define ATTR$K_EAP_AUTH 80 #define ATTR$K_FRAMED_POOL 88 /*++ */ /** */ /** RADIUS 3GPP2 SET OF ATTRIBUTES */ /** */ /*-- */ #define VSA$K__3GPP2_IMSI 1 #define VSA$K__3GPP2_ACTIVE_TIME 49 #define VSA$K__3GPP2_SO 16 #define DATA$K_HSPD_EV1X 33 #define DATA$K_HSPD_EVDO 59 #define DATA$K_HSPD_MIX 0 #define VSA$K__3GPP2_BS_MSC_ADDR 10 /*++ */ /** */ /** RADIUS VENDORS CODE (ftp://ftp.isi.edu/in-notes/rfc1700.txt) */ /** */ /*-- */ #define VEND$K_RFC 0 #define VEND$K_USR 429 #define VEND$K_LIVINGSTON 307 #define VEND$K_LUCENT 1751 #define VEND$K_CISCO 9 #define VEND$K_BAY 1584 #define VEND$K_MERIT 61 #define VEND$K_SHIVA 166 #define VEND$K_DEC 36 #define VEND$K__3COM 43 #define VEND$K_MS 311 #define VEND$K__3GPP2 5535 /* */ /* Cisco VSA - Cisco-AVpair */ /* */ #define VSA$K_CISCOAVP 1 /*++ */ /** */ /** RADIUS VMS' non-protocol ATRRIBUTE codes */ /** */ /*-- */ #define ATTR$K_RADDB$_FLAGS 8006 /* */ /* VENDOR SPECIFIC ATTRIBUTE STRUCTURE */ /* */ #define VSA$K_HDRSZ 6 #ifdef __NEW_STARLET typedef struct _vsa { unsigned int vsa$l_vendor; /* Vendor-Id see $VENDK_* */ unsigned char vsa$b_attr; /* Vendor specific Attribute Id */ unsigned char vsa$b_len; /* Length of the VSA include all fields */ __union { unsigned char vsa$b_val [1]; unsigned int vsa$l_val; } vsa$r_val; } VSA; #if !defined(__VAXC) #define vsa$b_val vsa$r_val.vsa$b_val #define vsa$l_val vsa$r_val.vsa$l_val #endif /* #if !defined(__VAXC) */ #else /* __OLD_STARLET */ struct vsa { unsigned int vsa$l_vendor; /* Vendor-Id see $VENDK_* */ unsigned char vsa$b_attr; /* Vendor specific Attribute Id */ unsigned char vsa$b_len; /* Length of the VSA include all fields */ __union { unsigned char vsa$b_val [1]; unsigned int vsa$l_val; } vsa$r_val; } ; #if !defined(__VAXC) #define vsa$b_val vsa$r_val.vsa$b_val #define vsa$l_val vsa$r_val.vsa$l_val #endif /* #if !defined(__VAXC) */ #endif /* #ifdef __NEW_STARLET */ /* */ /* REGULAR ATTRIBUTE STRUCTURE */ /* */ #define AVP$K_HDRSZ 2 #ifdef __NEW_STARLET typedef struct _avp { unsigned char avp$b_attr; /* Attribute code, see ATTR$* */ unsigned char avp$b_len; /* Length of the attribute = len(attr,len,val) */ __union { unsigned char avp$b_val [1]; unsigned int avp$l_val; VSA avp$r_vsa; } avp$r_val; } AVP; #if !defined(__VAXC) #define avp$b_val avp$r_val.avp$b_val #define avp$l_val avp$r_val.avp$l_val #define avp$r_vsa avp$r_val.avp$r_vsa #endif /* #if !defined(__VAXC) */ #else /* __OLD_STARLET */ struct avp { unsigned char avp$b_attr; /* Attribute code, see ATTR$* */ unsigned char avp$b_len; /* Length of the attribute = len(attr,len,val) */ __union { unsigned char avp$b_val [1]; unsigned int avp$l_val; struct vsa avp$r_vsa; } avp$r_val; } ; #if !defined(__VAXC) #define avp$b_val avp$r_val.avp$b_val #define avp$l_val avp$r_val.avp$l_val #define avp$r_vsa avp$r_val.avp$r_vsa #endif /* #if !defined(__VAXC) */ #endif /* #ifdef __NEW_STARLET */ /*++ */ /* A RADIUS Packet Data Unit header structure */ /*-- */ #ifdef __NEW_STARLET typedef struct _radpkt { unsigned char radpkt$b_code; /* A request/answer code, see RFC 2138/2139 */ unsigned char radpkt$b_id; /* An identifier of a request */ unsigned short int radpkt$w_len; /* A total length of a request packet */ unsigned char radpkt$b_vector [16]; /* A MD5 digest */ AVP radpkt$r_avp; /* Variable part of a packet */ } RADPKT; #else /* __OLD_STARLET */ struct radpkt { unsigned char radpkt$b_code; /* A request/answer code, see RFC 2138/2139 */ unsigned char radpkt$b_id; /* An identifier of a request */ unsigned short int radpkt$w_len; /* A total length of a request packet */ unsigned char radpkt$b_vector [16]; /* A MD5 digest */ struct avp radpkt$r_avp; /* Variable part of a packet */ } ; #endif /* #ifdef __NEW_STARLET */ #define RADPKT$K_HDRSZ 20 /* */ /* */ /* A VARIUS RADIUS/RADIUS-VMS CONSTANTS */ /* */ /* */ #define RAD$K_VECTORSZ 16 /* A size of the digest, RFC defined size is 16 */ #define RAD$K_CHUNKSZ 16 /* A password chunk size, RFC defined size is 16 */ #define RAD$K_MAXPWDSZ 64 /* A maximum length of the password */ #define RAD$K_MAXATTRSZ 253 /* A maximum length of an attribute */ #define RAD$K_CHAPLEN 16 #define RAD$K_AUTHUDPPORT 1812 /* Default UDP ports */ #define RAD$K_ACCTUDPPORT 1813 #define RADVMS$K_MAXTHREADS 128 /* A maximum threads for every home */ #define RADVMS$K_MAXIDS 255 /* A maximum number of VMS Right id used in the clients */ /* and realms definitions */ #define RADVMS$K_MAXHOMES 8 /* A maximum number of homes */ #define RADVMS$K_MAXIMSI 1024 /* A maximum number of IMSI realms */ #define RADVMS$K_SMBSSNPORT 139 #define RADVMS$K_PDUBUFSZ 4096 #define RADVMS$K_MAXPKTSZ 4064 #define RADVMS$K_RAD_MAXBODYSZ 4044 /* */ /* A RADIUS-VMS SIGNATURE USED TO "SIGN" FORWARDED PACKETS */ /* */ #define RADVMS$K_VMS_SIG 233573293 /*++ */ /* A structure of the ACCOUNTING Record (RADUS_ACCBIN) */ /*-- */ #ifdef __NEW_STARLET typedef struct _accrec { unsigned __int64 accrec$q_datetime; /* Date & time of record */ unsigned int accrec$l_client; /* NAS-IP-Address */ RADPKT accrec$r_pkt; } ACCREC; #else /* __OLD_STARLET */ struct accrec { unsigned int accrec$q_datetime [2]; /* Date & time of record */ unsigned int accrec$l_client; /* NAS-IP-Address */ struct radpkt accrec$r_pkt; } ; #endif /* #ifdef __NEW_STARLET */ /*++ */ /* RADIUS-VMS Internaly used structures */ /*-- */ #ifdef __NEW_STARLET typedef struct __three_node_key { unsigned char len; char *sts; } _THREE_NODE_KEY; #else /* __OLD_STARLET */ struct _three_node_key { unsigned char len; char *sts; } ; #endif /* #ifdef __NEW_STARLET */ #ifdef __NEW_STARLET typedef struct __three_node { void *flink; void *blink; unsigned short int spare; void *ptr; } _THREE_NODE; #else /* __OLD_STARLET */ struct _three_node { void *flink; void *blink; unsigned short int spare; void *ptr; } ; #endif /* #ifdef __NEW_STARLET */ /*++ */ /* RADIUS protocol constant definitions section */ /* */ /* ATTRIBUTE VALUE TYPES */ /* */ #define ATTRTYP$K__STRING 0 /* Octect string, probably NUL terminated */ #define ATTRTYP$K__INTEGER 1 /* 32-bits integer */ #define ATTRTYP$K_IPADDR 2 /* 32-bits IP address (IP4) */ #define ATTRTYP$K__DATE 3 /* Unix time, 32-bits integer */ #define ATTRTYP$K_FILTER 4 /* Ascend Filter */ /*++ */ /* RADIUS Request codes */ /*-- */ #define RADREQ$K_AUTHREQ 1 #define RADREQ$K_AUTHACK 2 #define RADREQ$K_AUTHREJ 3 #define RADREQ$K_ACCTREQ 4 #define RADREQ$K_ACCTRESP 5 #define RADREQ$K_PASSREQ 6 #define RADREQ$K_PASSACK 7 #define RADREQ$K_PASSREJ 8 #define ATTR$K_STATUS_TYPE 40 #define ATTR$K_DELAY_TIME 41 #define ATTR$K_INP_OCTS 42 #define ATTR$K_OUT_OCTS 43 #define ATTR$K_SID 44 #define ATTR$K_AUTH 45 #define ATTR$K_STIME 46 #define ATTR$K_TERM_CAUSE 49 /*++ */ /* Some specific RADIUS attributes */ /*-- */ #define ATTR$K_CONNECT_INFO 77 #define ATTR$K_USR_CONN_SPEED 36899 #define ATTR$K_PORT_LIMIT 62 #define ATTR$K_CLPORTTYP 61 #define VAL$K_VIRTUAL 5 #define ATTR$K_DIGEST_RESPONSE 206 #define ATTR$K_DIGEST_ATTRIBUTES 207 #define ATTR$K_DIGEST_REALM 1063 #define ATTR$K_DIGEST_NONCE 1064 #define ATTR$K_DIGEST_METHOD 1065 #define ATTR$K_DIGEST_URI 1066 #define ATTR$K_DIGEST_QOP 1067 #define ATTR$K_DIGEST_ALGORITHM 1068 #define ATTR$K_DIGEST_BODY_DIGEST 69 #define ATTR$K_DIGEST_CNONCE 1070 #define ATTR$K_DIGEST_NONCE_COUNT 1071 #define ATTR$K_DIGEST_USER_NAME 1072 /*++ */ /* Non-Protocol Attributes */ /*-- */ #define RADVMS$K_AUTHTYPE 1000 #define RADVMS$K_SUFFIX 1001 #define RADVMS$K_REALM 1002 #define RADVMS$K_RIGHT_ID 1003 #define RADVMS$K_CLIENT_IP 1004 #define RADVMS$K_CLIENT_GROUP 1005 /* */ /* INTERNAL AUTHENTICATION TYPES */ /* */ #define RADAUTH$K_LOCAL 0 #define RADAUTH$K_VMS 1 #define RADAUTH$K_EXTERN 2 #define RADAUTH$K_DOMAIN 3 #define RADAUTH$K_REJECT 4 #define RADAUTH$K_ACCEPT 5 #define RADAUTH$K_DIGEST 6 #define RADAUTH$K_DB 7 /* */ /* */ /* Server internal data structures */ /* */ /* */ #ifdef __NEW_STARLET typedef struct __dict_attr { unsigned char len; char name [32]; unsigned int id; unsigned int vendor; unsigned int type; } _DICT_ATTR; #else /* __OLD_STARLET */ struct _dict_attr { unsigned char len; char name [32]; unsigned int id; unsigned int vendor; unsigned int type; } ; #endif /* #ifdef __NEW_STARLET */ #ifdef __NEW_STARLET typedef struct __dict_value { _DICT_ATTR *attr; unsigned char len; char name [32]; unsigned int value; } _DICT_VALUE; #else /* __OLD_STARLET */ struct _dict_value { void *attr; unsigned char len; char name [32]; unsigned int value; } ; #endif /* #ifdef __NEW_STARLET */ #ifdef __NEW_STARLET typedef struct _avp_entry { _DICT_ATTR *ave$a_attr; __union { unsigned int ave$l_val; unsigned int ave$l_len; } ave$ave$_u; unsigned char ave$b_val [253]; struct _avp_entry *ave$a_next; } AVP_ENTRY; #if !defined(__VAXC) #define ave$l_val ave$ave$_u.ave$l_val #define ave$l_len ave$ave$_u.ave$l_len #endif /* #if !defined(__VAXC) */ #else /* __OLD_STARLET */ struct avp_entry { void *ave$a_attr; __union { unsigned int ave$l_val; unsigned int ave$l_len; } ave$ave$_u; unsigned char ave$b_val [253]; void *ave$a_next; } ; #if !defined(__VAXC) #define ave$l_val ave$ave$_u.ave$l_val #define ave$l_len ave$ave$_u.ave$l_len #endif /* #if !defined(__VAXC) */ #endif /* #ifdef __NEW_STARLET */ #ifdef __NEW_STARLET typedef struct _req_list { unsigned int rql$l_ipsrc; unsigned char rql$b_id; unsigned char rql$b_code; unsigned char rql$b_vector [16]; AVP_ENTRY *rql$a_avl; } REQ_LIST; #else /* __OLD_STARLET */ struct req_list { unsigned int rql$l_ipsrc; unsigned char rql$b_id; unsigned char rql$b_code; unsigned char rql$b_vector [16]; void *rql$a_avl; } ; #endif /* #ifdef __NEW_STARLET */ #ifdef __NEW_STARLET typedef struct __id_entry { unsigned char len; char name [32]; unsigned int id; } _ID_ENTRY; #else /* __OLD_STARLET */ struct _id_entry { unsigned char len; char name [32]; unsigned int id; } ; #endif /* #ifdef __NEW_STARLET */ #ifdef __NEW_STARLET typedef struct _realm { unsigned char len; char name [64]; unsigned char reject_id_count; unsigned char reject_id [15]; unsigned char accept_id_count; unsigned char accept_id [15]; /* struct sockaddr_in auth_sock, */ /* acct_sock, */ /* bauth_sock, */ /* bacct_sock; */ unsigned char account [8]; unsigned char imsi; /* The realm is IMSI prefix */ } REALM; #else /* __OLD_STARLET */ struct realm { unsigned char len; char name [64]; unsigned char reject_id_count; unsigned char reject_id [15]; unsigned char accept_id_count; unsigned char accept_id [15]; /* struct sockaddr_in auth_sock, */ /* acct_sock, */ /* bauth_sock, */ /* bacct_sock; */ unsigned char account [8]; unsigned char imsi; /* The realm is IMSI prefix */ } ; #endif /* #ifdef __NEW_STARLET */ /* */ #ifdef __NEW_STARLET typedef struct _dsc$__list { DSC$DESCRIPTOR dsc$r_name; struct _dsc$__list *dsc$a_next; } DSC$__LIST; #else /* __OLD_STARLET */ struct dsc$__list { struct dsc$descriptor dsc$r_name; void *dsc$a_next; } ; #endif /* #ifdef __NEW_STARLET */ /* */ #define CLIENT$M_LOCAL 0x1 #define CLIENT$M_NAS 0x2 #ifdef __NEW_STARLET typedef struct _client { unsigned int lf; /* A load factor of the client */ /* Client name */ __struct { unsigned char client_b_len; char client_t_name [32]; } client__name; unsigned int ip; /* Shared secret string */ __struct { unsigned char secret_b_len; char secret_t_name [16]; } client__secret; /* */ __struct { unsigned char reject_b_cnt; unsigned char reject_b_id [15]; } client__reject; /* */ __struct { unsigned char accept_b_cnt; unsigned char accept_b_id [15]; } client__accept; unsigned char slim; unsigned char nas; DSC$__LIST *arlm; /* A pointer to Accept Right-Id list */ DSC$__LIST *rrlm; /* A pointer to Reject Right-Id list */ unsigned short int group; /* Client group ID */ __union { unsigned __int64 client$q_opts; __struct { unsigned client$v_local : 1; /* LOCAL/REMOTE client flag */ unsigned client$v_nas : 1; /* NAS flag */ unsigned client$v_fill_2_ : 6; } client$r_fill_1_; } fill_0_; } CLIENT; #if !defined(__VAXC) #define client_b_len client__name.client_b_len #define client_t_name client__name.client_t_name #define secret_b_len client__secret.secret_b_len #define secret_t_name client__secret.secret_t_name #define reject_b_cnt client__reject.reject_b_cnt #define reject_b_id client__reject.reject_b_id #define accept_b_cnt client__accept.accept_b_cnt #define accept_b_id client__accept.accept_b_id #define client$q_opts fill_0_.client$q_opts #define client$v_local fill_0_.client$r_fill_1_.client$v_local #define client$v_nas fill_0_.client$r_fill_1_.client$v_nas #endif /* #if !defined(__VAXC) */ #else /* __OLD_STARLET */ struct client { unsigned int lf; /* A load factor of the client */ /* Client name */ __struct { unsigned char client_b_len; char client_t_name [32]; } client__name; unsigned int ip; /* Shared secret string */ __struct { unsigned char secret_b_len; char secret_t_name [16]; } client__secret; /* */ __struct { unsigned char reject_b_cnt; unsigned char reject_b_id [15]; } client__reject; /* */ __struct { unsigned char accept_b_cnt; unsigned char accept_b_id [15]; } client__accept; unsigned char slim; unsigned char nas; void *arlm; /* A pointer to Accept Right-Id list */ void *rrlm; /* A pointer to Reject Right-Id list */ unsigned short int group; /* Client group ID */ __union { unsigned int client$q_opts [2]; __struct { unsigned client$v_local : 1; /* LOCAL/REMOTE client flag */ unsigned client$v_nas : 1; /* NAS flag */ unsigned client$v_fill_2_ : 6; } client$r_fill_1_; } fill_0_; } ; #if !defined(__VAXC) #define client_b_len client__name.client_b_len #define client_t_name client__name.client_t_name #define secret_b_len client__secret.secret_b_len #define secret_t_name client__secret.secret_t_name #define reject_b_cnt client__reject.reject_b_cnt #define reject_b_id client__reject.reject_b_id #define accept_b_cnt client__accept.accept_b_cnt #define accept_b_id client__accept.accept_b_id #define client$q_opts fill_0_.client$q_opts #define client$v_local fill_0_.client$r_fill_1_.client$v_local #define client$v_nas fill_0_.client$r_fill_1_.client$v_nas #endif /* #if !defined(__VAXC) */ #endif /* #ifdef __NEW_STARLET */ #ifdef __NEW_STARLET typedef struct _th_auth { unsigned int flag; /* Thread flag */ unsigned char idx; /* Thread index */ unsigned int chan; /* Network I/O chanel */ FABDEF dbfab; /* FAB of the RADIUS_DB */ RABDEF dbrab; /* RAB/Stream of the RADIUS_DB */ FABDEF ufab; /* FAB of the RADIUS_USERS file */ RABDEF urab; /* RAB/Stream of the RADIUS_USERS file */ FABDEF sfab; /* FAB of the RADIUS_CURRENT file */ RABDEF srab; /* RAB/Stream of the RADIUS_CURRENT file */ unsigned __int64 tid; /* Thread ID (pthread_t) */ } TH_AUTH; #else /* __OLD_STARLET */ struct th_auth { unsigned int flag; /* Thread flag */ unsigned char idx; /* Thread index */ unsigned int chan; /* Network I/O chanel */ struct fabdef dbfab; /* FAB of the RADIUS_DB */ struct rabdef dbrab; /* RAB/Stream of the RADIUS_DB */ struct fabdef ufab; /* FAB of the RADIUS_USERS file */ struct rabdef urab; /* RAB/Stream of the RADIUS_USERS file */ struct fabdef sfab; /* FAB of the RADIUS_CURRENT file */ struct rabdef srab; /* RAB/Stream of the RADIUS_CURRENT file */ unsigned int tid [2]; /* Thread ID (pthread_t) */ } ; #endif /* #ifdef __NEW_STARLET */ /* */ /* */ /* */ #define EAP$K_EAP_SZ 5 #ifdef __NEW_STARLET typedef struct _eap_ds { unsigned char eap$b_code; /* Request/Response code */ unsigned char eap$b_id; /* An identifier of a request */ unsigned short int eap$w_len; /* A total length of a request packet */ unsigned char eap$b_type; /* See EAPTYPE$ */ unsigned char eap$b_data [1]; } EAP_DS; #else /* __OLD_STARLET */ struct eap_ds { unsigned char eap$b_code; /* Request/Response code */ unsigned char eap$b_id; /* An identifier of a request */ unsigned short int eap$w_len; /* A total length of a request packet */ unsigned char eap$b_type; /* See EAPTYPE$ */ unsigned char eap$b_data [1]; } ; #endif /* #ifdef __NEW_STARLET */ #define EAPTYPE$K_IDENTITY 1 #define EAPTYPE$K_NOTIFICATION 2 #define EAPTYPE$K_NAK 3 #define EAPTYPE$K_MD5 4 #define EAPTYPE$K_OTP 5 #define EAPTYPE$K_GTC 6 #define EAPTYPE$K_TLS 13 #define EAPTYPE$K_LEAP 17 #define EAPTYPE$K_SIM 18 #define EAPTYPE$K_TTLS 21 #define EAPTYPE$K_PEAP 25 #define EAPTYPE$K_MSCHAPV2 26 #define EAPTYPE$K_CISCO_MSCHAPV2 29 #define EAPTYPE$K_TNC 38 #define EAPTYPE$K_IKEV2 49 #define EAPTYPE$K_REQ 1 #define EAPTYPE$K_ANS 2 #define EAPTYPE$K_SUC 3 #define EAPTYPE$K_ERR 4 /* */ /* */ /* MSCHAPV2 specific stuff */ /* */ /* */ #define MSCHAPV2$K_ACK 0 #define MSCHAPV2$K_CHALLENGE 1 #define MSCHAPV2$K_RESPONSE 2 #define MSCHAPV2$K_SUCCESS 3 #define MSCHAPV2$K_FAILURE 4 /* Challenge packet */ #ifdef __NEW_STARLET typedef struct _mschapv2$_mchlg { unsigned char mschapv2$b_opcode; /* See MSCHAPV2$* constants */ unsigned char mschapv2$b_id; unsigned short int mschapv2$w_len; unsigned char mschapv2$b_vsize; /* 0x10 (16) */ unsigned char mschapv2$b_chal [16]; /* Variable part of the packet */ unsigned char mschapv2$b_name [1]; } MSCHAPV2$_MCHLG; #else /* __OLD_STARLET */ struct mschapv2$_mchlg { unsigned char mschapv2$b_opcode; /* See MSCHAPV2$* constants */ unsigned char mschapv2$b_id; unsigned short int mschapv2$w_len; unsigned char mschapv2$b_vsize; /* 0x10 (16) */ unsigned char mschapv2$b_chal [16]; /* Variable part of the packet */ unsigned char mschapv2$b_name [1]; } ; #endif /* #ifdef __NEW_STARLET */ /* Response packet */ #ifdef __NEW_STARLET typedef struct _mschapv2$_mresp { unsigned char mschapv2$b_opcode; /* See MSCHAPV2$* constants */ unsigned char mschapv2$b_id; unsigned short int mschapv2$w_len; unsigned char mschapv2$b_vsize; /* 0x10 (16) */ __struct { unsigned char mschapv2$b_chal [16]; unsigned char mschapv2$b_mbz [8]; unsigned char mschapv2$b_ntresp [24]; unsigned char mschapv2$b_flags; } mschapv2$r__mresp; /* Variable part of the packet */ unsigned char mschapv2$b_name [1]; } MSCHAPV2$_MRESP; #if !defined(__VAXC) #define mschapv2$b_chal mschapv2$r__mresp.mschapv2$b_chal #define mschapv2$b_mbz mschapv2$r__mresp.mschapv2$b_mbz #define mschapv2$b_ntresp mschapv2$r__mresp.mschapv2$b_ntresp #define mschapv2$b_flags mschapv2$r__mresp.mschapv2$b_flags #endif /* #if !defined(__VAXC) */ #else /* __OLD_STARLET */ struct mschapv2$_mresp { unsigned char mschapv2$b_opcode; /* See MSCHAPV2$* constants */ unsigned char mschapv2$b_id; unsigned short int mschapv2$w_len; unsigned char mschapv2$b_vsize; /* 0x10 (16) */ __struct { unsigned char mschapv2$b_chal [16]; unsigned char mschapv2$b_mbz [8]; unsigned char mschapv2$b_ntresp [24]; unsigned char mschapv2$b_flags; } mschapv2$r__mresp; /* Variable part of the packet */ unsigned char mschapv2$b_name [1]; } ; #if !defined(__VAXC) #define mschapv2$b_chal mschapv2$r__mresp.mschapv2$b_chal #define mschapv2$b_mbz mschapv2$r__mresp.mschapv2$b_mbz #define mschapv2$b_ntresp mschapv2$r__mresp.mschapv2$b_ntresp #define mschapv2$b_flags mschapv2$r__mresp.mschapv2$b_flags #endif /* #if !defined(__VAXC) */ #endif /* #ifdef __NEW_STARLET */ /* Success Request packet */ #ifdef __NEW_STARLET typedef struct _mschapv2$_msreq { unsigned char mschapv2$b_opcode; /* See MSCHAPV2$* constants */ unsigned char mschapv2$b_id; unsigned short int mschapv2$w_len; /* "S= M=" */ unsigned char mschapv2$b_msg [1]; } MSCHAPV2$_MSREQ; #else /* __OLD_STARLET */ struct mschapv2$_msreq { unsigned char mschapv2$b_opcode; /* See MSCHAPV2$* constants */ unsigned char mschapv2$b_id; unsigned short int mschapv2$w_len; /* "S= M=" */ unsigned char mschapv2$b_msg [1]; } ; #endif /* #ifdef __NEW_STARLET */ /* Success Response packet */ #ifdef __NEW_STARLET typedef struct _mschapv2$_sresp { unsigned char mschapv2$b_opcode; /* See MSCHAPV2$* constants */ } MSCHAPV2$_SRESP; #else /* __OLD_STARLET */ struct mschapv2$_sresp { unsigned char mschapv2$b_opcode; /* See MSCHAPV2$* constants */ } ; #endif /* #ifdef __NEW_STARLET */ /* Failure Request packet */ #ifdef __NEW_STARLET typedef struct _mschapv2$_freq { unsigned char mschapv2$b_opcode; /* See MSCHAPV2$* constants */ unsigned char mschapv2$b_id; unsigned short int mschapv2$w_len; /* "E= R= C= M=" */ unsigned char mschapv2$b_msg [1]; } MSCHAPV2$_FREQ; #else /* __OLD_STARLET */ struct mschapv2$_freq { unsigned char mschapv2$b_opcode; /* See MSCHAPV2$* constants */ unsigned char mschapv2$b_id; unsigned short int mschapv2$w_len; /* "E= R= C= M=" */ unsigned char mschapv2$b_msg [1]; } ; #endif /* #ifdef __NEW_STARLET */ /* Failure Response packet */ #ifdef __NEW_STARLET typedef struct _mschapv2$_fresp { unsigned char mschapv2$b_opcode; /* See MSCHAPV2$* constants */ } MSCHAPV2$_FRESP; #else /* __OLD_STARLET */ struct mschapv2$_fresp { unsigned char mschapv2$b_opcode; /* See MSCHAPV2$* constants */ } ; #endif /* #ifdef __NEW_STARLET */ #ifdef __NEW_STARLET typedef struct _mschapv2 { __union { unsigned char mschapv2$b_opcode; /* See MSCHAPV2$* constants */ MSCHAPV2$_MCHLG mschapv2$r_chlg; MSCHAPV2$_MRESP mschapv2$r_resp; MSCHAPV2$_MSREQ mschapv2$r_sreq; MSCHAPV2$_SRESP mschapv2$r_sresp; MSCHAPV2$_FREQ mschapv2$r_freq; MSCHAPV2$_FRESP mschapv2$r_fresp; } mschapv2$_u; } MSCHAPV2; #if !defined(__VAXC) #define mschapv2$b_opcode mschapv2$_u.mschapv2$b_opcode #define mschapv2$r_chlg mschapv2$_u.mschapv2$r_chlg #define mschapv2$r_resp mschapv2$_u.mschapv2$r_resp #define mschapv2$r_sreq mschapv2$_u.mschapv2$r_sreq #define mschapv2$r_sresp mschapv2$_u.mschapv2$r_sresp #define mschapv2$r_freq mschapv2$_u.mschapv2$r_freq #define mschapv2$r_fresp mschapv2$_u.mschapv2$r_fresp #endif /* #if !defined(__VAXC) */ #else /* __OLD_STARLET */ struct mschapv2 { __union { unsigned char mschapv2$b_opcode; /* See MSCHAPV2$* constants */ struct mschapv2$_mchlg mschapv2$r_chlg; struct mschapv2$_mresp mschapv2$r_resp; struct mschapv2$_msreq mschapv2$r_sreq; struct mschapv2$_sresp mschapv2$r_sresp; struct mschapv2$_freq mschapv2$r_freq; struct mschapv2$_fresp mschapv2$r_fresp; } mschapv2$_u; } ; #if !defined(__VAXC) #define mschapv2$b_opcode mschapv2$_u.mschapv2$b_opcode #define mschapv2$r_chlg mschapv2$_u.mschapv2$r_chlg #define mschapv2$r_resp mschapv2$_u.mschapv2$r_resp #define mschapv2$r_sreq mschapv2$_u.mschapv2$r_sreq #define mschapv2$r_sresp mschapv2$_u.mschapv2$r_sresp #define mschapv2$r_freq mschapv2$_u.mschapv2$r_freq #define mschapv2$r_fresp mschapv2$_u.mschapv2$r_fresp #endif /* #if !defined(__VAXC) */ #endif /* #ifdef __NEW_STARLET */ /* */ /* RADIUS's DB declaration/definition/structures */ /* */ /* */ /* Primary days (see UAI$_PRIMEDAYS) */ /* */ #define PDAYS$K_FULLDAY 16777215 /* 00:00 - 23:59 */ #define PDAYS$M_MONDAY 0x1 #define PDAYS$M_TUESDAY 0x2 #define PDAYS$M_WEDNESDAY 0x4 #define PDAYS$M_THURSDAY 0x8 #define PDAYS$M_FRIDAY 0x10 #define PDAYS$M_SATURDAY 0x20 #define PDAYS$M_SUNDAY 0x40 #ifdef __NEW_STARLET typedef struct _raddb$_pdays { __union { unsigned char pdays$b_days; /* Primary days */ __struct { unsigned pdays$v_monday : 1; unsigned pdays$v_tuesday : 1; unsigned pdays$v_wednesday : 1; unsigned pdays$v_thursday : 1; unsigned pdays$v_friday : 1; unsigned pdays$v_saturday : 1; unsigned pdays$v_sunday : 1; unsigned pdays$v_fill_5_ : 1; } pdays$r_fill_4_; } pdays$r_fill_3_; } RADDB$_PDAYS; #if !defined(__VAXC) #define pdays$b_days pdays$r_fill_3_.pdays$b_days #define pdays$v_monday pdays$r_fill_3_.pdays$r_fill_4_.pdays$v_monday #define pdays$v_tuesday pdays$r_fill_3_.pdays$r_fill_4_.pdays$v_tuesday #define pdays$v_wednesday pdays$r_fill_3_.pdays$r_fill_4_.pdays$v_wednesday #define pdays$v_thursday pdays$r_fill_3_.pdays$r_fill_4_.pdays$v_thursday #define pdays$v_friday pdays$r_fill_3_.pdays$r_fill_4_.pdays$v_friday #define pdays$v_saturday pdays$r_fill_3_.pdays$r_fill_4_.pdays$v_saturday #define pdays$v_sunday pdays$r_fill_3_.pdays$r_fill_4_.pdays$v_sunday #endif /* #if !defined(__VAXC) */ #else /* __OLD_STARLET */ struct raddb$_pdays { __union { unsigned char pdays$b_days; /* Primary days */ __struct { unsigned pdays$v_monday : 1; unsigned pdays$v_tuesday : 1; unsigned pdays$v_wednesday : 1; unsigned pdays$v_thursday : 1; unsigned pdays$v_friday : 1; unsigned pdays$v_saturday : 1; unsigned pdays$v_sunday : 1; unsigned pdays$v_fill_5_ : 1; } pdays$r_fill_4_; } pdays$r_fill_3_; } ; #if !defined(__VAXC) #define pdays$b_days pdays$r_fill_3_.pdays$b_days #define pdays$v_monday pdays$r_fill_3_.pdays$r_fill_4_.pdays$v_monday #define pdays$v_tuesday pdays$r_fill_3_.pdays$r_fill_4_.pdays$v_tuesday #define pdays$v_wednesday pdays$r_fill_3_.pdays$r_fill_4_.pdays$v_wednesday #define pdays$v_thursday pdays$r_fill_3_.pdays$r_fill_4_.pdays$v_thursday #define pdays$v_friday pdays$r_fill_3_.pdays$r_fill_4_.pdays$v_friday #define pdays$v_saturday pdays$r_fill_3_.pdays$r_fill_4_.pdays$v_saturday #define pdays$v_sunday pdays$r_fill_3_.pdays$r_fill_4_.pdays$v_sunday #endif /* #if !defined(__VAXC) */ #endif /* #ifdef __NEW_STARLET */ /* */ /* User/Subscriber options flag */ /* */ #define RADDB$M_ON 0x1 #define RADDB$M_TRACE 0x2 #define RADDB$M_IROAM 0x4 #define RADDB$M_NROAM 0x8 #define RADDB$M_CLID 0x10 #define RADDB$M_A12 0x20 #define RADDB$M_IPTEL 0x40 #define RADDB$M_FLAGSZ 0x80 #ifdef __NEW_STARLET typedef union _raddb$_flags { __union { unsigned int raddb$l_flags; __struct { unsigned raddb$v_on : 1; /* Status of NAI: is enabled/disabled */ unsigned raddb$v_trace : 1; /* AAA trace flag */ unsigned raddb$v_iroam : 1; /* International HSPD Roaming is enabled/disabled */ unsigned raddb$v_nroam : 1; /* National HSPD Roaming is enabled/disabled */ unsigned raddb$v_clid : 1; /* Use CLID as Username */ unsigned raddb$v_a12 : 1; /* A12 - TIA-878 (3GPP2 A.S0008). */ unsigned raddb$v_iptel : 1; /* IP Telephony */ unsigned raddb$v_flagsz : 1; /* End of ... marker */ } raddb$r_fill_7_; } raddb$r_fill_6_; } RADDB$_FLAGS; #if !defined(__VAXC) #define raddb$l_flags raddb$r_fill_6_.raddb$l_flags #define raddb$v_on raddb$r_fill_6_.raddb$r_fill_7_.raddb$v_on #define raddb$v_trace raddb$r_fill_6_.raddb$r_fill_7_.raddb$v_trace #define raddb$v_iroam raddb$r_fill_6_.raddb$r_fill_7_.raddb$v_iroam #define raddb$v_nroam raddb$r_fill_6_.raddb$r_fill_7_.raddb$v_nroam #define raddb$v_clid raddb$r_fill_6_.raddb$r_fill_7_.raddb$v_clid #define raddb$v_a12 raddb$r_fill_6_.raddb$r_fill_7_.raddb$v_a12 #define raddb$v_iptel raddb$r_fill_6_.raddb$r_fill_7_.raddb$v_iptel #define raddb$v_flagsz raddb$r_fill_6_.raddb$r_fill_7_.raddb$v_flagsz #endif /* #if !defined(__VAXC) */ #else /* __OLD_STARLET */ union raddb$_flags { __union { unsigned int raddb$l_flags; __struct { unsigned raddb$v_on : 1; /* Status of NAI: is enabled/disabled */ unsigned raddb$v_trace : 1; /* AAA trace flag */ unsigned raddb$v_iroam : 1; /* International HSPD Roaming is enabled/disabled */ unsigned raddb$v_nroam : 1; /* National HSPD Roaming is enabled/disabled */ unsigned raddb$v_clid : 1; /* Use CLID as Username */ unsigned raddb$v_a12 : 1; /* A12 - TIA-878 (3GPP2 A.S0008). */ unsigned raddb$v_iptel : 1; /* IP Telephony */ unsigned raddb$v_flagsz : 1; /* End of ... marker */ } raddb$r_fill_7_; } raddb$r_fill_6_; } ; #if !defined(__VAXC) #define raddb$l_flags raddb$r_fill_6_.raddb$l_flags #define raddb$v_on raddb$r_fill_6_.raddb$r_fill_7_.raddb$v_on #define raddb$v_trace raddb$r_fill_6_.raddb$r_fill_7_.raddb$v_trace #define raddb$v_iroam raddb$r_fill_6_.raddb$r_fill_7_.raddb$v_iroam #define raddb$v_nroam raddb$r_fill_6_.raddb$r_fill_7_.raddb$v_nroam #define raddb$v_clid raddb$r_fill_6_.raddb$r_fill_7_.raddb$v_clid #define raddb$v_a12 raddb$r_fill_6_.raddb$r_fill_7_.raddb$v_a12 #define raddb$v_iptel raddb$r_fill_6_.raddb$r_fill_7_.raddb$v_iptel #define raddb$v_flagsz raddb$r_fill_6_.raddb$r_fill_7_.raddb$v_flagsz #endif /* #if !defined(__VAXC) */ #endif /* #ifdef __NEW_STARLET */ /* */ /* Authentication types */ /* */ #define RADDB$M_SYSUAF 0x1 #define RADDB$M_ACCEPT 0x2 #define RADDB$M_REJECT 0x4 #define RADDB$M_DIGEST 0x8 #define RADDB$M_EAPMD5 0x10 #define RADDB$M_EXTERN 0x20 #define RADDB$M_DOMAIN 0x40 #define RADDB$M_AUTHSZ 0x80 #ifdef __NEW_STARLET typedef union _raddb$_auths { __union { unsigned int raddb$l_auths; __struct { unsigned raddb$v_sysuaf : 1; /* Authenticate against VMS's SYSUAF */ unsigned raddb$v_accept : 1; /* Accept w/o authentication */ unsigned raddb$v_reject : 1; /* Unconditional reject */ unsigned raddb$v_digest : 1; /* MD5 Digest */ unsigned raddb$v_eapmd5 : 1; /* Extensible Authentication Protocol: MD5 */ unsigned raddb$v_extern : 1; /* External authentication */ unsigned raddb$v_domain : 1; /* Against LANman/NT Domain */ unsigned raddb$v_authsz : 1; /* End of ... marker */ } raddb$r_fill_9_; } raddb$r_fill_8_; } RADDB$_AUTHS; #if !defined(__VAXC) #define raddb$l_auths raddb$r_fill_8_.raddb$l_auths #define raddb$v_sysuaf raddb$r_fill_8_.raddb$r_fill_9_.raddb$v_sysuaf #define raddb$v_accept raddb$r_fill_8_.raddb$r_fill_9_.raddb$v_accept #define raddb$v_reject raddb$r_fill_8_.raddb$r_fill_9_.raddb$v_reject #define raddb$v_digest raddb$r_fill_8_.raddb$r_fill_9_.raddb$v_digest #define raddb$v_eapmd5 raddb$r_fill_8_.raddb$r_fill_9_.raddb$v_eapmd5 #define raddb$v_extern raddb$r_fill_8_.raddb$r_fill_9_.raddb$v_extern #define raddb$v_domain raddb$r_fill_8_.raddb$r_fill_9_.raddb$v_domain #define raddb$v_authsz raddb$r_fill_8_.raddb$r_fill_9_.raddb$v_authsz #endif /* #if !defined(__VAXC) */ #else /* __OLD_STARLET */ union raddb$_auths { __union { unsigned int raddb$l_auths; __struct { unsigned raddb$v_sysuaf : 1; /* Authenticate against VMS's SYSUAF */ unsigned raddb$v_accept : 1; /* Accept w/o authentication */ unsigned raddb$v_reject : 1; /* Unconditional reject */ unsigned raddb$v_digest : 1; /* MD5 Digest */ unsigned raddb$v_eapmd5 : 1; /* Extensible Authentication Protocol: MD5 */ unsigned raddb$v_extern : 1; /* External authentication */ unsigned raddb$v_domain : 1; /* Against LANman/NT Domain */ unsigned raddb$v_authsz : 1; /* End of ... marker */ } raddb$r_fill_9_; } raddb$r_fill_8_; } ; #if !defined(__VAXC) #define raddb$l_auths raddb$r_fill_8_.raddb$l_auths #define raddb$v_sysuaf raddb$r_fill_8_.raddb$r_fill_9_.raddb$v_sysuaf #define raddb$v_accept raddb$r_fill_8_.raddb$r_fill_9_.raddb$v_accept #define raddb$v_reject raddb$r_fill_8_.raddb$r_fill_9_.raddb$v_reject #define raddb$v_digest raddb$r_fill_8_.raddb$r_fill_9_.raddb$v_digest #define raddb$v_eapmd5 raddb$r_fill_8_.raddb$r_fill_9_.raddb$v_eapmd5 #define raddb$v_extern raddb$r_fill_8_.raddb$r_fill_9_.raddb$v_extern #define raddb$v_domain raddb$r_fill_8_.raddb$r_fill_9_.raddb$v_domain #define raddb$v_authsz raddb$r_fill_8_.raddb$r_fill_9_.raddb$v_authsz #endif /* #if !defined(__VAXC) */ #endif /* #ifdef __NEW_STARLET */ /* */ /* */ /* */ #define NAI$NAI$_POS 1 #define NAI$NAI_SZ 95 #define PWD$PWD_SZ 63 #define RADDB$_RECSZ 194 #ifdef __NEW_STARLET typedef struct _raddb$_rec { __struct { /* NAI - Network Authentication Identifier (Username) */ unsigned char nai$b_len; /* NAI's length */ char nai$t_nai [95]; /* NAI itself */ } nai_nai; __struct { /* Plain-text Password */ unsigned char pwd$b_len; /* Password length */ char pwd$t_pwd [63]; /* Password itself */ } pwd_pwd; unsigned __int64 datepwd; /* Date of last password update */ unsigned __int64 login; /* Last login date */ RADDB$_PDAYS pdays; /* Primary days */ unsigned int phours; /* Hours in primary days */ unsigned int shours; /* Hours in secondary days */ RADDB$_FLAGS flags; RADDB$_AUTHS auths; unsigned char avpl; /* A size (count of avp) of the Attr-Val list */ AVP avlist [1]; /* Attr-Val list to be returned (Ret-Attr list) */ } RADDB$_REC; #if !defined(__VAXC) #define nai$b_len nai_nai.nai$b_len #define nai$t_nai nai_nai.nai$t_nai #define pwd$b_len pwd_pwd.pwd$b_len #define pwd$t_pwd pwd_pwd.pwd$t_pwd #endif /* #if !defined(__VAXC) */ #else /* __OLD_STARLET */ struct raddb$_rec { __struct { /* NAI - Network Authentication Identifier (Username) */ unsigned char nai$b_len; /* NAI's length */ char nai$t_nai [95]; /* NAI itself */ } nai_nai; __struct { /* Plain-text Password */ unsigned char pwd$b_len; /* Password length */ char pwd$t_pwd [63]; /* Password itself */ } pwd_pwd; unsigned int datepwd [2]; /* Date of last password update */ unsigned int login [2]; /* Last login date */ struct raddb$_pdays pdays; /* Primary days */ unsigned int phours; /* Hours in primary days */ unsigned int shours; /* Hours in secondary days */ union raddb$_flags flags; union raddb$_auths auths; unsigned char avpl; /* A size (count of avp) of the Attr-Val list */ struct avp avlist [1]; /* Attr-Val list to be returned (Ret-Attr list) */ } ; #if !defined(__VAXC) #define nai$b_len nai_nai.nai$b_len #define nai$t_nai nai_nai.nai$t_nai #define pwd$b_len pwd_pwd.pwd$b_len #define pwd$t_pwd pwd_pwd.pwd$t_pwd #endif /* #if !defined(__VAXC) */ #endif /* #ifdef __NEW_STARLET */ /* */ /* RADIUS-VMS internal configuration vector */ /* */ #define CONF$M_DBUG 0x1 #define CONF$M_EXIT 0x2 #define CONF$M_STMO 0x4 #define CONF$M_DNS 0x8 #define CONF$M_OPCOMLVL 0x10 #define CONF$M_PWD_EXPIRED 0x80 #define CONF$M_RESTRICTED 0x100 #ifdef __NEW_STARLET #pragma __member_alignment typedef struct _radvms$_conf { unsigned conf$v_dbug : 1; /* A debug mode output flag */ unsigned conf$v_exit : 1; /* Request to exit flag */ unsigned conf$v_stmo : 1; /* Performs a computing of a session time */ unsigned conf$v_dns : 1; /* Performs a reverse DNS lookuping */ unsigned conf$v_opcomlvl : 3 /** WARNING: bitfield array has been reduced to a string **/ ; /* A severity level to send to OPCO\ M */ unsigned conf$v_pwd_expired : 1; /* A SYSUAF's /PWD_EXPIRED flag checking */ unsigned conf$v_restricted : 1; /* A SYSUAF's /RESTRICED flag checking */ unsigned conf$v_fill_10_ : 23; unsigned int conf$l_host_ip; /* A main own IP address */ unsigned int conf$l_maxhomes; /* A number of confugerd and initalized homes */ REALM *conf$a_default_realm; #pragma __member_alignment _ID_ENTRY conf$r_ids [255]; char conf$b_fill_11_; int (*conf$a_extacct)(void); #pragma __member_alignment int (*conf$a_extauth)(void); #pragma __member_alignment char conf$b_fill_12_ [4]; unsigned __int64 conf$q_tattr; /* Thread Attribute (pthread_attr_t) */ __struct { unsigned int conf$l_len; char conf$t_name [32]; } conf$r_nbname; char conf$b_fill_13_ [4]; } RADVMS$_CONF; #if !defined(__VAXC) #define conf$l_len conf$r_nbname.conf$l_len #define conf$t_name conf$r_nbname.conf$t_name #endif /* #if !defined(__VAXC) */ #else /* __OLD_STARLET */ struct radvms$_conf { unsigned conf$v_dbug : 1; /* A debug mode output flag */ unsigned conf$v_exit : 1; /* Request to exit flag */ unsigned conf$v_stmo : 1; /* Performs a computing of a session time */ unsigned conf$v_dns : 1; /* Performs a reverse DNS lookuping */ unsigned conf$v_opcomlvl : 3 /** WARNING: bitfield array has been reduced to a string **/ ; /* A severity level to send to OPCO\ M */ unsigned conf$v_pwd_expired : 1; /* A SYSUAF's /PWD_EXPIRED flag checking */ unsigned conf$v_restricted : 1; /* A SYSUAF's /RESTRICED flag checking */ unsigned conf$v_fill_10_ : 23; unsigned int conf$l_host_ip; /* A main own IP address */ unsigned int conf$l_maxhomes; /* A number of confugerd and initalized homes */ void *conf$a_default_realm; struct _id_entry conf$r_ids [255]; char conf$b_fill_11_; int (*conf$a_extacct)(); #pragma __member_alignment int (*conf$a_extauth)(); #pragma __member_alignment char conf$b_fill_12_ [4]; unsigned int conf$q_tattr [2]; /* Thread Attribute (pthread_attr_t) */ __struct { unsigned int conf$l_len; char conf$t_name [32]; } conf$r_nbname; char conf$b_fill_13_ [4]; } ; #if !defined(__VAXC) #define conf$l_len conf$r_nbname.conf$l_len #define conf$t_name conf$r_nbname.conf$t_name #endif /* #if !defined(__VAXC) */ #endif /* #ifdef __NEW_STARLET */ /* */ /* RADIUS-VMS internal statistic */ /* */ #ifdef __NEW_STARLET typedef struct _radvms$_stat { unsigned __int64 stat$q_stardt; /* Start date&time, VMS format */ unsigned __int64 stat$q_acptd; /* A number of accepted requests */ unsigned __int64 stat$q_rjctd; /* --- // -- rejected requests */ unsigned __int64 stat$q_resp; /* --- // -- accounting responses */ } RADVMS$_STAT; #else /* __OLD_STARLET */ struct radvms$_stat { unsigned int stat$q_stardt [2]; /* Start date&time, VMS format */ unsigned int stat$q_acptd [2]; /* A number of accepted requests */ unsigned int stat$q_rjctd [2]; /* --- // -- rejected requests */ unsigned int stat$q_resp [2]; /* --- // -- accounting responses */ } ; #endif /* #ifdef __NEW_STARLET */ #pragma __member_alignment __restore #ifdef __INITIAL_POINTER_SIZE /* Defined whenever ptr size pragmas supported */ #pragma __required_pointer_size __restore /* Restore the previously-defined required ptr size */ #endif #ifdef __cplusplus } #endif #pragma __standard #endif /* __RADDEF_LOADED */