xref: /freebsd/crypto/krb5/src/util/ss/requests.c (revision 7f2fe78b9dd5f51c821d771b63d2e096f6fd49e9)
1 /* -*- mode: c; c-basic-offset: 4; indent-tabs-mode: nil -*- */
2 /* util/ss/requests.c */
3 /*
4  * Copyright 1987, 1988, 1989 by MIT
5  *
6  * For copyright information, see mit-sipb-copyright.h.
7  */
8 
9 #include <stdio.h>
10 #include "ss_internal.h"
11 
12 #define DECLARE(name)   void name(argc,argv,sci_idx,info_ptr)int argc,sci_idx;const char * const *argv; pointer info_ptr;
13 
14 /*
15  * ss_self_identify -- assigned by default to the "." request
16  */
DECLARE(ss_self_identify)17 DECLARE(ss_self_identify)
18 {
19     ss_data *info = ss_info(sci_idx);
20     printf("%s version %s\n", info->subsystem_name,
21            info->subsystem_version);
22 }
23 
24 /*
25  * ss_subsystem_name -- print name of subsystem
26  */
DECLARE(ss_subsystem_name)27 DECLARE(ss_subsystem_name)
28 {
29     printf("%s\n", ss_info(sci_idx)->subsystem_name);
30 }
31 
32 /*
33  * ss_subsystem_version -- print version of subsystem
34  */
DECLARE(ss_subsystem_version)35 DECLARE(ss_subsystem_version)
36 {
37     printf("%s\n", ss_info(sci_idx)->subsystem_version);
38 }
39 
40 /*
41  * ss_unimplemented -- routine not implemented (should be
42  * set up as (dont_list,dont_summarize))
43  */
DECLARE(ss_unimplemented)44 DECLARE(ss_unimplemented)
45 {
46     ss_perror(sci_idx, SS_ET_UNIMPLEMENTED, "");
47 }
48