Revert "TODO epan/dissectors/asn1/kerberos/packet-kerberos-template.c new GSS flags"
[wireshark-sm.git] / epan / dissectors / packet-teklink.c
blobcc486a3f762f4195876b5ce8cfa699532254ea0f
1 /* packet-teklink.c
2 * Routines for TEKLINK dissection
3 * Copyright (c)2010 Sven Schnelle <svens@stackframe.org>
5 * Wireshark - Network traffic analyzer
6 * By Gerald Combs <gerald@wireshark.org>
7 * Copyright 1998 Gerald Combs
9 * SPDX-License-Identifier: GPL-2.0-or-later
12 #include "config.h"
14 #include "packet-rpc.h"
16 #define PROGRAM_TEKLINK 0x20400034
18 void proto_reg_handoff_teklink(void);
19 void proto_register_teklink(void);
21 static int proto_teklink;
22 static int hf_teklink_procedure;
23 static int hf_teklink_unknown_long;
24 static int hf_teklink_unknown_string;
25 static int hf_teklink_cmd;
26 static int hf_teklink_user;
27 static int hf_teklink_host;
28 static int hf_teklink_location;
29 static int hf_teklink_tla_type;
30 static int hf_teklink_locked;
31 static int hf_teklink_vtc_srcnames;
32 static int hf_teklink_vtc_dstnames;
33 static int hf_teklink_vtc_sigpol;
34 static int hf_teklink_vtc_sigen;
35 static int hf_teklink_vtc_clksource;
36 static int hf_teklink_vtc_clkmode;
37 static int hf_teklink_vtc_clkedge;
38 static int hf_teklink_vtc_mode;
39 static int hf_teklink_vtc_edge;
40 static int hf_teklink_vtc_sigfeedback;
42 static int ett_teklink;
44 static const value_string teklink_vtc_srcnames[] = {
45 { 0, "VTC_SRC_APPSIG0" },
46 { 1, "VTC_SRC_APPSIG1" },
47 { 2, "VTC_SRC_APPSIG2" },
48 { 3, "VTC_SRC_APPSIG3" },
49 { 4, "VTC_SRC_APPSIG4" },
50 { 5, "VTC_SRC_APPSIG5" },
51 { 6, "VTC_SRC_APPSIG6" },
52 { 7, "VTC_SRC_APPSIG7" },
53 { 8, "VTC_SRC_APPSIG8" },
54 { 9, "VTC_SRC_APPSIG9" },
55 { 10, "VTC_SRC_APPSIG10" },
56 { 11, "VTC_SRC_APPSIG11" },
57 { 12, "VTC_SRC_TTLTRIG0" },
58 { 13, "VTC_SRC_TTLTRIG1" },
59 { 14, "VTC_SRC_TTLTRIG2" },
60 { 15, "VTC_SRC_TTLTRIG3" },
61 { 16, "VTC_SRC_TTLTRIG4" },
62 { 17, "VTC_SRC_TTLTRIG5" },
63 { 18, "VTC_SRC_TTLTRIG6" },
64 { 19, "VTC_SRC_TTLTRIG7" },
65 { 20, "VTC_SRC_XBAR1" },
66 { 21, "VTC_SRC_XBAR2" },
67 { 22, "VTC_SRC_ECLTRIG0" },
68 { 23, "VTC_SRC_ECLTRIG1" },
69 { 24, "VTC_SRC_ALL" },
70 { 25, "VTC_SRC_XXX" },
71 { 26, "VTC_SRC_XXX" },
72 { 27, "VTC_SRC_VCC" },
73 { 0, NULL },
76 static const value_string teklink_vtc_dstnames[] = {
77 { 0, "VTC_DST_APPSIG0" },
78 { 1, "VTC_DST_APPSIG1" },
79 { 2, "VTC_DST_APPSIG2" },
80 { 3, "VTC_DST_APPSIG3" },
81 { 4, "VTC_DST_APPSIG4" },
82 { 5, "VTC_DST_APPSIG5" },
83 { 6, "VTC_DST_APPSIG6" },
84 { 7, "VTC_DST_APPSIG7" },
85 { 8, "VTC_DST_APPSIG8" },
86 { 9, "VTC_DST_APPSIG9" },
87 { 10, "VTC_DST_APPSIG10" },
88 { 11, "VTC_DST_APPSIG11" },
89 { 12, "VTC_DST_TTLTRIG0" },
90 { 13, "VTC_DST_TTLTRIG1" },
91 { 14, "VTC_DST_TTLTRIG2" },
92 { 15, "VTC_DST_TTLTRIG3" },
93 { 16, "VTC_DST_TTLTRIG4" },
94 { 17, "VTC_DST_TTLTRIG5" },
95 { 18, "VTC_DST_TTLTRIG6" },
96 { 19, "VTC_DST_TTLTRIG7" },
97 { 20, "VTC_DST_XBAR1" },
98 { 21, "VTC_DST_XBAR2" },
99 { 22, "VTC_DST_ECLTRIG0" },
100 { 23, "VTC_DST_ECLTRIG1" },
101 { 24, "VTC_DST_ALL" },
102 { 0, NULL },
105 static const value_string teklink_vtc_sigen[] = {
106 { 0, "VTC_OUT_FORCE_OFF" },
107 { 1, "VTC_OUT_FORCE_ON" },
108 { 0, NULL },
111 static const value_string teklink_vtc_sigfeedback[] = {
112 { 0, "VTC_MODE_FEEDBK_OFF" },
113 { 1, "VTC_MODE_FEEDBK_ON" },
114 { 0, NULL },
117 static const value_string teklink_vtc_edge[] = {
118 { 0, "VTC_MODE_EDGE_FALL" },
119 { 1, "VTC_MODE_EDGE_RISE" },
120 { 0, NULL },
123 static const value_string teklink_vtc_sigpol[] = {
124 { 0, "VTC_OUT_POL_NORM" },
125 { 1, "VTC_OUT_POL_INVERT" },
126 { 0, NULL },
129 static const value_string teklink_vtc_clkmode[] = {
130 { 0, "VTC_CLK_MODE_ASYNCH" },
131 { 1, "VTC_CLK_MODE_SYNCH" },
132 { 0, NULL },
135 static const value_string teklink_vtc_clkedge[] = {
136 { 0, "VTC_CLK_EDGE_SENS_FALL" },
137 { 1, "VTC_CLK_EDGE_SENS_RISE" },
138 { 0, NULL },
141 static const value_string teklink_vtc_clksource[] = {
142 { 0, "VTC_CLK_SRC_GND" },
143 { 1, "VTC_CLK_SRC_1" },
144 { 2, "VTC_CLK_SRC_2" },
145 { 3, "VTC_CLK_SRC_CPUCLK" },
146 { 0, NULL },
149 static const value_string teklink_vtc_modes[] = {
150 { 0, "VTC_MODE_NONE" },
151 { 1, "VTC_MODE_1" },
152 { 2, "VTC_MODE_2" },
153 { 3, "VTC_MODE_3" },
154 { 4, "VTC_MODE_4" },
155 { 5, "VTC_MODE_5" },
156 { 6, "VTC_MODE_6" },
157 { 7, "VTC_MODE_EVENT_CNT_LAT" },
158 { 0, NULL },
161 static int dissect_teklink_tlaframeopen_call(tvbuff_t *tvb, packet_info *pinfo _U_,
162 proto_tree *tree, void* data _U_)
164 int offset = 0;
165 offset = dissect_rpc_uint32(tvb, tree, hf_teklink_unknown_long, offset);
166 offset = dissect_rpc_string(tvb, tree, hf_teklink_unknown_string, offset, NULL);
167 offset = dissect_rpc_string(tvb, tree, hf_teklink_unknown_string, offset, NULL);
168 offset = dissect_rpc_string(tvb, tree, hf_teklink_unknown_string, offset, NULL);
169 return offset;
172 static int dissect_teklink_tlaframeclose_call(tvbuff_t *tvb, packet_info *pinfo _U_,
173 proto_tree *tree, void* data _U_)
175 return dissect_rpc_uint32(tvb, tree, hf_teklink_unknown_long, 0);
178 static int dissect_teklink_tlaframeclose_reply(tvbuff_t *tvb, packet_info *pinfo _U_,
179 proto_tree *tree, void* data _U_)
181 return dissect_rpc_uint32(tvb, tree, hf_teklink_unknown_long, 0);
184 static int dissect_teklink_tlaframeopen_reply(tvbuff_t *tvb, packet_info *pinfo _U_,
185 proto_tree *tree, void* data _U_)
187 int offset = 0;
188 offset = dissect_rpc_uint32(tvb, tree, hf_teklink_unknown_long, offset);
189 offset = dissect_rpc_uint32(tvb, tree, hf_teklink_unknown_long, offset);
190 offset = dissect_rpc_uint32(tvb, tree, hf_teklink_unknown_long, offset);
191 return offset;
194 static int dissect_teklink_get_software_version_reply(tvbuff_t *tvb, packet_info *pinfo _U_,
195 proto_tree *tree, void* data _U_)
197 int offset = 0;
198 offset = dissect_rpc_uint32(tvb, tree, hf_teklink_unknown_long, offset);
199 offset = dissect_rpc_uint32(tvb, tree, hf_teklink_unknown_long, offset);
200 offset = dissect_rpc_string(tvb, tree, hf_teklink_unknown_string, offset, NULL);
201 offset = dissect_rpc_string(tvb, tree, hf_teklink_unknown_string, offset, NULL);
202 return offset;
205 static int dissect_teklink_call65_call(tvbuff_t *tvb, packet_info *pinfo _U_,
206 proto_tree *tree, void* data _U_)
208 int offset = 0;
209 offset = dissect_rpc_uint32(tvb, tree, hf_teklink_cmd, offset);
210 offset = dissect_rpc_uint32(tvb, tree, hf_teklink_unknown_long, offset);
211 offset = dissect_rpc_uint32(tvb, tree, hf_teklink_unknown_long, offset);
212 offset = dissect_rpc_uint32(tvb, tree, hf_teklink_unknown_long, offset);
213 offset = dissect_rpc_uint32(tvb, tree, hf_teklink_unknown_long, offset);
214 offset = dissect_rpc_uint32(tvb, tree, hf_teklink_unknown_long, offset);
215 return offset;
218 static int dissect_teklink_call65_reply(tvbuff_t *tvb, packet_info *pinfo _U_,
219 proto_tree *tree, void* data _U_)
221 return dissect_rpc_uint32(tvb, tree, hf_teklink_unknown_long, 0);
224 static int dissect_teklink_info_reply(tvbuff_t *tvb, packet_info *pinfo _U_,
225 proto_tree *tree, void* data _U_)
227 int offset = 0;
228 offset = dissect_rpc_uint32(tvb, tree, hf_teklink_locked, offset);
229 offset = dissect_rpc_uint32(tvb, tree, hf_teklink_unknown_long, offset);
230 offset = dissect_rpc_uint32(tvb, tree, hf_teklink_tla_type, offset);
231 offset = dissect_rpc_uint32(tvb, tree, hf_teklink_unknown_long, offset);
232 offset = dissect_rpc_string(tvb, tree, hf_teklink_unknown_string, offset, NULL);
233 offset = dissect_rpc_string(tvb, tree, hf_teklink_location, offset, NULL);
234 offset = dissect_rpc_string(tvb, tree, hf_teklink_user, offset, NULL);
235 offset = dissect_rpc_string(tvb, tree, hf_teklink_host, offset, NULL);
236 offset = dissect_rpc_string(tvb, tree, hf_teklink_unknown_string, offset, NULL);
237 return offset;
240 static int dissect_teklink_info_call(tvbuff_t *tvb, packet_info *pinfo _U_,
241 proto_tree *tree, void* data _U_)
243 int offset = 0;
244 offset = dissect_rpc_uint32(tvb, tree, hf_teklink_unknown_long, offset);
245 offset = dissect_rpc_uint32(tvb, tree, hf_teklink_unknown_long, offset);
246 return offset;
250 static int dissect_teklink_vtc_ident(tvbuff_t *tvb, packet_info *pinfo _U_,
251 proto_tree *tree, void* data _U_)
253 int offset = 0;
254 offset = dissect_rpc_uint32(tvb, tree, hf_teklink_unknown_long, offset);
255 offset = dissect_rpc_uint32(tvb, tree, hf_teklink_unknown_long, offset);
256 return offset;
259 static int dissect_teklink_vtc_sigstatall(tvbuff_t *tvb, packet_info *pinfo _U_,
260 proto_tree *tree, void* data _U_)
262 int offset = 0;
263 offset = dissect_rpc_uint32(tvb, tree, hf_teklink_unknown_long, offset);
264 offset = dissect_rpc_uint32(tvb, tree, hf_teklink_unknown_long, offset);
265 return offset;
268 static int dissect_teklink_vtc_outen(tvbuff_t *tvb, packet_info *pinfo _U_,
269 proto_tree *tree, void* data _U_)
271 int offset = 0;
272 uint32_t sig = tvb_get_ntohl(tvb, offset);
273 uint32_t sigon = tvb_get_ntohl(tvb, offset + 4);
275 offset = dissect_rpc_uint32(tvb, tree, hf_teklink_vtc_dstnames, offset);
276 offset = dissect_rpc_uint32(tvb, tree, hf_teklink_vtc_sigen, offset);
278 col_append_fstr(pinfo->cinfo, COL_INFO," %s, %s ",
279 val_to_str(sig, teklink_vtc_dstnames, "Unknown destination %d"),
280 sigon ? "VTC_OUT_FORCE_ON" : "VTC_OUT_FORCE_OFF");
281 return offset;
284 static int dissect_teklink_vtc_map(tvbuff_t *tvb, packet_info *pinfo _U_,
285 proto_tree *tree, void* data _U_)
287 uint32_t src, dst;
288 int offset = 0;
290 src = tvb_get_ntohl(tvb, offset);
291 dst = tvb_get_ntohl(tvb, offset + 4);
293 offset = dissect_rpc_uint32(tvb, tree, hf_teklink_vtc_srcnames, offset);
294 offset = dissect_rpc_uint32(tvb, tree, hf_teklink_vtc_dstnames, offset);
296 col_append_fstr(pinfo->cinfo, COL_INFO," %s, %s ",
297 val_to_str(src, teklink_vtc_srcnames, "Unknown source %d"),
298 val_to_str(dst, teklink_vtc_dstnames, "Unknown destination %d"));
299 return offset;
302 static int dissect_teklink_vtc_clk(tvbuff_t *tvb, packet_info *pinfo _U_,
303 proto_tree *tree, void* data _U_)
305 uint32_t sig, clksource, clkedge, clkmode;
306 int offset = 0;
308 sig = tvb_get_ntohl(tvb, offset);
309 clksource = tvb_get_ntohl(tvb, offset + 4);
310 clkedge = tvb_get_ntohl(tvb, offset + 8);
311 clkmode = tvb_get_ntohl(tvb, offset + 12);
313 offset = dissect_rpc_uint32(tvb, tree, hf_teklink_vtc_dstnames, offset);
314 offset = dissect_rpc_uint32(tvb, tree, hf_teklink_vtc_clksource, offset);
315 offset = dissect_rpc_uint32(tvb, tree, hf_teklink_vtc_clkedge, offset);
316 offset = dissect_rpc_uint32(tvb, tree, hf_teklink_vtc_clkmode, offset);
318 col_append_fstr(pinfo->cinfo, COL_INFO," %s, %s, %s, %s",
319 val_to_str(sig, teklink_vtc_dstnames, "Unknown destination %d"),
320 val_to_str(clksource, teklink_vtc_clksource, "Unknown clocksource %d"),
321 val_to_str(clkedge, teklink_vtc_clkedge, "Unknown edge setting %d"),
322 val_to_str(clkmode, teklink_vtc_clkmode, "Unknown mode setting %d"));
323 return offset;
326 static int dissect_teklink_vtc_mode(tvbuff_t *tvb, packet_info *pinfo _U_,
327 proto_tree *tree, void* data _U_)
329 uint32_t sig, edge, mode;
330 int offset = 0;
332 sig = tvb_get_ntohl(tvb, offset);
333 edge = tvb_get_ntohl(tvb, offset + 4);
334 mode = tvb_get_ntohl(tvb, offset + 12);
336 offset = dissect_rpc_uint32(tvb, tree, hf_teklink_vtc_dstnames, offset);
337 offset = dissect_rpc_uint32(tvb, tree, hf_teklink_vtc_edge, offset);
338 offset = dissect_rpc_uint32(tvb, tree, hf_teklink_unknown_long, offset);
339 offset = dissect_rpc_uint32(tvb, tree, hf_teklink_vtc_mode, offset);
341 col_append_fstr(pinfo->cinfo, COL_INFO," %s, %s, %s",
342 val_to_str(sig, teklink_vtc_dstnames, "Unknown destination %d"),
343 val_to_str(edge, teklink_vtc_edge, "Unknown edge setting %d"),
344 val_to_str(mode, teklink_vtc_modes, "Unknown mode setting %d"));
345 return offset;
348 static int dissect_teklink_vtc_outsetup(tvbuff_t *tvb, packet_info *pinfo _U_,
349 proto_tree *tree, void* data _U_)
351 uint32_t sig, en, pol, feedback;
352 int offset = 0;
354 sig = tvb_get_ntohl(tvb, offset);
355 en = tvb_get_ntohl(tvb, offset + 4);
356 pol = tvb_get_ntohl(tvb, offset + 8);
357 feedback = tvb_get_ntohl(tvb, offset + 12);
359 offset = dissect_rpc_uint32(tvb, tree, hf_teklink_vtc_dstnames, offset);
360 offset = dissect_rpc_uint32(tvb, tree, hf_teklink_vtc_sigen, offset);
361 offset = dissect_rpc_uint32(tvb, tree, hf_teklink_vtc_sigpol, offset);
362 offset = dissect_rpc_uint32(tvb, tree, hf_teklink_vtc_sigfeedback, offset);
364 col_append_fstr(pinfo->cinfo, COL_INFO," %s, %s, %s, %s",
365 val_to_str(sig, teklink_vtc_dstnames, "Unknown destination %d"),
366 val_to_str(pol, teklink_vtc_sigpol, "Unknown signal polarity %d"),
367 val_to_str(en, teklink_vtc_sigen, "Unknown signal enable %d"),
368 val_to_str(feedback, teklink_vtc_sigfeedback, "Unknown signal feedback setting %d"));
369 return offset;
372 static int dissect_teklink_vtc_res(tvbuff_t *tvb, packet_info *pinfo _U_,
373 proto_tree *tree, void* data _U_)
375 int offset = 0;
376 uint32_t sig = tvb_get_ntohl(tvb, offset);
378 offset = dissect_rpc_uint32(tvb, tree, hf_teklink_vtc_dstnames, offset);
380 col_append_fstr(pinfo->cinfo, COL_INFO," %s",
381 val_to_str(sig, teklink_vtc_dstnames, "Unknown destination %d"));
382 return offset;
385 static int dissect_teklink_vtl_spinbits(tvbuff_t *tvb, packet_info *pinfo _U_,
386 proto_tree *tree, void* data _U_)
388 int offset = 0;
389 offset = dissect_rpc_uint32(tvb, tree, hf_teklink_unknown_long, offset);
390 return offset;
393 static int dissect_teklink_vtl_zmode(tvbuff_t *tvb, packet_info *pinfo _U_,
394 proto_tree *tree, void* data _U_)
396 return dissect_rpc_uint32(tvb, tree, hf_teklink_unknown_long, 0);
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", dissect_rpc_void, dissect_teklink_get_software_version_reply },
403 { 4, "GetInfo", dissect_teklink_info_call, dissect_teklink_info_reply },
404 { 5, "VtcIdent", dissect_rpc_void, dissect_teklink_vtc_ident },
405 { 7, "VtcOutEn", dissect_teklink_vtc_outen, dissect_rpc_void },
406 { 8, "VtcMap", dissect_teklink_vtc_map, dissect_rpc_void },
407 { 9, "VtcOutSetup", dissect_teklink_vtc_outsetup, dissect_rpc_void },
408 { 10, "VtcClk", dissect_teklink_vtc_clk, dissect_rpc_void },
409 { 11, "VtcMode", dissect_teklink_vtc_mode, dissect_rpc_void },
410 { 12, "VtcRes", dissect_teklink_vtc_res, dissect_rpc_void },
411 { 13, "VtcHardRes", dissect_rpc_void, dissect_rpc_void },
412 { 14, "VtcSigStatAll", dissect_rpc_void, dissect_teklink_vtc_sigstatall },
413 { 20, "VtlZMode", dissect_rpc_void, dissect_teklink_vtl_zmode },
414 { 21, "VtlSpinBits", dissect_rpc_void, dissect_teklink_vtl_spinbits },
415 { 65, "Unknown (65)", dissect_teklink_call65_call, dissect_teklink_call65_reply },
416 { 0, NULL, NULL, NULL }
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" },
450 { 0, NULL }
453 static const rpc_prog_vers_info teklink_vers_info[] = {
454 { 1, teklink_proc, &hf_teklink_procedure },
457 #if 0
458 static const value_string teklink_error_vals[] = {
459 { 0, NULL }
461 #endif
463 static const value_string teklink_cmd_vals[] = {
464 { 0, "TLKFreeResources" },
465 { 1, "TLKCreateDeleteEventRoute" },
466 { 2, "TLKDeleteRoutesForSignal" },
467 { 3, "CanRequestBeRouted" },
468 { 4, "TLKIsRouted" },
469 { 5, "TLACreateSysRoutes" },
470 { 6, "TLAStart" },
471 { 7, "TLAGetFrameDelay" },
472 { 8, "TLAFrameRegisterCallBack" },
473 { 10, "TLAGetTrggerDelay" },
474 { 0, NULL }
477 static const value_string teklink_tla_types[] = {
478 { 0x02, "TLA711" },
479 { 0x03, "TLA714" },
480 { 0x04, "TLA720" },
481 { 0x05, "TLA60X" },
482 { 0x06, "TLA6XX" },
483 { 0x13, "TLA714A" },
484 { 0x14, "TLA715" },
485 { 0x15, "TLA721" },
486 { 0x16, "TLA520X" },
487 { 0x17, "TLA7012" },
488 { 0x18, "TLA7016" },
489 { 0x00, NULL }
492 void
493 proto_register_teklink(void)
495 static hf_register_info hf_core[] = {
496 { &hf_teklink_procedure, {
497 "Procedure", "teklink.procedure", FT_UINT8, BASE_DEC,
498 VALS(teklink_proc_vals), 0, NULL, HFILL }},
499 { &hf_teklink_unknown_long, {
500 "Unknown long", "teklink.long", FT_UINT32, BASE_HEX,
501 NULL, 0, NULL, HFILL }},
502 { &hf_teklink_unknown_string, {
503 "Unknown String", "teklink.string", FT_STRING, BASE_NONE,
504 NULL, 0, NULL, HFILL }},
505 { &hf_teklink_cmd, {
506 "Command", "teklink.command", FT_UINT32, BASE_DEC,
507 VALS(teklink_cmd_vals), 0, NULL, HFILL }},
508 { &hf_teklink_tla_type, {
509 "TLA Type", "teklink.tla_type", FT_UINT32, BASE_DEC,
510 VALS(teklink_tla_types), 0, NULL, HFILL }},
511 { &hf_teklink_host, {
512 "Host", "teklink.host", FT_STRING, BASE_NONE,
513 NULL, 0, NULL, HFILL }},
514 { &hf_teklink_user, {
515 "User", "teklink.user", FT_STRING, BASE_NONE,
516 NULL, 0, NULL, HFILL }},
517 { &hf_teklink_location, {
518 "Location", "teklink.location", FT_STRING, BASE_NONE,
519 NULL, 0, NULL, HFILL }},
520 { &hf_teklink_locked, {
521 "Locked", "teklink.locked", FT_UINT32, BASE_HEX,
522 NULL, 0, NULL, HFILL }},
523 { &hf_teklink_vtc_dstnames, {
524 "Destination signal", "teklink.signal.destination", FT_UINT32, BASE_HEX,
525 VALS(teklink_vtc_dstnames), 0, NULL, HFILL }},
526 { &hf_teklink_vtc_srcnames, {
527 "Source signal", "teklink.signal.source", FT_UINT32, BASE_HEX,
528 VALS(teklink_vtc_srcnames), 0, NULL, HFILL }},
529 { &hf_teklink_vtc_sigen, {
530 "Signal Enable", "teklink.signal.enable", FT_UINT32, BASE_HEX,
531 VALS(teklink_vtc_sigen), 0, NULL, HFILL }},
532 { &hf_teklink_vtc_sigpol, {
533 "Signal Polarity", "teklink.signal.polarity", FT_UINT32, BASE_HEX,
534 VALS(teklink_vtc_sigpol), 0, NULL, HFILL }},
535 { &hf_teklink_vtc_clkmode, {
536 "Clock Mode", "teklink.clock.mode", FT_UINT32, BASE_HEX,
537 VALS(teklink_vtc_clkmode), 0, NULL, HFILL }},
538 { &hf_teklink_vtc_clkedge, {
539 "Clock Edge", "teklink.clock.clkedge", FT_UINT32, BASE_HEX,
540 VALS(teklink_vtc_clkedge), 0, NULL, HFILL }},
541 { &hf_teklink_vtc_clksource, {
542 "Clock Source", "teklink.clock.source", FT_UINT32, BASE_HEX,
543 VALS(teklink_vtc_clksource), 0, NULL, HFILL }},
544 { &hf_teklink_vtc_mode, {
545 "Signal Mode", "teklink.signal.mode", FT_UINT32, BASE_HEX,
546 VALS(teklink_vtc_modes), 0, NULL, HFILL }},
547 { &hf_teklink_vtc_edge, {
548 "Signal Edge", "teklink.signal.edge", FT_UINT32, BASE_HEX,
549 VALS(teklink_vtc_edge), 0, NULL, HFILL }},
550 { &hf_teklink_vtc_sigfeedback, {
551 "Signal Feedbmode", "teklink.signal.feedback", FT_UINT32, BASE_HEX,
552 VALS(teklink_vtc_sigfeedback), 0, NULL, HFILL }}
555 static int *ett[] = {
556 &ett_teklink
559 proto_teklink = proto_register_protocol("TEKLINK", "TEKLINK", "teklink");
560 proto_register_field_array(proto_teklink, hf_core, array_length(hf_core));
561 proto_register_subtree_array(ett, array_length(ett));
564 void
565 proto_reg_handoff_teklink(void)
567 /* Register the protocol as RPC */
568 rpc_init_prog(proto_teklink, PROGRAM_TEKLINK, ett_teklink,
569 G_N_ELEMENTS(teklink_vers_info), teklink_vers_info);
573 * Editor modelines - https://www.wireshark.org/tools/modelines.html
575 * Local variables:
576 * c-basic-offset: 8
577 * tab-width: 8
578 * indent-tabs-mode: t
579 * End:
581 * vi: set shiftwidth=8 tabstop=8 noexpandtab:
582 * :indentSize=8:tabSize=8:noTabs=false: