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