]> andersk Git - moira.git/blobdiff - server/mr_server.h
stuff for hosttable in moira
[moira.git] / server / mr_server.h
index 9276ed8643a32e977911ad788cf2bb6f31ef95d7..c55d0660d75e10686a5223c3d42ecce511290512 100644 (file)
@@ -5,38 +5,20 @@
  *
  *     Copyright (C) 1987 by the Massachusetts Institute of Technology
  *
- *     $Log$
- *     Revision 1.7  1987-07-29 16:03:30  wesommer
- *     Added last_time_used field to client structure.
- *
- * Revision 1.6  87/07/14  00:36:40  wesommer
- * Added debugging options.
- * 
- * Revision 1.5  87/06/30  20:05:14  wesommer
- * Added parsed kerberos principal name.
- * 
- * Revision 1.4  87/06/21  16:42:07  wesommer
- * Performance work, rearrangement of include files.
- * 
- * Revision 1.3  87/06/03  16:07:59  wesommer
- * Fixes for lint.
- * 
- * Revision 1.2  87/06/01  03:35:10  wesommer
- * added stuff for authentication.
- * 
  */
 
 #include <sys/types.h>
 #include <sys/uio.h>
 #include <sys/socket.h>
 #include <netinet/in.h>
-#include "sms_proto.h"
+#include "mr_proto.h"
+#include <moira_site.h>
 #include <krb.h>
 
 typedef struct returned_tuples {
        struct returned_tuples *next;
        OPERATION op;
-       sms_params *retval;
+       mr_params *retval;
 } returned_tuples;
 
 /*
@@ -53,20 +35,21 @@ struct krbname {
  * This structure holds all per-client information; one of these is
  * allocated for each active client.
  */
-   
+
 typedef struct _client {
        OPERATION pending_op;   /* Primary pending operation */
        CONNECTION con;         /* Connection to the client */
-       int state;              /* XXX this is really superfluous and should */
-                               /* be removed */
        int action;             /* what action is pending? */
-       sms_params *args, reply;
+       mr_params *args, reply;
        int id;                 /* Unique id of client */
        struct sockaddr_in haddr; /* IP address of client */
-       char *clname;           /* Name client authenticated to */
+       char clname[MAX_K_NAME_SZ];/* Name client authenticated to */
        struct krbname kname;   /* Parsed version of the above */
+       int users_id;           /* MR internal ID of authenticated user */
+       int client_id;          /* MR internal ID of client for modby field */
        returned_tuples *first, *last;
        time_t last_time_used;  /* Last time connection used */
+       char entity[9];         /* entity on other end of the connection */
 } client;
 
 /*
@@ -97,4 +80,31 @@ extern int log_flags;
 #define LOG_ARGS               0x0004
 #define LOG_RESP               0x0008
 #define LOG_RES                        0x0010
+#define LOG_VALID              0x0020
+#define LOG_SQL                        0x0040
+#define LOG_GDSS               0x0080
+
+
+/* max length of query argument allowed */
+#define ARGLEN 257
+/* Used to setup static argv, maximum argc */
+#define QMAXARGS       20
+
+/* statistics on number of queries by version number */
+extern int newqueries, oldqueries;
+
+/* Maximum and minimum values that will ever be chosen for IDs */
+#define MAX_ID_VALUE   31999
+#define MIN_ID_VALUE   100
+
+/* Sleepy states for the server! */
+#define AWAKE 0
+#define SLEEPY 1
+#define ASLEEP 2
+#define GROGGY 3
+extern int dormant;
 
+/* state for the incremental update system */
+extern int inc_running, inc_pid;
+extern time_t inc_started, now;
+#define INC_TIMEOUT (3 * 60)   /* 3 minutes */
This page took 0.042451 seconds and 4 git commands to generate.