1 /* packet-ppi-antenna.c
2 * Routines for PPI-GEOLOCATION-ANNTENNA dissection
3 * Copyright 2010, Harris Corp, jellch@harris.com
5 * Wireshark - Network traffic analyzer
6 * By Gerald Combs <gerald@wireshark.org>
7 * Copyright 1998 Gerald Combs
9 * Copied from packet-radiotap.c
11 * SPDX-License-Identifier: GPL-2.0-or-later
16 #include <epan/packet.h>
17 #include <epan/expert.h>
18 #include "packet-ppi-geolocation-common.h"
20 enum ppi_antenna_type
{
21 PPI_ANTENNA_ANTFLAGS
= 0, /* Various flags about the antenna in use, Polarity, etc */
22 PPI_ANTENNA_GAINDB
= 1, /* Antenna gain, in dBi */
23 PPI_ANTENNA_HORIZBW
= 2, /* Antenna beamwidth, horizontal */
24 PPI_ANTENNA_VERTBW
= 3, /* Antenna beamwidth, vertical */
25 PPI_ANTENNA_PGAIN
= 4, /* precision gain */
26 PPI_ANTENNA_BEAMID
= 5, /* beam identifier (electrically steerable only) */
29 PPI_ANTENNA_SERIALNUM
= 26,
30 PPI_ANTENNA_MODELSTR
= 27, /*32 bytes, fixed length, null terminated model of antenna */
31 PPI_ANTENNA_DESCSTR
= 28, /*32 bytes, fixed length, null terminated description of what the antenna is for */
32 PPI_ANTENNA_APPID
= 29, /*4-byte identifier*/
33 PPI_ANTENNA_APPDATA
= 30, /* 60-byte app-id specific data*/
34 PPI_ANTENNA_EXT
= 31 /* Indicates n extended bitmap follows */
36 #define PPI_ANTENNA_MAXTAGLEN 187 /* increase as fields are added */
38 void proto_register_ppi_antenna(void);
41 static int proto_ppi_antenna
;
43 static int hf_ppi_antenna_version
;
44 static int hf_ppi_antenna_pad
;
45 static int hf_ppi_antenna_length
;
46 static int hf_ppi_antenna_present
;
47 static int hf_ppi_antenna_flags
;
48 static int hf_ppi_antenna_gaindb
;
49 static int hf_ppi_antenna_horizbw
;
50 static int hf_ppi_antenna_vertbw
;
51 static int hf_ppi_antenna_pgain
;
52 static int hf_ppi_antenna_beamid
;
53 static int hf_ppi_antenna_serialnum
;
54 static int hf_ppi_antenna_modelname
;
55 static int hf_ppi_antenna_descstr
;
56 static int hf_ppi_antenna_appspecific_num
; /* 4-byte tag no */
57 static int hf_ppi_antenna_appspecific_data
; /* 60 byte arbitrary data */
61 /* These represent decoded-bits in the gui */
62 static int hf_ppi_antenna_present_flags
;
63 static int hf_ppi_antenna_present_gaindb
;
64 static int hf_ppi_antenna_present_horizbw
;
65 static int hf_ppi_antenna_present_vertbw
;
66 static int hf_ppi_antenna_present_pgain
;
67 static int hf_ppi_antenna_present_beamid
;
68 static int hf_ppi_antenna_present_serialnum
;
69 static int hf_ppi_antenna_present_modelname
;
70 static int hf_ppi_antenna_present_descstr
;
71 static int hf_ppi_antenna_present_appspecific_num
;
72 static int hf_ppi_antenna_present_appspecific_data
;
73 static int hf_ppi_antenna_present_ext
;
75 /*These are the few defined AntennaFlags bits*/
76 static int hf_ppi_antennaflags_mimo
;
77 static int hf_ppi_antennaflags_horizpol
;
78 static int hf_ppi_antennaflags_vertpol
;
79 static int hf_ppi_antennaflags_circpol_l
;
80 static int hf_ppi_antennaflags_circpol_r
;
81 static int hf_ppi_antennaflags_steer_elec
;
82 static int hf_ppi_antennaflags_steer_mech
;
84 /* These represent arrow-dropdownthings in the gui */
85 static int ett_ppi_antenna
;
86 static int ett_ppi_antenna_present
;
87 static int ett_ppi_antennaflags
;
89 static expert_field ei_ppi_antenna_present_bit
;
90 static expert_field ei_ppi_antenna_version
;
91 static expert_field ei_ppi_antenna_length
;
94 dissect_ppi_antenna(tvbuff_t
*tvb
, packet_info
*pinfo
, proto_tree
*tree
, void* data _U_
) {
95 /* The fixed values up front */
100 proto_tree
*ppi_antenna_tree
;
102 proto_item
*antenna_line
, *version_item
, *length_item
;
107 uint32_t present
, next_present
;
108 /* values actually read out, for displaying */
111 uint32_t t_hbw
, t_vbw
, t_pgain
, t_appspecific_num
; /* temporary conversions */
112 double horizbw
, vertbw
, pgain
;
116 static int * const ppi_antenna_present_flags
[] = {
117 &hf_ppi_antenna_present_flags
,
118 &hf_ppi_antenna_present_gaindb
,
119 &hf_ppi_antenna_present_horizbw
,
120 &hf_ppi_antenna_present_vertbw
,
121 &hf_ppi_antenna_present_pgain
,
122 &hf_ppi_antenna_present_beamid
,
123 &hf_ppi_antenna_present_serialnum
,
124 &hf_ppi_antenna_present_modelname
,
125 &hf_ppi_antenna_present_descstr
,
126 &hf_ppi_antenna_present_appspecific_num
,
127 &hf_ppi_antenna_present_appspecific_data
,
128 &hf_ppi_antenna_present_ext
,
132 static int * const ppi_antenna_ant_flags
[] = {
133 &hf_ppi_antennaflags_mimo
,
134 &hf_ppi_antennaflags_horizpol
,
135 &hf_ppi_antennaflags_vertpol
,
136 &hf_ppi_antennaflags_circpol_l
,
137 &hf_ppi_antennaflags_circpol_r
,
138 &hf_ppi_antennaflags_steer_elec
,
139 &hf_ppi_antennaflags_steer_mech
,
143 /* Clear out stuff in the info column */
144 col_clear(pinfo
->cinfo
,COL_INFO
);
146 /* pull out the first three fields of the BASE-GEOTAG-HEADER */
147 version
= tvb_get_uint8(tvb
, offset
);
148 length
= tvb_get_letohs(tvb
, offset
+2);
149 present
= tvb_get_letohl(tvb
, offset
+4);
151 /* Setup basic column info */
152 col_add_fstr(pinfo
->cinfo
, COL_INFO
, "PPI Antenna info v%u, Length %u",
156 /* Create the basic dissection tree*/
157 antenna_line
= proto_tree_add_protocol_format(tree
, proto_ppi_antenna
,
158 tvb
, 0, length
, "Antenna: ");
159 ppi_antenna_tree
= proto_item_add_subtree(antenna_line
, ett_ppi_antenna
);
160 version_item
= proto_tree_add_uint(ppi_antenna_tree
, hf_ppi_antenna_version
,
161 tvb
, offset
, 1, version
);
162 proto_tree_add_item(ppi_antenna_tree
, hf_ppi_antenna_pad
,
163 tvb
, offset
+ 1, 1, ENC_LITTLE_ENDIAN
);
164 length_item
= proto_tree_add_uint(ppi_antenna_tree
, hf_ppi_antenna_length
,
165 tvb
, offset
+ 2, 2, length
);
167 /* We support v1 and v2 of Antenna tags (identical) */
168 if (! (version
== 1 || version
== 2) ) {
169 expert_add_info_format(pinfo
, version_item
, &ei_ppi_antenna_version
, "Invalid version (got %d, expected 1 or 2)", version
);
172 length_remaining
= length
;
173 /* minimum length check, should atleast be a fixed-size geotagging-base header*/
174 if (length_remaining
< PPI_GEOBASE_MIN_HEADER_LEN
) {
176 * Base-geotag-header (Radiotap lookalike) is shorter than the fixed-length portion
177 * plus one "present" bitset.
179 expert_add_info_format(pinfo
, length_item
, &ei_ppi_antenna_length
, "Invalid PPI-Antenna length - minimum length is 8");
184 /* perform max length sanity checking */
185 if (length
> PPI_ANTENNA_MAXTAGLEN
) {
186 expert_add_info_format(pinfo
, length_item
, &ei_ppi_antenna_length
, "Invalid PPI-Antenna length (got %d, %d max\n)", length
, PPI_ANTENNA_MAXTAGLEN
);
190 /* Subtree for the "present flags" bitfield. */
191 pt
= proto_tree_add_bitmask(ppi_antenna_tree
, tvb
, offset
+ 4, hf_ppi_antenna_present
, ett_ppi_antenna_present
, ppi_antenna_present_flags
, ENC_LITTLE_ENDIAN
);
193 offset
+= PPI_GEOBASE_MIN_HEADER_LEN
;
194 length_remaining
-= PPI_GEOBASE_MIN_HEADER_LEN
;
196 /* Now all of the fixed length, fixed location stuff is over. Loop over the bits */
197 for (; present
; present
= next_present
) {
198 /* clear the least significant bit that is set */
199 next_present
= present
& (present
- 1);
200 /* extract the least significant bit that is set */
201 bit
= BITNO_32(present
^ next_present
);
203 case PPI_ANTENNA_ANTFLAGS
:
204 if (length_remaining
< 4)
206 proto_tree_add_bitmask(ppi_antenna_tree
, tvb
, offset
, hf_ppi_antenna_flags
, ett_ppi_antennaflags
, ppi_antenna_ant_flags
, ENC_LITTLE_ENDIAN
);
210 case PPI_ANTENNA_GAINDB
:
211 if (length_remaining
< 1)
213 gaindb
= tvb_get_uint8(tvb
, offset
);
215 proto_tree_add_uint(ppi_antenna_tree
, hf_ppi_antenna_gaindb
, tvb
, offset
, 1, gaindb
);
216 proto_item_append_text(antenna_line
, " Gain: %d", gaindb
);
222 case PPI_ANTENNA_HORIZBW
:
223 if (length_remaining
< 4)
225 t_hbw
= tvb_get_letohl(tvb
, offset
);
226 horizbw
= ppi_fixed3_6_to_double(t_hbw
);
228 proto_tree_add_double(ppi_antenna_tree
, hf_ppi_antenna_horizbw
, tvb
, offset
, 4, horizbw
);
229 proto_item_append_text(antenna_line
, " HorizBw: %f", horizbw
);
234 case PPI_ANTENNA_VERTBW
:
235 if (length_remaining
< 4)
237 t_vbw
= tvb_get_letohl(tvb
, offset
);
238 vertbw
= ppi_fixed3_6_to_double(t_vbw
);
239 proto_tree_add_double(ppi_antenna_tree
, hf_ppi_antenna_vertbw
, tvb
, offset
, 4, vertbw
);
243 case PPI_ANTENNA_PGAIN
:
244 if (length_remaining
< 4)
246 t_pgain
= tvb_get_letohl(tvb
, offset
);
247 pgain
= ppi_fixed3_6_to_double(t_pgain
);
248 proto_tree_add_double(ppi_antenna_tree
, hf_ppi_antenna_pgain
, tvb
, offset
, 4, pgain
);
252 case PPI_ANTENNA_BEAMID
:
253 if (length_remaining
< 2)
255 beamid
= tvb_get_letohs(tvb
, offset
); /* convert endianess */
256 proto_tree_add_uint(ppi_antenna_tree
, hf_ppi_antenna_beamid
, tvb
, offset
, 2, beamid
);
260 case PPI_ANTENNA_SERIALNUM
:
261 if (length_remaining
< 32)
263 proto_tree_add_item(ppi_antenna_tree
, hf_ppi_antenna_serialnum
, tvb
, offset
, 32, ENC_ASCII
);
265 length_remaining
-=32;
268 case PPI_ANTENNA_MODELSTR
:
269 if (length_remaining
< 32)
272 /* proto_tree_add_item(ppi_antenna_tree, hf_ppi_antenna_modelname, tvb, offset, 32, ENC_ASCII); */
273 curr_str
= tvb_format_stringzpad(pinfo
->pool
, tvb
, offset
, 32);
274 proto_tree_add_string(ppi_antenna_tree
, hf_ppi_antenna_modelname
, tvb
, offset
, 32, curr_str
);
275 proto_item_append_text(antenna_line
, " (%s)", curr_str
);
278 length_remaining
-=32;
280 case PPI_ANTENNA_DESCSTR
:
281 if (length_remaining
< 32)
284 /*proto_tree_add_item(ppi_antenna_tree, hf_ppi_antenna_descstr, tvb, offset, 32, ENC_ASCII);*/
285 curr_str
= tvb_format_stringzpad(pinfo
->pool
, tvb
, offset
, 32);
286 proto_tree_add_string(ppi_antenna_tree
, hf_ppi_antenna_descstr
, tvb
, offset
, 32, curr_str
);
287 proto_item_append_text(antenna_line
, " (%s)", curr_str
);
290 length_remaining
-=32;
292 case PPI_ANTENNA_APPID
:
293 if (length_remaining
< 4)
295 t_appspecific_num
= tvb_get_letohl(tvb
, offset
); /* application specific parsers may switch on this later */
296 proto_tree_add_uint(ppi_antenna_tree
, hf_ppi_antenna_appspecific_num
, tvb
, offset
, 4, t_appspecific_num
);
300 case PPI_ANTENNA_APPDATA
:
301 if (length_remaining
< 60)
303 proto_tree_add_item(ppi_antenna_tree
, hf_ppi_antenna_appspecific_data
, tvb
, offset
, 60, ENC_NA
);
305 length_remaining
-=60;
309 * This indicates a field whose size we do not
310 * know, so we cannot proceed.
312 expert_add_info_format(pinfo
, pt
, &ei_ppi_antenna_present_bit
,
313 "Error: PPI-ANTENNA: unknown bit (%d) set in present field.", bit
);
319 return tvb_captured_length(tvb
);
323 proto_register_ppi_antenna(void) {
324 static hf_register_info hf
[] = {
325 { &hf_ppi_antenna_version
,
326 { "Header revision", "ppi_antenna.version",
327 FT_UINT8
, BASE_DEC
, NULL
, 0x0,
328 "Version of ppi_antenna header format", HFILL
} },
329 { &hf_ppi_antenna_pad
,
330 { "Header pad", "ppi_antenna.pad",
331 FT_UINT8
, BASE_DEC
, NULL
, 0x0,
332 "Padding", HFILL
} },
333 { &hf_ppi_antenna_length
,
334 { "Header length", "ppi_antenna.length",
335 FT_UINT16
, BASE_DEC
, NULL
, 0x0,
336 "Length of header including version, pad, length and data fields", HFILL
} },
337 /* This setups the "Antenna flags" hex dropydown thing */
338 { &hf_ppi_antenna_flags
,
339 { "Antenna flags", "ppi_antenna.antenna_flags",
340 FT_UINT32
, BASE_HEX
, NULL
, 0x0, "Bitmask indicating polarity, etc", HFILL
} },
341 { &hf_ppi_antenna_present
,
342 { "Present", "ppi_antenna.present",
343 FT_UINT32
, BASE_HEX
, NULL
, 0x0, "Bitmask indicating which fields are present", HFILL
} },
345 /* This first set is for the base_tag_header.it_present bitfield */
346 #define PPI_ANTENNA_MASK_FLAGS 0x00000001 /* 0 */
347 #define PPI_ANTENNA_MASK_GAINDB 0x00000002 /* 1 */
348 #define PPI_ANTENNA_MASK_HORIZBW 0x00000004 /* 2 */
349 #define PPI_ANTENNA_MASK_VERTBW 0x00000008 /* 3 */
350 #define PPI_ANTENNA_MASK_PGAIN 0x00000010 /* 4 */
351 #define PPI_ANTENNA_MASK_BEAMID 0x00000020 /* 5 */
352 #define PPI_ANTENNA_MASK_RES7 0x00000080 /* 7 */
353 #define PPI_ANTENNA_MASK_SERIALNUM 0x04000000 /* 26 */
354 #define PPI_ANTENNA_MASK_MODELSTR 0x08000000 /* 27 */
355 #define PPI_ANTENNA_MASK_DESCSTR 0x10000000 /* 28 */
356 #define PPI_ANTENNA_MASK_APPID 0x20000000 /* 29 */
357 #define PPI_ANTENNA_MASK_APPDATA 0x40000000 /* 30 */
358 #define PPI_ANTENNA_MASK_EXT 0x80000000 /* 31 */
360 /*This second set is for the AntennaFlags bitfield. */
361 #define PPI_ANTENNAFLAGS_MASK_MIMO 0x00000001 /* 0 */
362 #define PPI_ANTENNAFLAGS_MASK_HPOL 0x00000002 /* 1 */
363 #define PPI_ANTENNAFLAGS_MASK_VPOL 0x00000004 /* 2 */
364 #define PPI_ANTENNAFLAGS_MASK_CPOL_L 0x00000008 /* 3 */
365 #define PPI_ANTENNAFLAGS_MASK_CPOL_R 0x00000010 /* 4 */
366 #define PPI_ANTENNAFLAGS_MASK_STEER_ELEC 0x00010000 /* 16 */
367 #define PPI_ANTENNAFLAGS_MASK_STEER_MECH 0x00020000 /* 17 */
370 /* Boolean 'present' flags */
371 { &hf_ppi_antenna_present_flags
,
372 { "flags", "ppi_antenna.present.flags",
373 FT_BOOLEAN
, 32, NULL
, PPI_ANTENNA_MASK_FLAGS
,
374 "Specifies if the flags bitfield is present", HFILL
} },
375 { &hf_ppi_antenna_present_gaindb
,
376 { "gaindb", "ppi_antenna.present.gaindb",
377 FT_BOOLEAN
, 32, NULL
, PPI_ANTENNA_MASK_GAINDB
,
378 "Specifies if the antenna gain field is present", HFILL
} },
379 { &hf_ppi_antenna_present_horizbw
,
380 { "horizbw", "ppi_antenna.present.horizbw",
381 FT_BOOLEAN
, 32, NULL
, PPI_ANTENNA_MASK_HORIZBW
,
382 "Specifies if the horizontal beamwidth field is present", HFILL
} },
383 { &hf_ppi_antenna_present_vertbw
,
384 { "vertbw", "ppi_antenna.present.vertbw",
385 FT_BOOLEAN
, 32, NULL
, PPI_ANTENNA_MASK_VERTBW
,
386 "Specifies if the vertical beamwidth field is present", HFILL
} },
387 { &hf_ppi_antenna_present_pgain
,
388 { "pgain", "ppi_antenna.present.pgain",
389 FT_BOOLEAN
, 32, NULL
, PPI_ANTENNA_MASK_PGAIN
,
390 "Specifies if the precision gain field is present", HFILL
} },
391 { &hf_ppi_antenna_present_beamid
,
392 { "beamid", "ppi_antenna.present.beamid",
393 FT_BOOLEAN
, 32, NULL
, PPI_ANTENNA_MASK_BEAMID
,
394 "Specifies if the BeamID field is present", HFILL
} },
395 { &hf_ppi_antenna_present_serialnum
,
396 { "serialnum", "ppi_antenna.present.serialnum",
397 FT_BOOLEAN
, 32, NULL
, PPI_ANTENNA_MASK_SERIALNUM
,
398 "Specifies if the serial num is present", HFILL
} },
399 { &hf_ppi_antenna_present_modelname
,
400 { "modelname", "ppi_antenna.present.modelname",
401 FT_BOOLEAN
, 32, NULL
, PPI_ANTENNA_MASK_MODELSTR
,
402 "Specifies if the model name is present", HFILL
} },
403 { &hf_ppi_antenna_present_descstr
,
404 { "Description", "ppi_antenna.present.descr",
405 FT_BOOLEAN
, 32, NULL
, PPI_ANTENNA_MASK_DESCSTR
,
406 "Specifies if the description string is present", HFILL
} },
408 { &hf_ppi_antenna_present_appspecific_num
,
409 { "appid", "ppi_antenna.present.appid",
410 FT_BOOLEAN
, 32, NULL
, PPI_ANTENNA_MASK_APPID
,
411 "Specifies if the application specific field id is present", HFILL
} },
413 { &hf_ppi_antenna_present_appspecific_data
,
414 { "appdata", "ppi_antenna.present.appdata",
415 FT_BOOLEAN
, 32, NULL
, PPI_ANTENNA_MASK_APPDATA
,
416 "Specifies if the application specific data field is present", HFILL
} },
418 { &hf_ppi_antenna_present_ext
,
419 { "ext", "ppi_antenna.present.ext",
420 FT_BOOLEAN
, 32, NULL
, PPI_ANTENNA_MASK_EXT
,
421 "Specifies if there are any extensions to the header present", HFILL
} },
423 /*Here we switch to the antennflags bits*/
424 /* Boolean AntennaFlags' flags */
425 { &hf_ppi_antennaflags_mimo
,
426 { "mimo", "ppi_antenna.antennaflags.mimo",
427 FT_BOOLEAN
, 32, NULL
, PPI_ANTENNAFLAGS_MASK_MIMO
,
428 "Antenna is part of MIMO system", HFILL
} },
429 { &hf_ppi_antennaflags_horizpol
,
430 { "horizontally polarized", "ppi_antenna.antennaflags.horizpol",
431 FT_BOOLEAN
, 32, NULL
, PPI_ANTENNAFLAGS_MASK_HPOL
,
432 "Specifies if the antenna is horizontally polarized", HFILL
} },
434 { &hf_ppi_antennaflags_vertpol
,
435 { "vertically polarized", "ppi_antenna.antennaflags.vertpol",
436 FT_BOOLEAN
, 32, NULL
, PPI_ANTENNAFLAGS_MASK_VPOL
,
437 "Specifies if the antenna is vertically polarized", HFILL
} },
439 { &hf_ppi_antennaflags_circpol_l
,
440 { "circularly polarized left", "ppi_antenna.antennaflags.circpol_l",
441 FT_BOOLEAN
, 32, NULL
, PPI_ANTENNAFLAGS_MASK_CPOL_L
,
442 "Specifies if the antenna is circularly polarized, left handed", HFILL
} },
444 { &hf_ppi_antennaflags_circpol_r
,
445 { "circularly polarized right", "ppi_antenna.antennaflags.circpol_r",
446 FT_BOOLEAN
, 32, NULL
, PPI_ANTENNAFLAGS_MASK_CPOL_R
,
447 "Specifies if the antenna is circularly polarized, right handed", HFILL
} },
449 { &hf_ppi_antennaflags_steer_elec
,
450 { "electrically steerable", "ppi_antenna.antennaflags.steer_elec",
451 FT_BOOLEAN
, 32, NULL
, PPI_ANTENNAFLAGS_MASK_STEER_ELEC
,
452 "Specifies if the antenna is electrically steerable", HFILL
} },
454 { &hf_ppi_antennaflags_steer_mech
,
455 { "mechanically steerable", "ppi_antenna.antennaflags.steer_mech",
456 FT_BOOLEAN
, 32, NULL
, PPI_ANTENNAFLAGS_MASK_STEER_MECH
,
457 "Specifies if the antenna is mechanically steerable", HFILL
} },
459 /* Now we get to the actual data fields */
460 { &hf_ppi_antenna_gaindb
,
461 { "Gain (dBi)", "ppi_antenna.gaindb",
462 FT_UINT8
, BASE_DEC
, NULL
, 0x0,
463 "Gain of antenna (dBi)", HFILL
} },
464 { &hf_ppi_antenna_horizbw
,
465 { "HorizBw", "ppi_antenna.horizbw",
466 FT_DOUBLE
, BASE_NONE
, NULL
, 0x0,
467 "Horizontal beamwidth", HFILL
} },
468 { &hf_ppi_antenna_vertbw
,
469 { "VertBw", "ppi_antenna.vertbw",
470 FT_DOUBLE
, BASE_NONE
, NULL
, 0x0,
471 "Vertical beamwidth", HFILL
} },
472 { &hf_ppi_antenna_pgain
,
473 { "Precision Gain (dBi)", "ppi_antenna.pgain",
474 FT_DOUBLE
, BASE_NONE
, NULL
, 0x0,
476 { &hf_ppi_antenna_beamid
,
477 { "BeamID", "ppi_antenna.beamid",
478 FT_UINT16
, BASE_HEX
, NULL
, 0x0,
481 { &hf_ppi_antenna_serialnum
,
482 { "SerialNumber", "ppi_antenna.serialnum",
483 FT_STRING
, BASE_NONE
, NULL
, 0x0,
485 { &hf_ppi_antenna_modelname
,
486 { "ModelName", "ppi_antenna.modelname",
487 FT_STRING
, BASE_NONE
, NULL
, 0x0,
489 { &hf_ppi_antenna_descstr
,
490 { "Description", "ppi_antenna.descr",
491 FT_STRING
, BASE_NONE
, NULL
, 0x0,
493 { &hf_ppi_antenna_appspecific_num
,
494 { "Application Specific id", "ppi_antenna.appid",
495 FT_UINT32
, BASE_HEX
, NULL
, 0x0,
497 { &hf_ppi_antenna_appspecific_data
,
498 { "Application specific data", "ppi_antenna.appdata",
499 FT_BYTES
, BASE_NONE
, NULL
, 0x0,
502 static int *ett
[] = {
504 &ett_ppi_antenna_present
,
505 &ett_ppi_antennaflags
508 static ei_register_info ei
[] = {
509 { &ei_ppi_antenna_present_bit
, { "ppi_antenna.present.unknown_bit", PI_PROTOCOL
, PI_WARN
, "Error: PPI-ANTENNA: unknown bit set in present field.", EXPFILL
}},
510 { &ei_ppi_antenna_version
, { "ppi_antenna.version.unsupported", PI_PROTOCOL
, PI_WARN
, "Invalid version", EXPFILL
}},
511 { &ei_ppi_antenna_length
, { "ppi_antenna.length.invalid", PI_MALFORMED
, PI_ERROR
, "Invalid length", EXPFILL
}},
514 expert_module_t
* expert_ppi_antenna
;
516 proto_ppi_antenna
= proto_register_protocol("PPI antenna decoder", "PPI antenna Decoder", "ppi_antenna");
517 proto_register_field_array(proto_ppi_antenna
, hf
, array_length(hf
));
518 proto_register_subtree_array(ett
, array_length(ett
));
519 expert_ppi_antenna
= expert_register_protocol(proto_ppi_antenna
);
520 expert_register_field_array(expert_ppi_antenna
, ei
, array_length(ei
));
521 register_dissector("ppi_antenna", dissect_ppi_antenna
, proto_ppi_antenna
);
531 * indent-tabs-mode: nil
534 * ex: set shiftwidth=4 tabstop=8 expandtab:
535 * :indentSize=4:tabSize=8:noTabs=true: