Skip to content

Commit

Permalink
Basic doxygen comments. Addresses #31
Browse files Browse the repository at this point in the history
Documentation source was from #31 by @nmav
  • Loading branch information
arr2036 committed Mar 2, 2015
1 parent 0fd4cb0 commit 534b6c8
Show file tree
Hide file tree
Showing 15 changed files with 567 additions and 698 deletions.
264 changes: 132 additions & 132 deletions include/freeradius-client.h
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@
#define BUFFER_LEN 8192

#define NAME_LENGTH 32
#define GETSTR_LENGTH 128 /* must be bigger than AUTH_PASS_LEN */
#define GETSTR_LENGTH 128 //!< must be bigger than AUTH_PASS_LEN.

#define MAX_SECRET_LENGTH (3 * 16) /* MUST be multiple of 16 */

Expand Down Expand Up @@ -139,131 +139,131 @@ typedef struct rc_conf rc_handle;

/* standard RADIUS attribute-value pairs */

#define PW_USER_NAME 1 /* string */
#define PW_USER_PASSWORD 2 /* string */
#define PW_CHAP_PASSWORD 3 /* string */
#define PW_NAS_IP_ADDRESS 4 /* ipaddr */
#define PW_NAS_PORT 5 /* integer */
#define PW_SERVICE_TYPE 6 /* integer */
#define PW_FRAMED_PROTOCOL 7 /* integer */
#define PW_FRAMED_IP_ADDRESS 8 /* ipaddr */
#define PW_FRAMED_IP_NETMASK 9 /* ipaddr */
#define PW_FRAMED_ROUTING 10 /* integer */
#define PW_FILTER_ID 11 /* string */
#define PW_FRAMED_MTU 12 /* integer */
#define PW_FRAMED_COMPRESSION 13 /* integer */
#define PW_LOGIN_IP_HOST 14 /* ipaddr */
#define PW_LOGIN_SERVICE 15 /* integer */
#define PW_LOGIN_PORT 16 /* integer */
#define PW_OLD_PASSWORD 17 /* string */ /* deprecated */
#define PW_REPLY_MESSAGE 18 /* string */
#define PW_LOGIN_CALLBACK_NUMBER 19 /* string */
#define PW_FRAMED_CALLBACK_ID 20 /* string */
#define PW_EXPIRATION 21 /* date */ /* deprecated */
#define PW_FRAMED_ROUTE 22 /* string */
#define PW_FRAMED_IPX_NETWORK 23 /* integer */
#define PW_STATE 24 /* string */
#define PW_CLASS 25 /* string */
#define PW_VENDOR_SPECIFIC 26 /* string */
#define PW_SESSION_TIMEOUT 27 /* integer */
#define PW_IDLE_TIMEOUT 28 /* integer */
#define PW_TERMINATION_ACTION 29 /* integer */
#define PW_CALLED_STATION_ID 30 /* string */
#define PW_CALLING_STATION_ID 31 /* string */
#define PW_NAS_IDENTIFIER 32 /* string */
#define PW_PROXY_STATE 33 /* string */
#define PW_LOGIN_LAT_SERVICE 34 /* string */
#define PW_LOGIN_LAT_NODE 35 /* string */
#define PW_LOGIN_LAT_GROUP 36 /* string */
#define PW_FRAMED_APPLETALK_LINK 37 /* integer */
#define PW_FRAMED_APPLETALK_NETWORK 38 /* integer */
#define PW_FRAMED_APPLETALK_ZONE 39 /* string */
#define PW_ACCT_STATUS_TYPE 40 /* integer */
#define PW_ACCT_DELAY_TIME 41 /* integer */
#define PW_ACCT_INPUT_OCTETS 42 /* integer */
#define PW_ACCT_OUTPUT_OCTETS 43 /* integer */
#define PW_ACCT_SESSION_ID 44 /* string */
#define PW_ACCT_AUTHENTIC 45 /* integer */
#define PW_ACCT_SESSION_TIME 46 /* integer */
#define PW_ACCT_INPUT_PACKETS 47 /* integer */
#define PW_ACCT_OUTPUT_PACKETS 48 /* integer */
#define PW_ACCT_TERMINATE_CAUSE 49 /* integer */
#define PW_ACCT_MULTI_SESSION_ID 50 /* string */
#define PW_ACCT_LINK_COUNT 51 /* integer */
#define PW_ACCT_INPUT_GIGAWORDS 52 /* integer */
#define PW_ACCT_OUTPUT_GIGAWORDS 53 /* integer */
#define PW_EVENT_TIMESTAMP 55 /* integer */
#define PW_EGRESS_VLANID 56 /* string */
#define PW_INGRESS_FILTERS 57 /* integer */
#define PW_EGRESS_VLAN_NAME 58 /* string */
#define PW_USER_PRIORITY_TABLE 59 /* string */
#define PW_CHAP_CHALLENGE 60 /* string */
#define PW_NAS_PORT_TYPE 61 /* integer */
#define PW_PORT_LIMIT 62 /* integer */
#define PW_LOGIN_LAT_PORT 63 /* string */
#define PW_TUNNEL_TYPE 64 /* string */
#define PW_TUNNEL_MEDIUM_TYPE 65 /* integer */
#define PW_TUNNEL_CLIENT_ENDPOINT 66 /* string */
#define PW_TUNNEL_SERVER_ENDPOINT 67 /* string */
#define PW_ACCT_TUNNEL_CONNECTION 68 /* string */
#define PW_TUNNEL_PASSWORD 69 /* string */
#define PW_ARAP_PASSWORD 70 /* string */
#define PW_ARAP_FEATURES 71 /* string */
#define PW_ARAP_ZONE_ACCESS 72 /* integer */
#define PW_ARAP_SECURITY 73 /* integer */
#define PW_ARAP_SECURITY_DATA 74 /* string */
#define PW_PASSWORD_RETRY 75 /* integer */
#define PW_PROMPT 76 /* integer */
#define PW_CONNECT_INFO 77 /* string */
#define PW_CONFIGURATION_TOKEN 78 /* string */
#define PW_EAP_MESSAGE 79 /* string */
#define PW_MESSAGE_AUTHENTICATOR 80 /* string */
#define PW_TUNNEL_PRIVATE_GROUP_ID 81 /* string */
#define PW_TUNNEL_ASSIGNMENT_ID 82 /* string */
#define PW_TUNNEL_PREFERENCE 83 /* string */
#define PW_ARAP_CHALLENGE_RESPONSE 84 /* string */
#define PW_ACCT_INTERIM_INTERVAL 85 /* integer */
#define PW_ACCT_TUNNEL_PACKETS_LOST 86 /* integer */
#define PW_NAS_PORT_ID_STRING 87 /* string */
#define PW_FRAMED_POOL 88 /* string */
#define PW_CHARGEABLE_USER_IDENTITY 89 /* string */
#define PW_CUI 89 /* string */
#define PW_TUNNEL_CLIENT_AUTH_ID 90 /* string */
#define PW_TUNNEL_SERVER_AUTH_ID 91 /* string */
#define PW_NAS_FILTER_RULE 92 /* string */
#define PW_ORIGINATING_LINE_INFO 94 /* string */
#define PW_NAS_IPV6_ADDRESS 95 /* string */
#define PW_FRAMED_INTERFACE_ID 96 /* string */
#define PW_FRAMED_IPV6_PREFIX 97 /* string */
#define PW_LOGIN_IPV6_HOST 98 /* string */
#define PW_FRAMED_IPV6_ROUTE 99 /* string */
#define PW_FRAMED_IPV6_POOL 100 /* string */
#define PW_ERROR_CAUSE 101 /* integer */
#define PW_EAP_KEY_NAME 102 /* string */

#define PW_FRAMED_IPV6_ADDRESS 168 /* ipaddr6 */
#define PW_DNS_SERVER_IPV6_ADDRESS 169 /* ipaddr6 */
#define PW_ROUTE_IPV6_INFORMATION 170 /* ipv6prefix */
#define PW_USER_NAME 1 //!< string.
#define PW_USER_PASSWORD 2 //!< string.
#define PW_CHAP_PASSWORD 3 //!< string.
#define PW_NAS_IP_ADDRESS 4 //!< ipaddr.
#define PW_NAS_PORT 5 //!< integer.
#define PW_SERVICE_TYPE 6 //!< integer.
#define PW_FRAMED_PROTOCOL 7 //!< integer.
#define PW_FRAMED_IP_ADDRESS 8 //!< ipaddr.
#define PW_FRAMED_IP_NETMASK 9 //!< ipaddr.
#define PW_FRAMED_ROUTING 10 //!< integer.
#define PW_FILTER_ID 11 //!< string.
#define PW_FRAMED_MTU 12 //!< integer.
#define PW_FRAMED_COMPRESSION 13 //!< integer.
#define PW_LOGIN_IP_HOST 14 //!< ipaddr.
#define PW_LOGIN_SERVICE 15 //!< integer.
#define PW_LOGIN_PORT 16 //!< integer.
#define PW_OLD_PASSWORD 17 //!< string */ /* deprecated.
#define PW_REPLY_MESSAGE 18 //!< string.
#define PW_LOGIN_CALLBACK_NUMBER 19 //!< string.
#define PW_FRAMED_CALLBACK_ID 20 //!< string.
#define PW_EXPIRATION 21 //!< date */ /* deprecated.
#define PW_FRAMED_ROUTE 22 //!< string.
#define PW_FRAMED_IPX_NETWORK 23 //!< integer.
#define PW_STATE 24 //!< string.
#define PW_CLASS 25 //!< string.
#define PW_VENDOR_SPECIFIC 26 //!< string.
#define PW_SESSION_TIMEOUT 27 //!< integer.
#define PW_IDLE_TIMEOUT 28 //!< integer.
#define PW_TERMINATION_ACTION 29 //!< integer.
#define PW_CALLED_STATION_ID 30 //!< string.
#define PW_CALLING_STATION_ID 31 //!< string.
#define PW_NAS_IDENTIFIER 32 //!< string.
#define PW_PROXY_STATE 33 //!< string.
#define PW_LOGIN_LAT_SERVICE 34 //!< string.
#define PW_LOGIN_LAT_NODE 35 //!< string.
#define PW_LOGIN_LAT_GROUP 36 //!< string.
#define PW_FRAMED_APPLETALK_LINK 37 //!< integer.
#define PW_FRAMED_APPLETALK_NETWORK 38 //!< integer.
#define PW_FRAMED_APPLETALK_ZONE 39 //!< string.
#define PW_ACCT_STATUS_TYPE 40 //!< integer.
#define PW_ACCT_DELAY_TIME 41 //!< integer.
#define PW_ACCT_INPUT_OCTETS 42 //!< integer.
#define PW_ACCT_OUTPUT_OCTETS 43 //!< integer.
#define PW_ACCT_SESSION_ID 44 //!< string.
#define PW_ACCT_AUTHENTIC 45 //!< integer.
#define PW_ACCT_SESSION_TIME 46 //!< integer.
#define PW_ACCT_INPUT_PACKETS 47 //!< integer.
#define PW_ACCT_OUTPUT_PACKETS 48 //!< integer.
#define PW_ACCT_TERMINATE_CAUSE 49 //!< integer.
#define PW_ACCT_MULTI_SESSION_ID 50 //!< string.
#define PW_ACCT_LINK_COUNT 51 //!< integer.
#define PW_ACCT_INPUT_GIGAWORDS 52 //!< integer.
#define PW_ACCT_OUTPUT_GIGAWORDS 53 //!< integer.
#define PW_EVENT_TIMESTAMP 55 //!< integer.
#define PW_EGRESS_VLANID 56 //!< string.
#define PW_INGRESS_FILTERS 57 //!< integer.
#define PW_EGRESS_VLAN_NAME 58 //!< string.
#define PW_USER_PRIORITY_TABLE 59 //!< string.
#define PW_CHAP_CHALLENGE 60 //!< string.
#define PW_NAS_PORT_TYPE 61 //!< integer.
#define PW_PORT_LIMIT 62 //!< integer.
#define PW_LOGIN_LAT_PORT 63 //!< string.
#define PW_TUNNEL_TYPE 64 //!< string.
#define PW_TUNNEL_MEDIUM_TYPE 65 //!< integer.
#define PW_TUNNEL_CLIENT_ENDPOINT 66 //!< string.
#define PW_TUNNEL_SERVER_ENDPOINT 67 //!< string.
#define PW_ACCT_TUNNEL_CONNECTION 68 //!< string.
#define PW_TUNNEL_PASSWORD 69 //!< string.
#define PW_ARAP_PASSWORD 70 //!< string.
#define PW_ARAP_FEATURES 71 //!< string.
#define PW_ARAP_ZONE_ACCESS 72 //!< integer.
#define PW_ARAP_SECURITY 73 //!< integer.
#define PW_ARAP_SECURITY_DATA 74 //!< string.
#define PW_PASSWORD_RETRY 75 //!< integer.
#define PW_PROMPT 76 //!< integer.
#define PW_CONNECT_INFO 77 //!< string.
#define PW_CONFIGURATION_TOKEN 78 //!< string.
#define PW_EAP_MESSAGE 79 //!< string.
#define PW_MESSAGE_AUTHENTICATOR 80 //!< string.
#define PW_TUNNEL_PRIVATE_GROUP_ID 81 //!< string.
#define PW_TUNNEL_ASSIGNMENT_ID 82 //!< string.
#define PW_TUNNEL_PREFERENCE 83 //!< string.
#define PW_ARAP_CHALLENGE_RESPONSE 84 //!< string.
#define PW_ACCT_INTERIM_INTERVAL 85 //!< integer.
#define PW_ACCT_TUNNEL_PACKETS_LOST 86 //!< integer.
#define PW_NAS_PORT_ID_STRING 87 //!< string.
#define PW_FRAMED_POOL 88 //!< string.
#define PW_CHARGEABLE_USER_IDENTITY 89 //!< string.
#define PW_CUI 89 //!< string.
#define PW_TUNNEL_CLIENT_AUTH_ID 90 //!< string.
#define PW_TUNNEL_SERVER_AUTH_ID 91 //!< string.
#define PW_NAS_FILTER_RULE 92 //!< string.
#define PW_ORIGINATING_LINE_INFO 94 //!< string.
#define PW_NAS_IPV6_ADDRESS 95 //!< string.
#define PW_FRAMED_INTERFACE_ID 96 //!< string.
#define PW_FRAMED_IPV6_PREFIX 97 //!< string.
#define PW_LOGIN_IPV6_HOST 98 //!< string.
#define PW_FRAMED_IPV6_ROUTE 99 //!< string.
#define PW_FRAMED_IPV6_POOL 100 //!< string.
#define PW_ERROR_CAUSE 101 //!< integer.
#define PW_EAP_KEY_NAME 102 //!< string.
#define PW_FRAMED_IPV6_ADDRESS 168 //!< ipaddr6.
#define PW_DNS_SERVER_IPV6_ADDRESS 169 //!< ipaddr6.
#define PW_ROUTE_IPV6_INFORMATION 170 //!< ipv6prefix.
/* Experimental SIP-specific attributes (draft-sterman-aaa-sip-00.txt etc) */

#define PW_DIGEST_RESPONSE 206 /* string */
#define PW_DIGEST_ATTRIBUTES 207 /* string */
#define PW_DIGEST_REALM 1063 /* string */
#define PW_DIGEST_NONCE 1064 /* string */
#define PW_DIGEST_METHOD 1065 /* string */
#define PW_DIGEST_URI 1066 /* string */
#define PW_DIGEST_QOP 1067 /* string */
#define PW_DIGEST_ALGORITHM 1068 /* string */
#define PW_DIGEST_BODY_DIGEST 1069 /* string */
#define PW_DIGEST_CNONCE 1070 /* string */
#define PW_DIGEST_NONCE_COUNT 1071 /* string */
#define PW_DIGEST_USER_NAME 1072 /* string */
#define PW_DIGEST_RESPONSE 206 //!< string.
#define PW_DIGEST_ATTRIBUTES 207 //!< string.
#define PW_DIGEST_REALM 1063 //!< string.
#define PW_DIGEST_NONCE 1064 //!< string.
#define PW_DIGEST_METHOD 1065 //!< string.
#define PW_DIGEST_URI 1066 //!< string.
#define PW_DIGEST_QOP 1067 //!< string.
#define PW_DIGEST_ALGORITHM 1068 //!< string.
#define PW_DIGEST_BODY_DIGEST 1069 //!< string.
#define PW_DIGEST_CNONCE 1070 //!< string.
#define PW_DIGEST_NONCE_COUNT 1071 //!< string.
#define PW_DIGEST_USER_NAME 1072 //!< string.

/* Merit Experimental Extensions */

#define PW_USER_ID 222 /* string */
#define PW_USER_REALM 223 /* string */
#define PW_USER_ID 222 //!< string.
#define PW_USER_REALM 223 //!< string.

/* Integer Translations */

Expand Down Expand Up @@ -316,7 +316,7 @@ typedef struct rc_conf rc_handle;

/* PROHIBIT PROTOCOL */

#define PW_DUMB 0 /* 1 and 2 are defined in FRAMED PROTOCOLS */
#define PW_DUMB 0 //!< 1 and 2 are defined in FRAMED PROTOCOLS.
#define PW_AUTH_ONLY 3
#define PW_ALL 255

Expand Down Expand Up @@ -371,9 +371,9 @@ typedef struct rc_conf rc_handle;

typedef struct dict_attr
{
char name[NAME_LENGTH + 1]; /* attribute name */
int value; /* attribute index */
int type; /* string, int, etc. */
char name[NAME_LENGTH + 1]; //!< attribute name.
int value; //!< attribute index.
int type; //!< string, int, etc..
struct dict_attr *next;
} DICT_ATTR;

Expand Down Expand Up @@ -415,15 +415,15 @@ typedef struct value_pair

typedef struct send_data /* Used to pass information to sendserver() function */
{
uint8_t code; /* RADIUS packet code */
uint8_t seq_nbr; /* Packet sequence number */
char *server; /* Name/addrress of RADIUS server */
int svc_port; /* RADIUS protocol destination port */
char *secret; /* Shared secret of RADIUS server */
int timeout; /* Session timeout in seconds */
uint8_t code; //!< RADIUS packet code.
uint8_t seq_nbr; //!< Packet sequence number.
char *server; //!< Name/addrress of RADIUS server.
int svc_port; //!< RADIUS protocol destination port.
char *secret; //!< Shared secret of RADIUS server.
int timeout; //!< Session timeout in seconds.
int retries;
VALUE_PAIR *send_pairs; /* More a/v pairs to send */
VALUE_PAIR *receive_pairs; /* Where to place received a/v pairs */
VALUE_PAIR *send_pairs; //!< More a/v pairs to send.
VALUE_PAIR *receive_pairs; //!< Where to place received a/v pairs.
} SEND_DATA;

#ifndef MIN
Expand Down
6 changes: 3 additions & 3 deletions include/pathnames.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,12 @@
#ifndef PATHNAMES_H
#define PATHNAMES_H

#define _PATH_DEV_URANDOM "/dev/urandom" /* Linux only */
#define _PATH_ETC_ISSUE "/etc/issue"
#define _PATH_DEV_URANDOM "/dev/urandom" /* Linux only */
#define _PATH_ETC_ISSUE "/etc/issue"

/* normally defined in the Makefile */
#ifndef _PATH_ETC_RADIUSCLIENT_CONF
#define _PATH_ETC_RADIUSCLIENT_CONF "/etc/radiusclient.conf"
# define _PATH_ETC_RADIUSCLIENT_CONF "/etc/radiusclient.conf"
#endif

#endif /* PATHNAMES_H */
Loading

0 comments on commit 534b6c8

Please sign in to comment.