Move 3 ASN1 dissectors to 'clean' group; move 1 PIDL dissector to 'dirty' group.
[metze/wireshark/wip.git] / epan / dissectors / packet-teklink.c
1 /* packet-teklink.c
2  * Routines for TEKLINK dissection
3  * Copyright (c)2010 Sven Schnelle <svens@stackframe.org>
4  *
5  * $Id$
6  *
7  * Wireshark - Network traffic analyzer
8  * By Gerald Combs <gerald@wireshark.org>
9  * Copyright 1998 Gerald Combs
10  *
11  * This program is free software; you can redistribute it and/or
12  * modify it under the terms of the GNU General Public License
13  * as published by the Free Software Foundation; either version 2
14  * of the License, or (at your option) any later version.
15  *
16  * This program is distributed in the hope that it will be useful,
17  * but WITHOUT ANY WARRANTY; without even the implied warranty of
18  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
19  * GNU General Public License for more details.
20  *
21  * You should have received a copy of the GNU General Public License
22  * along with this program; if not, write to the Free Software
23  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
24  */
25
26 #include "config.h"
27
28 #include "packet-rpc.h"
29
30 #define PROGRAM_TEKLINK 0x20400034
31
32 static int proto_teklink = -1;
33 static int hf_teklink_procedure = -1;
34 static int hf_teklink_unknown_long = -1;
35 static int hf_teklink_unknown_string = -1;
36 static int hf_teklink_cmd = -1;
37 static int hf_teklink_user = -1;
38 static int hf_teklink_host = -1;
39 static int hf_teklink_location = -1;
40 static int hf_teklink_tla_type = -1;
41 static int hf_teklink_locked = -1;
42 static int hf_teklink_vtc_srcnames = -1;
43 static int hf_teklink_vtc_dstnames = -1;
44 static int hf_teklink_vtc_sigpol = -1;
45 static int hf_teklink_vtc_sigen = -1;
46 static int hf_teklink_vtc_clksource = -1;
47 static int hf_teklink_vtc_clkmode = -1;
48 static int hf_teklink_vtc_clkedge = -1;
49 static int hf_teklink_vtc_mode = -1;
50 static int hf_teklink_vtc_edge = -1;
51 static int hf_teklink_vtc_sigfeedback = -1;
52
53 static gint ett_teklink = -1;
54
55 static const value_string teklink_vtc_srcnames[] = {
56         { 0, "VTC_SRC_APPSIG0" },
57         { 1, "VTC_SRC_APPSIG1" },
58         { 2, "VTC_SRC_APPSIG2" },
59         { 3, "VTC_SRC_APPSIG3" },
60         { 4, "VTC_SRC_APPSIG4" },
61         { 5, "VTC_SRC_APPSIG5" },
62         { 6, "VTC_SRC_APPSIG6" },
63         { 7, "VTC_SRC_APPSIG7" },
64         { 8, "VTC_SRC_APPSIG8" },
65         { 9, "VTC_SRC_APPSIG9" },
66         { 10, "VTC_SRC_APPSIG10" },
67         { 11, "VTC_SRC_APPSIG11" },
68         { 12, "VTC_SRC_TTLTRIG0" },
69         { 13, "VTC_SRC_TTLTRIG1" },
70         { 14, "VTC_SRC_TTLTRIG2" },
71         { 15, "VTC_SRC_TTLTRIG3" },
72         { 16, "VTC_SRC_TTLTRIG4" },
73         { 17, "VTC_SRC_TTLTRIG5" },
74         { 18, "VTC_SRC_TTLTRIG6" },
75         { 19, "VTC_SRC_TTLTRIG7" },
76         { 20, "VTC_SRC_XBAR1" },
77         { 21, "VTC_SRC_XBAR2" },
78         { 22, "VTC_SRC_ECLTRIG0" },
79         { 23, "VTC_SRC_ECLTRIG1" },
80         { 24, "VTC_SRC_ALL" },
81         { 25, "VTC_SRC_XXX" },
82         { 26, "VTC_SRC_XXX" },
83         { 27, "VTC_SRC_VCC" },
84         { 0, NULL },
85 };
86
87 static const value_string teklink_vtc_dstnames[] = {
88         { 0, "VTC_DST_APPSIG0" },
89         { 1, "VTC_DST_APPSIG1" },
90         { 2, "VTC_DST_APPSIG2" },
91         { 3, "VTC_DST_APPSIG3" },
92         { 4, "VTC_DST_APPSIG4" },
93         { 5, "VTC_DST_APPSIG5" },
94         { 6, "VTC_DST_APPSIG6" },
95         { 7, "VTC_DST_APPSIG7" },
96         { 8, "VTC_DST_APPSIG8" },
97         { 9, "VTC_DST_APPSIG9" },
98         { 10, "VTC_DST_APPSIG10" },
99         { 11, "VTC_DST_APPSIG11" },
100         { 12, "VTC_DST_TTLTRIG0" },
101         { 13, "VTC_DST_TTLTRIG1" },
102         { 14, "VTC_DST_TTLTRIG2" },
103         { 15, "VTC_DST_TTLTRIG3" },
104         { 16, "VTC_DST_TTLTRIG4" },
105         { 17, "VTC_DST_TTLTRIG5" },
106         { 18, "VTC_DST_TTLTRIG6" },
107         { 19, "VTC_DST_TTLTRIG7" },
108         { 20, "VTC_DST_XBAR1" },
109         { 21, "VTC_DST_XBAR2" },
110         { 22, "VTC_DST_ECLTRIG0" },
111         { 23, "VTC_DST_ECLTRIG1" },
112         { 24, "VTC_DST_ALL" },
113         { 0, NULL },
114 };
115
116 static const value_string teklink_vtc_sigen[] = {
117         { 0, "VTC_OUT_FORCE_OFF" },
118         { 1, "VTC_OUT_FORCE_ON" },
119         { 0, NULL },
120 };
121
122 static const value_string teklink_vtc_sigfeedback[] = {
123         { 0, "VTC_MODE_FEEDBK_OFF" },
124         { 1, "VTC_MODE_FEEDBK_ON" },
125         { 0, NULL },
126 };
127
128 static const value_string teklink_vtc_edge[] = {
129         { 0, "VTC_MODE_EDGE_FALL" },
130         { 1, "VTC_MODE_EDGE_RISE" },
131         { 0, NULL },
132 };
133
134 static const value_string teklink_vtc_sigpol[] = {
135         { 0, "VTC_OUT_POL_NORM" },
136         { 1, "VTC_OUT_POL_INVERT" },
137         { 0, NULL },
138 };
139
140 static const value_string teklink_vtc_clkmode[] = {
141         { 0, "VTC_CLK_MODE_ASYNCH" },
142         { 1, "VTC_CLK_MODE_SYNCH" },
143         { 0, NULL },
144 };
145
146 static const value_string teklink_vtc_clkedge[] = {
147         { 0, "VTC_CLK_EDGE_SENS_FALL" },
148         { 1, "VTC_CLK_EDGE_SENS_RISE" },
149         { 0, NULL },
150 };
151
152 static const value_string teklink_vtc_clksource[] = {
153         { 0, "VTC_CLK_SRC_GND" },
154         { 1, "VTC_CLK_SRC_1" },
155         { 2, "VTC_CLK_SRC_2" },
156         { 3, "VTC_CLK_SRC_CPUCLK" },
157         { 0, NULL },
158 };
159
160 static const value_string teklink_vtc_modes[] = {
161         { 0, "VTC_MODE_NONE" },
162         { 1, "VTC_MODE_1" },
163         { 2, "VTC_MODE_2" },
164         { 3, "VTC_MODE_3" },
165         { 4, "VTC_MODE_4" },
166         { 5, "VTC_MODE_5" },
167         { 6, "VTC_MODE_6" },
168         { 7, "VTC_MODE_EVENT_CNT_LAT" },
169         { 0, NULL },
170 };
171
172 static int dissect_teklink_tlaframeopen_call(tvbuff_t *tvb, int offset, packet_info *pinfo _U_,
173         proto_tree *tree)
174 {
175         offset = dissect_rpc_uint32(tvb, tree, hf_teklink_unknown_long, offset);
176         offset = dissect_rpc_string(tvb, tree, hf_teklink_unknown_string, offset, NULL);
177         offset = dissect_rpc_string(tvb, tree, hf_teklink_unknown_string, offset, NULL);
178         offset = dissect_rpc_string(tvb, tree, hf_teklink_unknown_string, offset, NULL);
179         return offset;
180 }
181
182 static int dissect_teklink_tlaframeclose_call(tvbuff_t *tvb, int offset, packet_info *pinfo _U_,
183         proto_tree *tree)
184 {
185         offset = dissect_rpc_uint32(tvb, tree, hf_teklink_unknown_long, offset);
186         return offset;
187 }
188
189 static int dissect_teklink_tlaframeclose_reply(tvbuff_t *tvb, int offset, packet_info *pinfo _U_,
190         proto_tree *tree)
191 {
192         offset = dissect_rpc_uint32(tvb, tree, hf_teklink_unknown_long, offset);
193         return offset;
194 }
195
196 static int dissect_teklink_tlaframeopen_reply(tvbuff_t *tvb, int offset, packet_info *pinfo _U_,
197         proto_tree *tree)
198 {
199         offset = dissect_rpc_uint32(tvb, tree, hf_teklink_unknown_long, offset);
200         offset = dissect_rpc_uint32(tvb, tree, hf_teklink_unknown_long, offset);
201         offset = dissect_rpc_uint32(tvb, tree, hf_teklink_unknown_long, offset);
202         return offset;
203 }
204
205 static int dissect_teklink_get_software_version_reply(tvbuff_t *tvb, int offset, packet_info *pinfo _U_,
206         proto_tree *tree)
207 {
208         offset = dissect_rpc_uint32(tvb, tree, hf_teklink_unknown_long, offset);
209         offset = dissect_rpc_uint32(tvb, tree, hf_teklink_unknown_long, offset);
210         offset = dissect_rpc_string(tvb, tree, hf_teklink_unknown_string, offset, NULL);
211         offset = dissect_rpc_string(tvb, tree, hf_teklink_unknown_string, offset, NULL);
212         return offset;
213 }
214
215 static int dissect_teklink_call65_call(tvbuff_t *tvb, int offset, packet_info *pinfo _U_,
216         proto_tree *tree)
217 {
218         offset = dissect_rpc_uint32(tvb, tree, hf_teklink_cmd, offset);
219         offset = dissect_rpc_uint32(tvb, tree, hf_teklink_unknown_long, offset);
220         offset = dissect_rpc_uint32(tvb, tree, hf_teklink_unknown_long, offset);
221         offset = dissect_rpc_uint32(tvb, tree, hf_teklink_unknown_long, offset);
222         offset = dissect_rpc_uint32(tvb, tree, hf_teklink_unknown_long, offset);
223         offset = dissect_rpc_uint32(tvb, tree, hf_teklink_unknown_long, offset);
224         return offset;
225 }
226
227 static int dissect_teklink_call65_reply(tvbuff_t *tvb, int offset, packet_info *pinfo _U_,
228         proto_tree *tree)
229 {
230         offset = dissect_rpc_uint32(tvb, tree, hf_teklink_unknown_long, offset);
231         return offset;
232 }
233
234 static int dissect_teklink_info_reply(tvbuff_t *tvb, int offset, packet_info *pinfo _U_,
235         proto_tree *tree)
236 {
237         offset = dissect_rpc_uint32(tvb, tree, hf_teklink_locked, offset);
238         offset = dissect_rpc_uint32(tvb, tree, hf_teklink_unknown_long, offset);
239         offset = dissect_rpc_uint32(tvb, tree, hf_teklink_tla_type, offset);
240         offset = dissect_rpc_uint32(tvb, tree, hf_teklink_unknown_long, offset);
241         offset = dissect_rpc_string(tvb, tree, hf_teklink_unknown_string, offset, NULL);
242         offset = dissect_rpc_string(tvb, tree, hf_teklink_location, offset, NULL);
243         offset = dissect_rpc_string(tvb, tree, hf_teklink_user, offset, NULL);
244         offset = dissect_rpc_string(tvb, tree, hf_teklink_host, offset, NULL);
245         offset = dissect_rpc_string(tvb, tree, hf_teklink_unknown_string, offset, NULL);
246         return offset;
247 }
248
249 static int dissect_teklink_info_call(tvbuff_t *tvb, int offset, packet_info *pinfo _U_,
250         proto_tree *tree)
251 {
252         offset = dissect_rpc_uint32(tvb, tree, hf_teklink_unknown_long, offset);
253         offset = dissect_rpc_uint32(tvb, tree, hf_teklink_unknown_long, offset);
254         return offset;
255 }
256
257
258 static int dissect_teklink_vtc_ident(tvbuff_t *tvb, int offset, packet_info *pinfo _U_,
259         proto_tree *tree)
260 {
261         offset = dissect_rpc_uint32(tvb, tree, hf_teklink_unknown_long, offset);
262         offset = dissect_rpc_uint32(tvb, tree, hf_teklink_unknown_long, offset);
263         return offset;
264 }
265
266 static int dissect_teklink_vtc_sigstatall(tvbuff_t *tvb, int offset, packet_info *pinfo _U_,
267         proto_tree *tree)
268 {
269         offset = dissect_rpc_uint32(tvb, tree, hf_teklink_unknown_long, offset);
270         offset = dissect_rpc_uint32(tvb, tree, hf_teklink_unknown_long, offset);
271         return offset;
272 }
273
274 static int dissect_teklink_vtc_outen(tvbuff_t *tvb, int offset, packet_info *pinfo _U_,
275         proto_tree *tree)
276 {
277         guint32 sig = tvb_get_ntohl(tvb, offset);
278         guint32 sigon = tvb_get_ntohl(tvb, offset + 4);
279
280         offset = dissect_rpc_uint32(tvb, tree, hf_teklink_vtc_dstnames, offset);
281         offset = dissect_rpc_uint32(tvb, tree, hf_teklink_vtc_sigen, offset);
282
283         col_append_fstr(pinfo->cinfo, COL_INFO," %s, %s ",
284                         val_to_str(sig, teklink_vtc_dstnames, "Unknown destination %d"),
285                         sigon ? "VTC_OUT_FORCE_ON" : "VTC_OUT_FORCE_OFF");
286         return offset;
287 }
288
289 static int dissect_teklink_vtc_map(tvbuff_t *tvb, int offset, packet_info *pinfo _U_,
290         proto_tree *tree)
291 {
292         guint32 src, dst;
293
294         src = tvb_get_ntohl(tvb, offset);
295         dst = tvb_get_ntohl(tvb, offset + 4);
296
297         offset = dissect_rpc_uint32(tvb, tree, hf_teklink_vtc_srcnames, offset);
298         offset = dissect_rpc_uint32(tvb, tree, hf_teklink_vtc_dstnames, offset);
299
300         col_append_fstr(pinfo->cinfo, COL_INFO," %s, %s ",
301                         val_to_str(src, teklink_vtc_srcnames, "Unknown source %d"),
302                         val_to_str(dst, teklink_vtc_dstnames, "Unknown destination %d"));
303         return offset;
304 }
305
306 static int dissect_teklink_vtc_clk(tvbuff_t *tvb, int offset, packet_info *pinfo _U_,
307         proto_tree *tree)
308 {
309         guint32 sig, clksource, clkedge, clkmode;
310
311         sig = tvb_get_ntohl(tvb, offset);
312         clksource = tvb_get_ntohl(tvb, offset + 4);
313         clkedge = tvb_get_ntohl(tvb, offset + 8);
314         clkmode = tvb_get_ntohl(tvb, offset + 12);
315
316         offset = dissect_rpc_uint32(tvb, tree, hf_teklink_vtc_dstnames, offset);
317         offset = dissect_rpc_uint32(tvb, tree, hf_teklink_vtc_clksource, offset);
318         offset = dissect_rpc_uint32(tvb, tree, hf_teklink_vtc_clkedge, offset);
319         offset = dissect_rpc_uint32(tvb, tree, hf_teklink_vtc_clkmode, offset);
320
321         col_append_fstr(pinfo->cinfo, COL_INFO,"  %s, %s, %s, %s",
322                         val_to_str(sig, teklink_vtc_dstnames, "Unknown destination %d"),
323                         val_to_str(clksource, teklink_vtc_clksource, "Unknown clocksource %d"),
324                         val_to_str(clkedge, teklink_vtc_clkedge, "Unknown edge setting %d"),
325                         val_to_str(clkmode, teklink_vtc_clkmode, "Unknown mode setting %d"));
326         return offset;
327 }
328
329 static int dissect_teklink_vtc_mode(tvbuff_t *tvb, int offset, packet_info *pinfo _U_,
330         proto_tree *tree)
331 {
332         guint32 sig, edge, mode;
333
334         sig = tvb_get_ntohl(tvb, offset);
335         edge = tvb_get_ntohl(tvb, offset + 4);
336         mode = tvb_get_ntohl(tvb, offset + 12);
337
338         offset = dissect_rpc_uint32(tvb, tree, hf_teklink_vtc_dstnames, offset);
339         offset = dissect_rpc_uint32(tvb, tree, hf_teklink_vtc_edge, offset);
340         offset = dissect_rpc_uint32(tvb, tree, hf_teklink_unknown_long, offset);
341         offset = dissect_rpc_uint32(tvb, tree, hf_teklink_vtc_mode, offset);
342
343         col_append_fstr(pinfo->cinfo, COL_INFO," %s, %s, %s",
344                         val_to_str(sig, teklink_vtc_dstnames, "Unknown destination %d"),
345                         val_to_str(edge, teklink_vtc_edge, "Unknown edge setting %d"),
346                         val_to_str(mode, teklink_vtc_modes, "Unknown mode setting %d"));
347         return offset;
348 }
349
350 static int dissect_teklink_vtc_outsetup(tvbuff_t *tvb, int offset, packet_info *pinfo _U_,
351         proto_tree *tree)
352 {
353         guint32 sig, en, pol, feedback;
354
355         sig = tvb_get_ntohl(tvb, offset);
356         en = tvb_get_ntohl(tvb, offset + 4);
357         pol = tvb_get_ntohl(tvb, offset + 8);
358         feedback = tvb_get_ntohl(tvb, offset + 12);
359
360         offset = dissect_rpc_uint32(tvb, tree, hf_teklink_vtc_dstnames, offset);
361         offset = dissect_rpc_uint32(tvb, tree, hf_teklink_vtc_sigen, offset);
362         offset = dissect_rpc_uint32(tvb, tree, hf_teklink_vtc_sigpol, offset);
363         offset = dissect_rpc_uint32(tvb, tree, hf_teklink_vtc_sigfeedback, offset);
364
365         col_append_fstr(pinfo->cinfo, COL_INFO," %s, %s, %s, %s",
366                         val_to_str(sig, teklink_vtc_dstnames, "Unknown destination %d"),
367                         val_to_str(pol, teklink_vtc_sigpol, "Unknown signal polarity %d"),
368                         val_to_str(en, teklink_vtc_sigen, "Unknown signal enable %d"),
369                         val_to_str(feedback, teklink_vtc_sigfeedback, "Unknown signal feedback setting %d"));
370         return offset;
371 }
372
373 static int dissect_teklink_vtc_res(tvbuff_t *tvb, int offset, packet_info *pinfo _U_,
374         proto_tree *tree)
375 {
376         guint32 sig = tvb_get_ntohl(tvb, offset);
377
378         offset = dissect_rpc_uint32(tvb, tree, hf_teklink_vtc_dstnames, offset);
379
380         col_append_fstr(pinfo->cinfo, COL_INFO," %s",
381                         val_to_str(sig, teklink_vtc_dstnames, "Unknown destination %d"));
382         return offset;
383 }
384
385 static int dissect_teklink_vtl_spinbits(tvbuff_t *tvb, int offset, packet_info *pinfo _U_,
386         proto_tree *tree)
387 {
388         offset = dissect_rpc_uint32(tvb, tree, hf_teklink_unknown_long, offset);
389         return offset;
390 }
391
392 static int dissect_teklink_vtl_zmode(tvbuff_t *tvb, int offset, packet_info *pinfo _U_,
393         proto_tree *tree)
394 {
395         offset = dissect_rpc_uint32(tvb, tree, hf_teklink_unknown_long, offset);
396         return offset;
397 }
398
399 static const vsff teklink_proc[] = {
400         { 1, "TLAFrameOpen", dissect_teklink_tlaframeopen_call, dissect_teklink_tlaframeopen_reply },
401         { 2, "TLAFrameClose", dissect_teklink_tlaframeclose_call, dissect_teklink_tlaframeclose_reply },
402         { 3, "GetSoftwareVersion", NULL, dissect_teklink_get_software_version_reply },
403         { 4, "GetInfo", dissect_teklink_info_call, dissect_teklink_info_reply },
404         { 5, "VtcIdent", NULL, dissect_teklink_vtc_ident },
405         { 7, "VtcOutEn", dissect_teklink_vtc_outen, NULL },
406         { 8, "VtcMap", dissect_teklink_vtc_map, NULL },
407         { 9, "VtcOutSetup", dissect_teklink_vtc_outsetup, NULL },
408         { 10, "VtcClk", dissect_teklink_vtc_clk, NULL },
409         { 11, "VtcMode", dissect_teklink_vtc_mode, NULL },
410         { 12, "VtcRes", dissect_teklink_vtc_res, NULL },
411         { 13, "VtcHardRes", NULL, NULL },
412         { 14, "VtcSigStatAll", NULL, dissect_teklink_vtc_sigstatall },
413         { 20, "VtlZMode", NULL, dissect_teklink_vtl_zmode },
414         { 21, "VtlSpinBits", NULL, dissect_teklink_vtl_spinbits },
415         { 65, "Unknown (65)", dissect_teklink_call65_call, dissect_teklink_call65_reply },
416         { 0, NULL, NULL, NULL }
417 };
418
419 static const value_string teklink_proc_vals[] = {
420         { 1, "TLAFrameOpen" },
421         { 2, "TLAFrameClose" },
422         { 3, "TLAFrameGetStatus" },
423         { 4, "GetInfo" },
424         { 5, "VtcIdent" },
425         { 7, "VtcOutEn" },
426         { 8, "VtcMap" },
427         { 9, "VtcOutSetup" },
428         { 10, "VtcClk" },
429         { 11, "VtcMode" },
430         { 12, "VtcRes" },
431         { 13, "VtcHardRes" },
432         { 14, "VtcSigStatAll" },
433         { 15, "VtcPeek" },
434         { 16, "VtcPoke" },
435         { 20, "VtlZMode" },
436         { 21, "VtlSpinBits" },
437         { 30, "TLAFrameResetVISA" },
438         { 35, "VtcRemoteDiag" },
439         { 36, "TLAFrameRunPostDiag" },
440         { 37, "TLAFrameTigerAccess" },
441         { 40, "XXX" },
442         { 41, "XXX" },
443         { 42, "TLAGetFrameError" },
444         { 50, "TLAFileOpen" },
445         { 51, "TLAReadFile" },
446         { 52, "TLAWriteFile" },
447         { 53, "TLAFileClose" },
448         { 54, "TLAFlashImage" },
449
450         { 0, NULL }
451 };
452
453 static const value_string teklink_error_vals[] = {
454         { 0, NULL }
455 };
456
457 static const value_string teklink_cmd_vals[] = {
458         { 0, "TLKFreeResources" },
459         { 1, "TLKCreateDeleteEventRoute" },
460         { 2, "TLKDeleteRoutesForSignal" },
461         { 3, "CanRequestBeRouted" },
462         { 4, "TLKIsRouted" },
463         { 5, "TLACreateSysRoutes" },
464         { 6, "TLAStart" },
465         { 7, "TLAGetFrameDelay" },
466         { 8, "TLAFrameRegisterCallBack" },
467         { 10, "TLAGetTrggerDelay" },
468         { 0, NULL }
469 };
470
471 static const value_string teklink_tla_types[] = {
472         { 0x02, "TLA711" },
473         { 0x03, "TLA714" },
474         { 0x04, "TLA720" },
475         { 0x05, "TLA60X" },
476         { 0x06, "TLA6XX" },
477         { 0x13, "TLA714A" },
478         { 0x14, "TLA715" },
479         { 0x15, "TLA721" },
480         { 0x16, "TLA520X" },
481         { 0x17, "TLA7012" },
482         { 0x18, "TLA7016" },
483         { 0x00, NULL }
484 };
485
486 void
487 proto_register_teklink(void)
488 {
489         static hf_register_info hf_core[] = {
490                 { &hf_teklink_procedure, {
491                                 "Procedure", "teklink.procedure", FT_UINT8, BASE_DEC,
492                                 VALS(teklink_proc_vals), 0, NULL, HFILL }},
493                 { &hf_teklink_unknown_long, {
494                                 "Unknown long", "teklink.long", FT_UINT32, BASE_HEX,
495                                 NULL, 0, NULL, HFILL }},
496                 { &hf_teklink_unknown_string, {
497                                 "Unknown String", "teklink.string", FT_STRING, BASE_NONE,
498                                 NULL, 0, NULL, HFILL }},
499                 { &hf_teklink_cmd, {
500                                 "Command", "teklink.command", FT_UINT32, BASE_DEC,
501                                 VALS(teklink_cmd_vals), 0, NULL, HFILL }},
502                 { &hf_teklink_tla_type, {
503                                 "TLA Type", "teklink.tla_type", FT_UINT32, BASE_DEC,
504                                 VALS(teklink_tla_types), 0, NULL, HFILL }},
505                 { &hf_teklink_host, {
506                                 "Host", "teklink.host", FT_STRING, BASE_NONE,
507                                 NULL, 0, NULL, HFILL }},
508                 { &hf_teklink_user, {
509                                 "User", "teklink.user", FT_STRING, BASE_NONE,
510                                 NULL, 0, NULL, HFILL }},
511                 { &hf_teklink_location, {
512                                 "Location", "teklink.location", FT_STRING, BASE_NONE,
513                                 NULL, 0, NULL, HFILL }},
514                 { &hf_teklink_locked, {
515                                 "Locked", "teklink.locked", FT_UINT32, BASE_HEX,
516                                 NULL, 0, NULL, HFILL }},
517                 { &hf_teklink_vtc_dstnames, {
518                                 "Destination signal", "teklink.signal.destination", FT_UINT32, BASE_HEX,
519                                 VALS(teklink_vtc_dstnames), 0, NULL, HFILL }},
520                 { &hf_teklink_vtc_srcnames, {
521                                 "Source signal", "teklink.signal.source", FT_UINT32, BASE_HEX,
522                                 VALS(teklink_vtc_srcnames), 0, NULL, HFILL }},
523                 { &hf_teklink_vtc_sigen, {
524                                 "Signal Enable", "teklink.signal.enable", FT_UINT32, BASE_HEX,
525                                 VALS(teklink_vtc_sigen), 0, NULL, HFILL }},
526                 { &hf_teklink_vtc_sigpol, {
527                                 "Signal Polarity", "teklink.signal.polarity", FT_UINT32, BASE_HEX,
528                                 VALS(teklink_vtc_sigpol), 0, NULL, HFILL }},
529                 { &hf_teklink_vtc_clkmode, {
530                                 "Clock Mode", "teklink.clock.polarity", FT_UINT32, BASE_HEX,
531                                 VALS(teklink_vtc_clkmode), 0, NULL, HFILL }},
532                 { &hf_teklink_vtc_clkedge, {
533                                 "Clock Edge", "teklink.clock.polarity", FT_UINT32, BASE_HEX,
534                                 VALS(teklink_vtc_clkedge), 0, NULL, HFILL }},
535                 { &hf_teklink_vtc_clksource, {
536                                 "Clock Source", "teklink.clock.source", FT_UINT32, BASE_HEX,
537                                 VALS(teklink_vtc_clksource), 0, NULL, HFILL }},
538                 { &hf_teklink_vtc_mode, {
539                                 "Signal Mode", "teklink.signal.mode", FT_UINT32, BASE_HEX,
540                                 VALS(teklink_vtc_modes), 0, NULL, HFILL }},
541                 { &hf_teklink_vtc_edge, {
542                                 "Signal Edge", "teklink.signal.edge", FT_UINT32, BASE_HEX,
543                                 VALS(teklink_vtc_edge), 0, NULL, HFILL }},
544                 { &hf_teklink_vtc_sigfeedback, {
545                                 "Signal Feedbmode", "teklink.signal.feedback", FT_UINT32, BASE_HEX,
546                                 VALS(teklink_vtc_sigfeedback), 0, NULL, HFILL }}
547         };
548
549         static gint *ett[] = {
550                 &ett_teklink
551         };
552
553         proto_teklink = proto_register_protocol("TEKLINK", "TEKLINK", "teklink");
554         proto_register_field_array(proto_teklink, hf_core, array_length(hf_core));
555         proto_register_subtree_array(ett, array_length(ett));
556 }
557
558 void
559 proto_reg_handoff_teklink(void)
560 {
561         /* Register the protocol as RPC */
562         rpc_init_prog(proto_teklink, PROGRAM_TEKLINK, ett_teklink);
563
564         /* Register the procedure tables */
565         rpc_init_proc_table(PROGRAM_TEKLINK, 1, teklink_proc, hf_teklink_procedure);
566 }