Patches from "Alan Curry" <pacman-radius@cqc.com>
[freeradius.git] / src / include / radiusd.h
index 9dbcaa7..0aa85a1 100644 (file)
 #include "conf.h"
 #include "missing.h"
 
-#include <sys/time.h>
-
 #if HAVE_PTHREAD_H
 #include       <pthread.h>
-typedef pthread_t child_pid_t ;
+typedef pthread_t child_pid_t;
 #define child_kill pthread_kill
 #else
 typedef pid_t child_pid_t;
 #define child_kill kill
 #endif
 
-#define NO_SUCH_CHILD_PID (0)
+#define NO_SUCH_CHILD_PID (child_pid_t) (0)
+
+#ifndef NDEBUG
+#define REQUEST_MAGIC (0xdeadbeef)
+#endif
 
 typedef struct auth_req {
+#ifndef NDEBUG
+       uint32_t                magic; /* for debugging only */
+#endif
        RADIUS_PACKET           *packet;
        RADIUS_PACKET           *proxy;
        RADIUS_PACKET           *reply;
@@ -110,10 +115,15 @@ typedef struct pair_list {
 #define L_CONS                 128
 
 #ifndef FALSE
-#  define FALSE 0
+#define FALSE 0
 #endif
 #ifndef TRUE
-#  define TRUE 1
+/*
+ *     This definition of true as NOT false is definitive. :) Making
+ *     it '1' can cause problems on stupid platforms.  See articles
+ *     on C portability for more information.
+ */
+#define TRUE (!FALSE)
 #endif
 
 /* for paircompare_register */
@@ -124,15 +134,14 @@ typedef int (*COMPARE)(VALUE_PAIR *, VALUE_PAIR *, VALUE_PAIR *, VALUE_PAIR **);
  */
 extern const char      *progname;
 extern int             debug_flag;
-extern const char      *radacct_dir;
-extern const char      *radlog_dir;
-extern const char      *radius_dir;
+extern char            *radacct_dir;
+extern char            *radlog_dir;
+extern const char      *radlib_dir;
+extern char            *radius_dir;
 extern const char      *radius_libdir;
 extern uint32_t                expiration_seconds;
-extern int             radius_pid;
 extern int             use_dbm;
 extern int             log_stripped_names;
-extern int             cache_passwd;
 extern uint32_t                myip;
 extern int             log_auth_detail;
 extern int             log_auth;
@@ -141,6 +150,8 @@ extern int          auth_port;
 extern int             acct_port;
 extern int             proxy_port;
 extern int             proxyfd;
+extern int             proxy_retry_count;
+extern int             proxy_retry_delay;
 
 /*
  *     Function prototypes.
@@ -158,7 +169,6 @@ int         radutmp_checksimul(char *name, VALUE_PAIR *, int maxsimul);
 void           debug_pair(FILE *, VALUE_PAIR *);
 int            log_err (char *);
 void           sig_cleanup(int);
-void           remove_from_request_list(REQUEST *);
 int            rad_respond(REQUEST *, RAD_REQUEST_FUNP fun);
 
 /* util.c */
@@ -198,8 +208,6 @@ int         pam_pass(char *name, char *passwd, const char *pamauth);
 /* proxy.c */
 int proxy_receive(REQUEST *request);
 int proxy_send(REQUEST *request);
-struct timeval *proxy_setuptimeout(struct timeval *);
-void proxy_retry(void);
 
 /* auth.c */
 char           *auth_name(char *buf, size_t buflen, REQUEST *request, int do_cli);