sys/param.h: fix MAXOFF_T on ILP32
[unleashed.git] / include / listen.h
blob5429d04a2c1860762ce1a1029883b9ae23862d54
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 #ifdef __cplusplus
30 extern "C" {
31 #endif
34 * listen.h: Include file for network listener related user programs
39 * The NLPS (Network Listener Process Service)
40 * protocol message sent by client machines to
41 * a listener process to request a service on the listener's
42 * machine. The message is sent to "netnodename(r_nodename)"
43 * where r_nodename is the nodename (see uname(2)) of the
44 * remote host. Note that client's need not know (or care)
45 * about the details of this message. They use the "nls_connect(3)"
46 * library routine which uses this message.
48 * msg format:
50 * "id:low:high:service_code"
52 * id = "NLPS"
53 * low:high = version number of listener (see prot msg)
54 * service_code is ASCII/decimal
56 * the following prot string can be run through sprintf with a service code
57 * to generate the message:
59 * len = sprintf(buf,nls_prot_msg,svc_code);
60 * t_snd(fd, buf, len, ...);
62 * See also: listen(1), nlsrequest(3)
64 * and on the UNIX PC STARLAN NETWORK:
65 * See also: nlsname(3), nlsconnect(3), nlsestablish(3)
69 * defines for compatability purposes
72 #define nls_prot_msg nls_v0_d
73 #define nls_v2_msg nls_v2_s
75 static char *nls_v0_d = "NLPS:000:001:%d";
76 static char *nls_v0_s = "NLPS:000:001:%s";
77 static char *nls_v2_d = "NLPS:002:002:%d";
78 static char *nls_v2_s = "NLPS:002:002:%s";
80 #define NLSSTART 0
81 #define NLSFORMAT 2
82 #define NLSUNKNOWN 3
83 #define NLSDISABLED 4
85 #define SVC_CODE_SZ 14
88 * Structure for handling multiple connection requests on the same stream.
91 struct callsave {
92 struct t_call *c_cp;
93 struct callsave *c_np;
96 struct call_list {
97 struct callsave *cl_head;
98 struct callsave *cl_tail;
102 #define EMPTYLIST(p) (p->cl_head == NULL)
105 * Ridiculously high value for maximum number of connects per stream.
106 * Transport Provider will determine actual maximum to be used.
109 #define MAXCON 100
112 * these are names of environment variables that the listener
113 * adds to the servers environment before the exec(2).
115 * the variables should be accessed via library routines.
117 * see nlsgetcall(3X) and nlsprovider(3X).
120 #define NLSADDR "NLSADDR"
121 #define NLSOPT "NLSOPT"
122 #define NLSUDATA "NLSUDATA"
123 #define NLSPROVIDER "NLSPROVIDER"
126 * the following variables can be accessed "normally"
129 #define HOME "HOME"
130 #define PATH "PATH"
132 #ifdef __cplusplus
134 #endif
136 #endif /* _LISTEN_H */