xref: /titanic_44/usr/src/cmd/cmd-inet/usr.sbin/kssl/ksslcfg/ksslcfg.h (revision db8b037b5616a366b7dfdc01ef9552f02f9adfdd)
1 /*
2  * CDDL HEADER START
3  *
4  * The contents of this file are subject to the terms of the
5  * Common Development and Distribution License (the "License").
6  * You may not use this file except in compliance with the License.
7  *
8  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9  * or http://www.opensolaris.org/os/licensing.
10  * See the License for the specific language governing permissions
11  * and limitations under the License.
12  *
13  * When distributing Covered Code, include this CDDL HEADER in each
14  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15  * If applicable, add the following below this CDDL HEADER, with the
16  * fields enclosed by brackets "[]" replaced with your own identifying
17  * information: Portions Copyright [yyyy] [name of copyright owner]
18  *
19  * CDDL HEADER END
20  */
21 /*
22  * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
23  */
24 
25 #ifndef _KSSLCFG_H
26 #define	_KSSLCFG_H
27 
28 /*
29  * Common routines and variables used by ksslcfg files.
30  */
31 
32 #ifdef __cplusplus
33 extern "C" {
34 #endif
35 
36 #include <sys/types.h>
37 #include <libintl.h>
38 #include <locale.h>
39 
40 #define	MAX_ADRPORT_LEN	128 /* sufficient for host name/IP address + port */
41 
42 #define	SUCCESS			0
43 #define	FAILURE			1
44 #define	ERROR_USAGE		2
45 #define	INSTANCE_ANY_EXISTS	3
46 #define	INSTANCE_OTHER_EXISTS	4
47 
48 #define	KSSL_FILTER_SVC_NAME	"svc:/network/socket-filter:kssl"
49 
50 extern const char *SERVICE_NAME;
51 extern boolean_t verbose;
52 
53 extern char *create_instance_name(const char *arg, char **inaddr_any_name,
54     boolean_t is_create);
55 int get_portnum(const char *, ushort_t *);
56 extern void KSSL_DEBUG(const char *format, ...);
57 extern int do_create(int argc, char *argv[]);
58 extern int do_delete(int argc, char *argv[]);
59 extern int delete_instance(const char *instance_name);
60 extern void usage_create(boolean_t do_print);
61 extern void usage_delete(boolean_t do_print);
62 
63 #ifdef __cplusplus
64 }
65 #endif
66 
67 #endif /* _KSSLCFG_H */
68