/* 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 */ /* * CirioNubProtocol.h * * Demers, November 2, 1989 10:12:55 am PST * * CirioNub protocol. * * Bad design: CirioNubRetCode is known to all clients, * so this file gets included everywhere. */ #ifndef _CIRIO_NUB_PROTOCOL_ #define _CIRIO_NUB_PROTOCOL_ #include /* * well known port */ #define CIRIO_NUB_LISTENER_PORT 4815 #define CIRIO_NUB_PROTOCOL_VERSION 0 #define CIRIO_NUB_VERSION(proto,procs) ( ((proto)<<16) | (procs) ) /* * return codes */ typedef enum CirioNubRetCode { cnrc_ok = 0, cnrc_noProc = 1, cnrc_badArgs = 2, /* the remaining return codes require destroying the stream */ cnrc_MUST_CLOSE_CONNECTION = 128, cnrc_failure = 128, cnrc_comm = 129, cnrc_protocol = 130, cnrc_space = 131, cnrc_last = 0x7fffffff } CirioNubRetCode; /* * types (of tagged values passed over the wire) */ typedef enum CirioNubTag { cnt_null = 0, cnt_procID = 1, cnt_retCode = 2, cnt_card32 = 3, cnt_int32 = 4, cnt_string = 5, cnt_block8 = 6, cnt_block16 = 7, cnt_block32 = 8, cnt_last = 0x7fff }; /* * representation on the wire * * call is args followed by procID * reply is results followed by retCode */ typedef short net_short; typedef long net_long; typedef struct CirioNubWrapper { net_short cnw_tag; net_short cnw_len; }; #endif /* _CIRIO_NUB_PROTOCOL_ */