diff options
author | Bill Meier <wmeier@newsguy.com> | 2010-03-27 17:06:22 +0000 |
---|---|---|
committer | Bill Meier <wmeier@newsguy.com> | 2010-03-27 17:06:22 +0000 |
commit | 9290840c4da58dd1837fe302fb0cb28cdf8e77a6 (patch) | |
tree | 7adcd0dc1dfc0d24e9d6f11315fc7880908de7ff /epan/dissectors | |
parent | 45e2e811a47af90d0dbd41186df59083a586bf7a (diff) |
#include <stdio.h> not req'd; cleanup whitespace & indentation.
svn path=/trunk/; revision=32308
Diffstat (limited to 'epan/dissectors')
-rw-r--r-- | epan/dissectors/packet-dis-enums.c | 234 | ||||
-rw-r--r-- | epan/dissectors/packet-dis-fields.c | 70 | ||||
-rw-r--r-- | epan/dissectors/packet-dis-pdus.c | 212 | ||||
-rw-r--r-- | epan/dissectors/packet-dis.c | 589 |
4 files changed, 552 insertions, 553 deletions
diff --git a/epan/dissectors/packet-dis-enums.c b/epan/dissectors/packet-dis-enums.c index e0372c0eab..43a4c29732 100644 --- a/epan/dissectors/packet-dis-enums.c +++ b/epan/dissectors/packet-dis-enums.c @@ -290,124 +290,124 @@ const value_string DIS_PDU_Encoding_Type_Strings[] = const value_string DIS_PDU_TDL_Type_Strings[] = { - {DIS_TDL_TYPE_OTHER, "Other" }, - {DIS_TDL_TYPE_PADIL, "PADIL" }, - {DIS_TDL_TYPE_NATO_LINK1, "NATO Link-1" }, - {DIS_TDL_TYPE_ATDL1, "ATDL-1" }, - {DIS_TDL_TYPE_LINK_11B, "Link 11B (TADIL B)" }, - {DIS_TDL_TYPE_SADL, "Situational Awareness Data Link (SADL)" }, - {DIS_TDL_TYPE_JTIDS_TADIL_J, "Link 16 Legacy Format (JTIDS/TADIL-J) " }, - {DIS_TDL_TYPE_JTIDS_FDL_TADIL_J, "Link 16 Legacy Format (JTIDS/FDL/TADIL-J)" }, - {DIS_TDL_TYPE_LINK_11A, "Link 11A (TADIL A)" }, - {DIS_TDL_TYPE_IJMS, "IJMS" }, - {DIS_TDL_TYPE_LINK_4A, "Link 4A (TADIL C)" }, - {DIS_TDL_TYPE_LINK_4C, "Link 4C" }, - {DIS_TDL_TYPE_TIBS, "TIBS" }, - {DIS_TDL_TYPE_ATL, "ATL" }, - {DIS_TDL_TYPE_CONSTANT_SRC, "Constant Source" }, - {DIS_TDL_TYPE_ABBRV_CC, "Abbreviated Command and Control" }, - {DIS_TDL_TYPE_MILSTAR, "MILSTAR" }, - {DIS_TDL_TYPE_ATHS, "ATHS" }, - {DIS_TDL_TYPE_OTHGOLD, "OTHGOLD" }, - {DIS_TDL_TYPE_TACELINT, "TACELINT" }, - {DIS_TDL_TYPE_AWW13, "Weapons Data Link (AWW-13)" }, - {DIS_TDL_TYPE_ABBRV_CC_2, "Abbreviated Command and Control" }, - {DIS_TDL_TYPE_EPLRS, "Enhanced Position Location Reporting System (EPLRS)" }, - {DIS_TDL_TYPE_PLRS, "Position Location Reporting System (PLRS)" }, - {DIS_TDL_TYPE_SINCGARS, "SINCGARS" }, - {DIS_TDL_TYPE_HAVE_QUICK_I, "Have Quick I" }, - {DIS_TDL_TYPE_HAVE_QUICK_II, "Have Quick II" }, - {DIS_TDL_TYPE_HAVE_QUICK_IIA, "Have Quick IIA (Saturn)" }, - {DIS_TDL_TYPE_IFDL1, "Intra-Flight Data Link 1" }, - {DIS_TDL_TYPE_IFDL2, "Intra-Flight Data Link 2" }, - {DIS_TDL_TYPE_IDM, "Improved Data Modem (IDM)" }, - {DIS_TDL_TYPE_AFAPD, "Air Force Application Program Development (AFAPD)" }, - {DIS_TDL_TYPE_CEC, "Cooperative Engagement Capability (CEC)" }, - {DIS_TDL_TYPE_FAAD_FDL, "Forward Area Air Defense (FAAD) Data Link (FDL)" }, - {DIS_TDL_TYPE_GBDL, "Ground Based Data Link (GBDL)" }, - {DIS_TDL_TYPE_IVIS, "Intra Vehicular Info System (IVIS)" }, - {DIS_TDL_TYPE_MTS, "Marine Tactical System (MTS)" }, - {DIS_TDL_TYPE_TACFIRE, "Tactical Fire Direction System (TACFIRE)" }, - {DIS_TDL_TYPE_IBS, "Integrated Broadcast Service (IBS)" }, - {DIS_TDL_TYPE_ABIT, "Airborne Information Transfer (ABIT)" }, - {DIS_TDL_TYPE_ATARS, "Advanced Tactical Airborne Reconnaissance System (ATARS) Data Link" }, - {DIS_TDL_TYPE_BGPHES, "Battle Group Passive Horizon Extension System (BGPHES) Data Link" }, - {DIS_TDL_TYPE_CHBDL, "Common High Bandwidth Data Link (CHBDL)" }, - {DIS_TDL_TYPE_GUARDRAIL_IDL, "Guardrail Interoperable Data Link (IDL)" }, - {DIS_TDL_TYPE_GUARDRAIL_CSS1, "Guardrail Common Sensor System One (CSS1) Data Link" }, - {DIS_TDL_TYPE_GUARDRAIL_CSS2, "Guardrail Common Sensor System Two (CSS2) Data Link" }, - {DIS_TDL_TYPE_GUARDRAIL_CSS2_MRDL, "Guardrail CSS2 Multi-Role Data Link (MRDL)" }, - {DIS_TDL_TYPE_GUARDRAIL_CSS2_DASR, "Guardrail CSS2 Direct Air to Satellite Relay (DASR) Data Link" }, - {DIS_TDL_TYPE_LOS_TETHER, "Line of Sight (LOS) Data Link Implementation (LOS tether)" }, - {DIS_TDL_TYPE_LWCDL, "Lightweight CDL (LWCDL)" }, - {DIS_TDL_TYPE_L_52M, "L-52M (SR-71)" }, - {DIS_TDL_TYPE_RR_ROWL_DL, "Rivet Reach/Rivet Owl Data Link" }, - {DIS_TDL_TYPE_SENIOR_SPAN, "Senior Span" }, - {DIS_TDL_TYPE_SENIOR_SPUR, "Senior Spur" }, - {DIS_TDL_TYPE_SENIOR_STRETCH, "Senior Stretch." }, - {DIS_TDL_TYPE_SENIOR_YEAR_IDL, "Senior Year Interoperable Data Link (IDL)" }, - {DIS_TDL_TYPE_SPACE_CDL, "Space CDL" }, - {DIS_TDL_TYPE_TR_1_MIST_ADL, "TR-1 mode MIST Airborne Data Link" }, - {DIS_TDL_TYPE_KU_BAND_SATCOM, "Ku-band SATCOM Data Link Implementation (UAV)" }, - {DIS_TDL_TYPE_MECDL, "Mission Equipment Control Data link (MECDL)" }, - {DIS_TDL_TYPE_RADAR_DATA_TSDL, "Radar Data Transmitting Set Data Link" }, - {DIS_TDL_TYPE_SCDL, "Surveillance and Control Data Link (SCDL)" }, - {DIS_TDL_TYPE_TACTICAL_UAV_VIDEO, "Tactical UAV Video" }, - {DIS_TDL_TYPE_UHF_SATCOM, "UHF SATCOM Data Link Implementation (UAV)" }, - {DIS_TDL_TYPE_TCDL, "Tactical Common Data Link (TCDL)" }, - {DIS_TDL_TYPE_LLAPI, "Low Level Air Picture Interface (LLAPI)" }, - {DIS_TDL_TYPE_WEAPONS_DL, "Weapons Data Link (AGM-130)" }, - {DIS_TDL_TYPE_GC3, "GC3" }, - {DIS_TDL_TYPE_LINK16_STD, "Link 16 Standardized Format (JTIDS/MIDS/TADIL J)" }, - {DIS_TDL_TYPE_LINK16_EDR, "Link 16 Enhanced Data Rate (EDR JTIDS/MIDS/TADIL-J)" }, - {DIS_TDL_TYPE_JTIDS_NET_DATA_LOAD, "JTIDS/MIDS Net Data Load (TIMS/TOMS)" }, - {DIS_TDL_TYPE_LINK22, "Link 22" }, - {DIS_TDL_TYPE_AFIWC_IADS, "AFIWC IADS Communications Links" }, + {DIS_TDL_TYPE_OTHER, "Other" }, + {DIS_TDL_TYPE_PADIL, "PADIL" }, + {DIS_TDL_TYPE_NATO_LINK1, "NATO Link-1" }, + {DIS_TDL_TYPE_ATDL1, "ATDL-1" }, + {DIS_TDL_TYPE_LINK_11B, "Link 11B (TADIL B)" }, + {DIS_TDL_TYPE_SADL, "Situational Awareness Data Link (SADL)" }, + {DIS_TDL_TYPE_JTIDS_TADIL_J, "Link 16 Legacy Format (JTIDS/TADIL-J) " }, + {DIS_TDL_TYPE_JTIDS_FDL_TADIL_J, "Link 16 Legacy Format (JTIDS/FDL/TADIL-J)" }, + {DIS_TDL_TYPE_LINK_11A, "Link 11A (TADIL A)" }, + {DIS_TDL_TYPE_IJMS, "IJMS" }, + {DIS_TDL_TYPE_LINK_4A, "Link 4A (TADIL C)" }, + {DIS_TDL_TYPE_LINK_4C, "Link 4C" }, + {DIS_TDL_TYPE_TIBS, "TIBS" }, + {DIS_TDL_TYPE_ATL, "ATL" }, + {DIS_TDL_TYPE_CONSTANT_SRC, "Constant Source" }, + {DIS_TDL_TYPE_ABBRV_CC, "Abbreviated Command and Control" }, + {DIS_TDL_TYPE_MILSTAR, "MILSTAR" }, + {DIS_TDL_TYPE_ATHS, "ATHS" }, + {DIS_TDL_TYPE_OTHGOLD, "OTHGOLD" }, + {DIS_TDL_TYPE_TACELINT, "TACELINT" }, + {DIS_TDL_TYPE_AWW13, "Weapons Data Link (AWW-13)" }, + {DIS_TDL_TYPE_ABBRV_CC_2, "Abbreviated Command and Control" }, + {DIS_TDL_TYPE_EPLRS, "Enhanced Position Location Reporting System (EPLRS)" }, + {DIS_TDL_TYPE_PLRS, "Position Location Reporting System (PLRS)" }, + {DIS_TDL_TYPE_SINCGARS, "SINCGARS" }, + {DIS_TDL_TYPE_HAVE_QUICK_I, "Have Quick I" }, + {DIS_TDL_TYPE_HAVE_QUICK_II, "Have Quick II" }, + {DIS_TDL_TYPE_HAVE_QUICK_IIA, "Have Quick IIA (Saturn)" }, + {DIS_TDL_TYPE_IFDL1, "Intra-Flight Data Link 1" }, + {DIS_TDL_TYPE_IFDL2, "Intra-Flight Data Link 2" }, + {DIS_TDL_TYPE_IDM, "Improved Data Modem (IDM)" }, + {DIS_TDL_TYPE_AFAPD, "Air Force Application Program Development (AFAPD)" }, + {DIS_TDL_TYPE_CEC, "Cooperative Engagement Capability (CEC)" }, + {DIS_TDL_TYPE_FAAD_FDL, "Forward Area Air Defense (FAAD) Data Link (FDL)" }, + {DIS_TDL_TYPE_GBDL, "Ground Based Data Link (GBDL)" }, + {DIS_TDL_TYPE_IVIS, "Intra Vehicular Info System (IVIS)" }, + {DIS_TDL_TYPE_MTS, "Marine Tactical System (MTS)" }, + {DIS_TDL_TYPE_TACFIRE, "Tactical Fire Direction System (TACFIRE)" }, + {DIS_TDL_TYPE_IBS, "Integrated Broadcast Service (IBS)" }, + {DIS_TDL_TYPE_ABIT, "Airborne Information Transfer (ABIT)" }, + {DIS_TDL_TYPE_ATARS, "Advanced Tactical Airborne Reconnaissance System (ATARS) Data Link" }, + {DIS_TDL_TYPE_BGPHES, "Battle Group Passive Horizon Extension System (BGPHES) Data Link" }, + {DIS_TDL_TYPE_CHBDL, "Common High Bandwidth Data Link (CHBDL)" }, + {DIS_TDL_TYPE_GUARDRAIL_IDL, "Guardrail Interoperable Data Link (IDL)" }, + {DIS_TDL_TYPE_GUARDRAIL_CSS1, "Guardrail Common Sensor System One (CSS1) Data Link" }, + {DIS_TDL_TYPE_GUARDRAIL_CSS2, "Guardrail Common Sensor System Two (CSS2) Data Link" }, + {DIS_TDL_TYPE_GUARDRAIL_CSS2_MRDL, "Guardrail CSS2 Multi-Role Data Link (MRDL)" }, + {DIS_TDL_TYPE_GUARDRAIL_CSS2_DASR, "Guardrail CSS2 Direct Air to Satellite Relay (DASR) Data Link" }, + {DIS_TDL_TYPE_LOS_TETHER, "Line of Sight (LOS) Data Link Implementation (LOS tether)" }, + {DIS_TDL_TYPE_LWCDL, "Lightweight CDL (LWCDL)" }, + {DIS_TDL_TYPE_L_52M, "L-52M (SR-71)" }, + {DIS_TDL_TYPE_RR_ROWL_DL, "Rivet Reach/Rivet Owl Data Link" }, + {DIS_TDL_TYPE_SENIOR_SPAN, "Senior Span" }, + {DIS_TDL_TYPE_SENIOR_SPUR, "Senior Spur" }, + {DIS_TDL_TYPE_SENIOR_STRETCH, "Senior Stretch." }, + {DIS_TDL_TYPE_SENIOR_YEAR_IDL, "Senior Year Interoperable Data Link (IDL)" }, + {DIS_TDL_TYPE_SPACE_CDL, "Space CDL" }, + {DIS_TDL_TYPE_TR_1_MIST_ADL, "TR-1 mode MIST Airborne Data Link" }, + {DIS_TDL_TYPE_KU_BAND_SATCOM, "Ku-band SATCOM Data Link Implementation (UAV)" }, + {DIS_TDL_TYPE_MECDL, "Mission Equipment Control Data link (MECDL)" }, + {DIS_TDL_TYPE_RADAR_DATA_TSDL, "Radar Data Transmitting Set Data Link" }, + {DIS_TDL_TYPE_SCDL, "Surveillance and Control Data Link (SCDL)" }, + {DIS_TDL_TYPE_TACTICAL_UAV_VIDEO, "Tactical UAV Video" }, + {DIS_TDL_TYPE_UHF_SATCOM, "UHF SATCOM Data Link Implementation (UAV)" }, + {DIS_TDL_TYPE_TCDL, "Tactical Common Data Link (TCDL)" }, + {DIS_TDL_TYPE_LLAPI, "Low Level Air Picture Interface (LLAPI)" }, + {DIS_TDL_TYPE_WEAPONS_DL, "Weapons Data Link (AGM-130)" }, + {DIS_TDL_TYPE_GC3, "GC3" }, + {DIS_TDL_TYPE_LINK16_STD, "Link 16 Standardized Format (JTIDS/MIDS/TADIL J)" }, + {DIS_TDL_TYPE_LINK16_EDR, "Link 16 Enhanced Data Rate (EDR JTIDS/MIDS/TADIL-J)" }, + {DIS_TDL_TYPE_JTIDS_NET_DATA_LOAD, "JTIDS/MIDS Net Data Load (TIMS/TOMS)" }, + {DIS_TDL_TYPE_LINK22, "Link 22" }, + {DIS_TDL_TYPE_AFIWC_IADS, "AFIWC IADS Communications Links" }, { 0, NULL } }; const value_string DIS_PDU_RadioCategory_Strings[] = { - {0, "Other" }, - {1, "Voice Transmission/Reception" }, - {2, "Data Link Transmission/Reception" }, - {3, "Voice and Data Link Transmission/Reception" }, - {4, "Instrumented Landing System (ILS) Glideslope Transmitter" }, - {5, "Instrumented Landing System (ILS) Localizer Transmitter" }, - {6, "Instrumented Landing System (ILS) Outer Marker Beacon" }, - {7, "Instrumented Landing System (ILS) Middle Marker Beacon" }, - {8, "Instrumented Landing System (ILS) Inner Marker Beacon" }, - {9, "Instrumented Landing System (ILS) Receiver (Platform Radio)" }, - {10, "Tactical Air Navigation (TACAN) Transmitter (Ground Fixed Equipment)" }, - {11, "Tactical Air Navigation (TACAN) Receiver (Moving Platform Equipment)" }, - {12, "Tactical Air Navigation (TACAN) Transmitter/Receiver (Moving Platform Equipment)" }, - {13, "Variable Omni-Ranging (VOR) Transmitter (Ground Fixed Equipment)" }, - {14, "Variable Omni-Ranging (VOR) with Distance Measuring Equipment (DME) Transmitter (Ground Fixed Equipment)" }, - {15, "Combined VOR/ILS Receiver (Moving Platform Equipment)" }, - {16, "Combined VOR & TACAN (VORTAC) Transmitter" }, - {17, "Non-Directional Beacon (NDB) Transmitter" }, - {18, "Non-Directional Beacon (NDB) Receiver" }, - {19, "Non-Directional Beacon (NDB) with Distance Measuring Equipment (DME) Transmitter" }, - {20, "Distance Measuring Equipment (DME)" }, + {0, "Other" }, + {1, "Voice Transmission/Reception" }, + {2, "Data Link Transmission/Reception" }, + {3, "Voice and Data Link Transmission/Reception" }, + {4, "Instrumented Landing System (ILS) Glideslope Transmitter" }, + {5, "Instrumented Landing System (ILS) Localizer Transmitter" }, + {6, "Instrumented Landing System (ILS) Outer Marker Beacon" }, + {7, "Instrumented Landing System (ILS) Middle Marker Beacon" }, + {8, "Instrumented Landing System (ILS) Inner Marker Beacon" }, + {9, "Instrumented Landing System (ILS) Receiver (Platform Radio)" }, + {10, "Tactical Air Navigation (TACAN) Transmitter (Ground Fixed Equipment)" }, + {11, "Tactical Air Navigation (TACAN) Receiver (Moving Platform Equipment)" }, + {12, "Tactical Air Navigation (TACAN) Transmitter/Receiver (Moving Platform Equipment)" }, + {13, "Variable Omni-Ranging (VOR) Transmitter (Ground Fixed Equipment)" }, + {14, "Variable Omni-Ranging (VOR) with Distance Measuring Equipment (DME) Transmitter (Ground Fixed Equipment)" }, + {15, "Combined VOR/ILS Receiver (Moving Platform Equipment)" }, + {16, "Combined VOR & TACAN (VORTAC) Transmitter" }, + {17, "Non-Directional Beacon (NDB) Transmitter" }, + {18, "Non-Directional Beacon (NDB) Receiver" }, + {19, "Non-Directional Beacon (NDB) with Distance Measuring Equipment (DME) Transmitter" }, + {20, "Distance Measuring Equipment (DME)" }, {0, NULL } }; const value_string DIS_PDU_NomenclatureVersion_Strings[] = { - {0, "Other" }, - {1, "Joint Electronics Type Designation System (JETDS) Nomenclature (AN/ per Mil-STD-196)" }, - {2, "Manufacturer Designation" }, - {3, "National Designation" }, + {0, "Other" }, + {1, "Joint Electronics Type Designation System (JETDS) Nomenclature (AN/ per Mil-STD-196)" }, + {2, "Manufacturer Designation" }, + {3, "National Designation" }, {0, NULL } }; const value_string DIS_PDU_Nomenclature_Strings[] = { {0, "Other" }, - {1, "AN/ARN-118" }, - {2, "AN/ARN-139" }, - {3, "Generic Ground Fixed Transmitter" }, - {4, "Generic Ground Mobile Transmitter" }, + {1, "AN/ARN-118" }, + {2, "AN/ARN-139" }, + {3, "Generic Ground Fixed Transmitter" }, + {4, "Generic Ground Mobile Transmitter" }, {0, NULL } }; @@ -444,7 +444,7 @@ const value_string DIS_PDU_AntennaPatternType_Strings[] = const value_string DIS_PDU_MajorModulation_Strings[] = { - {DIS_MAJOR_MOD_OTHER, "Other" }, + {DIS_MAJOR_MOD_OTHER, "Other" }, {DIS_MAJOR_MOD_AMPLITUDE, "Amplitude" }, {DIS_MAJOR_MOD_AMPLITUDE_AND_ANGLE, "Amplitude and Angle" }, {DIS_MAJOR_MOD_ANGLE, "Angle" }, @@ -516,21 +516,21 @@ const value_string DIS_PDU_DetailModulationCPSM_Strings[] = {0, NULL } }; -const value_string DIS_PDU_ModParamMsgStart_Strings[] = +const value_string DIS_PDU_ModParamMsgStart_Strings[] = { {0, "Not start of message" }, {1, "Start of Message" }, {0, NULL } }; -const value_string DIS_PDU_ModParamClrChannel_Strings[] = +const value_string DIS_PDU_ModParamClrChannel_Strings[] = { {0, "Not clear channel" }, {1, "Clear channel" }, {0, NULL } }; -const value_string DIS_PDU_TSAllocationFidelity_Strings[] = +const value_string DIS_PDU_TSAllocationFidelity_Strings[] = { {0, "Time Slot Allocation Fidelity Level 0" }, {1, "Time Slot Allocation Fidelity Level 1" }, @@ -540,14 +540,14 @@ const value_string DIS_PDU_TSAllocationFidelity_Strings[] = {0, NULL } }; -const value_string DIS_PDU_TerminalPrimaryMode_Strings[] = +const value_string DIS_PDU_TerminalPrimaryMode_Strings[] = { {0, "NTR" }, {1, "JTIDS Unit Participant" }, {0, NULL } }; -const value_string DIS_PDU_TerminalSecondaryMode_Strings[] = +const value_string DIS_PDU_TerminalSecondaryMode_Strings[] = { {0, "None" }, {1, "Net Position Reference" }, @@ -556,11 +556,11 @@ const value_string DIS_PDU_TerminalSecondaryMode_Strings[] = {0, NULL } }; -const value_string DIS_PDU_ModParamSyncState_Strings[] = +const value_string DIS_PDU_ModParamSyncState_Strings[] = { {0, "Undefined" }, {1, "Coarse Synchronization" }, - {1, "Fine Synchronization" }, + {1, "Fine Synchronization" }, {0, NULL } }; @@ -575,20 +575,20 @@ const value_string DIS_PDU_SystemModulation_Strings[] = {5, "SINCGARS" }, {6, "CCTT SINCGARS" }, {7, "EPLRS (Enhanced Position Location Reporting System)" }, - {8, "JTIDS/MIDS" }, + {8, "JTIDS/MIDS" }, {0, NULL } }; - + const value_string DIS_PDU_CryptoSystem_Strings[] = { - {0, "Other" }, + {0, "Other" }, {1, "KY-28" }, - {2, "VINSON (KY-57, KY-58, SINCGARS ICOM)" }, - {3, "Narrow Spectrum Secure Voice (NSVE)" }, - {4, "Wide Spectrum Secure Voice (WSVE)" }, + {2, "VINSON (KY-57, KY-58, SINCGARS ICOM)" }, + {3, "Narrow Spectrum Secure Voice (NSVE)" }, + {4, "Wide Spectrum Secure Voice (WSVE)" }, {0, NULL } }; - + const value_string DIS_PDU_AcknowledgeFlag_Strings[] = { { DIS_ACKNOWLEDGE_FLAG_CREATE_ENTITY, "Create Entity" }, diff --git a/epan/dissectors/packet-dis-fields.c b/epan/dissectors/packet-dis-fields.c index c6e6020121..92d7d40fec 100644 --- a/epan/dissectors/packet-dis-fields.c +++ b/epan/dissectors/packet-dis-fields.c @@ -84,7 +84,7 @@ DIS_ParserNode DIS_FIELDS_PERSISTENT_OBJECT_HEADER[] = /* Composite types */ - + DIS_ParserNode DIS_FIELDS_BURST_DESCRIPTOR[] = { { DIS_FIELDTYPE_ENTITY_TYPE, "Munition",0,0,0,0 }, @@ -138,7 +138,7 @@ DIS_ParserNode DIS_FIELDS_MODULATION_TYPE[] = { DIS_FIELDTYPE_SPREAD_SPECTRUM, "Spread Spectrum",0,0,0,0 }, { DIS_FIELDTYPE_MODULATION_MAJOR, "Major",0,0,0,&majorModulation }, { DIS_FIELDTYPE_MODULATION_DETAIL, "Detail",0,0,0,0 }, - { DIS_FIELDTYPE_MODULATION_SYSTEM, "System",0,0,0,&systemModulation }, + { DIS_FIELDTYPE_MODULATION_SYSTEM, "System",0,0,0,&systemModulation }, { DIS_FIELDTYPE_END, NULL,0,0,0,0 } }; @@ -191,9 +191,9 @@ DIS_ParserNode DIS_FIELDS_MOD_PARAMS_CCTT_SINCGARS[] = { DIS_FIELDTYPE_FH_SYNC_TIME_OFFSET, "FH Synchronization Time Offset",0,0,0,0 }, { DIS_FIELDTYPE_FH_SECURITY_KEY, "Transmission Security Key",0,0,0,0 }, { DIS_FIELDTYPE_FH_CLEAR_CHANNEL, "Clear Channel",0,0,0,0 }, - { DIS_FIELDTYPE_PAD8, "Padding",0,0,0,0 }, + { DIS_FIELDTYPE_PAD8, "Padding",0,0,0,0 }, { DIS_FIELDTYPE_END, NULL,0,0,0,0 } -}; +}; DIS_ParserNode DIS_FIELDS_MOD_PARAMS_JTIDS_MIDS[] = { @@ -203,8 +203,8 @@ DIS_ParserNode DIS_FIELDS_MOD_PARAMS_JTIDS_MIDS[] = { DIS_FIELDTYPE_JTIDS_SYNC_STATE, "Synchronization State",0,0,0,0 }, { DIS_FIELDTYPE_NETWORK_SYNC_ID, "Network Sync ID",0,0,0,0 }, { DIS_FIELDTYPE_END, NULL,0,0,0,0 } -}; - +}; + /* Array records */ DIS_ParserNode DIS_FIELDS_FIXED_DATUM[] = @@ -379,7 +379,7 @@ void initializeFieldParsers() initializeParser(DIS_FIELDS_VR_DATA_QUERY); initializeParser(DIS_FIELDS_MOD_PARAMS_CCTT_SINCGARS); initializeParser(DIS_FIELDS_MOD_PARAMS_JTIDS_MIDS); - + } /* Adjust an offset variable for proper alignment for a specified field length. @@ -631,13 +631,13 @@ gint parseField_Enum(tvbuff_t *tvb, proto_tree *tree, gint offset, DIS_ParserNod break; case DIS_FIELDTYPE_RADIO_CATEGORY: enumStrings = DIS_PDU_RadioCategory_Strings; - break; + break; case DIS_FIELDTYPE_NOMENCLATURE_VERSION: enumStrings = DIS_PDU_NomenclatureVersion_Strings; - break; + break; case DIS_FIELDTYPE_NOMENCLATURE: enumStrings = DIS_PDU_Nomenclature_Strings; - break; + break; case DIS_FIELDTYPE_CATEGORY: if (entityKind == DIS_ENTITYKIND_PLATFORM) { @@ -687,34 +687,34 @@ gint parseField_Enum(tvbuff_t *tvb, proto_tree *tree, gint offset, DIS_ParserNod break; case DIS_FIELDTYPE_MODULATION_DETAIL: switch (majorModulation) { - case DIS_MAJOR_MOD_AMPLITUDE: - enumStrings = DIS_PDU_DetailModulationAmplitude_Strings; - break; - case DIS_MAJOR_MOD_AMPLITUDE_AND_ANGLE: - enumStrings = DIS_PDU_DetailModulationAmpAndAngle_Strings; - break; - case DIS_MAJOR_MOD_ANGLE: - enumStrings = DIS_PDU_DetailModulationAngle_Strings; - break; - case DIS_MAJOR_MOD_COMBINATION: - enumStrings = DIS_PDU_DetailModulationCombination_Strings; - break; - case DIS_MAJOR_MOD_PULSE: - enumStrings = DIS_PDU_DetailModulationPulse_Strings; - break; - case DIS_MAJOR_MOD_UNMODULATED: - enumStrings = DIS_PDU_DetailModulationUnmodulated_Strings; - break; - case DIS_MAJOR_MOD_CPSM: /* CPSM only has "other" defined */ - case DIS_MAJOR_MOD_OTHER: - default: - enumStrings = DIS_PDU_DetailModulationCPSM_Strings; - break; + case DIS_MAJOR_MOD_AMPLITUDE: + enumStrings = DIS_PDU_DetailModulationAmplitude_Strings; + break; + case DIS_MAJOR_MOD_AMPLITUDE_AND_ANGLE: + enumStrings = DIS_PDU_DetailModulationAmpAndAngle_Strings; + break; + case DIS_MAJOR_MOD_ANGLE: + enumStrings = DIS_PDU_DetailModulationAngle_Strings; + break; + case DIS_MAJOR_MOD_COMBINATION: + enumStrings = DIS_PDU_DetailModulationCombination_Strings; + break; + case DIS_MAJOR_MOD_PULSE: + enumStrings = DIS_PDU_DetailModulationPulse_Strings; + break; + case DIS_MAJOR_MOD_UNMODULATED: + enumStrings = DIS_PDU_DetailModulationUnmodulated_Strings; + break; + case DIS_MAJOR_MOD_CPSM: /* CPSM only has "other" defined */ + case DIS_MAJOR_MOD_OTHER: + default: + enumStrings = DIS_PDU_DetailModulationCPSM_Strings; + break; } break; default: enumStrings = 0; - break; + break; } switch(numBytes) @@ -825,7 +825,7 @@ gint parseField_Timestamp(tvbuff_t *tvb, proto_tree *tree, gint offset, DIS_Pars double ms; offset = alignOffset(offset, 4); - + /* convert to host value */ uintVal = tvb_get_ntohl(tvb, offset); /* determine absolute vis sim time */ diff --git a/epan/dissectors/packet-dis-pdus.c b/epan/dissectors/packet-dis-pdus.c index 172205b042..88d96c7ee2 100644 --- a/epan/dissectors/packet-dis-pdus.c +++ b/epan/dissectors/packet-dis-pdus.c @@ -1,4 +1,4 @@ - /* packet-dis-pdus.c +/* packet-dis-pdus.c * Routines and definitions for DIS PDU parsing. * Copyright 2005, Scientific Research Corporation * Initial implementation by Jeremy Ouellette <jouellet@scires.com> @@ -78,15 +78,15 @@ DIS_ParserNode DIS_PARSER_TRANSMITTER_PDU[] = { DIS_FIELDTYPE_REL_ANTENNA_LOCATON, "Relative Antenna Location",0,0,0,0 }, { DIS_FIELDTYPE_ANTENNA_PATTERN_TYPE, "Antenna Pattern Type",0,0,0,&disAntennaPattern }, { DIS_FIELDTYPE_ANTENNA_PATTERN_LENGTH, "Antenna Pattern Length",0,0,0,0 }, - { DIS_FIELDTYPE_TRANSMIT_FREQUENCY, "Transmit Frequency",0,0,0,0 }, - { DIS_FIELDTYPE_FLOAT32, "Transmit Frequency Bandwidth",0,0,0,0 }, + { DIS_FIELDTYPE_TRANSMIT_FREQUENCY, "Transmit Frequency",0,0,0,0 }, + { DIS_FIELDTYPE_FLOAT32, "Transmit Frequency Bandwidth",0,0,0,0 }, { DIS_FIELDTYPE_FLOAT32, "Transmit Power",0,0,0,0 }, - { DIS_FIELDTYPE_MODULATION_TYPE, "Modulation Type",0,0,0,0 }, + { DIS_FIELDTYPE_MODULATION_TYPE, "Modulation Type",0,0,0,0 }, { DIS_FIELDTYPE_CRYPTO_SYSTEM, "Crypto System",0,0,0,0 }, { DIS_FIELDTYPE_CRYPTO_KEY_ID, "Crypto Key ID",0,0,0,0 }, { DIS_FIELDTYPE_MODULATION_PARAMETER_LENGTH, "Modulation Parameter Length",0,0,0,&modulationParamLength }, - { DIS_FIELDTYPE_PAD24, "Padding",0,0,0,0 }, - { DIS_FIELDTYPE_MODULATION_PARAMETERS, "Modulation Parameters",0,0,0,0 }, + { DIS_FIELDTYPE_PAD24, "Padding",0,0,0,0 }, + { DIS_FIELDTYPE_MODULATION_PARAMETERS, "Modulation Parameters",0,0,0,0 }, /* need to finish decoding this PDU */ { DIS_FIELDTYPE_END, NULL,0,0,0,0 } }; @@ -100,7 +100,7 @@ DIS_ParserNode DIS_PARSER_SIGNAL_PDU[] = { DIS_FIELDTYPE_SAMPLE_RATE, "Sample Rate",0,0,0,0 }, { DIS_FIELDTYPE_DATA_LENGTH, "Data Length",0,0,0,0 }, { DIS_FIELDTYPE_NUMBER_OF_SAMPLES, "Number of Samples",0,0,0,&numSamples }, - { DIS_FIELDTYPE_RADIO_DATA, "Radio Data",0,0,0,0 }, + { DIS_FIELDTYPE_RADIO_DATA, "Radio Data",0,0,0,0 }, { DIS_FIELDTYPE_END, NULL,0,0,0,0 } }; @@ -430,7 +430,7 @@ void initializeParsers(void) /* DIS Radio Communications protocol (RCP) family PDUs */ initializeParser(DIS_PARSER_TRANSMITTER_PDU); initializeParser(DIS_PARSER_SIGNAL_PDU); - + /* DIS Warfare PDUs */ initializeParser(DIS_PARSER_FIRE_PDU); initializeParser(DIS_PARSER_DETONATION_PDU); @@ -543,7 +543,7 @@ void initializeParser(DIS_ParserNode parserNodes[]) DIS_FIELDS_MOD_PARAMS_JTIDS_MIDS, &parserNodes[parserIndex].ettVar); break; - + case DIS_FIELDTYPE_BURST_DESCRIPTOR: parserNodes[parserIndex].children = createSubtree( DIS_FIELDS_BURST_DESCRIPTOR, @@ -604,7 +604,7 @@ void initializeParser(DIS_ParserNode parserNodes[]) DIS_FIELDS_MODULATION_TYPE, &parserNodes[parserIndex].ettVar); break; - + /* Array records */ case DIS_FIELDTYPE_FIXED_DATUMS: parserNodes[parserIndex].children = createSubtree( @@ -643,14 +643,14 @@ void initializeParser(DIS_ParserNode parserNodes[]) */ gint parseFields(tvbuff_t *tvb, proto_tree *tree, gint offset, DIS_ParserNode parserNodes[]) { - guint fieldIndex = 0; - guint fieldRepeatLen = 0; - guint64 uintVal = 0; - proto_item *pi = NULL; - proto_tree *sub_tree = NULL; - tvbuff_t *newtvb = NULL; - gint length = 0; - guint16 spread_spectrum = 0; + guint fieldIndex = 0; + guint fieldRepeatLen = 0; + guint64 uintVal = 0; + proto_item *pi = NULL; + proto_tree *sub_tree = NULL; + tvbuff_t *newtvb = NULL; + gint length = 0; + guint16 spread_spectrum = 0; length = tvb_length_remaining(tvb, offset); @@ -772,12 +772,12 @@ gint parseFields(tvbuff_t *tvb, proto_tree *tree, gint offset, DIS_ParserNode pa break; case DIS_FIELDTYPE_RADIO_DATA: - newtvb = tvb_new_subset(tvb, offset, - tvb_length_remaining(tvb, offset), - tvb_reported_length_remaining(tvb, offset) - ); - proto_tree_add_item(tree, hf_dis_signal_data, newtvb, 0, -1, FALSE ); - /* ****ck******* need to look for padding bytes */ + newtvb = tvb_new_subset(tvb, offset, + tvb_length_remaining(tvb, offset), + tvb_reported_length_remaining(tvb, offset) + ); + proto_tree_add_item(tree, hf_dis_signal_data, newtvb, 0, -1, FALSE ); + /* ****ck******* need to look for padding bytes */ break; case DIS_FIELDTYPE_RADIO_CATEGORY: proto_tree_add_item(tree, hf_dis_radio_category, tvb, offset, 1, FALSE); @@ -794,7 +794,7 @@ gint parseFields(tvbuff_t *tvb, proto_tree *tree, gint offset, DIS_ParserNode pa case DIS_FIELDTYPE_RADIO_TRANSMIT_STATE: uintVal = tvb_get_guint8(tvb, offset); proto_tree_add_item(tree, hf_dis_radio_transmit_state, tvb, offset, 1, FALSE); - *(parserNodes[fieldIndex].outputVar) = (guint32)uintVal; + *(parserNodes[fieldIndex].outputVar) = (guint32)uintVal; offset += 1; break; case DIS_FIELDTYPE_RADIO_INPUT_SOURCE: @@ -802,9 +802,9 @@ gint parseFields(tvbuff_t *tvb, proto_tree *tree, gint offset, DIS_ParserNode pa offset += 1; break; case DIS_FIELDTYPE_ANTENNA_PATTERN_TYPE: - uintVal = tvb_get_ntohs(tvb, offset); + uintVal = tvb_get_ntohs(tvb, offset); proto_tree_add_item(tree, hf_dis_antenna_pattern_type, tvb, offset, 2, FALSE); - *(parserNodes[fieldIndex].outputVar) = (guint32)uintVal; + *(parserNodes[fieldIndex].outputVar) = (guint32)uintVal; offset += 2; break; case DIS_FIELDTYPE_ANTENNA_PATTERN_LENGTH: @@ -826,13 +826,13 @@ gint parseFields(tvbuff_t *tvb, proto_tree *tree, gint offset, DIS_ParserNode pa case DIS_FIELDTYPE_MODULATION_MAJOR: uintVal = tvb_get_ntohs(tvb, offset); proto_tree_add_item(tree, hf_dis_modulation_major, tvb, offset, 2, FALSE); - *(parserNodes[fieldIndex].outputVar) = (guint32)uintVal; + *(parserNodes[fieldIndex].outputVar) = (guint32)uintVal; offset += 2; break; case DIS_FIELDTYPE_MODULATION_SYSTEM: uintVal = tvb_get_ntohs(tvb, offset); proto_tree_add_item(tree, hf_dis_modulation_system, tvb, offset, 2, FALSE); - *(parserNodes[fieldIndex].outputVar) = (guint32)uintVal; + *(parserNodes[fieldIndex].outputVar) = (guint32)uintVal; offset += 2; break; case DIS_FIELDTYPE_CRYPTO_SYSTEM: @@ -848,14 +848,14 @@ gint parseFields(tvbuff_t *tvb, proto_tree *tree, gint offset, DIS_ParserNode pa offset += 2; break; case DIS_FIELDTYPE_MODULATION_PARAMETER_LENGTH: - uintVal = tvb_get_guint8(tvb, offset); + uintVal = tvb_get_guint8(tvb, offset); proto_tree_add_item(tree, hf_dis_modulation_parameter_length, tvb, offset, 1, FALSE); - *(parserNodes[fieldIndex].outputVar) = (guint32)uintVal; + *(parserNodes[fieldIndex].outputVar) = (guint32)uintVal; offset += 1; break; case DIS_FIELDTYPE_FH_NETWORK_ID: proto_tree_add_item(tree, hf_dis_mod_param_fh_net_id, tvb, offset, 2, FALSE); - offset += 2; + offset += 2; break; case DIS_FIELDTYPE_FH_SET_ID: proto_tree_add_item(tree, hf_dis_mod_param_fh_set_id, tvb, offset, 2, FALSE); @@ -877,31 +877,31 @@ gint parseFields(tvbuff_t *tvb, proto_tree *tree, gint offset, DIS_ParserNode pa proto_tree_add_item(tree, hf_dis_mod_param_fh_sync_time_offset, tvb, offset, 4, FALSE); offset += 4; break; - case DIS_FIELDTYPE_FH_SECURITY_KEY: + case DIS_FIELDTYPE_FH_SECURITY_KEY: proto_tree_add_item(tree, hf_dis_mod_param_fh_security_key, tvb, offset, 2, FALSE); offset += 2; break; - case DIS_FIELDTYPE_FH_CLEAR_CHANNEL: - proto_tree_add_item(tree, hf_dis_mod_param_fh_clear_channel, tvb, offset, 1, FALSE); + case DIS_FIELDTYPE_FH_CLEAR_CHANNEL: + proto_tree_add_item(tree, hf_dis_mod_param_fh_clear_channel, tvb, offset, 1, FALSE); offset += 1; break; - case DIS_FIELDTYPE_TS_ALLOCATION_MODE: + case DIS_FIELDTYPE_TS_ALLOCATION_MODE: proto_tree_add_item(tree, hf_dis_mod_param_ts_allocation_mode, tvb, offset, 1, FALSE); offset += 1; break; - case DIS_FIELDTYPE_TRANSMITTER_PRIMARY_MODE: + case DIS_FIELDTYPE_TRANSMITTER_PRIMARY_MODE: proto_tree_add_item(tree, hf_dis_mod_param_transmitter_prim_mode, tvb, offset, 1, FALSE); offset += 1; break; - case DIS_FIELDTYPE_TRANSMITTER_SECONDARY_MODE: + case DIS_FIELDTYPE_TRANSMITTER_SECONDARY_MODE: proto_tree_add_item(tree, hf_dis_mod_param_transmitter_second_mode, tvb, offset, 1, FALSE); offset += 1; break; - case DIS_FIELDTYPE_JTIDS_SYNC_STATE: + case DIS_FIELDTYPE_JTIDS_SYNC_STATE: proto_tree_add_item(tree, hf_dis_mod_param_sync_state, tvb, offset, 1, FALSE); offset += 1; break; - case DIS_FIELDTYPE_NETWORK_SYNC_ID: + case DIS_FIELDTYPE_NETWORK_SYNC_ID: proto_tree_add_item(tree, hf_dis_mod_param_network_sync_id, tvb, offset, 4, FALSE); offset += 4; break; @@ -909,41 +909,41 @@ gint parseFields(tvbuff_t *tvb, proto_tree *tree, gint offset, DIS_ParserNode pa /* need to check to see if mod parms length > 0 */ /* could get here when there are antenna pattern parameter but no mod params */ if (modulationParamLength > 0 ) { /* we do have a mod param */ - if (systemModulation == DIS_SYSTEM_MOD_CCTT_SINCGARS) - { - pi = proto_tree_add_text(tree, tvb, offset, -1, "%s", - parserNodes[fieldIndex].fieldLabel); - sub_tree = proto_item_add_subtree(pi, parserNodes[fieldIndex].ettVar); - offset = parseFields(tvb, sub_tree, offset, DIS_FIELDS_MOD_PARAMS_CCTT_SINCGARS); - proto_item_set_end(pi, tvb, offset); - break; - } - else if (systemModulation == DIS_SYSTEM_MOD_JTIDS_MIDS) { - pi = proto_tree_add_text(tree, tvb, offset, -1, "%s", - parserNodes[fieldIndex].fieldLabel); - sub_tree = proto_item_add_subtree(pi, parserNodes[fieldIndex].ettVar); - offset = parseFields(tvb, sub_tree, offset, DIS_FIELDS_MOD_PARAMS_JTIDS_MIDS); - proto_item_set_end(pi, tvb, offset); - break; - } - else { /* just dump what is available */ - newtvb = tvb_new_subset(tvb, offset,modulationParamLength, modulationParamLength); - proto_tree_add_item(tree, hf_dis_mod_param_dump, newtvb, 0, -1, FALSE ); - offset += modulationParamLength; - break; - } + if (systemModulation == DIS_SYSTEM_MOD_CCTT_SINCGARS) + { + pi = proto_tree_add_text(tree, tvb, offset, -1, "%s", + parserNodes[fieldIndex].fieldLabel); + sub_tree = proto_item_add_subtree(pi, parserNodes[fieldIndex].ettVar); + offset = parseFields(tvb, sub_tree, offset, DIS_FIELDS_MOD_PARAMS_CCTT_SINCGARS); + proto_item_set_end(pi, tvb, offset); + break; + } + else if (systemModulation == DIS_SYSTEM_MOD_JTIDS_MIDS) { + pi = proto_tree_add_text(tree, tvb, offset, -1, "%s", + parserNodes[fieldIndex].fieldLabel); + sub_tree = proto_item_add_subtree(pi, parserNodes[fieldIndex].ettVar); + offset = parseFields(tvb, sub_tree, offset, DIS_FIELDS_MOD_PARAMS_JTIDS_MIDS); + proto_item_set_end(pi, tvb, offset); + break; + } + else { /* just dump what is available */ + newtvb = tvb_new_subset(tvb, offset,modulationParamLength, modulationParamLength); + proto_tree_add_item(tree, hf_dis_mod_param_dump, newtvb, 0, -1, FALSE ); + offset += modulationParamLength; + break; + } } /* else, leave offset alone, and then check antenna pattern param field */ break; case DIS_FIELDTYPE_ANTENNA_PATTERN_PARAMETERS: /* just dump the bytes for now. Need to do finish */ - newtvb = tvb_new_subset(tvb, offset, - tvb_length_remaining(tvb, offset), - tvb_reported_length_remaining(tvb, offset) - ); - proto_tree_add_item(tree, hf_dis_antenna_pattern_parameter_dump, newtvb, 0, -1, FALSE ); - break; - - + newtvb = tvb_new_subset(tvb, offset, + tvb_length_remaining(tvb, offset), + tvb_reported_length_remaining(tvb, offset) + ); + proto_tree_add_item(tree, hf_dis_antenna_pattern_parameter_dump, newtvb, 0, -1, FALSE ); + break; + + /* padding */ case DIS_FIELDTYPE_PAD8: offset = parseField_Pad(tvb, tree, offset, @@ -956,7 +956,7 @@ gint parseFields(tvbuff_t *tvb, proto_tree *tree, gint offset, DIS_ParserNode pa case DIS_FIELDTYPE_PAD24: offset = parseField_Pad(tvb, tree, offset, parserNodes[fieldIndex], 3 * fieldRepeatLen); - break; + break; case DIS_FIELDTYPE_PAD32: offset = parseField_Pad(tvb, tree, offset, parserNodes[fieldIndex], 4 * fieldRepeatLen); @@ -1145,22 +1145,22 @@ gint parseFields(tvbuff_t *tvb, proto_tree *tree, gint offset, DIS_ParserNode pa for (i = 0; i < numFixed; ++i) { - /* is remaining length large enough for another fixed datum (ID & value) */ - length = tvb_length_remaining(tvb, offset); - if ( length >= 8 ) + /* is remaining length large enough for another fixed datum (ID & value) */ + length = tvb_length_remaining(tvb, offset); + if ( length >= 8 ) { - proto_item *newSubtree; - newField = proto_tree_add_text(tree, tvb, offset, -1, "%s", - parserNodes[fieldIndex].fieldLabel); - newSubtree = proto_item_add_subtree(newField, ettFixedData); - offset = parseFields - (tvb, newSubtree, offset, - parserNodes[fieldIndex].children); - proto_item_set_end(newField, tvb, offset); + proto_item *newSubtree; + newField = proto_tree_add_text(tree, tvb, offset, -1, "%s", + parserNodes[fieldIndex].fieldLabel); + newSubtree = proto_item_add_subtree(newField, ettFixedData); + offset = parseFields + (tvb, newSubtree, offset, + parserNodes[fieldIndex].children); + proto_item_set_end(newField, tvb, offset); } else { - THROW(ReportedBoundsError); - break; + THROW(ReportedBoundsError); + break; } } } @@ -1182,16 +1182,16 @@ gint parseFields(tvbuff_t *tvb, proto_tree *tree, gint offset, DIS_ParserNode pa for (i = 0; i < numFixed; ++i) { - /* is remaining length large enough for another fixed datum ID (32 bit int) */ - if (tvb_length_remaining(tvb, offset) >= 4 ) + /* is remaining length large enough for another fixed datum ID (32 bit int) */ + if (tvb_length_remaining(tvb, offset) >= 4 ) { offset = parseFields (tvb, newSubtree, offset, parserNodes[fieldIndex].children); } else { - THROW(ReportedBoundsError); - break; + THROW(ReportedBoundsError); + break; } } proto_item_set_end(newField, tvb, offset); @@ -1280,25 +1280,25 @@ gint parseFields(tvbuff_t *tvb, proto_tree *tree, gint offset, DIS_ParserNode pa for (i = 0; i < numVariable; ++i) { - /* simple check to detect malformed, field parsers will detect specifics */ - length = tvb_length_remaining(tvb, offset); - if ( length > 0 ) + /* simple check to detect malformed, field parsers will detect specifics */ + length = tvb_length_remaining(tvb, offset); + if ( length > 0 ) { - proto_item *newSubtree; - newField = proto_tree_add_text(tree, tvb, offset, -1, "%s", - parserNodes[fieldIndex].fieldLabel); - newSubtree = proto_item_add_subtree(newField, - ettVariableRecords[i]); - offset = parseFields - (tvb, newSubtree, offset, - parserNodes[fieldIndex].children); - offset = parseField_VariableRecord - (tvb, newSubtree, offset); - proto_item_set_end(newField, tvb, offset); + proto_item *newSubtree; + newField = proto_tree_add_text(tree, tvb, offset, -1, "%s", + parserNodes[fieldIndex].fieldLabel); + newSubtree = proto_item_add_subtree(newField, + ettVariableRecords[i]); + offset = parseFields + (tvb, newSubtree, offset, + parserNodes[fieldIndex].children); + offset = parseField_VariableRecord + (tvb, newSubtree, offset); + proto_item_set_end(newField, tvb, offset); } else { - THROW(ReportedBoundsError); - break; + THROW(ReportedBoundsError); + break; } } } @@ -1306,7 +1306,7 @@ gint parseFields(tvbuff_t *tvb, proto_tree *tree, gint offset, DIS_ParserNode pa default: break; } - + ++fieldIndex; length = tvb_length_remaining(tvb, offset); } diff --git a/epan/dissectors/packet-dis.c b/epan/dissectors/packet-dis.c index e556b06ba9..0a11a70829 100644 --- a/epan/dissectors/packet-dis.c +++ b/epan/dissectors/packet-dis.c @@ -43,7 +43,6 @@ # include "config.h" #endif -#include <stdio.h> #include <epan/packet.h> #include <epan/prefs.h> #include "packet-dis-enums.h" @@ -53,7 +52,7 @@ #define DEFAULT_DIS_UDP_PORT 3000 /* Encoding type the last 14 bits */ -#define DIS_ENCODING_TYPE(word) ((word) & 0x3FFF) +#define DIS_ENCODING_TYPE(word) ((word) & 0x3FFF) static gint proto_dis = -1; @@ -119,28 +118,28 @@ int ett_dis_ens = -1; int ett_dis_crypto_key = -1; static const true_false_string dis_modulation_spread_spectrum = { - "Spread Spectrum modulation in use", - "Spread Spectrum modulation not in use" + "Spread Spectrum modulation in use", + "Spread Spectrum modulation not in use" }; static const true_false_string dis_frequency_hopping_value = { - "Frequency hopping modulation used", - "Frequency hopping modulation not used" + "Frequency hopping modulation used", + "Frequency hopping modulation not used" }; static const true_false_string dis_encryption_mode_value = { - "diphase encryption mode", - "baseband encryption mode" + "diphase encryption mode", + "baseband encryption mode" }; static const true_false_string dis_pseudo_noise_value = { - "Pseudo Noise modulation used", - "Pseudo Noise modulation not used" + "Pseudo Noise modulation used", + "Pseudo Noise modulation not used" }; static const true_false_string dis_time_hopping_value = { - "Time hopping modulation used", - "Time hopping modulation not used" + "Time hopping modulation used", + "Time hopping modulation not used" }; static guint dis_udp_port = DEFAULT_DIS_UDP_PORT; @@ -178,10 +177,10 @@ static gint dissect_dis(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) pduType = DIS_PDUTYPE_OTHER; protocolFamily = DIS_PROTOCOLFAMILY_OTHER; persistentObjectPduType = DIS_PERSISTENT_OBJECT_TYPE_OTHER; - + /* set the protocol column */ col_set_str(pinfo->cinfo, COL_PROTOCOL, dis_proto_name_short); - + /* Add the top-level DIS node under which the rest of the fields will be * displayed. */ @@ -200,8 +199,8 @@ static gint dissect_dis(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) /* Locate the string name for the PDU type enumeration, * or default to "Unknown". */ - pduString = val_to_str(pduType, DIS_PDU_Type_Strings, "Unknown"); - + pduString = val_to_str(pduType, DIS_PDU_Type_Strings, "Unknown"); + /* Locate the appropriate PDU parser, if type is known. */ switch (protocolFamily) @@ -255,7 +254,7 @@ static gint dissect_dis(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) */ pduString = val_to_str (persistentObjectPduType, - DIS_PDU_PersistentObjectType_Strings, "Unknown"); + DIS_PDU_PersistentObjectType_Strings, "Unknown"); /* Add a node to contain the DIS PDU fields. */ @@ -285,7 +284,7 @@ static gint dissect_dis(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) case DIS_PDUTYPE_SIGNAL: pduParser = DIS_PARSER_SIGNAL_PDU; break; - + /* DIS Warfare PDUs */ case DIS_PDUTYPE_FIRE: pduParser = DIS_PARSER_FIRE_PDU; @@ -391,45 +390,45 @@ static gint dissect_dis(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) /* add detail to the INFO column if avalaible */ if ( check_col( pinfo->cinfo, COL_INFO) ) { - + switch (pduType) { /* DIS Entity Information / Interaction PDUs */ case DIS_PDUTYPE_ENTITY_STATE: col_add_fstr( pinfo->cinfo, COL_INFO, "PDUType: %s, %s, %s", - pduString, + pduString, val_to_str(entityKind, DIS_PDU_EntityKind_Strings, "Unknown Entity Kind"), val_to_str(entityDomain, DIS_PDU_Domain_Strings, "Unknown Entity Domain") - ); + ); break; - + case DIS_PDUTYPE_SIGNAL: col_add_fstr( pinfo->cinfo, COL_INFO, "PDUType: %s, RadioID=%u, Encoding Type=%s, Number of Samples=%u", - pduString, + pduString, radioID, val_to_str(DIS_ENCODING_TYPE(encodingScheme), DIS_PDU_Encoding_Type_Strings, "Unknown Encoding Type"), numSamples - ); + ); break; case DIS_PDUTYPE_TRANSMITTER: col_add_fstr( pinfo->cinfo, COL_INFO, "PDUType: %s, RadioID=%u, Transmit State=%s", - pduString, + pduString, radioID, val_to_str(disRadioTransmitState, DIS_PDU_RadioTransmitState_Strings, "Unknown Transmit State") - ); + ); break; default: /* set the basic info column (pdu type) */ - col_add_fstr( pinfo->cinfo, COL_INFO, - "PDUType: %s", - pduString); + col_add_fstr( pinfo->cinfo, COL_INFO, + "PDUType: %s", + pduString); break; } } - + return tvb_length(tvb); } @@ -440,271 +439,271 @@ void proto_reg_handoff_dis(void); void proto_register_dis(void) { -/* registration with the filtering engine */ - static hf_register_info hf[] = - { - { &hf_dis_proto_ver, - { "Proto version", "dis.proto_ver", - FT_UINT8, BASE_DEC, VALS(DIS_PDU_ProtocolVersion_Strings), 0x0, - NULL, HFILL } - }, - { &hf_dis_exercise_id, - { "Excercise ID", "dis.exer_id", - FT_UINT8, BASE_DEC, NULL, 0x0, - NULL, HFILL } - }, - { &hf_dis_pdu_type, - { "PDU type", "dis.pdu_type", - FT_UINT8, BASE_DEC, VALS(DIS_PDU_Type_Strings), 0x0, - NULL, HFILL } - }, - { &hf_dis_proto_fam, - { "Proto Family", "dis.proto_fam", - FT_UINT8, BASE_DEC, VALS(DIS_PDU_ProtocolFamily_Strings), 0x0, - NULL, HFILL } - }, - { &hf_dis_pdu_length, - { "PDU Length", "dis.pdu_length", - FT_UINT16, BASE_DEC, NULL, 0x0, - NULL, HFILL } - }, - { &hf_dis_entity_id_site, - { "Entity ID Site", "dis.entity_id_site", - FT_UINT16, BASE_DEC, NULL, 0x0, - NULL, HFILL } - }, - { &hf_dis_entity_id_application, - { "Entity ID Application", "dis.entity_id_application", - FT_UINT16, BASE_DEC, NULL, 0x0, - NULL, HFILL } - }, - { &hf_dis_entity_id_entity, - { "Entity ID Entity", "dis.entity_id_entity", - FT_UINT16, BASE_DEC, NULL, 0x0, - NULL, HFILL } - }, - { &hf_dis_num_art_params, - { "Number of Articulation Parameters", "dis.num_articulation_params", - FT_UINT8, BASE_DEC, NULL, 0x0, - NULL, HFILL } - }, - { &hf_dis_radio_id, - { "Radio ID", "dis.radio.radio_id", - FT_UINT16, BASE_DEC, NULL, 0x0, - NULL, HFILL } - }, - { &hf_dis_ens, - { "Encoding Scheme", "dis.radio.encoding_scheme", - FT_UINT16, BASE_HEX, NULL, 0x0, - NULL, HFILL } - }, - { &hf_dis_ens_class, - { "Encoding Class", "dis.radio.encoding_class", - FT_UINT16, BASE_DEC, VALS(DIS_PDU_Encoding_Class_Strings), 0xc000, - NULL, HFILL } - }, - { &hf_dis_ens_type, - { "Encoding Type", "dis.radio.encoding_type", - FT_UINT16, BASE_DEC, VALS(DIS_PDU_Encoding_Type_Strings), 0x3fff, - NULL, HFILL } - }, - { &hf_dis_tdl_type, - { "TDL Type", "dis.radio.tdl_type", - FT_UINT16, BASE_DEC, VALS(DIS_PDU_TDL_Type_Strings), 0x0, - NULL, HFILL } - }, - { &hf_dis_sample_rate, - { "Sample Rate", "dis.radio.sample_rate", - FT_UINT32, BASE_DEC, NULL, 0x0, - NULL, HFILL } - }, - { &hf_dis_data_length, - { "Data Length", "dis.radio.data_length", - FT_UINT16, BASE_DEC, NULL, 0x0, - NULL, HFILL } - }, - { &hf_dis_num_of_samples, - { "Number of Samples", "dis.radio.num_of_samples", - FT_UINT16, BASE_DEC, NULL, 0x0, - NULL, HFILL } - }, - { &hf_dis_signal_data, - {"Data", "dis.radio.signal_data", - FT_BYTES, BASE_NONE, NULL, 0x0, - NULL, HFILL} - }, - { &hf_dis_radio_category, - { "Radio Category", "dis.radio.radio_category", - FT_UINT8, BASE_DEC, VALS(DIS_PDU_RadioCategory_Strings), 0x0, - NULL, HFILL } - }, - { &hf_dis_nomenclature_version, - { "Nomenclature Version", "dis.radio.nomenclature_version", - FT_UINT8, BASE_DEC, VALS(DIS_PDU_NomenclatureVersion_Strings), 0x0, - NULL, HFILL } - }, - { &hf_dis_nomenclature, - { "Nomenclature", "dis.radio.nomenclature", - FT_UINT16, BASE_DEC, VALS(DIS_PDU_Nomenclature_Strings), 0x0, - NULL, HFILL } - }, - { &hf_dis_radio_transmit_state, - { "Radio Transmit State", "dis.radio.transmit_state", - FT_UINT8, BASE_DEC, VALS(DIS_PDU_RadioTransmitState_Strings), 0x0, - NULL, HFILL } - }, - { &hf_dis_radio_input_source, - { "Radio Input Source", "dis.radio.input_source", - FT_UINT8, BASE_DEC, VALS(DIS_PDU_RadioInputSource_Strings), 0x0, - NULL, HFILL } - }, - { &hf_dis_antenna_pattern_type, - { "Antenna Pattern Type", "dis.radio.antenna_pattern_type", - FT_UINT16, BASE_DEC, VALS(DIS_PDU_AntennaPatternType_Strings), 0x0, - NULL, HFILL } - }, - { &hf_dis_antenna_pattern_length, - { "Antenna Pattern Length", "dis.radio.antenna_pattern_length", - FT_UINT16, BASE_DEC, NULL, 0x0, - NULL, HFILL } - }, - { &hf_dis_transmit_frequency, - { "Transmit Frequency (Hz)", "dis.radio.frequency", - FT_UINT64, BASE_DEC, NULL, 0x0, - NULL, HFILL } - }, - { &hf_dis_spread_spectrum_usage, - { "Spread Spectrum", "dis.radio.mod_type.spread_spectrum_usage", - FT_BOOLEAN, 16, TFS(&dis_modulation_spread_spectrum),0xFFFF, - NULL, HFILL } - }, - { &hf_dis_frequency_hopping, - { "Frequency Hopping modulation", "dis.radio.mod_type.frequency_hopping", - FT_BOOLEAN, 16, TFS(&dis_frequency_hopping_value),0x0001, - NULL, HFILL } - }, - { &hf_dis_pseudo_noise_modulation, - { "Psuedo noise modulation", "dis.radio.mod_type.pseudo_noise_modulation", - FT_BOOLEAN, 16, TFS(&dis_pseudo_noise_value),0x0002, - NULL, HFILL } - }, - { &hf_dis_time_hopping, - { "Time Hopping modulation", "dis.radio.mod_type.time_hopping", - FT_BOOLEAN, 16, TFS(&dis_time_hopping_value),0x0004, - NULL, HFILL } - }, - { &hf_dis_modulation_major, - { "Major Modulation", "dis.radio.mod_type.major", - FT_UINT16, BASE_DEC, VALS(DIS_PDU_MajorModulation_Strings), 0x0, - NULL, HFILL } - }, - { &hf_dis_modulation_system, - { "System Modulation", "dis.radio.mod_type.system", - FT_UINT16, BASE_DEC, VALS(DIS_PDU_SystemModulation_Strings), 0x0, - NULL, HFILL } - }, - { &hf_dis_crypto_system, - { "Crypto System", "dis.radio.crypto_system", - FT_UINT16, BASE_DEC, VALS(DIS_PDU_CryptoSystem_Strings), 0x0, - NULL, HFILL } - }, - { &hf_dis_crypto_key, - { "Encryption Key", "dis.radio.encryption_key", - FT_UINT16, BASE_HEX, NULL, 0x0, - NULL, HFILL } - }, - { &hf_dis_encryption_mode, - { "Encryption Mode", "dis.radio.encryption_key.mode", - FT_BOOLEAN, 16, TFS(&dis_encryption_mode_value),0x8000, - NULL, HFILL } - }, - { &hf_dis_key_identifier, - { "Encryption Key ID", "dis.radio.encryption_key.id", - FT_UINT16, BASE_DEC, NULL,0x7FFF, - NULL, HFILL } - }, - { &hf_dis_modulation_parameter_length, - { "Modulation Parameter Length", "dis.radio.mod_param.length", - FT_UINT8, BASE_DEC, NULL, 0x0, - NULL, HFILL } - }, - { &hf_dis_mod_param_fh_net_id, - { "Frequency Hopping Network ID", "dis.radio.mod_param.cctt_cingars.fh_nw_id", - FT_UINT16, BASE_DEC, NULL, 0x0, - NULL, HFILL } - }, - { &hf_dis_mod_param_fh_set_id, - { "Frequency Set ID", "dis.radio.mod_param.cctt_cingars.fh_set_id", - FT_UINT16, BASE_DEC, NULL, 0x0, - NULL, HFILL } - }, - { &hf_dis_mod_param_fh_lo_set_id, - { "Frequency Lockout Set ID", "dis.radio.mod_param.cctt_cingars.fh_lo_set_id", - FT_UINT16, BASE_DEC, NULL, 0x0, - NULL, HFILL } - }, - { &hf_dis_mod_param_fh_msg_start, - { "Start of Message", "dis.radio.mod_param.cctt_cingars.fh_msg_start", - FT_UINT8, BASE_DEC, VALS(DIS_PDU_ModParamMsgStart_Strings), 0x0, - NULL, HFILL } - }, - { &hf_dis_mod_param_fh_reserved, - { "Reserved", "dis.radio.mod_param.cctt_cingars.fh_reserved", - FT_UINT8, BASE_DEC, NULL, 0x0, - NULL, HFILL } - }, - { &hf_dis_mod_param_fh_sync_time_offset, - { "Sync Time Offset (Seconds)", "dis.radio.mod_param.cctt_cingars.fh_sync_offset", - FT_UINT32, BASE_DEC, NULL, 0x0, - NULL, HFILL } - }, - { &hf_dis_mod_param_fh_security_key, - { "Transmission Security Key", "dis.radio.mod_param.cctt_cingars.fh_securit_key", - FT_UINT16, BASE_DEC, NULL, 0x0, - NULL, HFILL } - }, - { &hf_dis_mod_param_fh_clear_channel, - { "Clear Channel", "dis.radio.mod_param.cctt_cingars.fh_clr_channel", - FT_UINT8, BASE_DEC, VALS(DIS_PDU_ModParamClrChannel_Strings), 0x0, - NULL, HFILL } - }, - { &hf_dis_mod_param_dump, - {"Modulation Parameter All", "dis.radio.mod_param.all", - FT_BYTES, BASE_NONE, NULL, 0x0, - NULL, HFILL} - }, - { &hf_dis_mod_param_ts_allocation_mode, - { "Time Slot Allocaton Mode", "dis.radio.mod_param.jtids.ts_alloc_mode", - FT_UINT8, BASE_DEC, VALS(DIS_PDU_TSAllocationFidelity_Strings), 0x0, - NULL, HFILL } - }, - { &hf_dis_mod_param_transmitter_prim_mode, - { "Transmitter Primary Mode", "dis.radio.mod_param.jtids.transmitter_primary_mode", - FT_UINT8, BASE_DEC, VALS(DIS_PDU_TerminalPrimaryMode_Strings), 0x0, - NULL, HFILL } - }, - { &hf_dis_mod_param_transmitter_second_mode, - { "Transmitter Primary Mode", "dis.radio.mod_param.jtids.transmitter_secondary_mode", - FT_UINT8, BASE_DEC, VALS(DIS_PDU_TerminalSecondaryMode_Strings), 0x0, - NULL, HFILL } - }, - { &hf_dis_mod_param_sync_state, - { "Synchronization State", "dis.radio.mod_param.jtids.sync_state", - FT_UINT8, BASE_DEC, VALS(DIS_PDU_ModParamSyncState_Strings), 0x0, - NULL, HFILL } - }, - { &hf_dis_mod_param_network_sync_id, - { "Network Sync ID", "dis.radio.mod_param.jtids.network_sync_id", - FT_UINT32, BASE_DEC, NULL, 0x0, - NULL, HFILL } - }, - { &hf_dis_antenna_pattern_parameter_dump, - {"Antenna Pattern Parameter", "dis.radio.antenna_parameter", - FT_BYTES, BASE_NONE, NULL, 0x0, - NULL, HFILL} - }, - }; - +/* registration with the filtering engine */ + static hf_register_info hf[] = + { + { &hf_dis_proto_ver, + { "Proto version", "dis.proto_ver", + FT_UINT8, BASE_DEC, VALS(DIS_PDU_ProtocolVersion_Strings), 0x0, + NULL, HFILL } + }, + { &hf_dis_exercise_id, + { "Excercise ID", "dis.exer_id", + FT_UINT8, BASE_DEC, NULL, 0x0, + NULL, HFILL } + }, + { &hf_dis_pdu_type, + { "PDU type", "dis.pdu_type", + FT_UINT8, BASE_DEC, VALS(DIS_PDU_Type_Strings), 0x0, + NULL, HFILL } + }, + { &hf_dis_proto_fam, + { "Proto Family", "dis.proto_fam", + FT_UINT8, BASE_DEC, VALS(DIS_PDU_ProtocolFamily_Strings), 0x0, + NULL, HFILL } + }, + { &hf_dis_pdu_length, + { "PDU Length", "dis.pdu_length", + FT_UINT16, BASE_DEC, NULL, 0x0, + NULL, HFILL } + }, + { &hf_dis_entity_id_site, + { "Entity ID Site", "dis.entity_id_site", + FT_UINT16, BASE_DEC, NULL, 0x0, + NULL, HFILL } + }, + { &hf_dis_entity_id_application, + { "Entity ID Application", "dis.entity_id_application", + FT_UINT16, BASE_DEC, NULL, 0x0, + NULL, HFILL } + }, + { &hf_dis_entity_id_entity, + { "Entity ID Entity", "dis.entity_id_entity", + FT_UINT16, BASE_DEC, NULL, 0x0, + NULL, HFILL } + }, + { &hf_dis_num_art_params, + { "Number of Articulation Parameters", "dis.num_articulation_params", + FT_UINT8, BASE_DEC, NULL, 0x0, + NULL, HFILL } + }, + { &hf_dis_radio_id, + { "Radio ID", "dis.radio.radio_id", + FT_UINT16, BASE_DEC, NULL, 0x0, + NULL, HFILL } + }, + { &hf_dis_ens, + { "Encoding Scheme", "dis.radio.encoding_scheme", + FT_UINT16, BASE_HEX, NULL, 0x0, + NULL, HFILL } + }, + { &hf_dis_ens_class, + { "Encoding Class", "dis.radio.encoding_class", + FT_UINT16, BASE_DEC, VALS(DIS_PDU_Encoding_Class_Strings), 0xc000, + NULL, HFILL } + }, + { &hf_dis_ens_type, + { "Encoding Type", "dis.radio.encoding_type", + FT_UINT16, BASE_DEC, VALS(DIS_PDU_Encoding_Type_Strings), 0x3fff, + NULL, HFILL } + }, + { &hf_dis_tdl_type, + { "TDL Type", "dis.radio.tdl_type", + FT_UINT16, BASE_DEC, VALS(DIS_PDU_TDL_Type_Strings), 0x0, + NULL, HFILL } + }, + { &hf_dis_sample_rate, + { "Sample Rate", "dis.radio.sample_rate", + FT_UINT32, BASE_DEC, NULL, 0x0, + NULL, HFILL } + }, + { &hf_dis_data_length, + { "Data Length", "dis.radio.data_length", + FT_UINT16, BASE_DEC, NULL, 0x0, + NULL, HFILL } + }, + { &hf_dis_num_of_samples, + { "Number of Samples", "dis.radio.num_of_samples", + FT_UINT16, BASE_DEC, NULL, 0x0, + NULL, HFILL } + }, + { &hf_dis_signal_data, + {"Data", "dis.radio.signal_data", + FT_BYTES, BASE_NONE, NULL, 0x0, + NULL, HFILL} + }, + { &hf_dis_radio_category, + { "Radio Category", "dis.radio.radio_category", + FT_UINT8, BASE_DEC, VALS(DIS_PDU_RadioCategory_Strings), 0x0, + NULL, HFILL } + }, + { &hf_dis_nomenclature_version, + { "Nomenclature Version", "dis.radio.nomenclature_version", + FT_UINT8, BASE_DEC, VALS(DIS_PDU_NomenclatureVersion_Strings), 0x0, + NULL, HFILL } + }, + { &hf_dis_nomenclature, + { "Nomenclature", "dis.radio.nomenclature", + FT_UINT16, BASE_DEC, VALS(DIS_PDU_Nomenclature_Strings), 0x0, + NULL, HFILL } + }, + { &hf_dis_radio_transmit_state, + { "Radio Transmit State", "dis.radio.transmit_state", + FT_UINT8, BASE_DEC, VALS(DIS_PDU_RadioTransmitState_Strings), 0x0, + NULL, HFILL } + }, + { &hf_dis_radio_input_source, + { "Radio Input Source", "dis.radio.input_source", + FT_UINT8, BASE_DEC, VALS(DIS_PDU_RadioInputSource_Strings), 0x0, + NULL, HFILL } + }, + { &hf_dis_antenna_pattern_type, + { "Antenna Pattern Type", "dis.radio.antenna_pattern_type", + FT_UINT16, BASE_DEC, VALS(DIS_PDU_AntennaPatternType_Strings), 0x0, + NULL, HFILL } + }, + { &hf_dis_antenna_pattern_length, + { "Antenna Pattern Length", "dis.radio.antenna_pattern_length", + FT_UINT16, BASE_DEC, NULL, 0x0, + NULL, HFILL } + }, + { &hf_dis_transmit_frequency, + { "Transmit Frequency (Hz)", "dis.radio.frequency", + FT_UINT64, BASE_DEC, NULL, 0x0, + NULL, HFILL } + }, + { &hf_dis_spread_spectrum_usage, + { "Spread Spectrum", "dis.radio.mod_type.spread_spectrum_usage", + FT_BOOLEAN, 16, TFS(&dis_modulation_spread_spectrum),0xFFFF, + NULL, HFILL } + }, + { &hf_dis_frequency_hopping, + { "Frequency Hopping modulation", "dis.radio.mod_type.frequency_hopping", + FT_BOOLEAN, 16, TFS(&dis_frequency_hopping_value),0x0001, + NULL, HFILL } + }, + { &hf_dis_pseudo_noise_modulation, + { "Psuedo noise modulation", "dis.radio.mod_type.pseudo_noise_modulation", + FT_BOOLEAN, 16, TFS(&dis_pseudo_noise_value),0x0002, + NULL, HFILL } + }, + { &hf_dis_time_hopping, + { "Time Hopping modulation", "dis.radio.mod_type.time_hopping", + FT_BOOLEAN, 16, TFS(&dis_time_hopping_value),0x0004, + NULL, HFILL } + }, + { &hf_dis_modulation_major, + { "Major Modulation", "dis.radio.mod_type.major", + FT_UINT16, BASE_DEC, VALS(DIS_PDU_MajorModulation_Strings), 0x0, + NULL, HFILL } + }, + { &hf_dis_modulation_system, + { "System Modulation", "dis.radio.mod_type.system", + FT_UINT16, BASE_DEC, VALS(DIS_PDU_SystemModulation_Strings), 0x0, + NULL, HFILL } + }, + { &hf_dis_crypto_system, + { "Crypto System", "dis.radio.crypto_system", + FT_UINT16, BASE_DEC, VALS(DIS_PDU_CryptoSystem_Strings), 0x0, + NULL, HFILL } + }, + { &hf_dis_crypto_key, + { "Encryption Key", "dis.radio.encryption_key", + FT_UINT16, BASE_HEX, NULL, 0x0, + NULL, HFILL } + }, + { &hf_dis_encryption_mode, + { "Encryption Mode", "dis.radio.encryption_key.mode", + FT_BOOLEAN, 16, TFS(&dis_encryption_mode_value),0x8000, + NULL, HFILL } + }, + { &hf_dis_key_identifier, + { "Encryption Key ID", "dis.radio.encryption_key.id", + FT_UINT16, BASE_DEC, NULL,0x7FFF, + NULL, HFILL } + }, + { &hf_dis_modulation_parameter_length, + { "Modulation Parameter Length", "dis.radio.mod_param.length", + FT_UINT8, BASE_DEC, NULL, 0x0, + NULL, HFILL } + }, + { &hf_dis_mod_param_fh_net_id, + { "Frequency Hopping Network ID", "dis.radio.mod_param.cctt_cingars.fh_nw_id", + FT_UINT16, BASE_DEC, NULL, 0x0, + NULL, HFILL } + }, + { &hf_dis_mod_param_fh_set_id, + { "Frequency Set ID", "dis.radio.mod_param.cctt_cingars.fh_set_id", + FT_UINT16, BASE_DEC, NULL, 0x0, + NULL, HFILL } + }, + { &hf_dis_mod_param_fh_lo_set_id, + { "Frequency Lockout Set ID", "dis.radio.mod_param.cctt_cingars.fh_lo_set_id", + FT_UINT16, BASE_DEC, NULL, 0x0, + NULL, HFILL } + }, + { &hf_dis_mod_param_fh_msg_start, + { "Start of Message", "dis.radio.mod_param.cctt_cingars.fh_msg_start", + FT_UINT8, BASE_DEC, VALS(DIS_PDU_ModParamMsgStart_Strings), 0x0, + NULL, HFILL } + }, + { &hf_dis_mod_param_fh_reserved, + { "Reserved", "dis.radio.mod_param.cctt_cingars.fh_reserved", + FT_UINT8, BASE_DEC, NULL, 0x0, + NULL, HFILL } + }, + { &hf_dis_mod_param_fh_sync_time_offset, + { "Sync Time Offset (Seconds)", "dis.radio.mod_param.cctt_cingars.fh_sync_offset", + FT_UINT32, BASE_DEC, NULL, 0x0, + NULL, HFILL } + }, + { &hf_dis_mod_param_fh_security_key, + { "Transmission Security Key", "dis.radio.mod_param.cctt_cingars.fh_securit_key", + FT_UINT16, BASE_DEC, NULL, 0x0, + NULL, HFILL } + }, + { &hf_dis_mod_param_fh_clear_channel, + { "Clear Channel", "dis.radio.mod_param.cctt_cingars.fh_clr_channel", + FT_UINT8, BASE_DEC, VALS(DIS_PDU_ModParamClrChannel_Strings), 0x0, + NULL, HFILL } + }, + { &hf_dis_mod_param_dump, + {"Modulation Parameter All", "dis.radio.mod_param.all", + FT_BYTES, BASE_NONE, NULL, 0x0, + NULL, HFILL} + }, + { &hf_dis_mod_param_ts_allocation_mode, + { "Time Slot Allocaton Mode", "dis.radio.mod_param.jtids.ts_alloc_mode", + FT_UINT8, BASE_DEC, VALS(DIS_PDU_TSAllocationFidelity_Strings), 0x0, + NULL, HFILL } + }, + { &hf_dis_mod_param_transmitter_prim_mode, + { "Transmitter Primary Mode", "dis.radio.mod_param.jtids.transmitter_primary_mode", + FT_UINT8, BASE_DEC, VALS(DIS_PDU_TerminalPrimaryMode_Strings), 0x0, + NULL, HFILL } + }, + { &hf_dis_mod_param_transmitter_second_mode, + { "Transmitter Primary Mode", "dis.radio.mod_param.jtids.transmitter_secondary_mode", + FT_UINT8, BASE_DEC, VALS(DIS_PDU_TerminalSecondaryMode_Strings), 0x0, + NULL, HFILL } + }, + { &hf_dis_mod_param_sync_state, + { "Synchronization State", "dis.radio.mod_param.jtids.sync_state", + FT_UINT8, BASE_DEC, VALS(DIS_PDU_ModParamSyncState_Strings), 0x0, + NULL, HFILL } + }, + { &hf_dis_mod_param_network_sync_id, + { "Network Sync ID", "dis.radio.mod_param.jtids.network_sync_id", + FT_UINT32, BASE_DEC, NULL, 0x0, + NULL, HFILL } + }, + { &hf_dis_antenna_pattern_parameter_dump, + {"Antenna Pattern Parameter", "dis.radio.antenna_parameter", + FT_BYTES, BASE_NONE, NULL, 0x0, + NULL, HFILL} + }, + }; + /* Setup protocol subtree array */ static gint *ett[] = { |