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 /* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */ 23*7c478bd9Sstevel@tonic-gate /* All Rights Reserved */ 24*7c478bd9Sstevel@tonic-gate 25*7c478bd9Sstevel@tonic-gate 26*7c478bd9Sstevel@tonic-gate #ident "%Z%%M% %I% %E% SMI" /* SVr4.0 1.3.4.1 */ 27*7c478bd9Sstevel@tonic-gate 28*7c478bd9Sstevel@tonic-gate /* 29*7c478bd9Sstevel@tonic-gate * lsdbf.h: listener data base file defines and structs 30*7c478bd9Sstevel@tonic-gate */ 31*7c478bd9Sstevel@tonic-gate 32*7c478bd9Sstevel@tonic-gate #define DBFCOMMENT '#' /* end of line comment char */ 33*7c478bd9Sstevel@tonic-gate #define DBFWHITESP " \t" /* space, tab: white space */ 34*7c478bd9Sstevel@tonic-gate #define DBFTOKENS " \t:" /* space, tab, cmnt token seps */ 35*7c478bd9Sstevel@tonic-gate #define DBFTOKSEP ':' /* seps in _pmtab file */ 36*7c478bd9Sstevel@tonic-gate 37*7c478bd9Sstevel@tonic-gate /* 38*7c478bd9Sstevel@tonic-gate * defines for flag characters -- used in the dfb_flags field 39*7c478bd9Sstevel@tonic-gate * these are the flags defined by SAF 40*7c478bd9Sstevel@tonic-gate */ 41*7c478bd9Sstevel@tonic-gate 42*7c478bd9Sstevel@tonic-gate #define DBF_UTMP 0x01 /* create a utmp entry for service */ 43*7c478bd9Sstevel@tonic-gate #define DBF_OFF 0x02 /* service is turned off */ 44*7c478bd9Sstevel@tonic-gate #define DBF_UNKNOWN 0x80 /* indicates unkown flag character */ 45*7c478bd9Sstevel@tonic-gate 46*7c478bd9Sstevel@tonic-gate /* 47*7c478bd9Sstevel@tonic-gate * arguments to read_dbf 48*7c478bd9Sstevel@tonic-gate */ 49*7c478bd9Sstevel@tonic-gate 50*7c478bd9Sstevel@tonic-gate #define DB_INIT 0 51*7c478bd9Sstevel@tonic-gate #define DB_REREAD 1 52*7c478bd9Sstevel@tonic-gate 53*7c478bd9Sstevel@tonic-gate /* 54*7c478bd9Sstevel@tonic-gate * service code parameters 55*7c478bd9Sstevel@tonic-gate */ 56*7c478bd9Sstevel@tonic-gate 57*7c478bd9Sstevel@tonic-gate #define DBF_INT_CODE "1" /* intermediary proc svc code */ 58*7c478bd9Sstevel@tonic-gate #define DBF_SMB_CODE "2" /* MS-NET server proc svc code */ 59*7c478bd9Sstevel@tonic-gate 60*7c478bd9Sstevel@tonic-gate #define PRV_ADR_SZ 64 /* size of a private address entry */ 61*7c478bd9Sstevel@tonic-gate 62*7c478bd9Sstevel@tonic-gate /* 63*7c478bd9Sstevel@tonic-gate * current database version 64*7c478bd9Sstevel@tonic-gate */ 65*7c478bd9Sstevel@tonic-gate 66*7c478bd9Sstevel@tonic-gate #define VERSION 4 67*7c478bd9Sstevel@tonic-gate 68*7c478bd9Sstevel@tonic-gate 69*7c478bd9Sstevel@tonic-gate /* 70*7c478bd9Sstevel@tonic-gate * database structure 71*7c478bd9Sstevel@tonic-gate */ 72*7c478bd9Sstevel@tonic-gate 73*7c478bd9Sstevel@tonic-gate typedef struct { 74*7c478bd9Sstevel@tonic-gate int dbf_flags; /* flags */ 75*7c478bd9Sstevel@tonic-gate int dbf_sflags; /* listener-specific flags */ 76*7c478bd9Sstevel@tonic-gate char *dbf_svc_code; /* null terminated service code */ 77*7c478bd9Sstevel@tonic-gate char *dbf_id; /* user id for server to run as */ 78*7c478bd9Sstevel@tonic-gate char *dbf_res1; /* reserved field */ 79*7c478bd9Sstevel@tonic-gate char *dbf_res2; /* reserved field */ 80*7c478bd9Sstevel@tonic-gate char *dbf_res3; /* reserved field */ 81*7c478bd9Sstevel@tonic-gate char *dbf_prv_adr; /* null terminated private address*/ 82*7c478bd9Sstevel@tonic-gate char *dbf_modules; /* optional modules to push */ 83*7c478bd9Sstevel@tonic-gate char *dbf_cmd_line; /* null terminated cmd line */ 84*7c478bd9Sstevel@tonic-gate int dbf_fd; /* calls for service come in on */ 85*7c478bd9Sstevel@tonic-gate /* this fd -- filled in when */ 86*7c478bd9Sstevel@tonic-gate /* this entry is bound to net */ 87*7c478bd9Sstevel@tonic-gate int dbf_maxcon; /* maximum number of outstanding*/ 88*7c478bd9Sstevel@tonic-gate /* connections on this fd */ 89*7c478bd9Sstevel@tonic-gate int dbf_prognum; /* program number (RPC only) */ 90*7c478bd9Sstevel@tonic-gate int dbf_version; /* version number (RPC only) */ 91*7c478bd9Sstevel@tonic-gate } dbf_t; 92*7c478bd9Sstevel@tonic-gate 93*7c478bd9Sstevel@tonic-gate 94*7c478bd9Sstevel@tonic-gate /* 95*7c478bd9Sstevel@tonic-gate * listener-specific flags (dbf_sflags) 96*7c478bd9Sstevel@tonic-gate */ 97*7c478bd9Sstevel@tonic-gate 98*7c478bd9Sstevel@tonic-gate #define CFLAG 0x1 /* dbf_cmd_line is a command */ 99*7c478bd9Sstevel@tonic-gate #define PFLAG 0x2 /* dbf_cmd_line is a pipe */ 100*7c478bd9Sstevel@tonic-gate #define DFLAG 0x4 /* allocate a dynamic address */ 101