1*7c478bd9Sstevel@tonic-gate /* 2*7c478bd9Sstevel@tonic-gate * CDDL HEADER START 3*7c478bd9Sstevel@tonic-gate * 4*7c478bd9Sstevel@tonic-gate * The contents of this file are subject to the terms of the 5*7c478bd9Sstevel@tonic-gate * Common Development and Distribution License, Version 1.0 only 6*7c478bd9Sstevel@tonic-gate * (the "License"). You may not use this file except in compliance 7*7c478bd9Sstevel@tonic-gate * with the License. 8*7c478bd9Sstevel@tonic-gate * 9*7c478bd9Sstevel@tonic-gate * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 10*7c478bd9Sstevel@tonic-gate * or http://www.opensolaris.org/os/licensing. 11*7c478bd9Sstevel@tonic-gate * See the License for the specific language governing permissions 12*7c478bd9Sstevel@tonic-gate * and limitations under the License. 13*7c478bd9Sstevel@tonic-gate * 14*7c478bd9Sstevel@tonic-gate * When distributing Covered Code, include this CDDL HEADER in each 15*7c478bd9Sstevel@tonic-gate * file and include the License file at usr/src/OPENSOLARIS.LICENSE. 16*7c478bd9Sstevel@tonic-gate * If applicable, add the following below this CDDL HEADER, with the 17*7c478bd9Sstevel@tonic-gate * fields enclosed by brackets "[]" replaced with your own identifying 18*7c478bd9Sstevel@tonic-gate * information: Portions Copyright [yyyy] [name of copyright owner] 19*7c478bd9Sstevel@tonic-gate * 20*7c478bd9Sstevel@tonic-gate * CDDL HEADER END 21*7c478bd9Sstevel@tonic-gate */ 22*7c478bd9Sstevel@tonic-gate /* 23*7c478bd9Sstevel@tonic-gate * Copyright 2004 Sun Microsystems, Inc. All rights reserved. 24*7c478bd9Sstevel@tonic-gate * Use is subject to license terms. 25*7c478bd9Sstevel@tonic-gate */ 26*7c478bd9Sstevel@tonic-gate 27*7c478bd9Sstevel@tonic-gate #ifndef _INETSVC_H 28*7c478bd9Sstevel@tonic-gate #define _INETSVC_H 29*7c478bd9Sstevel@tonic-gate 30*7c478bd9Sstevel@tonic-gate #pragma ident "%Z%%M% %I% %E% SMI" 31*7c478bd9Sstevel@tonic-gate 32*7c478bd9Sstevel@tonic-gate #include <libscf.h> 33*7c478bd9Sstevel@tonic-gate #include <sys/socket.h> 34*7c478bd9Sstevel@tonic-gate #include <libuutil.h> 35*7c478bd9Sstevel@tonic-gate #include <rpc/rpc.h> 36*7c478bd9Sstevel@tonic-gate 37*7c478bd9Sstevel@tonic-gate /* 38*7c478bd9Sstevel@tonic-gate * Interfaces shared by usr.lib/inetd and its administrative commands. 39*7c478bd9Sstevel@tonic-gate */ 40*7c478bd9Sstevel@tonic-gate 41*7c478bd9Sstevel@tonic-gate #ifdef __cplusplus 42*7c478bd9Sstevel@tonic-gate extern "C" { 43*7c478bd9Sstevel@tonic-gate #endif 44*7c478bd9Sstevel@tonic-gate 45*7c478bd9Sstevel@tonic-gate #define PROTO_DELIMITERS " ," 46*7c478bd9Sstevel@tonic-gate 47*7c478bd9Sstevel@tonic-gate #define INETD_UDS_PATH "/var/run/.inetd.uds" 48*7c478bd9Sstevel@tonic-gate #define INETD_INSTANCE_FMRI "svc:/network/inetd:default" 49*7c478bd9Sstevel@tonic-gate 50*7c478bd9Sstevel@tonic-gate #define PG_NAME_SERVICE_CONFIG "inetd" 51*7c478bd9Sstevel@tonic-gate #define PG_NAME_SERVICE_DEFAULTS "defaults" 52*7c478bd9Sstevel@tonic-gate #define PG_NAME_INETCONV "inetconv" 53*7c478bd9Sstevel@tonic-gate 54*7c478bd9Sstevel@tonic-gate #define PR_SVC_NAME_NAME "name" 55*7c478bd9Sstevel@tonic-gate #define PR_SOCK_TYPE_NAME "endpoint_type" 56*7c478bd9Sstevel@tonic-gate #define PR_PROTO_NAME "proto" 57*7c478bd9Sstevel@tonic-gate #define PR_ISRPC_NAME "isrpc" 58*7c478bd9Sstevel@tonic-gate #define PR_RPC_LW_VER_NAME "rpc_low_version" 59*7c478bd9Sstevel@tonic-gate #define PR_RPC_HI_VER_NAME "rpc_high_version" 60*7c478bd9Sstevel@tonic-gate #define PR_ISWAIT_NAME "wait" 61*7c478bd9Sstevel@tonic-gate #define PR_CON_RATE_MAX_NAME "max_con_rate" 62*7c478bd9Sstevel@tonic-gate #define PR_CON_RATE_OFFLINE_NAME "con_rate_offline" 63*7c478bd9Sstevel@tonic-gate #define PR_BIND_ADDR_NAME "bind_addr" 64*7c478bd9Sstevel@tonic-gate #define PR_BIND_FAIL_MAX_NAME "bind_fail_max" 65*7c478bd9Sstevel@tonic-gate #define PR_BIND_FAIL_INTVL_NAME "bind_fail_interval" 66*7c478bd9Sstevel@tonic-gate #define PR_MAX_COPIES_NAME "max_copies" 67*7c478bd9Sstevel@tonic-gate #define PR_MAX_FAIL_RATE_CNT_NAME "failrate_cnt" 68*7c478bd9Sstevel@tonic-gate #define PR_MAX_FAIL_RATE_INTVL_NAME "failrate_interval" 69*7c478bd9Sstevel@tonic-gate #define PR_INHERIT_ENV_NAME "inherit_env" 70*7c478bd9Sstevel@tonic-gate #define PR_DO_TCP_WRAPPERS_NAME "tcp_wrappers" 71*7c478bd9Sstevel@tonic-gate #define PR_DO_TCP_TRACE_NAME "tcp_trace" 72*7c478bd9Sstevel@tonic-gate #define PR_AUTO_CONVERTED_NAME "converted" 73*7c478bd9Sstevel@tonic-gate #define PR_VERSION_NAME "version" 74*7c478bd9Sstevel@tonic-gate #define PR_SOURCE_LINE_NAME "source_line" 75*7c478bd9Sstevel@tonic-gate 76*7c478bd9Sstevel@tonic-gate /* 77*7c478bd9Sstevel@tonic-gate * Provide index values for inetd property locations in the property table, for 78*7c478bd9Sstevel@tonic-gate * convenience. If the array is modified, these values MUST be updated. 79*7c478bd9Sstevel@tonic-gate */ 80*7c478bd9Sstevel@tonic-gate #define PT_SVC_NAME_INDEX 0 81*7c478bd9Sstevel@tonic-gate #define PT_SOCK_TYPE_INDEX 1 82*7c478bd9Sstevel@tonic-gate #define PT_PROTO_INDEX 2 83*7c478bd9Sstevel@tonic-gate #define PT_ISRPC_INDEX 3 84*7c478bd9Sstevel@tonic-gate #define PT_RPC_LW_VER_INDEX 4 85*7c478bd9Sstevel@tonic-gate #define PT_RPC_HI_VER_INDEX 5 86*7c478bd9Sstevel@tonic-gate #define PT_ISWAIT_INDEX 6 87*7c478bd9Sstevel@tonic-gate #define PT_EXEC_INDEX 7 88*7c478bd9Sstevel@tonic-gate #define PT_ARG0_INDEX 8 89*7c478bd9Sstevel@tonic-gate #define PT_USER_INDEX 9 90*7c478bd9Sstevel@tonic-gate #define PT_BIND_ADDR_INDEX 10 91*7c478bd9Sstevel@tonic-gate #define PT_BIND_FAIL_MAX_INDEX 11 92*7c478bd9Sstevel@tonic-gate #define PT_BIND_FAIL_INTVL_INDEX 12 93*7c478bd9Sstevel@tonic-gate #define PT_CON_RATE_MAX_INDEX 13 94*7c478bd9Sstevel@tonic-gate #define PT_MAX_COPIES_INDEX 14 95*7c478bd9Sstevel@tonic-gate #define PT_CON_RATE_OFFLINE_INDEX 15 96*7c478bd9Sstevel@tonic-gate #define PT_MAX_FAIL_RATE_CNT_INDEX 16 97*7c478bd9Sstevel@tonic-gate #define PT_MAX_FAIL_RATE_INTVL_INDEX 17 98*7c478bd9Sstevel@tonic-gate #define PT_INHERIT_ENV_INDEX 18 99*7c478bd9Sstevel@tonic-gate #define PT_DO_TCP_TRACE_INDEX 19 100*7c478bd9Sstevel@tonic-gate #define PT_DO_TCP_WRAPPERS_INDEX 20 101*7c478bd9Sstevel@tonic-gate 102*7c478bd9Sstevel@tonic-gate /* 103*7c478bd9Sstevel@tonic-gate * Names of method properties. 104*7c478bd9Sstevel@tonic-gate */ 105*7c478bd9Sstevel@tonic-gate #define PR_EXEC_NAME "exec" 106*7c478bd9Sstevel@tonic-gate #define PR_ARG0_NAME "arg0" 107*7c478bd9Sstevel@tonic-gate #define PR_USER_NAME "user" 108*7c478bd9Sstevel@tonic-gate 109*7c478bd9Sstevel@tonic-gate /* 110*7c478bd9Sstevel@tonic-gate * Method property group names. 111*7c478bd9Sstevel@tonic-gate */ 112*7c478bd9Sstevel@tonic-gate #define START_METHOD_NAME "inetd_start" 113*7c478bd9Sstevel@tonic-gate #define OFFLINE_METHOD_NAME "inetd_offline" 114*7c478bd9Sstevel@tonic-gate #define ONLINE_METHOD_NAME "inetd_online" 115*7c478bd9Sstevel@tonic-gate #define DISABLE_METHOD_NAME "inetd_disable" 116*7c478bd9Sstevel@tonic-gate #define REFRESH_METHOD_NAME "inetd_refresh" 117*7c478bd9Sstevel@tonic-gate 118*7c478bd9Sstevel@tonic-gate /* 119*7c478bd9Sstevel@tonic-gate * Valid socket type values. 120*7c478bd9Sstevel@tonic-gate */ 121*7c478bd9Sstevel@tonic-gate #define SOCKTYPE_STREAM_STR "stream" 122*7c478bd9Sstevel@tonic-gate #define SOCKTYPE_DGRAM_STR "dgram" 123*7c478bd9Sstevel@tonic-gate #define SOCKTYPE_RAW_STR "raw" 124*7c478bd9Sstevel@tonic-gate #define SOCKTYPE_SEQPKT_STR "seqpacket" 125*7c478bd9Sstevel@tonic-gate #define SOCKTYPE_TLI_STR "tli" 126*7c478bd9Sstevel@tonic-gate #define SOCKTYPE_XTI_STR "xti" 127*7c478bd9Sstevel@tonic-gate 128*7c478bd9Sstevel@tonic-gate /* 129*7c478bd9Sstevel@tonic-gate * Valid socket based service protocols. 130*7c478bd9Sstevel@tonic-gate */ 131*7c478bd9Sstevel@tonic-gate #define SOCKET_PROTO_SCTP6 "sctp6" 132*7c478bd9Sstevel@tonic-gate #define SOCKET_PROTO_SCTP6_ONLY "sctp6only" 133*7c478bd9Sstevel@tonic-gate #define SOCKET_PROTO_SCTP "sctp" 134*7c478bd9Sstevel@tonic-gate #define SOCKET_PROTO_TCP6 "tcp6" 135*7c478bd9Sstevel@tonic-gate #define SOCKET_PROTO_TCP6_ONLY "tcp6only" 136*7c478bd9Sstevel@tonic-gate #define SOCKET_PROTO_TCP "tcp" 137*7c478bd9Sstevel@tonic-gate #define SOCKET_PROTO_UDP6 "udp6" 138*7c478bd9Sstevel@tonic-gate #define SOCKET_PROTO_UDP6_ONLY "udp6only" 139*7c478bd9Sstevel@tonic-gate #define SOCKET_PROTO_UDP "udp" 140*7c478bd9Sstevel@tonic-gate 141*7c478bd9Sstevel@tonic-gate /* 142*7c478bd9Sstevel@tonic-gate * Return codes for the methods of inetd managed services. 143*7c478bd9Sstevel@tonic-gate */ 144*7c478bd9Sstevel@tonic-gate #define IMRET_SUCCESS 0 145*7c478bd9Sstevel@tonic-gate /* 146*7c478bd9Sstevel@tonic-gate * Set this value above the range used by unix commands so theres minimal chance 147*7c478bd9Sstevel@tonic-gate * of a non-GL cognizant command accidentally returning this code. 148*7c478bd9Sstevel@tonic-gate */ 149*7c478bd9Sstevel@tonic-gate #define IMRET_FAILURE 100 150*7c478bd9Sstevel@tonic-gate 151*7c478bd9Sstevel@tonic-gate /* 152*7c478bd9Sstevel@tonic-gate * Macros for differentiating between sockaddr_in & sockaddr_in6 when 153*7c478bd9Sstevel@tonic-gate * dealing with the contents of a sockaddr_storage structure. 154*7c478bd9Sstevel@tonic-gate * These differentiate based on the contents of ss_family (either AF_INET 155*7c478bd9Sstevel@tonic-gate * or AF_INET6). 156*7c478bd9Sstevel@tonic-gate */ 157*7c478bd9Sstevel@tonic-gate #define SS_ADDRLEN(s) ((s).ss_family == AF_INET ? \ 158*7c478bd9Sstevel@tonic-gate sizeof (struct sockaddr_in) : sizeof (struct sockaddr_in6)) 159*7c478bd9Sstevel@tonic-gate #define SS_PORT(s) ((s).ss_family == AF_INET ? \ 160*7c478bd9Sstevel@tonic-gate ((struct sockaddr_in *)&(s))->sin_port : \ 161*7c478bd9Sstevel@tonic-gate ((struct sockaddr_in6 *)&(s))->sin6_port) 162*7c478bd9Sstevel@tonic-gate #define SS_SETPORT(s, port) ((s).ss_family == AF_INET ? \ 163*7c478bd9Sstevel@tonic-gate (((struct sockaddr_in *)&(s))->sin_port = port) : \ 164*7c478bd9Sstevel@tonic-gate (((struct sockaddr_in6 *)&(s))->sin6_port = port)) 165*7c478bd9Sstevel@tonic-gate #define SS_SINADDR(s) ((s).ss_family == AF_INET ? \ 166*7c478bd9Sstevel@tonic-gate ((void *) &(((struct sockaddr_in *)&(s))->sin_addr)) : \ 167*7c478bd9Sstevel@tonic-gate ((void *) &(((struct sockaddr_in6 *)&(s))->sin6_addr))) 168*7c478bd9Sstevel@tonic-gate 169*7c478bd9Sstevel@tonic-gate /* Collection of information pertaining to rpc based services. */ 170*7c478bd9Sstevel@tonic-gate typedef struct { 171*7c478bd9Sstevel@tonic-gate struct netbuf netbuf; 172*7c478bd9Sstevel@tonic-gate int prognum; 173*7c478bd9Sstevel@tonic-gate int lowver; 174*7c478bd9Sstevel@tonic-gate int highver; 175*7c478bd9Sstevel@tonic-gate char *netid; 176*7c478bd9Sstevel@tonic-gate boolean_t is_loopback; 177*7c478bd9Sstevel@tonic-gate } rpc_info_t; 178*7c478bd9Sstevel@tonic-gate 179*7c478bd9Sstevel@tonic-gate /* 180*7c478bd9Sstevel@tonic-gate * Structure containing the common elements of both the socket_info_t and the 181*7c478bd9Sstevel@tonic-gate * tlx_info_t structures. 182*7c478bd9Sstevel@tonic-gate */ 183*7c478bd9Sstevel@tonic-gate typedef struct { 184*7c478bd9Sstevel@tonic-gate /* proto string causing this entry */ 185*7c478bd9Sstevel@tonic-gate char *proto; 186*7c478bd9Sstevel@tonic-gate 187*7c478bd9Sstevel@tonic-gate /* network fd we're listening on; -1 if not listening */ 188*7c478bd9Sstevel@tonic-gate int listen_fd; 189*7c478bd9Sstevel@tonic-gate 190*7c478bd9Sstevel@tonic-gate /* associate RPC info structure, if any (NULL if none). */ 191*7c478bd9Sstevel@tonic-gate rpc_info_t *ri; 192*7c478bd9Sstevel@tonic-gate 193*7c478bd9Sstevel@tonic-gate uu_list_node_t link; 194*7c478bd9Sstevel@tonic-gate 195*7c478bd9Sstevel@tonic-gate /* should this fd have the v6 socket option set? */ 196*7c478bd9Sstevel@tonic-gate boolean_t v6only; 197*7c478bd9Sstevel@tonic-gate } proto_info_t; 198*7c478bd9Sstevel@tonic-gate 199*7c478bd9Sstevel@tonic-gate 200*7c478bd9Sstevel@tonic-gate /* TLI/XTI connection indication list construct. */ 201*7c478bd9Sstevel@tonic-gate typedef struct { 202*7c478bd9Sstevel@tonic-gate struct t_call *call; 203*7c478bd9Sstevel@tonic-gate uu_list_node_t link; 204*7c478bd9Sstevel@tonic-gate } tlx_conn_ind_t; 205*7c478bd9Sstevel@tonic-gate 206*7c478bd9Sstevel@tonic-gate /* Collection of information pertaining to tli/xti based services. */ 207*7c478bd9Sstevel@tonic-gate typedef struct { 208*7c478bd9Sstevel@tonic-gate /* protocol information common to tlx and socket based services */ 209*7c478bd9Sstevel@tonic-gate proto_info_t pr_info; 210*7c478bd9Sstevel@tonic-gate 211*7c478bd9Sstevel@tonic-gate /* address we're bound to */ 212*7c478bd9Sstevel@tonic-gate struct netbuf local_addr; 213*7c478bd9Sstevel@tonic-gate 214*7c478bd9Sstevel@tonic-gate /* device name supplied to t_open() */ 215*7c478bd9Sstevel@tonic-gate char *dev_name; 216*7c478bd9Sstevel@tonic-gate 217*7c478bd9Sstevel@tonic-gate /* queue of pending connection indications */ 218*7c478bd9Sstevel@tonic-gate uu_list_t *conn_ind_queue; 219*7c478bd9Sstevel@tonic-gate } tlx_info_t; 220*7c478bd9Sstevel@tonic-gate 221*7c478bd9Sstevel@tonic-gate /* Collection of information pertaining to socket based services. */ 222*7c478bd9Sstevel@tonic-gate typedef struct { 223*7c478bd9Sstevel@tonic-gate /* protocol information common to tlx and socket based services */ 224*7c478bd9Sstevel@tonic-gate proto_info_t pr_info; 225*7c478bd9Sstevel@tonic-gate 226*7c478bd9Sstevel@tonic-gate /* address we're bound to */ 227*7c478bd9Sstevel@tonic-gate struct sockaddr_storage local_addr; 228*7c478bd9Sstevel@tonic-gate 229*7c478bd9Sstevel@tonic-gate /* SOCK_STREAM/SOCK_DGRAM/SOCK_RAW/SOCK_SEQPACKET */ 230*7c478bd9Sstevel@tonic-gate int type; 231*7c478bd9Sstevel@tonic-gate 232*7c478bd9Sstevel@tonic-gate int protocol; 233*7c478bd9Sstevel@tonic-gate } socket_info_t; 234*7c478bd9Sstevel@tonic-gate 235*7c478bd9Sstevel@tonic-gate /* Basic configuration properties for an instance. */ 236*7c478bd9Sstevel@tonic-gate typedef struct { 237*7c478bd9Sstevel@tonic-gate /* getservbyname() recognized service name */ 238*7c478bd9Sstevel@tonic-gate char *svc_name; 239*7c478bd9Sstevel@tonic-gate 240*7c478bd9Sstevel@tonic-gate /* TLI/XTI type service ? */ 241*7c478bd9Sstevel@tonic-gate boolean_t istlx; 242*7c478bd9Sstevel@tonic-gate 243*7c478bd9Sstevel@tonic-gate /* list of protocols and associated info */ 244*7c478bd9Sstevel@tonic-gate uu_list_t *proto_list; 245*7c478bd9Sstevel@tonic-gate 246*7c478bd9Sstevel@tonic-gate /* wait type service ? */ 247*7c478bd9Sstevel@tonic-gate boolean_t iswait; 248*7c478bd9Sstevel@tonic-gate 249*7c478bd9Sstevel@tonic-gate /* 250*7c478bd9Sstevel@tonic-gate * Properties from here onwards all have default values in the inetd 251*7c478bd9Sstevel@tonic-gate * service instance. 252*7c478bd9Sstevel@tonic-gate */ 253*7c478bd9Sstevel@tonic-gate 254*7c478bd9Sstevel@tonic-gate boolean_t do_tcp_wrappers; 255*7c478bd9Sstevel@tonic-gate boolean_t do_tcp_trace; 256*7c478bd9Sstevel@tonic-gate 257*7c478bd9Sstevel@tonic-gate /* inherit inetd's environment, or take an empty one */ 258*7c478bd9Sstevel@tonic-gate boolean_t inherit_env; 259*7c478bd9Sstevel@tonic-gate 260*7c478bd9Sstevel@tonic-gate /* failure rate configuration */ 261*7c478bd9Sstevel@tonic-gate int64_t wait_fail_cnt; 262*7c478bd9Sstevel@tonic-gate int wait_fail_interval; 263*7c478bd9Sstevel@tonic-gate 264*7c478bd9Sstevel@tonic-gate /* maximum concurrent copies limit */ 265*7c478bd9Sstevel@tonic-gate int64_t max_copies; 266*7c478bd9Sstevel@tonic-gate 267*7c478bd9Sstevel@tonic-gate /* connection rate configuration */ 268*7c478bd9Sstevel@tonic-gate int conn_rate_offline; 269*7c478bd9Sstevel@tonic-gate int64_t conn_rate_max; 270*7c478bd9Sstevel@tonic-gate 271*7c478bd9Sstevel@tonic-gate /* bind failure retries configuration */ 272*7c478bd9Sstevel@tonic-gate int bind_fail_interval; 273*7c478bd9Sstevel@tonic-gate int64_t bind_fail_max; 274*7c478bd9Sstevel@tonic-gate 275*7c478bd9Sstevel@tonic-gate /* specific address to bind instance to */ 276*7c478bd9Sstevel@tonic-gate char *bind_addr; 277*7c478bd9Sstevel@tonic-gate } basic_cfg_t; 278*7c478bd9Sstevel@tonic-gate 279*7c478bd9Sstevel@tonic-gate typedef enum uds_request { 280*7c478bd9Sstevel@tonic-gate UR_REFRESH_INETD, 281*7c478bd9Sstevel@tonic-gate UR_STOP_INETD 282*7c478bd9Sstevel@tonic-gate } uds_request_t; 283*7c478bd9Sstevel@tonic-gate 284*7c478bd9Sstevel@tonic-gate typedef union { 285*7c478bd9Sstevel@tonic-gate int64_t iv_int; 286*7c478bd9Sstevel@tonic-gate uint64_t iv_cnt; 287*7c478bd9Sstevel@tonic-gate boolean_t iv_boolean; 288*7c478bd9Sstevel@tonic-gate char *iv_astring; 289*7c478bd9Sstevel@tonic-gate char **iv_proto_list; 290*7c478bd9Sstevel@tonic-gate } inetd_value_t; 291*7c478bd9Sstevel@tonic-gate 292*7c478bd9Sstevel@tonic-gate typedef enum { 293*7c478bd9Sstevel@tonic-gate IVE_VALID, 294*7c478bd9Sstevel@tonic-gate IVE_UNSET, 295*7c478bd9Sstevel@tonic-gate IVE_INVALID 296*7c478bd9Sstevel@tonic-gate } iv_error_t; 297*7c478bd9Sstevel@tonic-gate 298*7c478bd9Sstevel@tonic-gate typedef struct { 299*7c478bd9Sstevel@tonic-gate char *ip_name; 300*7c478bd9Sstevel@tonic-gate char *ip_pg; 301*7c478bd9Sstevel@tonic-gate scf_type_t ip_type; 302*7c478bd9Sstevel@tonic-gate boolean_t ip_default; 303*7c478bd9Sstevel@tonic-gate iv_error_t ip_error; 304*7c478bd9Sstevel@tonic-gate inetd_value_t ip_value; 305*7c478bd9Sstevel@tonic-gate boolean_t from_inetd; 306*7c478bd9Sstevel@tonic-gate } inetd_prop_t; 307*7c478bd9Sstevel@tonic-gate 308*7c478bd9Sstevel@tonic-gate inetd_prop_t *get_prop_table(size_t *); 309*7c478bd9Sstevel@tonic-gate void *get_prop_value(const inetd_prop_t *, char *); 310*7c478bd9Sstevel@tonic-gate int put_prop_value(inetd_prop_t *, char *, void *); 311*7c478bd9Sstevel@tonic-gate boolean_t valid_props(inetd_prop_t *, const char *fmri, basic_cfg_t **, 312*7c478bd9Sstevel@tonic-gate uu_list_pool_t *, uu_list_pool_t *); 313*7c478bd9Sstevel@tonic-gate void destroy_basic_cfg(basic_cfg_t *); 314*7c478bd9Sstevel@tonic-gate void destroy_proto_list(basic_cfg_t *); 315*7c478bd9Sstevel@tonic-gate boolean_t valid_default_prop(char *, void *); 316*7c478bd9Sstevel@tonic-gate scf_error_t read_prop(scf_handle_t *, inetd_prop_t *, int, const char *, 317*7c478bd9Sstevel@tonic-gate const char *); 318*7c478bd9Sstevel@tonic-gate inetd_prop_t *read_instance_props(scf_handle_t *, const char *, size_t *, 319*7c478bd9Sstevel@tonic-gate scf_error_t *); 320*7c478bd9Sstevel@tonic-gate inetd_prop_t *read_default_props(scf_handle_t *, size_t *, scf_error_t *); 321*7c478bd9Sstevel@tonic-gate void free_instance_props(inetd_prop_t *); 322*7c478bd9Sstevel@tonic-gate int connect_to_inetd(void); 323*7c478bd9Sstevel@tonic-gate int refresh_inetd(void); 324*7c478bd9Sstevel@tonic-gate int get_sock_type_id(const char *); 325*7c478bd9Sstevel@tonic-gate int get_rpc_prognum(const char *); 326*7c478bd9Sstevel@tonic-gate int calculate_hash(const char *, char **); 327*7c478bd9Sstevel@tonic-gate scf_error_t retrieve_inetd_hash(char **); 328*7c478bd9Sstevel@tonic-gate scf_error_t store_inetd_hash(const char *); 329*7c478bd9Sstevel@tonic-gate const char *inet_ntop_native(int, const void *, char *, size_t); 330*7c478bd9Sstevel@tonic-gate void setproctitle(const char *, int, char **); 331*7c478bd9Sstevel@tonic-gate void dg_template( 332*7c478bd9Sstevel@tonic-gate void (*)(int, const struct sockaddr *, int, const void *, size_t), int, 333*7c478bd9Sstevel@tonic-gate void *, size_t); 334*7c478bd9Sstevel@tonic-gate int safe_write(int, const void *, size_t); 335*7c478bd9Sstevel@tonic-gate int safe_sendto(int, const void *, size_t, int, const struct sockaddr *, int); 336*7c478bd9Sstevel@tonic-gate char **get_protos(const char *); 337*7c478bd9Sstevel@tonic-gate char **get_netids(char *); 338*7c478bd9Sstevel@tonic-gate void destroy_strings(char **); 339*7c478bd9Sstevel@tonic-gate 340*7c478bd9Sstevel@tonic-gate #ifdef __cplusplus 341*7c478bd9Sstevel@tonic-gate } 342*7c478bd9Sstevel@tonic-gate #endif 343*7c478bd9Sstevel@tonic-gate 344*7c478bd9Sstevel@tonic-gate #endif /* _INETSVC_H */ 345