]> andersk Git - moira.git/blob - server/mr_server.h
9276ed8643a32e977911ad788cf2bb6f31ef95d7
[moira.git] / server / mr_server.h
1 /*
2  *      $Source$
3  *      $Author$
4  *      $Header$
5  *
6  *      Copyright (C) 1987 by the Massachusetts Institute of Technology
7  *
8  *      $Log$
9  *      Revision 1.7  1987-07-29 16:03:30  wesommer
10  *      Added last_time_used field to client structure.
11  *
12  * Revision 1.6  87/07/14  00:36:40  wesommer
13  * Added debugging options.
14  * 
15  * Revision 1.5  87/06/30  20:05:14  wesommer
16  * Added parsed kerberos principal name.
17  * 
18  * Revision 1.4  87/06/21  16:42:07  wesommer
19  * Performance work, rearrangement of include files.
20  * 
21  * Revision 1.3  87/06/03  16:07:59  wesommer
22  * Fixes for lint.
23  * 
24  * Revision 1.2  87/06/01  03:35:10  wesommer
25  * added stuff for authentication.
26  * 
27  */
28
29 #include <sys/types.h>
30 #include <sys/uio.h>
31 #include <sys/socket.h>
32 #include <netinet/in.h>
33 #include "sms_proto.h"
34 #include <krb.h>
35
36 typedef struct returned_tuples {
37         struct returned_tuples *next;
38         OPERATION op;
39         sms_params *retval;
40 } returned_tuples;
41
42 /*
43  * This should be in the kerberos header file.
44  */
45
46 struct krbname {
47         char name[ANAME_SZ];
48         char inst[INST_SZ];
49         char realm[REALM_SZ];
50 };
51
52 /*
53  * This structure holds all per-client information; one of these is
54  * allocated for each active client.
55  */
56    
57 typedef struct _client {
58         OPERATION pending_op;   /* Primary pending operation */
59         CONNECTION con;         /* Connection to the client */
60         int state;              /* XXX this is really superfluous and should */
61                                 /* be removed */
62         int action;             /* what action is pending? */
63         sms_params *args, reply;
64         int id;                 /* Unique id of client */
65         struct sockaddr_in haddr; /* IP address of client */
66         char *clname;           /* Name client authenticated to */
67         struct krbname kname;   /* Parsed version of the above */
68         returned_tuples *first, *last;
69         time_t last_time_used;  /* Last time connection used */
70 } client;
71
72 /*
73  * States
74  */
75
76 #define CL_DEAD 0
77 #define CL_STARTING 1
78
79 /*
80  * Actions.
81  */
82
83 #define CL_ACCEPT 0
84 #define CL_RECEIVE 1
85 #define CL_SEND 2
86
87 extern char *krb_realm;
88
89 /*
90  * Debugging options.
91  */
92
93 extern int log_flags;
94
95 #define LOG_CONNECT             0x0001
96 #define LOG_REQUESTS            0x0002
97 #define LOG_ARGS                0x0004
98 #define LOG_RESP                0x0008
99 #define LOG_RES                 0x0010
100
This page took 0.031827 seconds and 3 git commands to generate.