xref: /illumos-gate/usr/src/lib/krb5/ss/ss.h (revision 7c478bd9)
1 /*
2  * Copyright 2003 Sun Microsystems, Inc.  All rights reserved.
3  * Use is subject to license terms.
4  */
5 
6 #pragma ident	"%Z%%M%	%I%	%E% SMI"
7 /*
8  * Copyright 1987, 1988 by MIT Student Information Processing Board
9  *
10  * For copyright information, see mit-sipb-copyright.h.
11  */
12 
13 #ifndef _ss_h
14 #define _ss_h __FILE__
15 
16 #include <ss/mit-sipb-copyright.h>
17 #include <ss/ss_err.h>
18 #include <errno.h>
19 
20 #ifdef __STDC__
21 #define __SS_CONST const
22 #define __SS_PROTO (int, const char * const *, int, void *)
23 #else
24 #define __SS_CONST
25 #define __SS_PROTO ()
26 #endif
27 
28 typedef struct _ss_request_entry {
29     __SS_CONST char * __SS_CONST *command_names; /* whatever */
30     void (* __SS_CONST function) __SS_PROTO; /* foo */
31     char *info_string;		/* Already L10ed cmd message */
32     int flags;			/* 0 */
33 } ss_request_entry;
34 
35 typedef __SS_CONST struct _ss_request_table {
36     int version;
37     ss_request_entry *requests;
38 } ss_request_table;
39 
40 #define SS_RQT_TBL_V2	2
41 
42 typedef struct _ss_rp_options {	/* DEFAULT VALUES */
43     int version;		/* SS_RP_V1 */
44     void (*unknown) __SS_PROTO;	/* call for unknown command */
45     int allow_suspend;
46     int catch_int;
47 } ss_rp_options;
48 
49 #define SS_RP_V1 1
50 
51 #define SS_OPT_DONT_LIST	0x0001
52 #define SS_OPT_DONT_SUMMARIZE	0x0002
53 
54 void ss_help __SS_PROTO;
55 char *ss_current_request();
56 char *ss_name();
57 #ifdef __STDC__
58 void ss_error (int, long, char const *, ...);
59 void ss_perror (int, long, char const *);
60 #else
61 void ss_error ();
62 void ss_perror ();
63 #endif
64 void ss_abort_subsystem();
65 extern ss_request_table ss_std_requests;
66 
67 /* toggles the display of debugging messages */
68 void debugDisplaySS(int onOff);
69 
70 #endif /* _ss_h */
71