6 * Copyright (C) 1987 by the Massachusetts Institute of Technology
13 /* return values from queries (and error codes) */
16 #define SMS_SUCCESS 0 /* Query was successful */
18 #define SMS_VERSION_1 1 /* Version in use from 7/87 to 4/88 */
19 #define SMS_VERSION_2 2 /* After 4/88, new query lib */
21 /* return values for sms server calls, used by clients */
23 #define SMS_CONT 0 /* Everything okay, continue sending values. */
24 #define SMS_ABORT -1 /* Something went wrong don't send anymore
27 #define MOIRA_SNAME "moira" /* Kerberos service key to use */
29 /* Protocol operations */
32 #define SMS_SHUTDOWN 2
35 #define SMS_DO_UPDATE 5
37 #define SMS_MAX_PROC 6
39 /* values used in NFS physical flags */
40 #define SMS_FS_STUDENT 0x0001
41 #define SMS_FS_FACULTY 0x0002
42 #define SMS_FS_STAFF 0x0004
43 #define SMS_FS_MISC 0x0008
45 /* magic values to pass for list and user queries */
46 #define UNIQUE_GID "create unique GID"
47 #define UNIQUE_UID "create unique UID"
48 #define UNIQUE_LOGIN "create unique login ID"
50 /* Structure used by Save Queue routines (for temporary storage of data) */
53 struct save_queue *q_next;
54 struct save_queue *q_prev;
55 struct save_queue *q_lastget;
59 /* Hash table declarations */
74 int sms_access(char *handle, int argc, char **argv);
75 int sms_access_internal(int argc, char **argv);
76 int sms_query(char *handle, int argc, char **argv,
77 int (*callback)(), char *callarg);
78 int sms_query_internal(int argc, char **argv,
79 int (*callback)(), char *callarg);
81 int sms_shutdown(char *reason);
82 struct save_queue *sq_create();
83 struct hash *create_hash(int size);
84 char *hash_lookup(struct hash *h, int key);
85 char *strsave(char *s);
86 char *strtrim(char *s);
87 char *canonicalize_hostname(char *s);
96 struct save_queue *sq_create();
97 struct hash *create_hash();
101 char *canonicalize_hostname();
104 #endif _sms_h_ /* Do Not Add Anything after this line. */