1 /*
2  * Copyright (c) 1989 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  * Redistribution and use in source and binary forms are permitted
9  * provided that the above copyright notice and this paragraph are
10  * duplicated in all such forms and that any documentation,
11  * advertising materials, and other materials related to such
12  * distribution and use acknowledge that the software was developed
13  * by the University of California, Berkeley.  The name of the
14  * University may not be used to endorse or promote products derived
15  * from this software without specific prior written permission.
16  * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
17  * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
18  * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
19  *
20  *	@(#)connect.h	5.1 (Berkeley) 05/16/89
21  */
22 
23 /*
24  * Unix Connection daemon
25  *
26  * service request structures and subroutine definitions
27  * for connection requests.
28  */
29 
30 #define	MAXCONNECTS	10	/* maximum number of simultaineous
31 					connects per process */
32 struct connectdomain {
33 	short	cd_family ;
34 	short	cd_alen ;
35 	char	cd_address[100] ;
36 } ;
37 
38 #define	CDSIZE(s)	(sizeof(s->cd_family) + sizeof (s->cd_alen) + (s->cd_alen))
39 
40 int	externalconnect(), externalabort(), externalfinish(), externaloption() ;
41 
42 #define	CDNEWREQUEST	  1	/* request a new connection from client */
43 #define	CDNEWRESPONSE	  2	/* response from server daemon */
44 #define	CDCANCELREQUEST	  3	/* cancellation message from client */
45 #define	CDFINISHREQUEST	  5	/* finshed, pass back file descriptor to srvr */
46 #define	CDFINISHRESPONSE  6	/* finish acked from server to client */
47 #define	CDOPTIONREQUEST	  7	/* pass option request to be performed
48 					on descriptor by srvr */
49 #define	CDOPTIONRESPONSE  8	/* option acked from server to client */
50 #define	CDRESOFFEREQUEST  9	/* other daemon offers resources of a given type
51 					to srvr */
52 #define	CDRESOFFERESPONSE 10	/* offer acked from server to client */
53 #define	CDWITHDRNREQUEST  11	/* other daemon withdraws resources frm srvr */
54 #define	CDWITHDRNRESPONSE 12	/* resp to withdraw resources frm srvr */
55 #define	CDSGRANTREQUEST   13	/* connect daemon demand resource frm srvr */
56 #define	CDSGRANTRESPONSE  14	/* resp to demand resource frm srvr */
57 
58 #define	ISCDREQUEST(s)	(s&1)	/* is this a request or response */
59