/* begincopyright
  Copyright (c) 1988 Xerox Corporation. All rights reserved.
  Use and copying of this software and preparation of derivative works based
  upon this software are permitted. Any distribution of this software or
  derivative works must comply with all applicable United States export
  control laws. This software is made available AS IS, and Xerox Corporation
  makes no warranty about the software, its performance or its conformity to
  any specification. Any person obtaining a copy of this software is requested
  to send their name and post office or electronic mail address to:
    PCR Coordinator
    Xerox PARC
    3333 Coyote Hill Rd.
    Palo Alto, CA 94304
  endcopyright */

/*
 * CMUX.h
 *
 * Originally built from Mentat's courier.h and courmux.h
 *
 * Demers, April 23, 1990 3:45:13 pm PDT
 */


/** Copyright (c) 1988  Mentat Inc.
 ** last change 2/22/89 HS
 **/

#ifndef	←CMUX←
#define	←CMUX←


#define COURIERVERSION	3	/* the version of Courier we support */

/* Address types */
#define	COUR←DEF←ADDR←TYPE	1
#define	COUR←ISO←ADDR←TYPE	2
#define	COUR←TCP←ADDR←TYPE	3
#define	COUR←XNS←ADDR←TYPE	4

/*
 * The rest of this should be #include ...courmux.h from Mentat
 */

/* CMUX I←STR ioctl cmds */
#define	CMUX←BASE		('C' << 8)
#define	CMUX←ADDR←COMPLETE	(CMUX←BASE + 1)		/* helper -> cmux */
#define	CMUX←ADDR←REQ		(CMUX←BASE + 2)		/* client -> cmux */
#define	CMUX←CALL←REQ		(CMUX←BASE + 3)		/* cmux -> helper */
#define	CMUX←CALL←REJECT	(CMUX←BASE + 4)		/* helper -> cmux */
#define	CMUX←CLIENT←REQ←IOCTL	(CMUX←BASE + 5)		/* client -> helper */
#define	CMUX←HELPER←ADD		(CMUX←BASE + 6)		/* helper -> cmux */
#define CMUX←HELPER←REPLY←IOCTL	(CMUX←BASE + 7)		/* helper -> client */
#define	CMUX←PASSTHRU←BEGIN	(CMUX←BASE + 8)		/* client -> cmux */
#define	CMUX←PASSTHRU←END	(CMUX←BASE + 9)		/* client -> cmux */
#define	CMUX←SERVER←ADD		(CMUX←BASE + 10)	/* server -> cmux */
#define	CMUX←TRANSPORT←REQ	(CMUX←BASE + 11)	/* cmux -> helper */
/* Available			(CMUX←BASE + 12) */
#define	CMUX←UNBLOCK←STREAM	(CMUX←BASE + 13)	/* helper -> cmux */
#define	CMUX←UNLINK←REQ		(CMUX←BASE + 14)	/* cmux -> helper */
#define	CMUX←HELPER←DBG		(CMUX←BASE + 15) /* client -> cmux -> helper */
#define	CMUX←SERVER←QUIT	(CMUX←BASE + 16)	/* server -> cmux */
#define	CMUX←PASSTHRU←BEGIN←DEFERRED (CMUX←BASE + 17)
#define	CMUX←NO←MORE←TRANSPORTS	(CMUX←BASE + 18)	/* helper -> cmux */
/* Available			(CMUX←BASE + 19) */
#define	CMUX←SERVER←COUNTDOWN	(CMUX←BASE + 20)	/* server -> cmux */
#define	CMUX←SERVER←RESET←UID	(CMUX←BASE + 21)	/* server -> cmux */
#define CMUX←REMOTE←ADDR←REQ	(CMUX←BASE + 22)	/* client -> cmux */
#define CMUX←REMOTE←ADDR←RESPONSE (CMUX←BASE + 23)	/* helper -> cmux */

#define	CMUX←GET←VALUE		1
#define	CMUX←SET←VALUE		2
#define	CMUX←DEL←VALUE		3
#define	CMUX←CH←ADD		4
#define	CMUX←TR←ADD		5
#define	CMUX←RETRIEVE←ITEM	6 /* Retrieve an item from a clearinghouse */

#define	CMUX←DEF←ADDR←TYPE	1

#define	COURIER←MUX←NAME←DEF	"/dev/courmux"

#endif /* ←CMUX← */