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