1*60593Sbostic /*- 2*60593Sbostic * Copyright (c) 1993 The Regents of the University of California. 338022Sbostic * All rights reserved. 438022Sbostic * 538022Sbostic * This code is derived from software contributed to Berkeley by 638022Sbostic * Bill Jolitz. 738022Sbostic * 8*60593Sbostic * %sccs.include.redist.c% 938022Sbostic * 10*60593Sbostic * @(#)connect.h 5.2 (Berkeley) 05/29/93 1138022Sbostic */ 1238022Sbostic 1338022Sbostic /* 1438022Sbostic * Unix Connection daemon 1538022Sbostic * 1638022Sbostic * service request structures and subroutine definitions 1738022Sbostic * for connection requests. 1838022Sbostic */ 1938022Sbostic 2038022Sbostic #define MAXCONNECTS 10 /* maximum number of simultaineous 2138022Sbostic connects per process */ 2238022Sbostic struct connectdomain { 2338022Sbostic short cd_family ; 2438022Sbostic short cd_alen ; 2538022Sbostic char cd_address[100] ; 2638022Sbostic } ; 2738022Sbostic 2838022Sbostic #define CDSIZE(s) (sizeof(s->cd_family) + sizeof (s->cd_alen) + (s->cd_alen)) 2938022Sbostic 3038022Sbostic int externalconnect(), externalabort(), externalfinish(), externaloption() ; 3138022Sbostic 3238022Sbostic #define CDNEWREQUEST 1 /* request a new connection from client */ 3338022Sbostic #define CDNEWRESPONSE 2 /* response from server daemon */ 3438022Sbostic #define CDCANCELREQUEST 3 /* cancellation message from client */ 3538022Sbostic #define CDFINISHREQUEST 5 /* finshed, pass back file descriptor to srvr */ 3638022Sbostic #define CDFINISHRESPONSE 6 /* finish acked from server to client */ 3738022Sbostic #define CDOPTIONREQUEST 7 /* pass option request to be performed 3838022Sbostic on descriptor by srvr */ 3938022Sbostic #define CDOPTIONRESPONSE 8 /* option acked from server to client */ 4038022Sbostic #define CDRESOFFEREQUEST 9 /* other daemon offers resources of a given type 4138022Sbostic to srvr */ 4238022Sbostic #define CDRESOFFERESPONSE 10 /* offer acked from server to client */ 4338022Sbostic #define CDWITHDRNREQUEST 11 /* other daemon withdraws resources frm srvr */ 4438022Sbostic #define CDWITHDRNRESPONSE 12 /* resp to withdraw resources frm srvr */ 4538022Sbostic #define CDSGRANTREQUEST 13 /* connect daemon demand resource frm srvr */ 4638022Sbostic #define CDSGRANTRESPONSE 14 /* resp to demand resource frm srvr */ 4738022Sbostic 4838022Sbostic #define ISCDREQUEST(s) (s&1) /* is this a request or response */ 49