1 .TH SMS 3 "29 Nov 1988"
4 sms_connect, sms_host, sms_auth, sms_disconnect, sms_noop, sms_access,
5 sms_query, sms_do_update, sms_motd, 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_host(host, size);
25 .B int sms_motd(motd);
28 .B int sms_auth(prog);
31 .B int sms_disconnect();
35 .B int sms_access(name, argc, argv);
40 .B int sms_query(name, argc, argv, callproc, callarg);
44 .B int (*callproc)(int, char **, char *);
47 .B int sms_do_update();
50 .B char *format_filesys_type(fs_status);
53 .B char *parse_filesys_type(fs_type_name);
54 .B char *fs_type_name;
56 .B char *canonicalize_hostname(host);
66 .B struct save_queue *sq_create();
69 .B struct save_queue *sq;
71 .B int sq_get_data(sq, data);
74 .B sq_save_args(argc, argv, sq);
76 .B sq_save_data(sq, data);
78 .B sq_save_unique_data(sq, data);
80 .B sq_save_unique_string(sq, data);
84 .B char *whoami = argv[0];
90 .B Start_menu(top_menu);
93 .B Start_no_menu(top_menu);
97 .B Prompt_input(prompt, buf, buflen);
101 .B Password_input(prompt, buf, buflen);
107 This library supports the Athena Service Management System protocol
108 and related operations. The library contains many routines beyond
109 those described in this man page, but they are not intended to be used
110 directly. Instead, they are called by the routines that are described.
112 Be sure to link your application against these libraries:
113 -lsms -lsmsgdb -lcom_err -lkrb -ldes, and also curses if the menu are
114 routines are to be used.
117 All protocol routines return 0 on success, or a value from
119 on failure. An application should connect, check the motd in case the
120 server is closed, authenticate, perform queries, then disconnect.
122 .I sending_version_no
127 to determine the version of the protocol that will be used. It
128 currently defaults to
132 establishes a connection with the SMS server. The
134 specification is of the form hostname:portname, where the portname can
141 with the name of the host that the client is currently connected to.
144 will check to see if the server is closed and if so, will retrieve an
145 explanatory message (the so-called motd). This routine will always
146 return 0 if no error occurs. *motd will be NULL if the server is
147 functioning normally, or a pointer to a static string with the
148 explanation if the server is down.
151 authenticates an established connection using Kerberos.
153 is the name of the program making the connection. The program name
154 and the kerberos principal name will be recorded with any changes made
155 to the database through this connection.
158 severs the connection with the SMS server.
161 pings the SMS server through a "no operation" request, verifying that
162 the connection is still working.
165 Verifies that the authenticated user has the necessary access to
166 perform the query specified by
172 performs a query. This query may be a retrieval, append, delete, or
173 update of the database. Query
175 will be executed with the
177 arguments specified in the string array
179 For each return tuple,
181 will be called with an
183 and the value passed to
189 triggers a DCM update immediately on the SMS server.
192 .B format_filesys_type
193 returns a user-displayable representation of the status bits on an NFS
196 is the ascii representation of the integer value of that field.
198 .B parse_filesys_type
199 returns the numeric value of the filesystem type, given a string
200 describing an NFS physical partition allocation type. The returned
201 value is a pointer to a static buffer containing the ascii
202 representation of the integer value.
204 .B canonicalize_hostname
205 attempts to update what is possibly the nickname for a host to its
206 canonical form which is a fully specified, uppercase domain name.
207 If the named host is in the namespace, it calls the nameserver to
208 expand it and return the primary name of the host. Otherwise, it just
209 returns the argument. It assumes that
213 and may be freed or realloc'ed before returning. The returned value
214 will be a malloc'ed value, possibly the same buffer as the argument.
217 will malloc some memory and make a copy of
221 will trim whitespace off of both ends of the string
223 The returned value will be a pointer into the same buffer
228 will create an empty save_queue.
232 will free all of the memory contained in the queue structure
234 It will not attempt to free the elements.
239 with the next piece of data in the queue. If will return 0 if there
240 is no more data in the queue.
245 null terminate it so that
247 is not necessary, and save this value on the end of the queue
253 on the end of the queue
256 .B sq_save_unique_data
259 on the queue if it does not already appear in the queue. If it is
260 already present, nothing is modified and no errors are returned.
261 .B sq_save_unique_string
263 .B sq_save_unique_data,
264 except that it uses strcmp on the elements rather than comparing the
268 The menu package requires that the string
270 be defined. It is usually set to argv[0] of the program.
273 initializes menu package and sets up the screen.
276 resets the screen to normal mode. This must be done before the
277 program exits to put the tty back into a sane mode.
280 starts interpreting menus with
282 giving the menu package complete control of the screen.
284 must have been called first.
287 starts interpreting menus, but does not entirely give up control of
288 the screen. The menu package will treat the tty as a printing
292 aborts the menu package and returns the tty to sane modes.
295 will get input from the user, using the dialogue window on the screen.
296 It will first display
300 bytes into the buffer
306 except that the value the user types is not echoed.
310 to the screen, appending a newline at the end.
314 /usr/include/sms_et.h
318 smstest(8), The Service Management System section of the Athena
321 The error codes returned are those defined in <sms_et.h>, or
322 <krb_et.h>. They may be easily decoded using the com_err library.
324 COPYRIGHT 1987,1988 Massachusetts Institute of Technology