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