]> andersk Git - moira.git/blobdiff - man/moira.3
cups-lpd DCM.
[moira.git] / man / moira.3
index 783696e4263cfbccedec9f61c879458a5d87cc0f..229bcdee3ac3c798a8aa17b58f10565d0879f2ed 100644 (file)
@@ -1,87 +1,84 @@
-.TH SMS 3 "8 Jan 1989"
+.TH MOIRA 3 "8 Jan 1989"
 .FM mit
 .SH NAME
-sms_connect, sms_host, sms_auth, sms_disconnect, sms_noop, sms_access,
-sms_query, sms_do_update, sms_motd, sms_set_alternate_input,
+mr_connect, mr_host, mr_auth, mr_disconnect, mr_noop, mr_access,
+mr_query, mr_do_update, mr_motd, mr_set_alternate_input,
 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
+sq_get_data, sq_remove_data, sq_empty, sq_save_args, sq_save_data,
+sq_save_unique_data, sq_save_unique_string
 .SH SYNOPSIS
 .nf
 .nj
 .TP
 Protocol functions
-.B #include <sms.h>
+.B
+int mr_connect(char *server);
 
-.B     extern int sending_version_no;
+.B
+int mr_host(char *host, int size);
 
-.B int sms_connect(server);
-.B     char *server;
+.B
+int mr_motd(char **motd);
 
-.B int sms_host(host, size);
-.B     char *server;
+.B
+int mr_auth(char *prog);
 
-.B int sms_motd(motd);
-.B     char **motd;
+.B
+int mr_disconnect(void);
 
-.B int sms_auth(prog);
-.B     char *prog;
+.B
+int mr_noop(void);
 
-.B int sms_disconnect();
+.B
+int mr_access(char *name, int argc, char **argv);
 
-.B int sms_noop();
+.B
+int mr_query(char *name, int argc, char **argv,
+.B
+       int (*callproc)(int, char **, void *), void *callarg);
 
-.B int sms_access(name, argc, argv);
-.B     char *name;
-.B     int argc;
-.B     char **argv;
-
-.B int sms_query(name, argc, argv, callproc, callarg);
-.B     char *name;
-.B     int argc;
-.B     char **argv;
-.B     int (*callproc)(int, char **, char *);
-.B     char *callarg;
-
-.B int sms_do_update();
-
-.B int sms_set_alternate_input(fd, proc)
-.B     int fd;
-.B     void (*proc)();
 .TP
 Data manipulation
-.B char *format_filesys_type(fs_status);
-.B     char *fs_status;
-
-.B char *parse_filesys_type(fs_type_name);
-.B     char *fs_type_name;
+.B
+char *format_filesys_type(char *fs_status);
 
-.B char *canonicalize_hostname(host);
-.B     char *host;
+.B
+char *parse_filesys_type(char *fs_type_name);
 
-.B char *strsave(s);
-.B     char *s;
+.B
+char *canonicalize_hostname(char *host);
 
-.B char *strtrim(s);
-.B     char *s;
+.B
+char *strtrim(char *s);
 .TP
 Simple Queues
-.B struct save_queue *sq_create();
+.B
+struct save_queue *sq_create(void);
 
-.B sq_destroy(sq);
-.B     struct save_queue *sq;
+.B
+void sq_destroy(struct save_queue *sq);
 
-.B int sq_get_data(sq, data);
-.B     char **data;
+.B
+int sq_get_data(struct save_queue *sq, void *data);
 
-.B sq_save_args(argc, argv, sq);
+.B
+int sq_remove_data(struct save_queue *sq, void *data);
 
-.B sq_save_data(sq, data);
+.B
+int sq_empty(struct save_queue *sq);
 
-.B sq_save_unique_data(sq, data);
+.B
+sq_save_args(int argc, char **argv, struct save_queue *sq);
 
-.B sq_save_unique_string(sq, data);
+.B
+sq_save_data(struct save_queue *sq, void *data);
+
+.B
+sq_save_unique_data(struct save_queue *sq, void *data);
+
+.B
+sq_save_unique_string(struct save_queue *sq, char *data);
 .fi
 .SH DESCRIPTION
 This library supports the Athena Service Management System protocol
@@ -90,64 +87,60 @@ 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
+-lmoira -lkrb -ldes -lcom_err
 .TP
 Protocol functions
 All protocol routines return 0 on success, or a value from 
-.I <sms_et.h>
+.I <mr_et.h>
 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
-.B SMS_VERSION_1
-or
-.B SMS_VERSION_2 
-to determine the version of the protocol that will be used.  It
-currently defaults to
-.B SMS_VERSION_2.
-
-.B sms_connect
-establishes a connection with the SMS server.  The
+.B mr_connect
+establishes a connection with the Moira server.  The
 .I server
-specification is of the form hostname:portname, where the portname can
-be looked up in 
+specification is optional.  If present, it is of the form
+hostname:portname, where the portname can be looked up in 
 .B /etc/services.
+If NULL or an empty string is passed as
+.I server,
+then the server will be found from the MOIRASERVER environment
+variable, the "moira" sloc entry in hesiod, or the compiled in
+default, in that order.
 
-.B sms_host
+.B mr_host
 initializes
 .I host
 with the name of the host that the client is currently connected to.
 
-.B sms_motd
+.B mr_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
+.B mr_auth
 authenticates an established connection using Kerberos.
 .I prog
 is the name of the program making the connection.  The program name
 and the kerberos principal name will be recorded with any changes made
 to the database through this connection.
 
-.B sms_disconnect
-severs the connection with the SMS server.
+.B mr_disconnect
+severs the connection with the Moira server.
 
-.B sms_noop
-pings the SMS server through a "no operation" request, verifying that
+.B mr_noop
+pings the Moira server through a "no operation" request, verifying that
 the connection is still working.
 
-.B sms_access
+.B mr_access
 Verifies that the authenticated user has the necessary access to
 perform the query specified by
 .I name, argc,
 and
 .I argv.
 
-.B sms_query
+.B mr_query
 performs a query.  This query may be a retrieval, append, delete, or
 update of the database.  Query
 .I name
@@ -160,22 +153,10 @@ For each return tuple,
 will be called with an
 .I argc, argv,
 and the value passed to
-.B sms_query
+.B mr_query
 as
 .I callarg.
 
-.B sms_do_update
-triggers a DCM update immediately on the SMS server.
-
-.B sms_set_alternate_input
-tells the Moira library that you want to allow some asynchronus
-actions while a query is being processed.  During query processing, if
-any data is available to be read on the specified file descriptor,
-then the specified function will be called to handle it.  For
-instance, calling sms_set_alternate_input with the connection to the X
-server and a routine which will dispatch X events will allow a toolkit
-application to handle mouse and expose events while a query is being
-processed.
 .TP
 Data manipulation
 .B format_filesys_type
@@ -202,10 +183,6 @@ was allocated using
 and may be freed or realloc'ed before returning.  The returned value
 will be a malloc'ed value, possibly the same buffer as the argument.
 
-.B strsave
-will malloc some memory and make a copy of
-.I s.
-
 .B strtrim
 will trim whitespace off of both ends of the string
 .I s.
@@ -213,10 +190,11 @@ The returned value will be a pointer into the same buffer
 .I s
 pointed to.
 
-.B sq_create
-will create an empty save_queue.
 .TP
 Simple Queues
+.B sq_create
+will create an empty save_queue.
+
 .B sq_destroy
 will free all of the memory contained in the queue structure
 .I sq.
@@ -228,6 +206,14 @@ will fill in
 with the next piece of data in the queue.  If will return 0 if there
 is no more data in the queue.
 
+.B sq_remove_data
+functions like sq_get_data except that any returned data is first
+removed from the queue.
+
+.B sq_empty
+tests the length of the queue, returning non-zero if it is empty or
+zero if the queue contains data.
+
 .B sq_save_args
 will make a copy of
 .I argv,
@@ -253,16 +239,15 @@ is like
 except that it uses strcmp on the elements rather than comparing the
 addresses directly.
 .SH FILES
-/usr/include/sms.h
+/usr/athena/include/moira.h
 .br
-/usr/include/sms_et.h
+/usr/athena/include/mr_et.h
 .br
 /tmp/tkt###
 .SH "SEE ALSO"
-smstest(8), The Service Management System section of the Athena
-Technical Plan
+mrtest(8), The Moira section of the Athena Technical Plan
 .SH DIAGNOSTICS
-The error codes returned are those defined in <sms_et.h>, or
+The error codes returned are those defined in <mr_et.h>, or
 <krb_et.h>.  They may be easily decoded using the com_err library.
 .SH RESTRICTIONS
 COPYRIGHT 1987,1988,1989 Massachusetts Institute of Technology
This page took 0.04545 seconds and 4 git commands to generate.