]> andersk Git - moira.git/blobdiff - server/mr_server.h
changed names of some of the clients; and changed order or arguments
[moira.git] / server / mr_server.h
index 665c851e7f81b267e613299fad4e3c31e14df266..0ea58582bad0f89bd02ee14750ed3150bcfc6132 100644 (file)
@@ -5,21 +5,49 @@
  *
  *     Copyright (C) 1987 by the Massachusetts Institute of Technology
  *
- *     $Log$
- *     Revision 1.2  1987-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 <krb.h>
+
+typedef struct returned_tuples {
+       struct returned_tuples *next;
+       OPERATION op;
+       sms_params *retval;
+} returned_tuples;
+
+/*
+ * This should be in the kerberos header file.
+ */
+
+struct krbname {
+       char name[ANAME_SZ];
+       char inst[INST_SZ];
+       char realm[REALM_SZ];
+};
+
+/*
+ * This structure holds all per-client information; one of these is
+ * allocated for each active client.
+ */
+   
 typedef struct _client {
-       OPERATION pending_op;
-       CONNECTION con;
-       int state;
-       int action;
+       OPERATION pending_op;   /* Primary pending operation */
+       CONNECTION con;         /* Connection to the client */
+       int action;             /* what action is pending? */
        sms_params *args, reply;
        int id;                 /* Unique id of client */
-       struct sockaddr_in haddr;
-       char *clname;
+       struct sockaddr_in haddr; /* IP address of client */
+       char *clname;           /* Name client authenticated to */
+       int users_id;           /* SMS internal ID of authenticated user */
+       struct krbname kname;   /* Parsed version of the above */
+       returned_tuples *first, *last;
+       time_t last_time_used;  /* Last time connection used */
+       char *entity;           /* entity on other end of the connection */
 } client;
 
 /*
@@ -37,3 +65,28 @@ typedef struct _client {
 #define CL_RECEIVE 1
 #define CL_SEND 2
 
+extern char *krb_realm;
+
+/*
+ * Debugging options.
+ */
+
+extern int log_flags;
+
+#define LOG_CONNECT            0x0001
+#define LOG_REQUESTS           0x0002
+#define LOG_ARGS               0x0004
+#define LOG_RESP               0x0008
+#define LOG_RES                        0x0010
+#define LOG_VALID              0x0020
+
+
+/* max length of query argument allowed */
+#define ARGLEN 257
+
+/* 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   32765
+#define MIN_ID_VALUE   100
This page took 0.033803 seconds and 4 git commands to generate.