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