xref: /onnv-gate/usr/src/cmd/cmd-inet/usr.sbin/kssl/ksslcfg/ksslcfg.h (revision 12644:4f9a0cd40c5f)
1898Skais /*
2898Skais  * CDDL HEADER START
3898Skais  *
4898Skais  * The contents of this file are subject to the terms of the
5*12644SAnders.Persson@Sun.COM  * Common Development and Distribution License (the "License").
6*12644SAnders.Persson@Sun.COM  * You may not use this file except in compliance with the License.
7898Skais  *
8898Skais  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9898Skais  * or http://www.opensolaris.org/os/licensing.
10898Skais  * See the License for the specific language governing permissions
11898Skais  * and limitations under the License.
12898Skais  *
13898Skais  * When distributing Covered Code, include this CDDL HEADER in each
14898Skais  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15898Skais  * If applicable, add the following below this CDDL HEADER, with the
16898Skais  * fields enclosed by brackets "[]" replaced with your own identifying
17898Skais  * information: Portions Copyright [yyyy] [name of copyright owner]
18898Skais  *
19898Skais  * CDDL HEADER END
20898Skais  */
21898Skais /*
22*12644SAnders.Persson@Sun.COM  * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
23898Skais  */
24898Skais 
25898Skais #ifndef _KSSLCFG_H
26898Skais #define	_KSSLCFG_H
27898Skais 
28898Skais /*
29898Skais  * Common routines and variables used by ksslcfg files.
30898Skais  */
31898Skais 
32898Skais #ifdef __cplusplus
33898Skais extern "C" {
34898Skais #endif
35898Skais 
36898Skais #include <sys/types.h>
37898Skais #include <libintl.h>
38898Skais #include <locale.h>
39898Skais 
40898Skais #define	MAX_ADRPORT_LEN	128 /* sufficient for host name/IP address + port */
41898Skais 
42898Skais #define	SUCCESS			0
43898Skais #define	FAILURE			1
44898Skais #define	ERROR_USAGE		2
45898Skais #define	INSTANCE_ANY_EXISTS	3
46898Skais #define	INSTANCE_OTHER_EXISTS	4
47898Skais 
48*12644SAnders.Persson@Sun.COM #define	KSSL_FILTER_SVC_NAME	"svc:/network/socket-filter:kssl"
49*12644SAnders.Persson@Sun.COM 
50898Skais extern const char *SERVICE_NAME;
51898Skais extern boolean_t verbose;
52898Skais 
53898Skais extern char *create_instance_name(const char *arg, char **inaddr_any_name,
54898Skais     boolean_t is_create);
55898Skais int get_portnum(const char *, ushort_t *);
56898Skais extern void KSSL_DEBUG(const char *format, ...);
57898Skais extern int do_create(int argc, char *argv[]);
58898Skais extern int do_delete(int argc, char *argv[]);
59898Skais extern int delete_instance(const char *instance_name);
60898Skais extern void usage_create(boolean_t do_print);
61898Skais extern void usage_delete(boolean_t do_print);
62898Skais 
63898Skais #ifdef __cplusplus
64898Skais }
65898Skais #endif
66898Skais 
67898Skais #endif /* _KSSLCFG_H */
68