6 * Copyright (C) 1987 by the Massachusetts Institute of Technology
13 /* return values from queries (and error codes) */
16 #define MR_SUCCESS 0 /* Query was successful */
18 #define MR_VERSION_1 1 /* Version in use from 7/87 to 4/88 */
19 #define MR_VERSION_2 2 /* After 4/88, new query lib */
21 /* return values for Moira server calls, used by clients */
23 #define MR_CONT 0 /* Everything okay, continue sending values. */
24 #define MR_ABORT -1 /* Something went wrong don't send anymore
27 #define MOIRA_SNAME "moira" /* Kerberos service key to use */
29 /* Protocol operations */
35 #define MR_DO_UPDATE 5
39 /* values used in NFS physical flags */
40 #define MR_FS_STUDENT 0x0001
41 #define MR_FS_FACULTY 0x0002
42 #define MR_FS_STAFF 0x0004
43 #define MR_FS_MISC 0x0008
44 #define MR_FS_GROUPQUOTA 0x0010
46 /* magic values to pass for list and user queries */
47 #define UNIQUE_GID "create unique GID"
48 #define UNIQUE_UID "create unique UID"
49 #define UNIQUE_LOGIN "create unique login ID"
51 /* Structure used by Save Queue routines (for temporary storage of data) */
54 struct save_queue *q_next;
55 struct save_queue *q_prev;
56 struct save_queue *q_lastget;
60 /* Hash table declarations */
72 int mr_connect(char *server);
74 int mr_host(char *host, int size);
75 int mr_motd(char **motd);
76 int mr_auth(char *prog);
77 int mr_access(char *handle, int argc, char **argv);
78 int mr_access_internal(int argc, char **argv);
79 int mr_query(char *handle, int argc, char **argv,
80 int (*callback)(), char *callarg);
81 int mr_query_internal(int argc, char **argv,
82 int (*callback)(), char *callarg);
84 struct save_queue *sq_create();
85 struct hash *create_hash(int size);
86 char *hash_lookup(struct hash *h, int key);
87 char *strsave(char *s);
88 char *strtrim(char *s);
89 char *canonicalize_hostname(char *s);
99 struct save_queue *sq_create();
100 struct hash *create_hash();
104 char *canonicalize_hostname();
105 #endif /* __STDC__ */
107 #endif /* _moira_h_ */ /* Do Not Add Anything after this line. */