]>
Commit | Line | Data |
---|---|---|
a3cf6921 | 1 | /* |
2 | * $Source$ | |
3 | * $Author$ | |
4 | * $Header$ | |
5 | * | |
6 | * Copyright (C) 1987 by the Massachusetts Institute of Technology | |
c801de4c | 7 | * For copying and distribution information, please see the file |
8 | * <mit-copyright.h>. | |
a3cf6921 | 9 | * |
10 | * Global variables inside the SMS server. | |
a3cf6921 | 11 | */ |
12 | ||
13 | #ifndef lint | |
d548a4e7 | 14 | static char *rcsid_mr_srvdata_c = "$Header$"; |
a3cf6921 | 15 | #endif lint |
16 | ||
c801de4c | 17 | #include <mit-copyright.h> |
d548a4e7 | 18 | #include "mr_server.h" |
a3cf6921 | 19 | |
20 | /* | |
21 | * Connections & clients: | |
22 | * | |
23 | * The template and most recently connected connection: | |
24 | */ | |
25 | CONNECTION listencon, newconn; | |
26 | /* | |
27 | * The template listen operation. | |
28 | */ | |
29 | OPERATION listenop; | |
30 | /* | |
31 | * The list of operations corresponding to the I/O being done by the | |
32 | * currently connected clients. | |
33 | */ | |
34 | LIST_OF_OPERATIONS op_list; | |
35 | /* | |
36 | * The current number of connected clients, an array of them, and the | |
37 | * "current" client, if any. | |
38 | */ | |
39 | int nclients=0; | |
40 | client **clients, *cur_client; | |
41 | /* | |
42 | * Socket address of the most recently connected client. | |
43 | */ | |
44 | struct sockaddr_in client_addr; | |
45 | int client_addrlen; | |
46 | /* | |
47 | * Additional data sent at connect time by the client | |
d548a4e7 | 48 | * (provided by GDB; ignored by Moira) |
a3cf6921 | 49 | */ |
50 | TUPLE client_tuple; | |
51 | ||
52 | /* | |
53 | * Name server was invoked as. | |
54 | */ | |
55 | char *whoami; | |
56 | /* | |
57 | * Buffer for use in error messages. | |
58 | */ | |
59 | char buf1[BUFSIZ]; | |
60 | ||
61 | /* | |
d548a4e7 | 62 | * If non-null, reason for shutdown. (Moira will be going down shortly |
a3cf6921 | 63 | * if this is non-null) |
64 | */ | |
65 | char *takedown=NULL; | |
a7aaa15b | 66 | |
5d5736b9 | 67 | /* States for putting the server to sleep & waking it up again. */ |
68 | int dormant = AWAKE; | |
69 | ||
a7aaa15b | 70 | /* |
71 | * The name of the local Kerberos realm | |
72 | */ | |
73 | ||
74 | char *krb_realm = NULL; | |
4d64e1de | 75 | /* |
76 | * Logging levels. | |
77 | */ | |
78 | ||
79 | int log_flags = LOG_CONNECT|LOG_REQUESTS|LOG_ARGS|LOG_RES; | |
b2328d1e | 80 | |
81 | /* | |
82 | * Time of last time through main loop. | |
83 | */ | |
84 | time_t now; | |
7f7fdf1d | 85 | |
86 | ||
87 | /* | |
88 | * Statistics on number of queries of each version that have been attempted | |
89 | */ | |
90 | ||
91 | int newqueries = 0; | |
92 | int oldqueries = 0; | |
93 | ||
94 | ||
95 | /* Journalling file */ | |
96 | FILE *journal = NULL; | |
97 |