/* File: courmux.h - Last Edit: */ /* arvani Thu Feb 8 09:58:57 1990 */ /* Copyright (C) by Xerox Corporation, 1990. All rights reserved. */ /* helge Tue Nov 21 18:10:50 1989 * * Copyright (c) 1989 by Xerox Corporation. All rights reserved. */ /** Copyright (c) 1988 Mentat Inc. ** last change 2/22/89 HS **/ #ifndef _COURMUX_ #define _COURMUX_ #ifndef BE16_TO_U16 #define BE16_TO_U16(dp) (((u16)(dp)[0] << 8) | ((u16)(dp)[1])) #define U16_TO_BE16(u1,dp) ((dp[0] = U8((u1) >> 8)),(dp[1] = U8((u1)))) #endif #ifndef BE16_TO_I16 #define BE16_TO_I16(dp) (((i16)(dp)[0] << 8) | ((i16)(dp)[1])) #define I16_TO_BE16(i1,dp) ((dp[0] = U8((i1) >> 8)),(dp[1] = U8((i1)))) #endif #ifndef BE32_TO_U32 #define BE32_TO_U32(dp) ((((u32)(dp)[0] & 0xFF) << (u32)24) | (((u32)(dp)[1] & 0xFF) << (u32)16) | (((u32)(dp)[2] & 0xFF) << (u32)8) | ((u32)(dp)[3] & 0xFF)) #define U32_TO_BE32(u1,dp) ((dp[0] = U8((u1) >> 24)),(dp[1] = U8((u1) >> 16)),(dp[2] = U8((u1) >> 8)),(dp[3] = U8((u1)))) #endif /* 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 #ifndef COURIER_MUX_NAME_DEF #define COURIER_MUX_NAME_DEF "/dev/courmux" #endif #endif /* 2/22/89: HS Corrected spelling of DEFERRED */ /* Tue Nov 21 18:10:13 1989 HS: added CMUX_REMOTE_ADDR_REQ and * CMUX_REMOTE_ADDR_RESPONSE. */