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
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.
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]
22 /* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */
23 /* All Rights Reserved */
26 #ident "%Z%%M% %I% %E% SMI" /* SVr4.0 1.15.1.3 */
29 * nlsadmin.h: nlsadmin defines and structs
32 #define VERSION 4 /* current database version */
34 #define SVC_CODE_SZ 14
35 #define DEFAULTID "listen" /* default id for servers */
36 #define LISTENTYPE "listen" /* pm type for listener service */
37 #define ROOT (uid_t) 0
39 #define NLPSSRV "/usr/lib/saf/nlps_server" /* full path of nlps server */
40 #define LISTENCMD "/usr/lib/saf/listen" /* full path of the listener */
41 #define NLPSSVCCODE "0" /* (string!) protoserv service code */
42 #define TTYSVCCODE "1" /* (string!) ttyserv service code */
45 * bit flags for argument processing
49 #define CMDFLAG 0x0001
50 #define PIPFLAG 0x0002
51 #define VERFLAG 0x0004
52 #define DISFLAG 0x0008
53 #define ENAFLAG 0x0010
54 #define KILFLAG 0x0020
55 #define ADRFLAG 0x0040
56 #define REMFLAG 0x0080
57 #define STAFLAG 0x0100
58 #define VBSFLAG 0x0200
59 #define NETFLAG 0x0400
60 #define ZZZFLAG 0x0800
61 #define INIFLAG 0x1000
67 #define INCONSISTENT 1
84 * error returns from nlsadmin (1 is reserved for passing non-error
88 #define NLS_OK 0 /* no error */
89 #define NLS_FAILED 2 /* failure in command */
90 #define NLS_PERM 3 /* must be root */
91 #define NLS_SERV 4 /* error in service code */
92 #define NLS_CMD 5 /* command line error */
93 #define NLS_SYSERR 6 /* system error during cmd */
94 #define NLS_BADPM 7 /* bad port monitor */
97 * command lines for SAC functions
100 #define SAC_LSPM "/usr/sbin/sacadm -L -p %s 2>/dev/null"
101 #define SAC_LSTY "/usr/sbin/sacadm -L -t %s 2>/dev/null"
102 #define SAC_KILLPM "/usr/sbin/sacadm -k -p %s 2>/dev/null"
103 #define SAC_STARTPM "/usr/sbin/sacadm -s -p %s 2>/dev/null"
104 #define SAC_ENABLPM "/usr/sbin/sacadm -e -p %s 2>/dev/null"
105 #define SAC_ADDPM "/usr/sbin/sacadm -a -p %s -t %s -c \"%s\" -v %d 2>/dev/null"
106 #define PM_DISABLE "/usr/sbin/pmadm -d -p %s -s %s 2>/dev/null"
107 #define PM_ENABLE "/usr/sbin/pmadm -e -p %s -s %s 2>/dev/null"
108 #define PM_LSALL "/usr/sbin/pmadm -L -p %s 2>/dev/null"
109 #define PM_LSONE "/usr/sbin/pmadm -L -p %s -s %s 2>/dev/null"
110 #define PM_REMSVC "/usr/sbin/pmadm -r -p %s -s %s 2>/dev/null"
111 #define PM_ADDSVC "/usr/sbin/pmadm -a -p %s -s %s -i %s -m %s -v %d -y \"%s\" 2>/dev/null"
112 #define PM_ADDSVCF "/usr/sbin/pmadm -a -p %s -s %s -i %s -f %s -m %s -v %d -y \"%s\" 2>/dev/null"