uts: make emu10k non-verbose
[unleashed.git] / include / listen.h
blobac182b13d70811bf579e70f6325ca19bc4fa0792
1 /*
2 * CDDL HEADER START
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.
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]
20 * CDDL HEADER END
22 /* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */
23 /* All Rights Reserved */
26 #ifndef _LISTEN_H
27 #define _LISTEN_H
29 #pragma ident "%Z%%M% %I% %E% SMI" /* SVr4.0 1.4.3.1 */
31 #ifdef __cplusplus
32 extern "C" {
33 #endif
36 * listen.h: Include file for network listener related user programs
41 * The NLPS (Network Listener Process Service)
42 * protocol message sent by client machines to
43 * a listener process to request a service on the listener's
44 * machine. The message is sent to "netnodename(r_nodename)"
45 * where r_nodename is the nodename (see uname(2)) of the
46 * remote host. Note that client's need not know (or care)
47 * about the details of this message. They use the "nls_connect(3)"
48 * library routine which uses this message.
50 * msg format:
52 * "id:low:high:service_code"
54 * id = "NLPS"
55 * low:high = version number of listener (see prot msg)
56 * service_code is ASCII/decimal
58 * the following prot string can be run through sprintf with a service code
59 * to generate the message:
61 * len = sprintf(buf,nls_prot_msg,svc_code);
62 * t_snd(fd, buf, len, ...);
64 * See also: listen(1), nlsrequest(3)
66 * and on the UNIX PC STARLAN NETWORK:
67 * See also: nlsname(3), nlsconnect(3), nlsestablish(3)
71 * defines for compatability purposes
74 #define nls_prot_msg nls_v0_d
75 #define nls_v2_msg nls_v2_s
77 static char *nls_v0_d = "NLPS:000:001:%d";
78 static char *nls_v0_s = "NLPS:000:001:%s";
79 static char *nls_v2_d = "NLPS:002:002:%d";
80 static char *nls_v2_s = "NLPS:002:002:%s";
82 #define NLSSTART 0
83 #define NLSFORMAT 2
84 #define NLSUNKNOWN 3
85 #define NLSDISABLED 4
87 #define SVC_CODE_SZ 14
90 * Structure for handling multiple connection requests on the same stream.
93 struct callsave {
94 struct t_call *c_cp;
95 struct callsave *c_np;
98 struct call_list {
99 struct callsave *cl_head;
100 struct callsave *cl_tail;
104 #define EMPTYLIST(p) (p->cl_head == NULL)
107 * Ridiculously high value for maximum number of connects per stream.
108 * Transport Provider will determine actual maximum to be used.
111 #define MAXCON 100
114 * these are names of environment variables that the listener
115 * adds to the servers environment before the exec(2).
117 * the variables should be accessed via library routines.
119 * see nlsgetcall(3X) and nlsprovider(3X).
122 #define NLSADDR "NLSADDR"
123 #define NLSOPT "NLSOPT"
124 #define NLSUDATA "NLSUDATA"
125 #define NLSPROVIDER "NLSPROVIDER"
128 * the following variables can be accessed "normally"
131 #define HOME "HOME"
132 #define PATH "PATH"
134 #ifdef __cplusplus
136 #endif
138 #endif /* _LISTEN_H */