1 .TH SMS 3 "29 Nov 1988"
4 sms_connect, sms_auth, sms_disconnect, sms_noop, sms_access,
5 sms_query, sms_do_update, format_filesys_type, parse_filesys_type,
6 canonicalize_hostname, strsave, strtrim, sq_create, sq_destroy,
7 sq_get_data, sq_save_args, sq_save_data, sq_save_unique_data,
8 sq_save_unique_string, Start_paging, Stop_paging, Start_menu,
9 Start_no_menu, Cleanup_menu, Prompt_input, Password_input, Put_message
17 .B extern int sending_version_no;
19 .B int sms_connect(server);
22 .B int sms_auth(prog);
25 .B int sms_disconnect();
29 .B int sms_access(name, argc, argv);
34 .B int sms_query(name, argc, argv, callproc, callarg);
38 .B int (*callproc)(int, char **, char *);
41 .B int sms_do_update();
44 .B char *format_filesys_type(fs_status);
47 .B char *parse_filesys_type(fs_type_name);
48 .B char *fs_type_name;
50 .B char *canonicalize_hostname(host);
60 .B struct save_queue *sq_create();
63 .B struct save_queue *sq;
65 .B int sq_get_data(sq, data);
68 .B sq_save_args(argc, argv, sq);
70 .B sq_save_data(sq, data);
72 .B sq_save_unique_data(sq, data);
74 .B sq_save_unique_string(sq, data);
78 .B char *whoami = argv[0];
84 .B Start_menu(top_menu);
87 .B Start_no_menu(top_menu);
91 .B Prompt_input(prompt, buf, buflen);
95 .B Password_input(prompt, buf, buflen);
101 This library supports the Athena Service Management System protocol
102 and related operations. The library contains many routines beyond
103 those described in this man page, but they are not intended to be used
104 directly. Instead, they are called by the routines that are described.
106 Be sure to link your application against these libraries:
107 -lsms -lsmsgdb -lcom_err -lkrb -ldes, and also curses if the menu are
108 routines are to be used.
111 All protocol routines return 0 on success, or a value from
113 on failure. An application should connect, authenticate, perform
114 queries, then disconnect.
116 .I sending_version_no
121 to determine the version of the protocol that will be used. It
122 currently defaults to
126 establishes a connection with the SMS server. The
128 specification is of the form hostname:portname, where the portname can
133 authenticates an established connection using Kerberos.
135 is the name of the program making the connection. The program name
136 and the kerberos principal name will be recorded with any changes made
137 to the database through this connection.
140 severs the connection with the SMS server.
143 pings the SMS server through a "no operation" request, verifying that
144 the connection is still working.
147 Verifies that the authenticated user has the necessary access to
148 perform the query specified by
154 performs a query. This query may be a retrieval, append, delete, or
155 update of the database. Query
157 will be executed with the
159 arguments specified in the string array
161 For each return tuple,
163 will be called with an
165 and the value passed to
171 triggers a DCM update immediately on the SMS server.
174 .B format_filesys_type
175 returns a user-displayable representation of the status bits on an NFS
178 is the ascii representation of the integer value of that field.
180 .B parse_filesys_type
181 returns the numeric value of the filesystem type, given a string
182 describing an NFS physical partition allocation type. The returned
183 value is a pointer to a static buffer containing the ascii
184 representation of the integer value.
186 .B canonicalize_hostname
187 attempts to update what is possibly the nickname for a host to its
188 canonical form which is a fully specified, uppercase domain name.
189 If the named host is in the namespace, it calls the nameserver to
190 expand it and return the primary name of the host. Otherwise, it just
191 returns the argument. It assumes that
195 and may be freed or realloc'ed before returning. The returned value
196 will be a malloc'ed value, possibly the same buffer as the argument.
199 will malloc some memory and make a copy of
203 will trim whitespace off of both ends of the string
205 The returned value will be a pointer into the same buffer
210 will create an empty save_queue.
214 will free all of the memory contained in the queue structure
216 It will not attempt to free the elements.
221 with the next piece of data in the queue. If will return 0 if there
222 is no more data in the queue.
227 null terminate it so that
229 is not necessary, and save this value on the end of the queue
235 on the end of the queue
238 .B sq_save_unique_data
241 on the queue if it does not already appear in the queue. If it is
242 already present, nothing is modified and no errors are returned.
243 .B sq_save_unique_string
245 .B sq_save_unique_data,
246 except that it uses strcmp on the elements rather than comparing the
250 The menu package requires that the string
252 be defined. It is usually set to argv[0] of the program.
255 initializes menu package and sets up the screen.
258 resets the screen to normal mode. This must be done before the
259 program exits to put the tty back into a sane mode.
262 starts interpreting menus with
264 giving the menu package complete control of the screen.
266 must have been called first.
269 starts interpreting menus, but does not entirely give up control of
270 the screen. The menu package will treat the tty as a printing
274 aborts the menu package and returns the tty to sane modes.
277 will get input from the user, using the dialogue window on the screen.
278 It will first display
282 bytes into the buffer
288 except that the value the user types is not echoed.
292 to the screen, appending a newline at the end.
296 /usr/include/sms_et.h
300 smstest(8), The Service Management System section of the Athena
303 The error codes returned are those defined in <sms_et.h>, or
304 <krb_et.h>. They may be easily decoded using the com_err library.
306 COPYRIGHT 1987,1988 Massachusetts Institute of Technology