.TH SMS 3 "29 Nov 1988"
.FM mit
.SH NAME
-sms_connect, sms_auth, sms_disconnect, sms_noop, sms_access,
-sms_query, sms_do_update, format_filesys_type, parse_filesys_type,
+sms_connect, sms_host, sms_auth, sms_disconnect, sms_noop, sms_access,
+sms_query, sms_do_update, sms_motd, format_filesys_type, parse_filesys_type,
canonicalize_hostname, strsave, strtrim, sq_create, sq_destroy,
sq_get_data, sq_save_args, sq_save_data, sq_save_unique_data,
sq_save_unique_string, Start_paging, Stop_paging, Start_menu,
.B int sms_connect(server);
.B char *server;
+.B int sms_host(host, size);
+.B char *server;
+
+.B int sms_motd(motd);
+.B char **motd;
+
.B int sms_auth(prog);
.B char *prog;
and related operations. The library contains many routines beyond
those described in this man page, but they are not intended to be used
directly. Instead, they are called by the routines that are described.
+
+Be sure to link your application against these libraries:
+-lsms -lsmsgdb -lcom_err -lkrb -ldes, and also curses if the menu are
+routines are to be used.
.TP
Protocol functions
All protocol routines return 0 on success, or a value from
.I <sms_et.h>
-on failure. An application should connect, authenticate, perform
-queries, then disconnect.
+on failure. An application should connect, check the motd in case the
+server is closed, authenticate, perform queries, then disconnect.
.I sending_version_no
may be set to
be looked up in
.B /etc/services.
+.B sms_host
+initializes
+.I host
+with the name of the host that the client is currently connected to.
+
+.B sms_motd
+will check to see if the server is closed and if so, will retrieve an
+explanatory message (the so-called motd). This routine will always
+return 0 if no error occurs. *motd will be NULL if the server is
+functioning normally, or a pointer to a static string with the
+explanation if the server is down.
+
.B sms_auth
authenticates an established connection using Kerberos.
.I prog