1 /*-
2  * Copyright (c) 1993 The Regents of the University of California.
3  * All rights reserved.
4  *
5  * This code is derived from software contributed to Berkeley by
6  * Bill Jolitz.
7  *
8  * %sccs.include.redist.c%
9  *
10  *	@(#)connect.h	5.2 (Berkeley) 05/29/93
11  */
12 
13 /*
14  * Unix Connection daemon
15  *
16  * service request structures and subroutine definitions
17  * for connection requests.
18  */
19 
20 #define	MAXCONNECTS	10	/* maximum number of simultaineous
21 					connects per process */
22 struct connectdomain {
23 	short	cd_family ;
24 	short	cd_alen ;
25 	char	cd_address[100] ;
26 } ;
27 
28 #define	CDSIZE(s)	(sizeof(s->cd_family) + sizeof (s->cd_alen) + (s->cd_alen))
29 
30 int	externalconnect(), externalabort(), externalfinish(), externaloption() ;
31 
32 #define	CDNEWREQUEST	  1	/* request a new connection from client */
33 #define	CDNEWRESPONSE	  2	/* response from server daemon */
34 #define	CDCANCELREQUEST	  3	/* cancellation message from client */
35 #define	CDFINISHREQUEST	  5	/* finshed, pass back file descriptor to srvr */
36 #define	CDFINISHRESPONSE  6	/* finish acked from server to client */
37 #define	CDOPTIONREQUEST	  7	/* pass option request to be performed
38 					on descriptor by srvr */
39 #define	CDOPTIONRESPONSE  8	/* option acked from server to client */
40 #define	CDRESOFFEREQUEST  9	/* other daemon offers resources of a given type
41 					to srvr */
42 #define	CDRESOFFERESPONSE 10	/* offer acked from server to client */
43 #define	CDWITHDRNREQUEST  11	/* other daemon withdraws resources frm srvr */
44 #define	CDWITHDRNRESPONSE 12	/* resp to withdraw resources frm srvr */
45 #define	CDSGRANTREQUEST   13	/* connect daemon demand resource frm srvr */
46 #define	CDSGRANTRESPONSE  14	/* resp to demand resource frm srvr */
47 
48 #define	ISCDREQUEST(s)	(s&1)	/* is this a request or response */
49