Remove a check_col();
Fix a typo; Minor whitespace cleanup. svn path=/trunk/; revision=34971
This commit is contained in:
parent
19e7c7461f
commit
5cb41c00b1
|
@ -115,9 +115,9 @@ proto_register_ppi_antenna(void) {
|
||||||
/* The following array initializes those header fields declared above to the values displayed */
|
/* The following array initializes those header fields declared above to the values displayed */
|
||||||
static hf_register_info hf[] = {
|
static hf_register_info hf[] = {
|
||||||
{ &hf_ppi_antenna_version,
|
{ &hf_ppi_antenna_version,
|
||||||
{ "Header revision", "ppi_antenna.version",
|
{ "Header revision", "ppi_antenna.version",
|
||||||
FT_UINT8, BASE_DEC, NULL, 0x0,
|
FT_UINT8, BASE_DEC, NULL, 0x0,
|
||||||
"Version of ppi_antenna header format", HFILL } },
|
"Version of ppi_antenna header format", HFILL } },
|
||||||
{ &hf_ppi_antenna_pad,
|
{ &hf_ppi_antenna_pad,
|
||||||
{ "Header pad", "ppi_antenna.pad",
|
{ "Header pad", "ppi_antenna.pad",
|
||||||
FT_UINT8, BASE_DEC, NULL, 0x0,
|
FT_UINT8, BASE_DEC, NULL, 0x0,
|
||||||
|
|
|
@ -130,21 +130,21 @@ proto_register_ppi_gps(void) {
|
||||||
{ "Present", "ppi_gps.present",
|
{ "Present", "ppi_gps.present",
|
||||||
FT_UINT32, BASE_HEX, NULL, 0x0, "Bitmask indicating which fields are present", HFILL } },
|
FT_UINT32, BASE_HEX, NULL, 0x0, "Bitmask indicating which fields are present", HFILL } },
|
||||||
|
|
||||||
#define PPI_GPS_MASK_GPSFLAGS 0x00000001
|
#define PPI_GPS_MASK_GPSFLAGS 0x00000001
|
||||||
#define PPI_GPS_MASK_LAT 0x00000002
|
#define PPI_GPS_MASK_LAT 0x00000002
|
||||||
#define PPI_GPS_MASK_LON 0x00000004
|
#define PPI_GPS_MASK_LON 0x00000004
|
||||||
#define PPI_GPS_MASK_ALT 0x00000008
|
#define PPI_GPS_MASK_ALT 0x00000008
|
||||||
#define PPI_GPS_MASK_ALT_G 0x00000010
|
#define PPI_GPS_MASK_ALT_G 0x00000010
|
||||||
|
|
||||||
#define PPI_GPS_MASK_GPSTIME 0x00000020
|
#define PPI_GPS_MASK_GPSTIME 0x00000020
|
||||||
#define PPI_GPS_MASK_FRACTIME 0x00000040
|
#define PPI_GPS_MASK_FRACTIME 0x00000040
|
||||||
#define PPI_GPS_MASK_EPH 0x00000080
|
#define PPI_GPS_MASK_EPH 0x00000080
|
||||||
#define PPI_GPS_MASK_EPV 0x00000100
|
#define PPI_GPS_MASK_EPV 0x00000100
|
||||||
#define PPI_GPS_MASK_EPT 0x00000200
|
#define PPI_GPS_MASK_EPT 0x00000200
|
||||||
|
|
||||||
#define PPI_GPS_MASK_DESCRSTR 0x10000000
|
#define PPI_GPS_MASK_DESCRSTR 0x10000000
|
||||||
#define PPI_GPS_MASK_APPID 0x20000000
|
#define PPI_GPS_MASK_APPID 0x20000000
|
||||||
#define PPI_GPS_MASK_APPDATA 0x40000000
|
#define PPI_GPS_MASK_APPDATA 0x40000000
|
||||||
#define PPI_GPS_MASK_EXT 0x80000000
|
#define PPI_GPS_MASK_EXT 0x80000000
|
||||||
|
|
||||||
/* Boolean 'present' flags */
|
/* Boolean 'present' flags */
|
||||||
|
@ -275,15 +275,15 @@ proto_register_ppi_gps(void) {
|
||||||
"application specific data", HFILL } },
|
"application specific data", HFILL } },
|
||||||
|
|
||||||
/* --- moving on to the 'FixType' flags --- */
|
/* --- moving on to the 'FixType' flags --- */
|
||||||
#define PPI_GPS_GPSFLAGS_FLAG0_NOFIX 0x00000001
|
#define PPI_GPS_GPSFLAGS_FLAG0_NOFIX 0x00000001
|
||||||
#define PPI_GPS_GPSFLAGS_FLAG1_GPS 0x00000002
|
#define PPI_GPS_GPSFLAGS_FLAG1_GPS 0x00000002
|
||||||
#define PPI_GPS_GPSFLAGS_FLAG2_DIFFGPS 0x00000004
|
#define PPI_GPS_GPSFLAGS_FLAG2_DIFFGPS 0x00000004
|
||||||
#define PPI_GPS_GPSFLAGS_FLAG3_PPS 0x00000008
|
#define PPI_GPS_GPSFLAGS_FLAG3_PPS 0x00000008
|
||||||
#define PPI_GPS_GPSFLAGS_FLAG4_RTK 0x00000010
|
#define PPI_GPS_GPSFLAGS_FLAG4_RTK 0x00000010
|
||||||
#define PPI_GPS_GPSFLAGS_FLAG5_FLOATRTK 0x00000020
|
#define PPI_GPS_GPSFLAGS_FLAG5_FLOATRTK 0x00000020
|
||||||
#define PPI_GPS_GPSFLAGS_FLAG6_DEAD_RECK 0x00000040
|
#define PPI_GPS_GPSFLAGS_FLAG6_DEAD_RECK 0x00000040
|
||||||
#define PPI_GPS_GPSFLAGS_FLAG7_MANUAL 0x00000080
|
#define PPI_GPS_GPSFLAGS_FLAG7_MANUAL 0x00000080
|
||||||
#define PPI_GPS_GPSFLAGS_FLAG8_SIM 0x00000100
|
#define PPI_GPS_GPSFLAGS_FLAG8_SIM 0x00000100
|
||||||
{ &hf_ppi_gps_gpsflags_flag0_nofix, /* no fix available */
|
{ &hf_ppi_gps_gpsflags_flag0_nofix, /* no fix available */
|
||||||
{ "No fix available", "ppi_gps.gpsflagss.nofix",
|
{ "No fix available", "ppi_gps.gpsflagss.nofix",
|
||||||
FT_BOOLEAN, 32, NULL, PPI_GPS_GPSFLAGS_FLAG0_NOFIX,
|
FT_BOOLEAN, 32, NULL, PPI_GPS_GPSFLAGS_FLAG0_NOFIX,
|
||||||
|
|
|
@ -38,26 +38,26 @@
|
||||||
#include "packet-ppi-geolocation-common.h"
|
#include "packet-ppi-geolocation-common.h"
|
||||||
|
|
||||||
enum ppi_vector_type {
|
enum ppi_vector_type {
|
||||||
PPI_VECTOR_VFLAGS = 0,
|
PPI_VECTOR_VFLAGS = 0,
|
||||||
PPI_VECTOR_VCHARS = 1,
|
PPI_VECTOR_VCHARS = 1,
|
||||||
PPI_VECTOR_ROTX = 2,
|
PPI_VECTOR_ROTX = 2,
|
||||||
PPI_VECTOR_ROTY = 3,
|
PPI_VECTOR_ROTY = 3,
|
||||||
PPI_VECTOR_ROTZ = 4,
|
PPI_VECTOR_ROTZ = 4,
|
||||||
PPI_VECTOR_OFF_R = 5,
|
PPI_VECTOR_OFF_R = 5,
|
||||||
PPI_VECTOR_OFF_F = 6,
|
PPI_VECTOR_OFF_F = 6,
|
||||||
PPI_VECTOR_OFF_U = 7,
|
PPI_VECTOR_OFF_U = 7,
|
||||||
PPI_VECTOR_VEL_R = 8,
|
PPI_VECTOR_VEL_R = 8,
|
||||||
PPI_VECTOR_VEL_F = 9,
|
PPI_VECTOR_VEL_F = 9,
|
||||||
PPI_VECTOR_VEL_U = 10,
|
PPI_VECTOR_VEL_U = 10,
|
||||||
PPI_VECTOR_VEL_T = 11,
|
PPI_VECTOR_VEL_T = 11,
|
||||||
PPI_VECTOR_ACC_R = 12,
|
PPI_VECTOR_ACC_R = 12,
|
||||||
PPI_VECTOR_ACC_F = 13,
|
PPI_VECTOR_ACC_F = 13,
|
||||||
PPI_VECTOR_ACC_U = 14,
|
PPI_VECTOR_ACC_U = 14,
|
||||||
PPI_VECTOR_ACC_T = 15,
|
PPI_VECTOR_ACC_T = 15,
|
||||||
PPI_VECTOR_ERR_ROT = 16,
|
PPI_VECTOR_ERR_ROT = 16,
|
||||||
PPI_VECTOR_ERR_OFF = 17,
|
PPI_VECTOR_ERR_OFF = 17,
|
||||||
PPI_VECTOR_ERR_VEL = 18,
|
PPI_VECTOR_ERR_VEL = 18,
|
||||||
PPI_VECTOR_ERR_ACC = 19,
|
PPI_VECTOR_ERR_ACC = 19,
|
||||||
|
|
||||||
PPI_VECTOR_DESCSTR = 28,
|
PPI_VECTOR_DESCSTR = 28,
|
||||||
PPI_VECTOR_APPID = 29,
|
PPI_VECTOR_APPID = 29,
|
||||||
|
@ -129,14 +129,14 @@ static int hf_ppi_vector_present_ext = -1;
|
||||||
/* There are currently only three vector flags.
|
/* There are currently only three vector flags.
|
||||||
* These control the units/interpreration of a vector
|
* These control the units/interpreration of a vector
|
||||||
*/
|
*/
|
||||||
static int hf_ppi_vector_vflags_defines_forward = -1;
|
static int hf_ppi_vector_vflags_defines_forward = -1;
|
||||||
static int hf_ppi_vector_vflags_rots_absolute = -1; /* different ways to display the same bit, hi or low */
|
static int hf_ppi_vector_vflags_rots_absolute = -1; /* different ways to display the same bit, hi or low */
|
||||||
static int hf_ppi_vector_vflags_offsets_from_gps = -1; /* these are different ways to display the same bit, hi or low */
|
static int hf_ppi_vector_vflags_offsets_from_gps = -1; /* these are different ways to display the same bit, hi or low */
|
||||||
|
|
||||||
/* There are currently eight vector characteristics.
|
/* There are currently eight vector characteristics.
|
||||||
* These are purely descriptive (no mathematical importance)
|
* These are purely descriptive (no mathematical importance)
|
||||||
*/
|
*/
|
||||||
static int hf_ppi_vector_vchars_antenna = -1;
|
static int hf_ppi_vector_vchars_antenna = -1;
|
||||||
static int hf_ppi_vector_vchars_dir_of_travel = -1;
|
static int hf_ppi_vector_vchars_dir_of_travel = -1;
|
||||||
static int hf_ppi_vector_vchars_front_of_veh = -1;
|
static int hf_ppi_vector_vchars_front_of_veh = -1;
|
||||||
|
|
||||||
|
@ -173,31 +173,31 @@ void proto_register_ppi_vector(void) {
|
||||||
{ "Present", "ppi_vector.present",
|
{ "Present", "ppi_vector.present",
|
||||||
FT_UINT32, BASE_HEX, NULL, 0x0, "Bitmask indicating which fields are present", HFILL } },
|
FT_UINT32, BASE_HEX, NULL, 0x0, "Bitmask indicating which fields are present", HFILL } },
|
||||||
|
|
||||||
#define PPI_VECTOR_MASK_VFLAGS 0x00000001
|
#define PPI_VECTOR_MASK_VFLAGS 0x00000001
|
||||||
#define PPI_VECTOR_MASK_VCHARS 0x00000002
|
#define PPI_VECTOR_MASK_VCHARS 0x00000002
|
||||||
#define PPI_VECTOR_MASK_ROTX 0x00000004
|
#define PPI_VECTOR_MASK_ROTX 0x00000004
|
||||||
#define PPI_VECTOR_MASK_ROTY 0x00000008
|
#define PPI_VECTOR_MASK_ROTY 0x00000008
|
||||||
#define PPI_VECTOR_MASK_ROTZ 0x00000010
|
#define PPI_VECTOR_MASK_ROTZ 0x00000010
|
||||||
#define PPI_VECTOR_MASK_OFF_R 0x00000020
|
#define PPI_VECTOR_MASK_OFF_R 0x00000020
|
||||||
#define PPI_VECTOR_MASK_OFF_F 0x00000040
|
#define PPI_VECTOR_MASK_OFF_F 0x00000040
|
||||||
#define PPI_VECTOR_MASK_OFF_U 0x00000080
|
#define PPI_VECTOR_MASK_OFF_U 0x00000080
|
||||||
#define PPI_VECTOR_MASK_VEL_R 0x00000100
|
#define PPI_VECTOR_MASK_VEL_R 0x00000100
|
||||||
#define PPI_VECTOR_MASK_VEL_F 0x00000200
|
#define PPI_VECTOR_MASK_VEL_F 0x00000200
|
||||||
#define PPI_VECTOR_MASK_VEL_U 0x00000400
|
#define PPI_VECTOR_MASK_VEL_U 0x00000400
|
||||||
#define PPI_VECTOR_MASK_VEL_T 0x00000800
|
#define PPI_VECTOR_MASK_VEL_T 0x00000800
|
||||||
#define PPI_VECTOR_MASK_ACC_R 0x00001000
|
#define PPI_VECTOR_MASK_ACC_R 0x00001000
|
||||||
#define PPI_VECTOR_MASK_ACC_F 0x00002000
|
#define PPI_VECTOR_MASK_ACC_F 0x00002000
|
||||||
#define PPI_VECTOR_MASK_ACC_U 0x00004000
|
#define PPI_VECTOR_MASK_ACC_U 0x00004000
|
||||||
#define PPI_VECTOR_MASK_ACC_T 0x00008000
|
#define PPI_VECTOR_MASK_ACC_T 0x00008000
|
||||||
|
|
||||||
#define PPI_VECTOR_MASK_ERR_ROT 0x00010000
|
#define PPI_VECTOR_MASK_ERR_ROT 0x00010000
|
||||||
#define PPI_VECTOR_MASK_ERR_OFF 0x00020000
|
#define PPI_VECTOR_MASK_ERR_OFF 0x00020000
|
||||||
#define PPI_VECTOR_MASK_ERR_VEL 0x00040000
|
#define PPI_VECTOR_MASK_ERR_VEL 0x00040000
|
||||||
#define PPI_VECTOR_MASK_ERR_ACC 0x00080000
|
#define PPI_VECTOR_MASK_ERR_ACC 0x00080000
|
||||||
|
|
||||||
#define PPI_VECTOR_MASK_DESCSTR 0x10000000 /* 28 */
|
#define PPI_VECTOR_MASK_DESCSTR 0x10000000 /* 28 */
|
||||||
#define PPI_VECTOR_MASK_APPID 0x20000000 /* 29 */
|
#define PPI_VECTOR_MASK_APPID 0x20000000 /* 29 */
|
||||||
#define PPI_VECTOR_MASK_APPDATA 0x40000000 /* 30 */
|
#define PPI_VECTOR_MASK_APPDATA 0x40000000 /* 30 */
|
||||||
#define PPI_VECTOR_MASK_EXT 0x80000000 /* 31 */
|
#define PPI_VECTOR_MASK_EXT 0x80000000 /* 31 */
|
||||||
|
|
||||||
/* Boolean 'present' flags */
|
/* Boolean 'present' flags */
|
||||||
|
@ -419,8 +419,8 @@ void proto_register_ppi_vector(void) {
|
||||||
/* There are currently only three vector flags.
|
/* There are currently only three vector flags.
|
||||||
* These control the units/interpreration of a vector
|
* These control the units/interpreration of a vector
|
||||||
*/
|
*/
|
||||||
#define PPI_VECTOR_VFLAGS_DEFINES_FORWARD 0x00000001
|
#define PPI_VECTOR_VFLAGS_DEFINES_FORWARD 0x00000001
|
||||||
#define PPI_VECTOR_VFLAGS_ROTS_ABSOLUTE 0x00000002
|
#define PPI_VECTOR_VFLAGS_ROTS_ABSOLUTE 0x00000002
|
||||||
#define PPI_VECTOR_VFLAGS_OFFSETS_FROM_GPS 0x00000004
|
#define PPI_VECTOR_VFLAGS_OFFSETS_FROM_GPS 0x00000004
|
||||||
/* Boolean vector flags */
|
/* Boolean vector flags */
|
||||||
{ &hf_ppi_vector_vflags_defines_forward,
|
{ &hf_ppi_vector_vflags_defines_forward,
|
||||||
|
@ -439,15 +439,15 @@ void proto_register_ppi_vector(void) {
|
||||||
/* There are currently eight vector characteristics.
|
/* There are currently eight vector characteristics.
|
||||||
* These are purely descriptive (no mathematical importance)
|
* These are purely descriptive (no mathematical importance)
|
||||||
*/
|
*/
|
||||||
#define PPI_VECTOR_VCHARS_ANTENNA 0x00000001
|
#define PPI_VECTOR_VCHARS_ANTENNA 0x00000001
|
||||||
#define PPI_VECTOR_VCHARS_DIR_OF_TRAVEL 0x00000002
|
#define PPI_VECTOR_VCHARS_DIR_OF_TRAVEL 0x00000002
|
||||||
#define PPI_VECTOR_VCHARS_FRONT_OF_VEH 0x00000004
|
#define PPI_VECTOR_VCHARS_FRONT_OF_VEH 0x00000004
|
||||||
|
|
||||||
#define PPI_VECTOR_VCHARS_GPS_DERIVED 0x00000100
|
#define PPI_VECTOR_VCHARS_GPS_DERIVED 0x00000100
|
||||||
#define PPI_VECTOR_VCHARS_INS_DERIVED 0x00000200
|
#define PPI_VECTOR_VCHARS_INS_DERIVED 0x00000200
|
||||||
#define PPI_VECTOR_VCHARS_COMPASS_DERIVED 0x00000400
|
#define PPI_VECTOR_VCHARS_COMPASS_DERIVED 0x00000400
|
||||||
#define PPI_VECTOR_VCHARS_ACCELEROMETER_DERIVED 0x00000800
|
#define PPI_VECTOR_VCHARS_ACCELEROMETER_DERIVED 0x00000800
|
||||||
#define PPI_VECTOR_VCHARS_HUMAN_DERIVED 0x00001000
|
#define PPI_VECTOR_VCHARS_HUMAN_DERIVED 0x00001000
|
||||||
/* Boolean vector chars */
|
/* Boolean vector chars */
|
||||||
{ &hf_ppi_vector_vchars_antenna,
|
{ &hf_ppi_vector_vchars_antenna,
|
||||||
{ "Antenna", "ppi_vector.chars.antenna",
|
{ "Antenna", "ppi_vector.chars.antenna",
|
||||||
|
|
|
@ -8,8 +8,6 @@
|
||||||
* By Gerald Combs <gerald@wireshark.org>
|
* By Gerald Combs <gerald@wireshark.org>
|
||||||
* Copyright 2007 Gerald Combs
|
* Copyright 2007 Gerald Combs
|
||||||
*
|
*
|
||||||
* Copied from README.developer
|
|
||||||
*
|
|
||||||
* Copyright (c) 2006 CACE Technologies, Davis (California)
|
* Copyright (c) 2006 CACE Technologies, Davis (California)
|
||||||
* All rights reserved.
|
* All rights reserved.
|
||||||
*
|
*
|
||||||
|
@ -96,9 +94,9 @@
|
||||||
* guint16 pfh_datalen; // Length of data
|
* guint16 pfh_datalen; // Length of data
|
||||||
* } ppi_fieldheader_t;
|
* } ppi_fieldheader_t;
|
||||||
*
|
*
|
||||||
* Anyone looking to add their own PPI dissector would probably do well to imitate the GPS
|
* Anyone looking to add their own PPI dissector would probably do well to imitate the GPS
|
||||||
* ones seperation into a distinct file. Here is a step by step guide:
|
* ones separation into a distinct file. Here is a step by step guide:
|
||||||
* 1) add the number you received to the enum ppi_field_type declaration.
|
* 1) add the number you received to the enum ppi_field_type declaration.
|
||||||
* 2) Add a value string for your number into vs_ppi_field_type
|
* 2) Add a value string for your number into vs_ppi_field_type
|
||||||
* 3) declare a dissector handle by the ppi_gps_handle, and initialize it inside proto_reg_handoff
|
* 3) declare a dissector handle by the ppi_gps_handle, and initialize it inside proto_reg_handoff
|
||||||
* 4) add case inside dissect_ppi to call your new handle.
|
* 4) add case inside dissect_ppi to call your new handle.
|
||||||
|
@ -706,7 +704,7 @@ static void dissect_8023_extension(tvbuff_t *tvb, packet_info *pinfo _U_, proto_
|
||||||
|
|
||||||
if (data_len != PPI_8023_EXTENSION_LEN) {
|
if (data_len != PPI_8023_EXTENSION_LEN) {
|
||||||
proto_tree_add_text(ftree, tvb, offset, data_len, "Invalid length: %u", data_len);
|
proto_tree_add_text(ftree, tvb, offset, data_len, "Invalid length: %u", data_len);
|
||||||
THROW(ReportedBoundsError);
|
THROW(ReportedBoundsError);
|
||||||
}
|
}
|
||||||
|
|
||||||
csr = ptvcursor_new(ftree, tvb, offset);
|
csr = ptvcursor_new(ftree, tvb, offset);
|
||||||
|
@ -762,9 +760,8 @@ dissect_ppi(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
|
||||||
tot_len = tvb_get_letohs(tvb, offset+2);
|
tot_len = tvb_get_letohs(tvb, offset+2);
|
||||||
dlt = tvb_get_letohl(tvb, offset+4);
|
dlt = tvb_get_letohl(tvb, offset+4);
|
||||||
|
|
||||||
if(check_col(pinfo->cinfo, COL_INFO))
|
col_add_fstr(pinfo->cinfo, COL_INFO, "PPI version %u, %u bytes",
|
||||||
col_add_fstr(pinfo->cinfo, COL_INFO, "PPI version %u, %u bytes",
|
version, tot_len);
|
||||||
version, tot_len);
|
|
||||||
|
|
||||||
/* Dissect the packet */
|
/* Dissect the packet */
|
||||||
if (tree) {
|
if (tree) {
|
||||||
|
@ -829,66 +826,66 @@ dissect_ppi(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
|
||||||
dissect_aggregation_extension(tvb, pinfo, ppi_tree, offset, data_len);
|
dissect_aggregation_extension(tvb, pinfo, ppi_tree, offset, data_len);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case PPI_8023_EXTENSION:
|
case PPI_8023_EXTENSION:
|
||||||
dissect_8023_extension(tvb, pinfo, ppi_tree, offset, data_len);
|
dissect_8023_extension(tvb, pinfo, ppi_tree, offset, data_len);
|
||||||
break;
|
break;
|
||||||
case PPI_GPS_INFO:
|
case PPI_GPS_INFO:
|
||||||
if (ppi_gps_handle == NULL)
|
if (ppi_gps_handle == NULL)
|
||||||
{
|
{
|
||||||
proto_tree_add_text(ppi_tree, tvb, offset, data_len,
|
proto_tree_add_text(ppi_tree, tvb, offset, data_len,
|
||||||
"%s (%u bytes)", val_to_str(data_type, (value_string *)&vs_ppi_field_type, "GPS: "), data_len);
|
"%s (%u bytes)", val_to_str(data_type, (value_string *)&vs_ppi_field_type, "GPS: "), data_len);
|
||||||
}
|
}
|
||||||
else /* we found a suitable dissector */
|
else /* we found a suitable dissector */
|
||||||
{
|
{
|
||||||
/* skip over the ppi_fieldheader, and pass it off to the dedicated GPS dissetor */
|
/* skip over the ppi_fieldheader, and pass it off to the dedicated GPS dissetor */
|
||||||
next_tvb = tvb_new_subset(tvb, offset + 4, data_len - 4 , -1);
|
next_tvb = tvb_new_subset(tvb, offset + 4, data_len - 4 , -1);
|
||||||
call_dissector(ppi_gps_handle, next_tvb, pinfo, ppi_tree);
|
call_dissector(ppi_gps_handle, next_tvb, pinfo, ppi_tree);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case PPI_VECTOR_INFO:
|
case PPI_VECTOR_INFO:
|
||||||
if (ppi_vector_handle == NULL)
|
if (ppi_vector_handle == NULL)
|
||||||
{
|
{
|
||||||
proto_tree_add_text(ppi_tree, tvb, offset, data_len,
|
proto_tree_add_text(ppi_tree, tvb, offset, data_len,
|
||||||
"%s (%u bytes)", val_to_str(data_type, (value_string *)&vs_ppi_field_type, "VECTOR: "), data_len);
|
"%s (%u bytes)", val_to_str(data_type, (value_string *)&vs_ppi_field_type, "VECTOR: "), data_len);
|
||||||
}
|
}
|
||||||
else /* we found a suitable dissector */
|
else /* we found a suitable dissector */
|
||||||
{
|
{
|
||||||
/* skip over the ppi_fieldheader, and pass it off to the dedicated VECTOR dissetor */
|
/* skip over the ppi_fieldheader, and pass it off to the dedicated VECTOR dissetor */
|
||||||
next_tvb = tvb_new_subset(tvb, offset + 4, data_len - 4 , -1);
|
next_tvb = tvb_new_subset(tvb, offset + 4, data_len - 4 , -1);
|
||||||
call_dissector(ppi_vector_handle, next_tvb, pinfo, ppi_tree);
|
call_dissector(ppi_vector_handle, next_tvb, pinfo, ppi_tree);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case PPI_HARRIS_TEST0:
|
case PPI_HARRIS_TEST0:
|
||||||
if (ppi_harris_test_handle == NULL)
|
if (ppi_harris_test_handle == NULL)
|
||||||
{
|
{
|
||||||
proto_tree_add_text(ppi_tree, tvb, offset, data_len,
|
proto_tree_add_text(ppi_tree, tvb, offset, data_len,
|
||||||
"%s (%u bytes)", val_to_str(data_type, (value_string *)&vs_ppi_field_type, "HARRIS: "), data_len);
|
"%s (%u bytes)", val_to_str(data_type, (value_string *)&vs_ppi_field_type, "HARRIS: "), data_len);
|
||||||
}
|
}
|
||||||
else /* we found a suitable dissector */
|
else /* we found a suitable dissector */
|
||||||
{
|
{
|
||||||
/* skip over the ppi_fieldheader, and pass it off to the dedicated ANTENNA_ORIENTATION dissetor */
|
/* skip over the ppi_fieldheader, and pass it off to the dedicated ANTENNA_ORIENTATION dissetor */
|
||||||
next_tvb = tvb_new_subset(tvb, offset + 4, data_len - 4 , -1);
|
next_tvb = tvb_new_subset(tvb, offset + 4, data_len - 4 , -1);
|
||||||
call_dissector(ppi_harris_test_handle, next_tvb, pinfo, ppi_tree);
|
call_dissector(ppi_harris_test_handle, next_tvb, pinfo, ppi_tree);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case PPI_ANTENNA_INFO:
|
case PPI_ANTENNA_INFO:
|
||||||
if (ppi_antenna_handle == NULL)
|
if (ppi_antenna_handle == NULL)
|
||||||
{
|
{
|
||||||
proto_tree_add_text(ppi_tree, tvb, offset, data_len,
|
proto_tree_add_text(ppi_tree, tvb, offset, data_len,
|
||||||
"%s (%u bytes)", val_to_str(data_type, (value_string *)&vs_ppi_field_type, "ANTENNA: "), data_len);
|
"%s (%u bytes)", val_to_str(data_type, (value_string *)&vs_ppi_field_type, "ANTENNA: "), data_len);
|
||||||
}
|
}
|
||||||
else /* we found a suitable dissector */
|
else /* we found a suitable dissector */
|
||||||
{
|
{
|
||||||
/* skip over the ppi_fieldheader, and pass it off to the dedicated ANTENNA dissetor */
|
/* skip over the ppi_fieldheader, and pass it off to the dedicated ANTENNA dissetor */
|
||||||
next_tvb = tvb_new_subset(tvb, offset + 4, data_len - 4 , -1);
|
next_tvb = tvb_new_subset(tvb, offset + 4, data_len - 4 , -1);
|
||||||
call_dissector(ppi_antenna_handle, next_tvb, pinfo, ppi_tree);
|
call_dissector(ppi_antenna_handle, next_tvb, pinfo, ppi_tree);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
if (tree)
|
if (tree)
|
||||||
proto_tree_add_text(ppi_tree, tvb, offset, data_len,
|
proto_tree_add_text(ppi_tree, tvb, offset, data_len,
|
||||||
"%s (%u bytes)", val_to_str(data_type, (value_string *)&vs_ppi_field_type, "Reserved"), data_len);
|
"%s (%u bytes)", val_to_str(data_type, (value_string *)&vs_ppi_field_type, "Reserved"), data_len);
|
||||||
}
|
}
|
||||||
|
|
||||||
offset += data_len;
|
offset += data_len;
|
||||||
|
@ -1362,10 +1359,10 @@ proto_reg_handoff_ppi(void)
|
||||||
ppi_handle = create_dissector_handle(dissect_ppi, proto_ppi);
|
ppi_handle = create_dissector_handle(dissect_ppi, proto_ppi);
|
||||||
data_handle = find_dissector("data");
|
data_handle = find_dissector("data");
|
||||||
ieee80211_ht_handle = find_dissector("wlan_ht");
|
ieee80211_ht_handle = find_dissector("wlan_ht");
|
||||||
ppi_gps_handle = find_dissector("ppi_gps");
|
ppi_gps_handle = find_dissector("ppi_gps");
|
||||||
ppi_vector_handle = find_dissector("ppi_vector");
|
ppi_vector_handle = find_dissector("ppi_vector");
|
||||||
ppi_harris_test_handle = find_dissector("ppi_harris_test");
|
ppi_harris_test_handle = find_dissector("ppi_harris_test");
|
||||||
ppi_antenna_handle = find_dissector("ppi_antenna");
|
ppi_antenna_handle = find_dissector("ppi_antenna");
|
||||||
|
|
||||||
dissector_add("wtap_encap", WTAP_ENCAP_PPI, ppi_handle);
|
dissector_add("wtap_encap", WTAP_ENCAP_PPI, ppi_handle);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue