checkAPIs.pl: support for new-style dissectors in check_hf_entries
[metze/wireshark/wip.git] / epan / dissectors / packet-itdm.c
1 /* packet-itdm.c
2  * Routines for I-TDM (Internal TDM) dissection
3  * Compliant to PICMG SFP.0 and SFP.1 March 24, 2005
4  *
5  * Copyright 2008, Dan Gora <dg [AT] adax.com>
6  *
7  * Wireshark - Network traffic analyzer
8  * By Gerald Combs <gerald@wireshark.org>
9  * Copyright 1998 Gerald Combs
10  *
11  * SPDX-License-Identifier: GPL-2.0-or-later
12  */
13
14 #include "config.h"
15
16 #include <epan/packet.h>
17 #include <epan/prefs.h>
18
19 void proto_register_itdm(void);
20 void proto_reg_handoff_itdm(void);
21
22 /* Initialize the protocol and registered fields */
23 static int proto_itdm        = -1;
24 static int hf_itdm_timestamp = -1;
25 static int hf_itdm_seqnum    = -1;
26 static int hf_itdm_sop_eop   = -1;
27 static int hf_itdm_last_pack = -1;
28 static int hf_itdm_pktlen    = -1;
29 static int hf_itdm_chksum    = -1;
30 static int hf_itdm_uid       = -1;
31 static int hf_itdm_ack       = -1;
32 static int hf_itdm_act       = -1;
33 static int hf_itdm_chcmd     = -1;
34 static int hf_itdm_chid      = -1;
35 static int hf_itdm_chloc1    = -1;
36 static int hf_itdm_chloc2    = -1;
37 static int hf_itdm_pktrate   = -1;
38 static int hf_itdm_cxnsize   = -1;
39
40 /* I-TDM control protocol fields */
41 static int hf_itdm_ctl_transid   = -1;
42 static int hf_itdm_ctl_command   = -1;
43 static int hf_itdm_ctl_flowid    = -1;
44 static int hf_itdm_ctl_dm        = -1;
45 static int hf_itdm_ctl_emts      = -1;
46 static int hf_itdm_ctl_pktrate   = -1;
47 static int hf_itdm_ctl_ptid      = -1;
48 static int hf_itdm_ctl_cksum     = -1;
49
50
51 /* Initialize the subtree pointers */
52 static gint ett_itdm       = -1;
53 static gint ett_itdm_ctl   = -1;
54
55 static dissector_handle_t itdm_handle;
56
57 /* ZZZZ some magic number.. */
58 static guint gbl_ItdmMPLSLabel = 0x99887;
59 static guint gbl_ItdmCTLFlowNo = 0;
60
61 /* I-TDM 125usec mode commands for data flows */
62 #define ITDM_CMD_NEW_CHAN     1
63 #define ITDM_CMD_CLOSE_CHAN   2
64 #define ITDM_CMD_RELOC_CHAN   3
65 #define ITDM_CMD_CYCLIC_REAF  4
66 #define ITDM_CMD_PACKET_RATE  5
67
68 #define ITDM_FLOWID_OFFSET    7
69 #define ITDM_CHCMD_OFFSET    10
70 #define ITDM_CHANID_OFFSET   11
71 #define ITDM_CHLOC1_OFFSET   14
72 #define ITDM_CHLOC2_OFFSET   16
73
74 /* I-TDM commands for I-TDM control flows */
75 #define ITDM_CTL_TRANSID_OFFSET    10
76 #define ITDM_CTL_CMD_OFFSET        14
77 #define ITDM_CTL_FLOWID_OFFSET     15
78 #define ITDM_CTL_ITDM_MODE_OFFSET  18
79 #define ITDM_CTL_EMTS_OFFSET       20
80 #define ITDM_CTL_PKTRATE_OFFSET    22
81 #define ITDM_CTL_PAIRED_TRANSID_OFFSET    26
82 #define ITDM_CTL_CRC_OFFSET        30
83
84 #define ITDM_CTL_CMD_AFI_REQ  1
85
86 static const value_string sop_eop_vals[] = {
87   { 0x0, "Middle of Packet" },
88   { 0x1, "End of Packet" },
89   { 0x2, "Start of Packet" },
90   { 0x3, "Complete Packet" },
91   { 0, NULL }
92 };
93
94 static const true_false_string ack_tfs = {
95   "Acknowledging a command from remote node",
96   "Normal Command"
97 };
98
99 static const value_string chcmd_vals[] = {
100   { 0x0, "Reserved" },
101   { 0x1, "New Channel ID" },
102   { 0x2, "Close Channel ID" },
103   { 0x3, "Relocate Channel ID" },
104   { 0x4, "Cyclic Reaffirmation" },
105   { 0x5, "Packet Rate Integrity Check" },
106   { 0x6, "Reserved" },
107   { 0x7, "Reserved" },
108   { 0x8, "Reserved" },
109   { 0x9, "Reserved" },
110   { 0xa, "Reserved" },
111   { 0xb, "Reserved" },
112   { 0xc, "Reserved" },
113   { 0xd, "Reserved" },
114   { 0xe, "Reserved" },
115   { 0xf, "Reserved" },
116   { 0, NULL }
117 };
118
119 static const value_string itdm_ctl_command_vals[] = {
120   { 0x0, "Not Used" },
121   { 0x1, "AFI_REQ: Alloc Flow ID Req" },
122   { 0x2, "AFI_RSP: Alloc Flow ID Rsp - Req Accepted." },
123   { 0x3, "DFI_REQ: Dealloc Flow ID Req" },
124   { 0x4, "DFI_RSP: Dealloc Flow ID Rsp - Req Accepted." },
125
126   { 0x10, "AFI_RSP: Reject: Data Mode Field value Not Supported." },
127   { 0x11, "AFI_RSP: Reject: Explicit Multi-timeslot value Not Supported." },
128   { 0x12, "AFI_RSP: Reject: Packet Rate value Not Supported." },
129   { 0x13, "AFI_RSP: Reject: Checksum Invalid." },
130   { 0x14, "AFI_RSP: Reject: No more flows available." },
131
132   { 0x20, "DFI_RSP: Reject: Data Mode Field value does not match Flow ID." },
133   { 0x21, "DFI_RSP: Reject: Explicit Multi-timeslots value does not match." },
134   { 0x22, "DFI_RSP: Reject: Packet Rate value does not match." },
135   { 0x23, "DFI_RSP: Reject: Checksum Invalid." },
136   { 0x24, "DFI_RSP: Reject: Flow ID invalid (out of range)." },
137   { 0x25, "DFI_RSP: Reject: Flow ID not currently allocated." },
138   { 0x26, "DFI_RSP: Reject: Other Flow ID in pair has active connections." },
139   { 0, NULL }
140 };
141
142 static const value_string itdm_ctl_data_mode_vals[] = {
143   { 0, "Not Used." },
144   { 1, "I-TDM 1ms Data Mode." },
145   { 2, "I-TDM 125usec Data Mode." },
146   { 3, "I-TDM Explicit Multi-timeslot Data Mode." },
147   { 4, "I-TDM CAS Signaling Data Mode." },
148   { 0, NULL }
149 };
150
151 static const value_string itdm_ctl_pktrate_vals[] = {
152   { 0x447A0000, "I-TDM 1ms Data Mode." },
153   { 0x45FA0000, "I-TDM 125usec/EMTS Data Mode." },
154   { 0x43A6AAAB, "I-TDM T1 CAS Mode." },
155   { 0x43FA0000, "I-TDM E1 CAS Mode." },
156   { 0, NULL }
157 };
158
159 static void
160 dissect_itdm_125usec(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
161 {
162   tvbuff_t  *next_tvb;
163   proto_item *itdm_item = NULL;
164   proto_tree *itdm_tree = NULL;
165   int offset;
166   guint32 flowid;
167   guint32 chanid;
168   guint16 chloc1;
169   guint16 chloc2;
170   guint8 chcmd;
171   guint8 actbit;
172   guint8 ackbit;
173
174
175   col_set_str(pinfo->cinfo, COL_PROTOCOL, "ITDM");
176
177   flowid = tvb_get_ntoh24(tvb, ITDM_FLOWID_OFFSET);
178   chanid = tvb_get_ntoh24(tvb, ITDM_CHANID_OFFSET);
179   chcmd  = tvb_get_guint8(tvb, ITDM_CHCMD_OFFSET);
180   chloc1 = tvb_get_ntohs(tvb, ITDM_CHLOC1_OFFSET);
181   actbit = (chcmd & 0x10) ? 1 : 0;
182   ackbit = (chcmd & 0x20) ? 1 : 0;
183   chcmd  = chcmd & 0x0f;
184
185   col_add_fstr(pinfo->cinfo, COL_INFO,
186       "Flow %d Chan %d ACT %d ACK %d %s",
187       flowid, chanid, actbit, ackbit,
188       val_to_str_const(chcmd, chcmd_vals, "Reserved"));
189   if (chcmd == ITDM_CMD_NEW_CHAN ||
190       chcmd == ITDM_CMD_CLOSE_CHAN ||
191       chcmd == ITDM_CMD_CYCLIC_REAF)
192   {
193     col_append_fstr(pinfo->cinfo, COL_INFO,
194         " Loc1 %d", chloc1);
195   }
196   else if (chcmd == ITDM_CMD_RELOC_CHAN)
197   {
198     chloc2 = tvb_get_ntohs(tvb, ITDM_CHLOC2_OFFSET);
199     col_append_fstr(pinfo->cinfo, COL_INFO,
200       " Loc1 %d Loc2 %d", chloc1, chloc2);
201   }
202
203   offset = 0;
204
205   if (tree)
206   {
207   itdm_item = proto_tree_add_item(tree, proto_itdm, tvb, 0, -1, ENC_NA);
208   itdm_tree = proto_item_add_subtree(itdm_item, ett_itdm);
209
210   proto_tree_add_item(itdm_tree, hf_itdm_timestamp, tvb, offset, 2, ENC_BIG_ENDIAN);
211   offset += 2;
212   proto_tree_add_item(itdm_tree, hf_itdm_seqnum, tvb, offset, 1, ENC_BIG_ENDIAN);
213   offset += 1;
214   proto_tree_add_item(itdm_tree, hf_itdm_sop_eop, tvb, offset, 1, ENC_BIG_ENDIAN);
215   proto_tree_add_item(itdm_tree, hf_itdm_last_pack, tvb, offset, 1, ENC_BIG_ENDIAN);
216   proto_tree_add_item(itdm_tree, hf_itdm_pktlen, tvb, offset, 2, ENC_BIG_ENDIAN);
217   offset += 2;
218   proto_tree_add_checksum(itdm_tree, tvb, offset, hf_itdm_chksum, -1, NULL, pinfo, 0, ENC_BIG_ENDIAN, PROTO_CHECKSUM_NO_FLAGS);
219   offset += 2;
220   proto_tree_add_item(itdm_tree, hf_itdm_uid, tvb, offset, 3, ENC_BIG_ENDIAN);
221   offset += 3;
222   proto_tree_add_item(itdm_tree, hf_itdm_ack, tvb, offset, 1, ENC_BIG_ENDIAN);
223   proto_tree_add_item(itdm_tree, hf_itdm_act, tvb, offset, 1, ENC_BIG_ENDIAN);
224   proto_tree_add_item(itdm_tree, hf_itdm_chcmd, tvb, offset, 1, ENC_BIG_ENDIAN);
225   offset += 1;
226   proto_tree_add_item(itdm_tree, hf_itdm_chid, tvb, offset, 3, ENC_BIG_ENDIAN);
227   offset += 3;
228   if (chcmd == ITDM_CMD_PACKET_RATE)
229   {
230     proto_tree_add_item(itdm_tree, hf_itdm_pktrate, tvb, offset, 4, ENC_BIG_ENDIAN);
231     offset += 4;
232   }
233   else
234   {
235     proto_tree_add_item(itdm_tree, hf_itdm_chloc1, tvb, offset, 2, ENC_BIG_ENDIAN);
236     offset += 2;
237     if (chcmd == ITDM_CMD_CYCLIC_REAF ||
238         chcmd == ITDM_CMD_NEW_CHAN ||
239         chcmd == ITDM_CMD_CLOSE_CHAN)
240     {
241       proto_tree_add_item(itdm_tree, hf_itdm_cxnsize, tvb, offset, 2, ENC_BIG_ENDIAN);
242       offset += 2;
243     }
244     else
245     {
246       proto_tree_add_item(itdm_tree, hf_itdm_chloc2, tvb, offset, 2, ENC_BIG_ENDIAN);
247       offset += 2;
248     }
249   }
250   }
251
252   next_tvb = tvb_new_subset_remaining(tvb, offset);
253   call_data_dissector(next_tvb, pinfo, tree);
254 }
255
256 static void
257 dissect_itdm_control(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
258 {
259   tvbuff_t  *next_tvb;
260   proto_item *itdm_ctl_item = NULL;
261   proto_tree *itdm_ctl_tree = NULL;
262   int offset;
263   guint32 flowid;
264   guint8 command;
265   guint32 trans_id;
266   guint32 paired_trans_id;
267   guint32 allocd_flowid;
268
269   col_set_str(pinfo->cinfo, COL_PROTOCOL, "ITDM-Control");
270
271   flowid = tvb_get_ntoh24(tvb, ITDM_FLOWID_OFFSET);
272   command = tvb_get_guint8(tvb, ITDM_CTL_CMD_OFFSET);
273   allocd_flowid = tvb_get_ntoh24(tvb, ITDM_CTL_FLOWID_OFFSET);
274   trans_id = tvb_get_ntohl(tvb, ITDM_CTL_TRANSID_OFFSET);
275   paired_trans_id = tvb_get_ntohl(tvb, ITDM_CTL_PAIRED_TRANSID_OFFSET);
276
277   col_add_fstr(pinfo->cinfo, COL_INFO,
278       "Flow %d Command %s ",
279       flowid, val_to_str_const(command, itdm_ctl_command_vals, "Reserved"));
280
281   if (command != ITDM_CTL_CMD_AFI_REQ )
282   {
283     col_append_fstr(pinfo->cinfo, COL_INFO,
284         " Alloc'd FlowID %d", allocd_flowid);
285   }
286
287   col_append_fstr(pinfo->cinfo, COL_INFO, " TransID 0x%x ", trans_id);
288
289   if (command != ITDM_CTL_CMD_AFI_REQ )
290   {
291     col_append_fstr(pinfo->cinfo, COL_INFO,
292         " Paired TransID 0x%x", paired_trans_id);
293   }
294
295   offset = 0;
296
297   if (tree)
298   {
299   itdm_ctl_item = proto_tree_add_item(tree, proto_itdm, tvb, 0, -1, ENC_NA);
300   itdm_ctl_tree = proto_item_add_subtree(itdm_ctl_item, ett_itdm_ctl);
301
302   /* These eventually should go into a SFP.0 dissector... */
303   proto_tree_add_item(itdm_ctl_tree, hf_itdm_timestamp, tvb, offset, 2, ENC_BIG_ENDIAN);
304   offset += 2;
305   proto_tree_add_item(itdm_ctl_tree, hf_itdm_seqnum, tvb, offset, 1, ENC_BIG_ENDIAN);
306   offset += 1;
307   proto_tree_add_item(itdm_ctl_tree, hf_itdm_sop_eop, tvb, offset, 1, ENC_BIG_ENDIAN);
308   proto_tree_add_item(itdm_ctl_tree, hf_itdm_last_pack, tvb, offset, 1, ENC_BIG_ENDIAN);
309   proto_tree_add_item(itdm_ctl_tree, hf_itdm_pktlen, tvb, offset, 2, ENC_BIG_ENDIAN);
310   offset += 2;
311   proto_tree_add_checksum(itdm_ctl_tree, tvb, offset, hf_itdm_chksum, -1, NULL, pinfo, 0, ENC_BIG_ENDIAN, PROTO_CHECKSUM_NO_FLAGS);
312   offset += 2;
313   proto_tree_add_item(itdm_ctl_tree, hf_itdm_uid, tvb, offset, 3, ENC_BIG_ENDIAN);
314   offset += 3;
315
316   proto_tree_add_item(itdm_ctl_tree, hf_itdm_ctl_transid, tvb, offset, 4, ENC_BIG_ENDIAN);
317   offset += 4;
318
319   proto_tree_add_item(itdm_ctl_tree, hf_itdm_ctl_command, tvb, offset, 1, ENC_BIG_ENDIAN);
320   offset += 1;
321   if (command != ITDM_CTL_CMD_AFI_REQ) {
322     proto_tree_add_item(itdm_ctl_tree, hf_itdm_ctl_flowid, tvb, offset, 3, ENC_BIG_ENDIAN);
323   }
324   offset += 3;
325   proto_tree_add_item(itdm_ctl_tree, hf_itdm_ctl_dm, tvb, offset, 1, ENC_BIG_ENDIAN);
326   offset += 1;
327   /* rsvd.. */
328   offset += 1;
329   proto_tree_add_item(itdm_ctl_tree, hf_itdm_ctl_emts, tvb, offset, 2, ENC_BIG_ENDIAN);
330   offset += 2;
331   proto_tree_add_item(itdm_ctl_tree, hf_itdm_ctl_pktrate, tvb, offset, 4, ENC_BIG_ENDIAN);
332   offset += 4;
333   if (command != ITDM_CTL_CMD_AFI_REQ) {
334     proto_tree_add_item(itdm_ctl_tree, hf_itdm_ctl_ptid, tvb, offset, 4, ENC_BIG_ENDIAN);
335   }
336   offset += 4;
337   /* rsvd.. */
338   offset += 2;
339   proto_tree_add_item(itdm_ctl_tree, hf_itdm_ctl_cksum, tvb, offset, 2, ENC_BIG_ENDIAN);
340   offset += 2;
341   }
342
343   next_tvb = tvb_new_subset_remaining(tvb, offset);
344   call_data_dissector(next_tvb, pinfo, tree);
345 }
346
347 static int
348 dissect_itdm(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_)
349 {
350   guint32 flowid;
351
352   /* ZZZ for now, 125 usec mode and I-TDM control protocol
353    * need to add 1ms mode */
354   if (tvb_captured_length(tvb) < 18)
355     return 0;
356
357   /* See if this packet is a data flow or the I-TDM control flow. */
358   flowid = tvb_get_ntoh24(tvb, ITDM_FLOWID_OFFSET);
359
360   /* gbl_ItdmCTLFlowNo is the configurable flow number where
361    * the control protocol resides... Usually 0.
362    */
363   if (flowid == gbl_ItdmCTLFlowNo)
364     dissect_itdm_control(tvb, pinfo, tree);
365   else
366     dissect_itdm_125usec(tvb, pinfo, tree);
367   return tvb_captured_length(tvb);
368 }
369
370 void
371 proto_register_itdm(void)
372 {
373
374   static hf_register_info hf[] = {
375     { &hf_itdm_timestamp,{ "Timestamp", "itdm.timestamp",
376       FT_UINT16, BASE_DEC, NULL, 0x0, NULL, HFILL } },
377     { &hf_itdm_seqnum,{ "Sequence Number", "itdm.seqnum",
378       FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL } },
379     { &hf_itdm_sop_eop,{ "Start/End of Packet", "itdm.sop_eop",
380       FT_UINT8, BASE_DEC, VALS(sop_eop_vals), 0xc0, NULL, HFILL } },
381     { &hf_itdm_last_pack,{ "Last Packet", "itdm.last_pack",
382       FT_BOOLEAN, 8, TFS(&tfs_true_false), 0x20, NULL, HFILL } },
383     { &hf_itdm_pktlen,{ "Packet Length", "itdm.pktlen",
384       FT_UINT16, BASE_DEC, NULL, 0x07ff, NULL, HFILL } },
385     { &hf_itdm_chksum,{ "Checksum", "itdm.chksum",
386       FT_UINT16, BASE_HEX, NULL, 0x0, NULL, HFILL } },
387     { &hf_itdm_uid,{ "Flow ID", "itdm.uid",
388       FT_UINT24, BASE_DEC, NULL, 0x0, NULL, HFILL } },
389     { &hf_itdm_ack,{ "ACK", "itdm.ack",
390       FT_BOOLEAN, 8, TFS(&ack_tfs), 0x20, NULL, HFILL } },
391     { &hf_itdm_act,{ "Activate", "itdm.act",
392       FT_BOOLEAN, 8, TFS(&tfs_true_false), 0x10, NULL, HFILL } },
393     { &hf_itdm_chcmd,{ "Channel Command", "itdm.chcmd",
394       FT_UINT8, BASE_DEC, VALS(chcmd_vals), 0x0f, NULL, HFILL } },
395     { &hf_itdm_chid,{ "Channel ID", "itdm.chid",
396       FT_UINT24, BASE_DEC, NULL, 0x0, NULL, HFILL } },
397     { &hf_itdm_chloc1,{ "Channel Location 1", "itdm.chloc1",
398       FT_UINT16, BASE_DEC, NULL, 0x1ff, NULL, HFILL } },
399     { &hf_itdm_chloc2,{ "Channel Location 2", "itdm.chloc2",
400       FT_UINT16, BASE_DEC, NULL, 0x1ff, NULL, HFILL } },
401     { &hf_itdm_pktrate,{ "IEEE 754 Packet Rate", "itdm.pktrate",
402        FT_UINT32, BASE_HEX, NULL, 0x0, NULL, HFILL } },
403     { &hf_itdm_cxnsize, { "Connection Size", "itdm.cxnsize",
404        FT_UINT16, BASE_DEC, NULL, 0x0, NULL, HFILL } },
405
406     { &hf_itdm_ctl_transid, { "Transaction ID", "itdm.ctl_transid",
407        FT_UINT32, BASE_HEX, NULL, 0x0, NULL, HFILL } },
408     { &hf_itdm_ctl_command, { "Control Command", "itdm.ctl_cmd",
409        FT_UINT8, BASE_DEC, VALS(itdm_ctl_command_vals), 0x0, NULL, HFILL } },
410     { &hf_itdm_ctl_flowid, { "Allocated Flow ID", "itdm.ctl_flowid",
411        FT_UINT24, BASE_DEC, NULL, 0x0, NULL, HFILL } },
412     { &hf_itdm_ctl_dm, { "I-TDM Data Mode", "itdm.ctl_dm",
413        FT_UINT8, BASE_DEC, VALS(itdm_ctl_data_mode_vals), 0x0, NULL, HFILL } },
414     { &hf_itdm_ctl_emts, { "I-TDM Explicit Multi-timeslot Size", "itdm.ctlemts",
415        FT_UINT16, BASE_DEC, NULL, 0x0, NULL, HFILL } },
416     { &hf_itdm_ctl_pktrate, { "I-TDM Packet Rate", "itdm.ctl_pktrate",
417        FT_UINT32, BASE_HEX, VALS(itdm_ctl_pktrate_vals), 0x0, NULL, HFILL } },
418     { &hf_itdm_ctl_ptid, { "Paired Transaction ID", "itdm.ctl_ptid",
419        FT_UINT32, BASE_HEX, NULL, 0x0, NULL, HFILL } },
420     { &hf_itdm_ctl_cksum, { "ITDM Control Message Checksum", "itdm.ctl_cksum",
421        FT_UINT16, BASE_HEX, NULL, 0x0, NULL, HFILL } }
422   };
423
424   static gint *ett[] = {
425     &ett_itdm,
426     &ett_itdm_ctl
427   };
428
429   module_t *itdm_module;
430
431   proto_itdm = proto_register_protocol("Internal TDM", "ITDM", "itdm");
432   itdm_handle = register_dissector("itdm", dissect_itdm, proto_itdm);
433
434   proto_register_field_array(proto_itdm, hf, array_length(hf));
435   proto_register_subtree_array(ett, array_length(ett));
436
437   itdm_module = prefs_register_protocol(proto_itdm, proto_reg_handoff_itdm);
438
439   prefs_register_uint_preference(itdm_module, "mpls_label",
440     "ITDM MPLS label (Flow Bundle ID in hex)",
441     "The MPLS label (aka Flow Bundle ID) used by ITDM traffic.",
442     16, &gbl_ItdmMPLSLabel);
443
444   prefs_register_uint_preference(itdm_module, "ctl_flowno",
445     "I-TDM Control Protocol Flow Number",
446     "Flow Number used by I-TDM Control Protocol traffic.",
447     10, &gbl_ItdmCTLFlowNo);
448 }
449
450 void
451 proto_reg_handoff_itdm(void)
452 {
453   static gboolean Initialized=FALSE;
454   static guint ItdmMPLSLabel;
455
456   if (!Initialized) {
457     Initialized=TRUE;
458   } else {
459     dissector_delete_uint("mpls.label", ItdmMPLSLabel, itdm_handle);
460   }
461
462   ItdmMPLSLabel = gbl_ItdmMPLSLabel;
463   dissector_add_uint("mpls.label", gbl_ItdmMPLSLabel, itdm_handle);
464 }
465
466 /*
467  * Editor modelines  -  http://www.wireshark.org/tools/modelines.html
468  *
469  * Local Variables:
470  * c-basic-offset: 2
471  * tab-width: 8
472  * indent-tabs-mode: nil
473  * End:
474  *
475  * ex: set shiftwidth=2 tabstop=8 expandtab:
476  * :indentSize=2:tabSize=8:noTabs=true:
477  */