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