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 /* Protocol operations */
30 #define SMS_SHUTDOWN 2
33 #define SMS_DO_UPDATE 5
35 #define SMS_MAX_PROC 6
37 /* values used in NFS physical flags */
38 #define SMS_FS_STUDENT 0x0001
39 #define SMS_FS_FACULTY 0x0002
40 #define SMS_FS_STAFF 0x0004
41 #define SMS_FS_MISC 0x0008
43 /* magic values to pass for list and user queries */
44 #define UNIQUE_GID "create unique GID"
45 #define UNIQUE_UID "create unique UID"
46 #define UNIQUE_LOGIN "create unique login ID"
48 /* Structure used by Save Queue routines (for temporary storage of data) */
51 struct save_queue *q_next;
52 struct save_queue *q_prev;
53 struct save_queue *q_lastget;
57 /* Hash table declarations */
72 int sms_access(char *handle, int argc, char **argv);
73 int sms_access_internal(int argc, char **argv);
74 int sms_query(char *handle, int argc, char **argv,
75 int (*callback)(), char *callarg);
76 int sms_query_internal(int argc, char **argv,
77 int (*callback)(), char *callarg);
79 int sms_shutdown(char *reason);
80 struct save_queue *sq_create();
81 struct hash *create_hash(int size);
82 char *hash_lookup(struct hash *h, int key);
83 char *strsave(char *s);
84 char *strtrim(char *s);
85 char *canonicalize_hostname(char *s);
94 struct save_queue *sq_create();
95 struct hash *create_hash();
99 char *canonicalize_hostname();
102 #endif _sms_h_ /* Do Not Add Anything after this line. */