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, Version 1.0 only 6 * (the "License"). You may not use this file except in compliance 7 * with the License. 8 * 9 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 10 * or http://www.opensolaris.org/os/licensing. 11 * See the License for the specific language governing permissions 12 * and limitations under the License. 13 * 14 * When distributing Covered Code, include this CDDL HEADER in each 15 * file and include the License file at usr/src/OPENSOLARIS.LICENSE. 16 * If applicable, add the following below this CDDL HEADER, with the 17 * fields enclosed by brackets "[]" replaced with your own identifying 18 * information: Portions Copyright [yyyy] [name of copyright owner] 19 * 20 * CDDL HEADER END 21 */ 22 /* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */ 23 /* All Rights Reserved */ 24 25 26 #ident "%Z%%M% %I% %E% SMI" /* SVr4.0 1.3.4.1 */ 27 28 /* 29 * lsdbf.h: listener data base file defines and structs 30 */ 31 32 #define DBFCOMMENT '#' /* end of line comment char */ 33 #define DBFWHITESP " \t" /* space, tab: white space */ 34 #define DBFTOKENS " \t:" /* space, tab, cmnt token seps */ 35 #define DBFTOKSEP ':' /* seps in _pmtab file */ 36 37 /* 38 * defines for flag characters -- used in the dfb_flags field 39 * these are the flags defined by SAF 40 */ 41 42 #define DBF_UTMP 0x01 /* create a utmp entry for service */ 43 #define DBF_OFF 0x02 /* service is turned off */ 44 #define DBF_UNKNOWN 0x80 /* indicates unkown flag character */ 45 46 /* 47 * arguments to read_dbf 48 */ 49 50 #define DB_INIT 0 51 #define DB_REREAD 1 52 53 /* 54 * service code parameters 55 */ 56 57 #define DBF_INT_CODE "1" /* intermediary proc svc code */ 58 #define DBF_SMB_CODE "2" /* MS-NET server proc svc code */ 59 60 #define PRV_ADR_SZ 64 /* size of a private address entry */ 61 62 /* 63 * current database version 64 */ 65 66 #define VERSION 4 67 68 69 /* 70 * database structure 71 */ 72 73 typedef struct { 74 int dbf_flags; /* flags */ 75 int dbf_sflags; /* listener-specific flags */ 76 char *dbf_svc_code; /* null terminated service code */ 77 char *dbf_id; /* user id for server to run as */ 78 char *dbf_res1; /* reserved field */ 79 char *dbf_res2; /* reserved field */ 80 char *dbf_res3; /* reserved field */ 81 char *dbf_prv_adr; /* null terminated private address*/ 82 char *dbf_modules; /* optional modules to push */ 83 char *dbf_cmd_line; /* null terminated cmd line */ 84 int dbf_fd; /* calls for service come in on */ 85 /* this fd -- filled in when */ 86 /* this entry is bound to net */ 87 int dbf_maxcon; /* maximum number of outstanding*/ 88 /* connections on this fd */ 89 int dbf_prognum; /* program number (RPC only) */ 90 int dbf_version; /* version number (RPC only) */ 91 } dbf_t; 92 93 94 /* 95 * listener-specific flags (dbf_sflags) 96 */ 97 98 #define CFLAG 0x1 /* dbf_cmd_line is a command */ 99 #define PFLAG 0x2 /* dbf_cmd_line is a pipe */ 100 #define DFLAG 0x4 /* allocate a dynamic address */ 101