1 /* Copyright 1992 NEC Corporation, Tokyo, Japan. 2 * 3 * Permission to use, copy, modify, distribute and sell this software 4 * and its documentation for any purpose is hereby granted without 5 * fee, provided that the above copyright notice appear in all copies 6 * and that both that copyright notice and this permission notice 7 * appear in supporting documentation, and that the name of NEC 8 * Corporation not be used in advertising or publicity pertaining to 9 * distribution of the software without specific, written prior 10 * permission. NEC Corporation makes no representations about the 11 * suitability of this software for any purpose. It is provided "as 12 * is" without express or implied warranty. 13 * 14 * NEC CORPORATION DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, 15 * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN 16 * NO EVENT SHALL NEC CORPORATION BE LIABLE FOR ANY SPECIAL, INDIRECT OR 17 * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF 18 * USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR 19 * OTHER TORTUOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR 20 * PERFORMANCE OF THIS SOFTWARE. 21 */ 22 23 /* @(#) NEC UNIX( PC-UX/EWS-UX ) IRproto.h 2.1 91/10/17 13:40:04 */ 24 /* $Id: IRproto.h,v 1.1.1.1 2002/10/19 08:27:53 aida_s Exp $ */ 25 26 #define RETURN_VERSION_ERROR_STAT -2 27 28 #define OWNER "bin" 29 #define EXIT 999 30 31 typedef struct _Req0{ 32 int Type ; 33 } Req0 ; 34 35 typedef struct _Req1{ 36 int Type ; 37 int context ; 38 } Req1 ; 39 40 typedef struct _Req2{ 41 int Type ; 42 int namelen ; 43 char *name ; 44 } Req2 ; 45 46 typedef struct _Req3{ 47 int Type ; 48 int context ; 49 int number ; 50 } Req3 ; 51 52 typedef struct _Req4{ 53 int Type ; 54 int context ; 55 int number ; 56 int *kouho ; 57 } Req4 ; 58 59 typedef struct _Req5{ 60 int Type ; 61 int context ; 62 int number ; 63 int datalen ; 64 } Req5 ; 65 66 typedef struct _Req6{ 67 int Type ; 68 int context ; 69 int mode ; 70 int datalen ; 71 char *data ; 72 } Req6 ; 73 74 typedef struct _Req7{ 75 int Type ; 76 int context ; 77 int diclen ; 78 char *dicname ; 79 int datalen ; 80 char *datainfo ; 81 } Req7 ; 82 83 typedef struct _Req8{ 84 int Type ; 85 int context ; 86 int datalen ; 87 char *data ; 88 int mode ; 89 } Req8 ; 90 91 typedef struct _Req9{ 92 int Type ; 93 int context ; 94 int number ; 95 int datalen ; 96 char *data ; 97 } Req9 ; 98 99 typedef struct _Req10{ 100 int Type ; 101 int context ; 102 int diclen ; 103 char *dicname ; 104 int textdiclen ; 105 char *textdicname ; 106 int mode ; 107 } Req10 ; 108 109 typedef struct _Req11{ 110 int Type ; 111 int context ; 112 int number ; 113 int kouho ; 114 int max ; 115 } Req11 ; 116 117 typedef struct _Req12{ 118 int Type ; 119 int datalen ; 120 char *data ; 121 int number ; 122 } Req12 ; 123 124 typedef union _IRReq { 125 Req0 Request0 ; 126 Req1 Request1 ; 127 Req2 Request2 ; 128 Req3 Request3 ; 129 Req4 Request4 ; 130 Req5 Request5 ; 131 Req6 Request6 ; 132 Req7 Request7 ; 133 Req8 Request8 ; 134 Req9 Request9 ; 135 Req10 Request10; 136 Req11 Request11; 137 Req12 Request12; 138 BYTE Buffer[4]; 139 } IRReq ; 140 141 #define ACK_BUFSIZE 2048 142 143 typedef struct _Ack0 { 144 int stat ; 145 } Ack0 ; 146 147 typedef struct _Ack1 { 148 int stat ; 149 int len ; 150 char data[ ACK_BUFSIZE ] ; 151 } Ack1 ; 152 153 typedef struct _Ack2 { 154 int stat ; 155 int len ; 156 int info[ ACK_BUFSIZE/sizeof( int ) ] ; 157 } Ack2 ; 158 159 typedef union _IRAck { 160 Ack0 Anck0 ; 161 Ack1 Anck1 ; 162 Ack2 Anck2 ; 163 164 char SendAckBuffer[ ACK_BUFSIZE + sizeof( int )*2 ] ; 165 } IRAck ; 166