17c478bd9Sstevel@tonic-gate /* 27c478bd9Sstevel@tonic-gate * CDDL HEADER START 37c478bd9Sstevel@tonic-gate * 47c478bd9Sstevel@tonic-gate * The contents of this file are subject to the terms of the 57c478bd9Sstevel@tonic-gate * Common Development and Distribution License, Version 1.0 only 67c478bd9Sstevel@tonic-gate * (the "License"). You may not use this file except in compliance 77c478bd9Sstevel@tonic-gate * with the License. 87c478bd9Sstevel@tonic-gate * 97c478bd9Sstevel@tonic-gate * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 107c478bd9Sstevel@tonic-gate * or http://www.opensolaris.org/os/licensing. 117c478bd9Sstevel@tonic-gate * See the License for the specific language governing permissions 127c478bd9Sstevel@tonic-gate * and limitations under the License. 137c478bd9Sstevel@tonic-gate * 147c478bd9Sstevel@tonic-gate * When distributing Covered Code, include this CDDL HEADER in each 157c478bd9Sstevel@tonic-gate * file and include the License file at usr/src/OPENSOLARIS.LICENSE. 167c478bd9Sstevel@tonic-gate * If applicable, add the following below this CDDL HEADER, with the 177c478bd9Sstevel@tonic-gate * fields enclosed by brackets "[]" replaced with your own identifying 187c478bd9Sstevel@tonic-gate * information: Portions Copyright [yyyy] [name of copyright owner] 197c478bd9Sstevel@tonic-gate * 207c478bd9Sstevel@tonic-gate * CDDL HEADER END 217c478bd9Sstevel@tonic-gate */ 227c478bd9Sstevel@tonic-gate /* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */ 237c478bd9Sstevel@tonic-gate /* All Rights Reserved */ 247c478bd9Sstevel@tonic-gate 257c478bd9Sstevel@tonic-gate 267c478bd9Sstevel@tonic-gate #ident "%Z%%M% %I% %E% SMI" /* SVr4.0 1.7.1.1 */ 277c478bd9Sstevel@tonic-gate 287c478bd9Sstevel@tonic-gate /* 297c478bd9Sstevel@tonic-gate * lserror.h: Network listener error exit codes. 307c478bd9Sstevel@tonic-gate * The codes in the defines index the table below to 317c478bd9Sstevel@tonic-gate * give the actual exit code. (The table is in lsdata.c) 327c478bd9Sstevel@tonic-gate * 337c478bd9Sstevel@tonic-gate * An exit code of 1 means initialization problem 347c478bd9Sstevel@tonic-gate * before logging is available 357c478bd9Sstevel@tonic-gate * 367c478bd9Sstevel@tonic-gate * An exit code of 0 means the listener got past 377c478bd9Sstevel@tonic-gate * it's initialization and made itself independent 387c478bd9Sstevel@tonic-gate * of it's parent. 397c478bd9Sstevel@tonic-gate * 407c478bd9Sstevel@tonic-gate * Not all of the errors listed below will cause error exits. 417c478bd9Sstevel@tonic-gate */ 427c478bd9Sstevel@tonic-gate 437c478bd9Sstevel@tonic-gate #ifndef lserror_h /* avoid multiple inclusions of lserror.h */ 447c478bd9Sstevel@tonic-gate #define lserror_h 457c478bd9Sstevel@tonic-gate 46*55fea89dSDan Cross /* 477c478bd9Sstevel@tonic-gate * parameters to error/exit routines 487c478bd9Sstevel@tonic-gate */ 497c478bd9Sstevel@tonic-gate 507c478bd9Sstevel@tonic-gate #define EXIT 0x80 /* error routines will exit */ 517c478bd9Sstevel@tonic-gate #define NOCORE 0x40 527c478bd9Sstevel@tonic-gate #define NORMAL 0x20 /* exit is a 'normal' exit */ 537c478bd9Sstevel@tonic-gate #define NO_MSG 0x10 /* message already logged */ 547c478bd9Sstevel@tonic-gate #define CONTINUE 0 557c478bd9Sstevel@tonic-gate 567c478bd9Sstevel@tonic-gate 577c478bd9Sstevel@tonic-gate #define E_CMDLINE 1 /* cmd line arguments */ 587c478bd9Sstevel@tonic-gate #define E_CDHOME 2 /* can't chdir to home dir */ 597c478bd9Sstevel@tonic-gate #define E_CREAT 3 /* can't create a file */ 607c478bd9Sstevel@tonic-gate #define E_ACCESS 4 /* can't access/exec file */ 617c478bd9Sstevel@tonic-gate #define E_OPEN 5 /* can't open a file */ 627c478bd9Sstevel@tonic-gate #define E_LSFORK 6 /* can't fork myself */ 637c478bd9Sstevel@tonic-gate #define E_PIDWRITE 7 /* error writing process id file */ 647c478bd9Sstevel@tonic-gate 657c478bd9Sstevel@tonic-gate #define E_FD1OPEN 8 /* fd 1 net device open */ 667c478bd9Sstevel@tonic-gate #define E_FD2OPEN 9 /* fd 2 net device open */ 677c478bd9Sstevel@tonic-gate #define E_FD3OPEN 10 /* fd 3 net device open */ 687c478bd9Sstevel@tonic-gate #define E_UNAME 11 /* uname system call */ 697c478bd9Sstevel@tonic-gate #define E_SIGTERM 12 /* signal SIGTERM caught */ 707c478bd9Sstevel@tonic-gate /* 717c478bd9Sstevel@tonic-gate * E_INCONSISTENT should only be seen by developers/integrators/etc. 727c478bd9Sstevel@tonic-gate * Cmd line/data base problem. Hopefully only a debug error. 737c478bd9Sstevel@tonic-gate * In the listener, in check_files(), where cmd line args 747c478bd9Sstevel@tonic-gate * and the data base file entries are merged, a pathname 757c478bd9Sstevel@tonic-gate * of a required file (e.g.: pidfile, logfile) was NULL. 767c478bd9Sstevel@tonic-gate * Make sure the data base/cmd line has all the required entries. 777c478bd9Sstevel@tonic-gate */ 787c478bd9Sstevel@tonic-gate 797c478bd9Sstevel@tonic-gate #define E_INCONSISTENT 13 807c478bd9Sstevel@tonic-gate 817c478bd9Sstevel@tonic-gate 827c478bd9Sstevel@tonic-gate /* 837c478bd9Sstevel@tonic-gate * TLI errors. 847c478bd9Sstevel@tonic-gate * E_T_ALLOC: probably couldn't malloc() (out of memory?) 857c478bd9Sstevel@tonic-gate * E_T_BIND: Couldn't bind nodename or netnodename!!! 867c478bd9Sstevel@tonic-gate * E_BIND_REQ: TLI didn't bind the requested name!!! 877c478bd9Sstevel@tonic-gate * (someone else on the machine/net took it?) 887c478bd9Sstevel@tonic-gate * E_T_FREE: t_free failed -- listener/tli bug or reboot 897c478bd9Sstevel@tonic-gate * E_IN_TLI: System call failed in a TLI routine. 90*55fea89dSDan Cross * 917c478bd9Sstevel@tonic-gate */ 927c478bd9Sstevel@tonic-gate 937c478bd9Sstevel@tonic-gate #define E_T_ALLOC 14 /* TLI: t_alloc failed */ 947c478bd9Sstevel@tonic-gate #define E_T_BIND 15 /* TLI couldn't bind */ 957c478bd9Sstevel@tonic-gate #define E_BIND_REQ 16 /* tli bound a different name! */ 967c478bd9Sstevel@tonic-gate #define E_T_FREE 17 /* tli couldn't free memory? */ 977c478bd9Sstevel@tonic-gate #define E_IN_TLI 18 /* system call failed in tli */ 987c478bd9Sstevel@tonic-gate #define E_T_LISTEN 19 /* t_listen error */ 997c478bd9Sstevel@tonic-gate #define E_T_ACCEPT 20 /* t_accept */ 1007c478bd9Sstevel@tonic-gate #define E_T_SNDDIS 21 /* t_snddis */ 1017c478bd9Sstevel@tonic-gate #define E_T_RCV 22 /* t_rcv */ 1027c478bd9Sstevel@tonic-gate #define E_T_SND 23 /* t_snd */ 1037c478bd9Sstevel@tonic-gate 1047c478bd9Sstevel@tonic-gate /* miscellaneous errors */ 1057c478bd9Sstevel@tonic-gate 1067c478bd9Sstevel@tonic-gate #define E_CANT_HAPPEN 24 /* transport provider bug */ 1077c478bd9Sstevel@tonic-gate 1087c478bd9Sstevel@tonic-gate #define E_NOINTERMEDIARY 25 /* login service requested, but 1097c478bd9Sstevel@tonic-gate listener doesn't have an 1107c478bd9Sstevel@tonic-gate intermediary to 'exec' */ 1117c478bd9Sstevel@tonic-gate 1127c478bd9Sstevel@tonic-gate #define E_FORK_SERVICE 26 /* error occurred when the listener 1137c478bd9Sstevel@tonic-gate tried to fork itself to start 1147c478bd9Sstevel@tonic-gate a service. */ 1157c478bd9Sstevel@tonic-gate 1167c478bd9Sstevel@tonic-gate #define E_RCV_MSG 27 /* error in t_rcv */ 1177c478bd9Sstevel@tonic-gate #define E_RCV_TMO 28 /* t_rcv timed out */ 1187c478bd9Sstevel@tonic-gate 1197c478bd9Sstevel@tonic-gate /* 1207c478bd9Sstevel@tonic-gate * E_OPENBIND: problem during t_open in initialization 1217c478bd9Sstevel@tonic-gate * actually means the driver ran out of minor devices or the 122*55fea89dSDan Cross * system file table is full -- reboot or wait recommended 1237c478bd9Sstevel@tonic-gate */ 1247c478bd9Sstevel@tonic-gate 1257c478bd9Sstevel@tonic-gate #define E_OPENBIND 29 /* open/bind err during init */ 1267c478bd9Sstevel@tonic-gate 1277c478bd9Sstevel@tonic-gate #define E_DBF_IO 30 /* data base file i/o error */ 1287c478bd9Sstevel@tonic-gate #define E_SCAN_DBF E_DBF_IO 1297c478bd9Sstevel@tonic-gate #define E_READ_DBF E_DBF_IO 1307c478bd9Sstevel@tonic-gate 1317c478bd9Sstevel@tonic-gate #define E_BAD_VERSION 31 /* attservice: bad version */ 1327c478bd9Sstevel@tonic-gate #define E_BAD_FORMAT 32 /* attservice: bad msg format */ 1337c478bd9Sstevel@tonic-gate 1347c478bd9Sstevel@tonic-gate #define E_SYS_ERROR 33 /* sys call problem; i.e. in exec */ 1357c478bd9Sstevel@tonic-gate 1367c478bd9Sstevel@tonic-gate #define E_DBF_ALLOC 34 /* calloc's for dbf failed */ 1377c478bd9Sstevel@tonic-gate #define E_POLL 35 /* poll call failed */ 1387c478bd9Sstevel@tonic-gate #define E_MALLOC 36 /* generic failed malloc */ 1397c478bd9Sstevel@tonic-gate #define E_T_RCVDIS 37 /* t_rcvdis (should be above but 1407c478bd9Sstevel@tonic-gate renumbering is bad) */ 1417c478bd9Sstevel@tonic-gate #define E_T_LOOK 38 /* t_look (should be above but 1427c478bd9Sstevel@tonic-gate renumbering is bad) */ 1437c478bd9Sstevel@tonic-gate #define E_DBF_CORRUPT 39 /* data base file corrupt */ 1447c478bd9Sstevel@tonic-gate #define E_BADVER 40 /* data base file at wrong version */ 1457c478bd9Sstevel@tonic-gate 1467c478bd9Sstevel@tonic-gate #define E_FDNOMATCH 41 /* fd the call came in did not match 147*55fea89dSDan Cross with fd in private_tab */ 1487c478bd9Sstevel@tonic-gate typedef struct { 1497c478bd9Sstevel@tonic-gate char *err_msg; 1507c478bd9Sstevel@tonic-gate int err_code; 1517c478bd9Sstevel@tonic-gate } errlist; 1527c478bd9Sstevel@tonic-gate 1537c478bd9Sstevel@tonic-gate #ifndef GLOBAL_DATA 1547c478bd9Sstevel@tonic-gate extern char *Usage; 1557c478bd9Sstevel@tonic-gate extern errlist err_list[]; 1567c478bd9Sstevel@tonic-gate #endif 1577c478bd9Sstevel@tonic-gate 1587c478bd9Sstevel@tonic-gate #endif /* lserror_h */ 159