xref: /illumos-gate/usr/src/lib/krb5/ss/requests.c (revision 1da57d55)
1 /*
2  * Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
3  * Use is subject to license terms.
4  */
5 
6 /*
7  * Various minor routines...
8  *
9  * Copyright 1987, 1988, 1989 by MIT
10  *
11  * For copyright information, see mit-sipb-copyright.h.
12  */
13 
14 #include <stdio.h>
15 #include "ss_internal.h"
16 #include <libintl.h>
17 
18 #define	DECLARE(name)	void name(argc,argv,sci_idx,info_ptr)int argc,sci_idx;const char * const *argv; pointer info_ptr;
19 
20 /*
21  * ss_self_identify -- assigned by default to the "." request
22  */
DECLARE(ss_self_identify)23 DECLARE(ss_self_identify)
24 {
25      register ss_data *info = ss_info(sci_idx);
26      printf((char *)dgettext(TEXT_DOMAIN,
27 	    "%s version %s\n"), info->subsystem_name,
28 	    info->subsystem_version);
29 }
30 
31 /*
32  * ss_subsystem_name -- print name of subsystem
33  */
DECLARE(ss_subsystem_name)34 DECLARE(ss_subsystem_name)
35 {
36      printf("%s\n", ss_info(sci_idx)->subsystem_name);
37 }
38 
39 /*
40  * ss_subsystem_version -- print version of subsystem
41  */
DECLARE(ss_subsystem_version)42 DECLARE(ss_subsystem_version)
43 {
44      printf("%s\n", ss_info(sci_idx)->subsystem_version);
45 }
46 
47 /*
48  * ss_unimplemented -- routine not implemented (should be
49  * set up as (dont_list,dont_summarize))
50  */
DECLARE(ss_unimplemented)51 DECLARE(ss_unimplemented)
52 {
53      ss_perror(sci_idx, SS_ET_UNIMPLEMENTED, "");
54 }
55