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