Add a few more menu items.
[obnox/wireshark/wip.git] / plugins / gryphon / packet-gryphon.h
1 /* packet-gryphon.h
2  * Definitions for Gryphon packet disassembly structures and routines
3  * By Steve Limkemann <stevelim@dgtech.com>
4  * Copyright 1998 Steve Limkemann
5  *
6  * $Id$
7  *
8  * Wireshark - Network traffic analyzer
9  * By Gerald Combs <gerald@wireshark.org>
10  * Copyright 1998 Gerald Combs
11  *
12  * This program is free software; you can redistribute it and/or
13  * modify it under the terms of the GNU General Public License
14  * as published by the Free Software Foundation; either version 2
15  * of the License, or (at your option) any later version.
16  *
17  * This program is distributed in the hope that it will be useful,
18  * but WITHOUT ANY WARRANTY; without even the implied warranty of
19  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
20  * GNU General Public License for more details.
21  *
22  * You should have received a copy of the GNU General Public License
23  * along with this program; if not, write to the Free Software
24  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
25  */
26
27 #define MSG_HDR_SZ          8
28 #define CMD_HDR_SZ          4
29
30 /* source/destinations: */
31
32 #define SD_CARD                 0x01    /* (vehicle) network interface */
33 #define SD_SERVER               0x02
34 #define SD_CLIENT               0x03
35 #define SD_KNOWN                0x10    /* Client ID >= are well known */
36 #define SD_SCHED                0x10    /* scheduler */
37 #define SD_SCRIPT               0x20    /* script processor */
38 #define SD_PGM                  0x21    /* Program loader */
39 #define SD_USDT                 0x22    /* USDT (Unacknowledged Segmented Data Transfer) */
40 #define SD_BLM                  0x23    /* Bus Load Monitoring */
41 #define SD_FLIGHT               0x25    /* Flight Recorder */
42 #define SD_RESP                 0x26    /* Message Response */
43 #define SD_IOPWR                0x27    /* VNG / Compact Gryphon I/O & power */
44 #define SD_UTIL                 0x28    /* Miscellaneous utility commands   */
45
46
47
48 /* frame types: */
49 #define GY_FT_CMD           0x01    /* command to initiate some action */
50 #define GY_FT_RESP          0x02    /* response to a command */
51 #define GY_FT_DATA          0x03    /* (vehicle) network data */
52 #define GY_FT_EVENT         0x04    /* notification of an event */
53 #define GY_FT_MISC          0x05    /* misc data */
54 #define GY_FT_TEXT          0x06    /* null-terminated ASCII strings */
55
56
57
58 /* generic (all SD type) commands: values 0x00 to 0x3f */
59
60 #define CMD_INIT                0x01    /* initialize target */
61 #define CMD_GET_STAT            0x02    /* request status */
62 #define CMD_GET_CONFIG          0x03    /* request configuration info */
63 #define CMD_EVENT_ENABLE        0x04    /* Enable event type */
64 #define CMD_EVENT_DISABLE       0x05    /* Disable event type */
65 #define CMD_GET_TIME            0x06    /* Get current value of timestamp */
66 #define CMD_GET_RXDROP          0x07    /* Get count of Rx msgs dropped */
67 #define CMD_RESET_RXDROP        0x08    /* Set count of Rx msgs dropped to zero */
68 #define CMD_BCAST_ON            0x09    /* broadcasts on */
69 #define CMD_BCAST_OFF           0x0a    /* broadcasts off */
70 #define CMD_SET_TIME            0x0b    /* set time */
71
72 /* SD-type specific commands: should start at 0x40, global uniqueness   */
73 /* is prefered, but not mandatory.                                      */
74
75 /* SD_CARD command types: */
76
77 #define CMD_CARD_SET_SPEED      (SD_CARD * 256 + 0x40)  /* set peripheral speed */
78 #define CMD_CARD_GET_SPEED      (SD_CARD * 256 + 0x41)  /* get peripheral speed */
79 #define CMD_CARD_SET_FILTER     (SD_CARD * 256 + 0x42)  /* set filter to pass or block all */
80 #define CMD_CARD_GET_FILTER     (SD_CARD * 256 + 0x43)  /* get a pass/block filter */
81 #define CMD_CARD_TX             (SD_CARD * 256 + 0x44)  /* transmit message */
82 #define CMD_CARD_TX_LOOP_ON     (SD_CARD * 256 + 0x45)  /* set transmit loopback on */
83 #define CMD_CARD_TX_LOOP_OFF    (SD_CARD * 256 + 0x46)  /* set transmit loopback off */
84 #define CMD_CARD_IOCTL          (SD_CARD * 256 + 0x47)  /* device driver ioctl pass-through */
85 #define CMD_CARD_ADD_FILTER     (SD_CARD * 256 + 0x48)  /* add a pass/block filter */
86 #define CMD_CARD_MODIFY_FILTER  (SD_CARD * 256 + 0x49)  /* modify a pass/block filter */
87 #define CMD_CARD_GET_FILTER_HANDLES (SD_CARD * 256 + 0x4A)/* get a list of filters */
88 #define CMD_CARD_SET_DEFAULT_FILTER (SD_CARD * 256 + 0x4B)/* set the default action */
89 #define CMD_CARD_GET_DEFAULT_FILTER (SD_CARD * 256 + 0x4C)/* get the defautl action */
90 #define CMD_CARD_SET_FILTER_MODE (SD_CARD * 256 + 0x4D) /* set the client data mode */
91 #define CMD_CARD_GET_FILTER_MODE (SD_CARD * 256 + 0x4E) /* get the client data mode */
92 #define CMD_CARD_GET_EVNAMES     (SD_CARD * 256 + 0x4f)  /* get event names */
93 #define CMD_CARD_GET_SPEEDS      (SD_CARD * 256 + 0x50) /* get speed definitions */
94
95 /* SD_SERVER command types: */
96
97 #define CMD_SERVER_REG          (SD_SERVER * 256 + 0x50)        /* register connection */
98 #define CMD_SERVER_SET_SORT     (SD_SERVER * 256 + 0x51)        /* set sorting behavior */
99 #define CMD_SERVER_SET_OPT      (SD_SERVER * 256 + 0x52)        /* set type of optimization */
100
101 /* SD_CLIENT command types: */
102
103 #define CMD_CLIENT_GET_ID       (SD_CLIENT * 256 + 0x60)        /* get the ID (channel field) of this client? */
104 #define CMD_CLIENT_SET_ID       (SD_CLIENT * 256 + 0x61)        /* set the ID (channel field) of this client? */
105 #define CMD_CLIENT_SHUTDOWN     (SD_CLIENT * 256 + 0x62)        /* tell client to die ? */
106
107 /* Bus load monitor (SD_BLM) commands: */
108
109 #define CMD_BLM_SET_MODE        (SD_BLM * 256 + 0xA0)
110 #define CMD_BLM_GET_MODE        (SD_BLM * 256 + 0xA1)
111 #define CMD_BLM_GET_DATA        (SD_BLM * 256 + 0xA2)
112 #define CMD_BLM_GET_STATS       (SD_BLM * 256 + 0xA3)
113
114 /* Flight recorder (SD_FLIGHT) commands */
115
116 #define CMD_FLIGHT_GET_CONFIG   (SD_FLIGHT * 256 + 0x50)        /* get flight recorder channel info */
117 #define CMD_FLIGHT_START_MON    (SD_FLIGHT * 256 + 0x51)        /* start flight recorder monitoring */
118 #define CMD_FLIGHT_STOP_MON     (SD_FLIGHT * 256 + 0x52)        /* stop flight recorder monitoring */
119
120 /* Message responder (SD_RESP) commands: */
121 #define CMD_MSGRESP_ADD         (SD_RESP * 256 + 0xB0)
122 #define CMD_MSGRESP_GET         (SD_RESP * 256 + 0xB1)
123 #define CMD_MSGRESP_MODIFY      (SD_RESP * 256 + 0xB2)
124 #define CMD_MSGRESP_GET_HANDLES (SD_RESP * 256 + 0xB3)
125
126 /* Program loader (SD_PGM) commands: */
127
128 #define CMD_PGM_DESC            (SD_PGM * 256 + 0x90)   /* Describe a program to to uploaded */
129 #define CMD_PGM_UPLOAD          (SD_PGM * 256 + 0x91)   /* Upload a program to the Gryphon */
130 #define CMD_PGM_DELETE          (SD_PGM * 256 + 0x92)   /* Delete an uploaded program */
131 #define CMD_PGM_LIST            (SD_PGM * 256 + 0x93)   /* Get a list of uploaded programs */
132 #define CMD_PGM_START           (SD_PGM * 256 + 0x94)   /* Start an uploaded program */
133 #define CMD_PGM_START2          (SD_CLIENT * 256 + 0x94)/* Start an uploaded program */
134 #define CMD_PGM_STOP            (SD_PGM * 256 + 0x95)   /* Stop an uploaded program */
135 #define CMD_PGM_STATUS          (SD_PGM * 256 + 0x96)   /* Get the status of an uploaded program */
136 #define CMD_PGM_OPTIONS         (SD_PGM * 256 + 0x97)   /* Set the upload options */
137 #define CMD_PGM_FILES           (SD_PGM * 256 + 0x98)   /* Get a list of files & directories */
138
139 /* Scheduler (SD_SCHED) target commands: */
140
141 #define CMD_SCHED_TX            (SD_SCHED * 256 + 0x70) /* schedule transmission list */
142 #define CMD_SCHED_KILL_TX       (SD_SCHED * 256 + 0x71) /* stop and destroy job */
143 #define CMD_SCHED_STOP_TX       (SD_SCHED * 256 + 0x71) /* deprecated */
144 #define CMD_SCHED_MSG_REPLACE   (SD_SCHED * 256 + 0x72) /* replace a scheduled message */
145
146 /* USDT (SD_USDT) target commands: */
147
148 #define CMD_USDT_IOCTL          (SD_USDT * 256 + 0x47)  /* Register/Unregister with USDT */
149 #define CMD_USDT_REGISTER       (SD_USDT * 256 + 0xB0)  /* Register/Unregister with USDT */
150 #define CMD_USDT_SET_FUNCTIONAL (SD_USDT * 256 + 0xB1)  /* Set to use extended addressing*/
151
152 /* USDT (SD_IOPWR) target commands: */
153
154 #define CMD_IOPWR_GETINP        (SD_IOPWR * 256 + 0x40) /*  Read current digital inputs  */   
155 #define CMD_IOPWR_GETLATCH      (SD_IOPWR * 256 + 0x41) /*  Read latched digital inputs  */   
156 #define CMD_IOPWR_CLRLATCH      (SD_IOPWR * 256 + 0x42) /*  Read & clear latched inputs  */   
157 #define CMD_IOPWR_GETOUT        (SD_IOPWR * 256 + 0x43) /*  Read digital outputs         */   
158 #define CMD_IOPWR_SETOUT        (SD_IOPWR * 256 + 0x44) /*  Write digital outputs        */   
159 #define CMD_IOPWR_SETBIT        (SD_IOPWR * 256 + 0x45) /*  Set indicated output bit(s)  */   
160 #define CMD_IOPWR_CLRBIT        (SD_IOPWR * 256 + 0x46) /*  Clear indicated output bit(s)*/   
161 #define CMD_IOPWR_GETPOWER      (SD_IOPWR * 256 + 0x47) /*  Read inputs at power on time */   
162
163 /* Miscellaneous (SD_UTIL) target commands: */
164
165 #define CMD_UTIL_SET_INIT_STRATEGY (SD_UTIL * 256 + 0x90) /* set the initialization strategy  */
166 #define CMD_UTIL_GET_INIT_STRATEGY (SD_UTIL * 256 + 0x91) /* get the initialization strategy  */
167
168 /* response frame (FT_RESP) response field definitions: */
169
170 #define RESP_OK                 0x00    /* no error */
171 #define RESP_UNKNOWN_ERR        0x01    /* unknown error */
172 #define RESP_UNKNOWN_CMD        0x02    /* unrecognised command */
173 #define RESP_UNSUPPORTED        0x03    /* unsupported command */
174 #define RESP_INVAL_CHAN         0x04    /* invalid channel specified */
175 #define RESP_INVAL_DST          0x05    /* invalid destination */
176 #define RESP_INVAL_PARAM        0x06    /* invalid parameters */
177 #define RESP_INVAL_MSG          0x07    /* invalid message */
178 #define RESP_INVAL_LEN          0x08    /* invalid length field */
179 #define RESP_TX_FAIL            0x09    /* transmit failed */
180 #define RESP_RX_FAIL            0x0a    /* receive failed */
181 #define RESP_AUTH_FAIL          0x0b
182 #define RESP_MEM_ALLOC_ERR      0x0c    /* memory allocation error */
183 #define RESP_TIMEOUT            0x0d    /* command timed out */
184 #define RESP_UNAVAILABLE        0x0e
185 #define RESP_BUF_FULL           0x0f    /* buffer full */
186 #define RESP_NO_SUCH_JOB        0x10
187
188 /* Flight recorder (SD_FLIGHT) target definitions */
189
190 #define FR_RESP_AFTER_EVENT         0
191 #define FR_RESP_AFTER_PERIOD        1
192 #define FR_IGNORE_DURING_PER        2
193 #define FR_DEACT_AFTER_PER          0x80
194 #define FR_DEACT_ON_EVENT           0x40
195 #define FR_DELETE                   0x20
196 #define FR_PERIOD_MSGS              0x10
197
198 /* Filter data types */
199
200 #define FILTER_DATA_TYPE_HEADER_FRAME   0x00
201 #define FILTER_DATA_TYPE_HEADER         0x01
202 #define FILTER_DATA_TYPE_DATA           0x02
203 #define FILTER_DATA_TYPE_EXTRA_DATA     0x03
204 #define FILTER_EVENT_TYPE_HEADER        0x04
205 #define FILTER_EVENT_TYPE_DATA          0x05
206
207 /* filter flags */
208
209 #define FILTER_PASS_FLAG            0x01
210 #define FILTER_ACTIVE_FLAG          0x02
211
212 /* Filter and Frame Responder Condition operators */
213
214 #define BIT_FIELD_CHECK         0
215 #define SVALUE_GT               1
216 #define SVALUE_GE               2
217 #define SVALUE_LT               3
218 #define SVALUE_LE               4
219 #define VALUE_EQ                5
220 #define VALUE_NE                6
221 #define UVALUE_GT               7
222 #define UVALUE_GE               8
223 #define UVALUE_LT               9
224 #define UVALUE_LE               10
225 #define DIG_LOW_TO_HIGH         11
226 #define DIG_HIGH_TO_LOW         12
227 #define DIG_TRANSITION          13
228
229 /* Modes available via CMD_CARD_SET_FILTERING_MODE */
230 #define FILTER_OFF_PASS_ALL     3
231 #define FILTER_OFF_BLOCK_ALL    4
232 #define FILTER_ON               5
233
234 /* Modes available via CMD_CARD_SET_DEFAULT_FILTER */
235 #define DEFAULT_FILTER_BLOCK    0
236 #define DEFAULT_FILTER_PASS     1
237
238 /* Actions available via CMD_CARD_MODIFY_FILTER */
239 #define DELETE_FILTER           0
240 #define ACTIVATE_FILTER         1
241 #define DEACTIVATE_FILTER       2
242
243 /* Flags to modify how FT_CMD (command) messages are handled            */
244 /* These values are ORed with FT_CMD and stored in the Frame Header's   */
245 /* Frame Type field for each response.                                  */
246 #define DONT_WAIT_FOR_RESP      0x80
247 #define WAIT_FOR_PREV_RESP      0x40
248 #define RESPONSE_FLAGS          (DONT_WAIT_FOR_RESP | WAIT_FOR_PREV_RESP)
249
250
251 /* Program loader options */
252 #define PGM_CONV            1       /* Type of data conversion to perform   */
253 #define PGM_TYPE            2       /* Type of file                         */
254 #define PGM_BIN             11      /* Binary, no conversion                */
255 #define PGM_ASCII           12      /* ASCII, convert CR LF to LF           */
256 #define PGM_PGM             21      /* Executable                           */
257 #define PGM_DATA            22      /* Data                                 */
258
259
260
261
262 /* IOCTL definitions - comments indicate data size */
263
264 #define GINIT           0x11100001
265 #define GLOOPON         0x11100002
266 #define GLOOPOFF        0x11100003
267 #define GGETHWTYPE      0x11100004
268 #define GGETREG         0x11100005
269 #define GSETREG         0x11100006
270 #define GGETRXCOUNT     0x11100007
271 #define GSETRXCOUNT     0x11100008
272 #define GGETTXCOUNT     0x11100009
273 #define GSETTXCOUNT     0x1110000a
274 #define GGETRXDROP      0x1110000b
275 #define GSETRXDROP      0x1110000c
276 #define GGETTXDROP      0x1110000d
277 #define GSETTXDROP      0x1110000e
278 #define GGETRXBAD       0x1110000f
279 #define GGETTXBAD       0x11100011
280 #define GGETCOUNTS      0x11100013
281 #define GGETBLMON       0x11100014
282 #define GSETBLMON       0x11100015
283 #define GGETERRLEV      0x11100016
284 #define GSETERRLEV      0x11100017
285 #define GGETBITRATE     0x11100018
286 #define GGETRAM         0x11100019
287 #define GSETRAM         0x1110001a
288
289 #define GCANGETBTRS     0x11200001
290 #define GCANSETBTRS     0x11200002
291 #define GCANGETBC       0x11200003
292 #define GCANSETBC       0x11200004
293 #define GCANGETMODE     0x11200005
294 #define GCANSETMODE     0x11200006
295 #define GCANGETTRANS    0x11200009
296 #define GCANSETTRANS    0x1120000a
297 #define GCANSENDERR     0x1120000b
298 #define GCANRGETOBJ     0x11210001
299 #define GCANRSETSTDID   0x11210002
300 #define GCANRSETEXTID   0x11210003
301 #define GCANRSETDATA    0x11210004
302 #define GCANRENABLE     0x11210005
303 #define GCANRDISABLE    0x11210006
304 #define GCANRGETMASKS   0x11210007
305 #define GCANRSETMASKS   0x11210008
306 #define GCANSWGETMODE   0x11220001
307 #define GCANSWSETMODE   0x11220002
308
309 #define GDLCGETFOURX    0x11400001
310 #define GDLCSETFOURX    0x11400002
311 #define GDLCGETLOAD     0x11400003
312 #define GDLCSETLOAD     0x11400004
313 #define GDLCSENDBREAK   0x11400005
314 #define GDLCABORTTX     0x11400006
315 #define GDLCGETHDRMODE  0x11400007
316 #define GDLCSETHDRMODE  0x11400008
317
318 #define GHONSLEEP       0x11600001
319 #define GHONSILENCE     0x11600002
320
321 #define GKWPSETPTIMES   0x11700011
322 #define GKWPSETWTIMES   0x11700010
323 #define GKWPDOWAKEUP    0x11700008
324 #define GKWPGETBITTIME  0x11700101
325 #define GKWPSETBITTIME  0x11700102
326 #define GKWPSETNODEADDR 0x11700104
327 #define GKWPGETNODETYPE 0x11700105
328 #define GKWPSETNODETYPE 0x11700106
329 #define GKWPSETWAKETYPE 0x11700108
330 #define GKWPSETTARGADDR 0x1170010a
331 #define GKWPSETKEYBYTES 0x1170010c
332 #define GKWPSETSTARTREQ 0x1170010e
333 #define GKWPSETSTARTRESP        0x11700110
334 #define GKWPSETPROTOCOL         0x11700112
335 #define GKWPGETLASTKEYBYTES     0x11700201
336 #define GKWPSETLASTKEYBYTES     0x11700202
337
338 #define GSCPGETBBR      0x11300001
339 #define GSCPSETBBR      0x11300002
340 #define GSCPGETID       0x11300003
341 #define GSCPSETID       0x11300004
342 #define GSCPADDFUNCID   0x11300005
343 #define GSCPCLRFUNCID   0x11300006
344
345 #define GUBPGETBITRATE          0x11800001
346 #define GUBPSETBITRATE          0x11800002
347 #define GUBPGETINTERBYTE        0x11800003
348 #define GUBPSETINTERBYTE        0x11800004
349 #define GUBPGETNACKMODE         0x11800005
350 #define GUBPSETNACKMODE         0x11800006
351 #define GUBPGETRETRYDELAY       0x11800007
352 #define GUBPSETRETRYDELAY       0x11800008
353
354 #define GRESETHC08              0x11800009
355 #define GTESTHC08COP            0x1180000A
356
357 #define GSJAGETLISTEN           0x11250001
358 #define GSJASETLISTEN           0x11250002
359 #define GSJAGETSELFTEST         0x11250003
360 #define GSJASETSELFTEST         0x11250004
361 #define GSJAGETXMITONCE         0x11250005
362 #define GSJASETXMITONCE         0x11250006
363 #define GSJAGETTRIGSTATE        0x11250007
364 #define GSJASETTRIGCTRL         0x11250008
365 #define GSJAGETTRIGCTRL         0x11250009
366 #define GSJAGETOUTSTATE         0x1125000A
367 #define GSJASETOUTSTATE         0x1125000B
368 #define GSJAGETFILTER           0x1125000C
369 #define GSJASETFILTER           0x1125000D
370 #define GSJAGETMASK             0x1125000E
371 #define GSJASETMASK             0x1125000F
372 #define GSJAGETINTTERM          0x11250010
373 #define GSJASETINTTERM          0x11250011
374 #define GSJAGETFTTRANS          0x11250012
375 #define GSJASETFTTRANS          0x11250013
376 #define GSJAGETFTERROR          0x11250014
377
378 #define GLINGETBITRATE          0x11C00001
379 #define GLINSETBITRATE          0x11C00002
380 #define GLINGETBRKSPACE         0x11C00003
381 #define GLINSETBRKSPACE         0x11C00004
382 #define GLINGETBRKMARK          0x11C00005
383 #define GLINSETBRKMARK          0x11C00006
384 #define GLINGETIDDELAY          0x11C00007
385 #define GLINSETIDDELAY          0x11C00008
386 #define GLINGETRESPDELAY        0x11C00009
387 #define GLINSETRESPDELAY        0x11C0000A
388 #define GLINGETINTERBYTE        0x11C0000B
389 #define GLINSETINTERBYTE        0x11C0000C
390 #define GLINGETWAKEUPDELAY      0x11C0000D
391 #define GLINSETWAKEUPDELAY      0x11C0000E
392 #define GLINGETWAKEUPTIMEOUT    0x11C0000F
393 #define GLINSETWAKEUPTIMEOUT    0x11C00010
394 #define GLINGETWUTIMOUT3BR      0x11C00011
395 #define GLINSETWUTIMOUT3BR      0x11C00012
396 #define GLINSENDWAKEUP          0x11C00013
397 #define GLINGETMODE             0x11C00014
398 #define GLINSETMODE             0x11C00015
399
400 #define GINPGETINP              0x11500001
401 #define GINPGETLATCH            0x11500002
402 #define GINPCLRLATCH            0x11500003
403 #define GOUTGET                 0x11510001
404 #define GOUTSET                 0x11510002
405 #define GOUTSETBIT              0x11510003
406 #define GOUTCLEARBIT            0x11510004
407 #define GPWRGETWHICH            0x11520001
408 #define GPWROFF                 0x11520002
409 #define GPWROFFRESET            0x11520003
410 #define GPWRRESET               0x11520004
411
412
413 /* Hardware / driver TYPE and SUBTYPE definitions */
414
415 #define GDUMMY          0x01    /* Dummy device driver TYPE */
416 #define GDGDMARKONE     0x01            /* Dummy device driver SUBTYPE */
417
418 #define GCAN            0x02    /* CAN TYPE */
419 #define G82527          0x01            /* 82527 SUBTYPE */
420 #define GSJA1000        0x02            /* SJA1000 SUBTYPE */
421 #define G82527SW        0x03            /* 82527 single wire subtype */
422 #define G82527ISO11992  0x04            /* 82527 ISO11992 subtype */
423 #define G82527_SINGLECHAN   0x05        /* 82527 single channel */
424 #define G82527SW_SINGLECHAN 0x06        /* 82527 single wire single channel */
425 #define G82527ISO11992_SINGLECHAN   0x07 /* 82527 ISO11992 single channel */
426 #define GSJA1000FT      0x10            /* SJA1000 Fault Tolerant subtype */
427 #define GSJA1000C       0x11            /* SJA1000 Compact subtype */
428 #define GSJA1000FT_FO   0x12            /* SJA1000 single chsnnel Fault Tolerant subtype */
429
430 #define GJ1850          0x03    /* 1850 TYPE */
431 #define GHBCCPAIR       0x01            /* HBCC SUBTYPE */
432 #define GDLC            0x02            /* GM DLC SUBTYPE */
433 #define GCHRYSLER       0x03            /* Chrysler SUBTYPE */
434 #define GDEHC12         0x04            /* DE HC12 KWP/BDLC SUBTYPE */
435
436 #define GKWP2000        0x04    /* Keyword protocol 2000 TYPE */
437 #define GDEHC12KWP      0x01            /* DE HC12 KWP/BDLC card SUBTYPE */
438
439 #define GHONDA          0x05    /* Honda UART TYPE */
440 #define GDGHC08         0x01            /* DG HC08 SUBTYPE */
441
442 #define GFORDUBP        0x06    /* FORD UBP TYPE */
443 #define GDGUBP08        0x01            /* DG HC08 SUBTYPE */
444
445 #define GSCI            0x09    /* Chrysler SCI TYPE */
446 #define G16550SCI       0x01            /* 16550 type UART based card SUBTYPE */
447
448 #define GCCD            0x0a    /* Chrysler C2D TYPE */
449 #define G16550CDP68HC68 0x01            /* 16550 / CDP68HC68S1 card SUBTYPE */
450
451 #define GLIN            0x0b    /* LIN TYPE */
452 #define GDGLIN08        0x01            /* DG HC08 SUBTYPE */
453
454 #define SIZEOF(x)       (sizeof(x)/sizeof(x[0]))
455
456 #define MEMCPY(dest, src, size)             \
457     memcpy (dest, src, size);               \
458     *((dest)+size) = 0;
459
460
461 typedef struct val_str_dsp {
462     int         value;
463     const char  *strptr;
464     int         (*cmd_fnct)(tvbuff_t *, int, proto_tree*);
465     int         (*rsp_fnct)(tvbuff_t *, int, proto_tree*);
466 } val_str_dsp;