diff options
author | Bill Meier <wmeier@newsguy.com> | 2012-05-17 14:35:11 +0000 |
---|---|---|
committer | Bill Meier <wmeier@newsguy.com> | 2012-05-17 14:35:11 +0000 |
commit | 6fbb09d50b21f6a5a193c9581eb3eed63466295f (patch) | |
tree | a4ce63d7a8b041be368cbebfec5ba9cd6d6b894f | |
parent | 6526ea37512972cd13a8e9096f03801329846359 (diff) |
General Cleanup including:
- Remove unneeded #include <stdlib.h>;
- Remove "README.developer" comments;
- Reformat hf[] entries;
- Remove unneeded variable initialization;
- "localize" some variables;
- Whitespace/indentation/long lines/formatting
- (In one case) proto_tree_add_uint returns a proto_item* (not a proto_tree *);
svn path=/trunk/; revision=42678
-rw-r--r-- | epan/dissectors/packet-ehs.c | 1720 | ||||
-rw-r--r-- | epan/dissectors/packet-gre.c | 1027 | ||||
-rw-r--r-- | epan/dissectors/packet-gsm_a_gm.c | 4570 | ||||
-rw-r--r-- | epan/dissectors/packet-gsm_sms_ud.c | 940 | ||||
-rw-r--r-- | epan/dissectors/packet-gvrp.c | 471 | ||||
-rw-r--r-- | epan/dissectors/packet-pdcp-lte.c | 130 | ||||
-rw-r--r-- | epan/dissectors/packet-skinny.c | 1756 | ||||
-rw-r--r-- | epan/dissectors/packet-usb.c | 559 |
8 files changed, 5616 insertions, 5557 deletions
diff --git a/epan/dissectors/packet-ehs.c b/epan/dissectors/packet-ehs.c index d53fd5214b..d01a66a675 100644 --- a/epan/dissectors/packet-ehs.c +++ b/epan/dissectors/packet-ehs.c @@ -28,8 +28,6 @@ # include "config.h" #endif -#include <stdlib.h> - #include <glib.h> #include <epan/packet.h> @@ -240,15 +238,15 @@ typedef enum EHS_Protocol_Type /* some basic sizing parameters */ enum { - IP_HEADER_LENGTH = 48, - CCSDS_PRIMARY_HEADER_LENGTH = 6, + IP_HEADER_LENGTH = 48, + CCSDS_PRIMARY_HEADER_LENGTH = 6, CCSDS_SECONDARY_HEADER_LENGTH = 10, - EHS_PRIMARY_HEADER_SIZE = 16, - EHS_SECONDARY_HEADER_SIZE = 12 + EHS_PRIMARY_HEADER_SIZE = 16, + EHS_SECONDARY_HEADER_SIZE = 12 }; /* determine if a ccsds primary header indicates a secondary exists */ -#define HDR_SECHDR 0x0800 +#define HDR_SECHDR 0x0800 static const value_string ehs_primary_header_project[] = @@ -401,7 +399,8 @@ static const value_string ehs_data_zone_udsm_event[] = * header, and the offset should be set to the start of the ehs secondary * header on input. */ -static int ehs_secondary_header_size ( int protocol, tvbuff_t* tvb, int offset ) +static int +ehs_secondary_header_size ( int protocol, tvbuff_t* tvb, int offset ) { /* for most protocols the ehs secondary header is a standard size */ int size = EHS_SECONDARY_HEADER_SIZE; @@ -409,7 +408,7 @@ static int ehs_secondary_header_size ( int protocol, tvbuff_t* tvb, int offset ) switch ( protocol ) { case EHS_PROTOCOL__TDM_TELEMETRY: - /* the TDM secondary header size is variable. it's value is actually + /* the TDM secondary header size is variable. its value is actually * contained in the first two bytes of the secondary header itself. */ size = tvb_get_ntohs ( tvb, offset ); @@ -469,7 +468,8 @@ static int ehs_secondary_header_size ( int protocol, tvbuff_t* tvb, int offset ) /* common EHS secondary header dissector */ -static void common_secondary_header_dissector ( proto_tree* ehs_secondary_header_tree, tvbuff_t* tvb, int* offset ) +static void +common_secondary_header_dissector ( proto_tree* ehs_secondary_header_tree, tvbuff_t* tvb, int* offset ) { proto_tree_add_item ( ehs_secondary_header_tree, hf_ehs_sh_vcdu_sequence_number, tvb, *offset, 3, ENC_BIG_ENDIAN ); *offset += 3; @@ -497,7 +497,8 @@ static void common_secondary_header_dissector ( proto_tree* ehs_secondary_header /* AOS/LOS EHS secondary header dissector */ -static void aoslos_secondary_header_dissector ( proto_tree* ehs_secondary_header_tree, tvbuff_t* tvb, int* offset ) +static void +aoslos_secondary_header_dissector ( proto_tree* ehs_secondary_header_tree, tvbuff_t* tvb, int* offset ) { proto_tree_add_item ( ehs_secondary_header_tree, hf_ehs_sh_version, tvb, *offset, 1, ENC_BIG_ENDIAN ); proto_tree_add_item ( ehs_secondary_header_tree, hf_ehs_sh_data_status_bit_5, tvb, *offset, 1, ENC_BIG_ENDIAN ); @@ -513,7 +514,8 @@ static void aoslos_secondary_header_dissector ( proto_tree* ehs_secondary_header /* payload ccsds secondary header dissector */ -static void payload_ccsds_secondary_header_dissector ( proto_tree* ehs_secondary_header_tree, tvbuff_t* tvb, int* offset ) +static void +payload_ccsds_secondary_header_dissector ( proto_tree* ehs_secondary_header_tree, tvbuff_t* tvb, int* offset ) { proto_tree_add_item ( ehs_secondary_header_tree, hf_ehs_sh_version, tvb, *offset, 1, ENC_BIG_ENDIAN ); proto_tree_add_item ( ehs_secondary_header_tree, hf_ehs_sh_data_status_bit_5, tvb, *offset, 1, ENC_BIG_ENDIAN ); @@ -529,7 +531,8 @@ static void payload_ccsds_secondary_header_dissector ( proto_tree* ehs_secondary /* core ccsds secondary header dissector */ -static void core_ccsds_secondary_header_dissector ( proto_tree* ehs_secondary_header_tree, tvbuff_t* tvb, int* offset ) +static void +core_ccsds_secondary_header_dissector ( proto_tree* ehs_secondary_header_tree, tvbuff_t* tvb, int* offset ) { proto_tree_add_item ( ehs_secondary_header_tree, hf_ehs_sh_version, tvb, *offset, 1, ENC_BIG_ENDIAN ); proto_tree_add_item ( ehs_secondary_header_tree, hf_ehs_sh_data_status_bit_5, tvb, *offset, 1, ENC_BIG_ENDIAN ); @@ -545,7 +548,8 @@ static void core_ccsds_secondary_header_dissector ( proto_tree* ehs_secondary_he /* payload bpdu secondary header dissector */ -static void payload_bpdu_secondary_header_dissector ( proto_tree* ehs_secondary_header_tree, tvbuff_t* tvb, int* offset ) +static void +payload_bpdu_secondary_header_dissector ( proto_tree* ehs_secondary_header_tree, tvbuff_t* tvb, int* offset ) { proto_tree_add_item ( ehs_secondary_header_tree, hf_ehs_sh_version, tvb, *offset, 1, ENC_BIG_ENDIAN ); proto_tree_add_item ( ehs_secondary_header_tree, hf_ehs_sh_data_status_bit_5, tvb, *offset, 1, ENC_BIG_ENDIAN ); @@ -561,7 +565,8 @@ static void payload_bpdu_secondary_header_dissector ( proto_tree* ehs_secondary_ /* udsm secondary header dissector */ -static void udsm_secondary_header_dissector ( proto_tree* ehs_secondary_header_tree, tvbuff_t* tvb, int* offset ) +static void +udsm_secondary_header_dissector ( proto_tree* ehs_secondary_header_tree, tvbuff_t* tvb, int* offset ) { proto_tree_add_item ( ehs_secondary_header_tree, hf_ehs_sh_version, tvb, *offset, 1, ENC_BIG_ENDIAN ); proto_tree_add_item ( ehs_secondary_header_tree, hf_ehs_sh_data_status_bit_5, tvb, *offset, 1, ENC_BIG_ENDIAN ); @@ -577,14 +582,15 @@ static void udsm_secondary_header_dissector ( proto_tree* ehs_secondary_header_t /* tdm secondary header dissector */ -static void tdm_secondary_header_dissector ( proto_tree* ehs_secondary_header_tree, tvbuff_t* tvb, int* offset ) +static void +tdm_secondary_header_dissector ( proto_tree* ehs_secondary_header_tree, tvbuff_t* tvb, int* offset ) { int j; int num_major_frames = 0; int num_minor_frames = 0; - int cntmet_present = 0; - int obt_present = 0; - int mjfs_present = 0; + int cntmet_present = 0; + int obt_present = 0; + int mjfs_present = 0; int year, jday, hour, minute, second, tenths; @@ -753,7 +759,8 @@ static void tdm_secondary_header_dissector ( proto_tree* ehs_secondary_header_tr /* pseudo secondary header dissector */ -static void pseudo_secondary_header_dissector ( proto_tree* ehs_secondary_header_tree, tvbuff_t* tvb, int* offset ) +static void +pseudo_secondary_header_dissector ( proto_tree* ehs_secondary_header_tree, tvbuff_t* tvb, int* offset ) { /* proto_tree_add_item ( ehs_secondary_header_tree, hf_ehs_sh_pseudo_unused, tvb, *offset, 2, ENC_BIG_ENDIAN ); */ *offset += 2; @@ -773,10 +780,11 @@ static void pseudo_secondary_header_dissector ( proto_tree* ehs_secondary_header /* EHS secondary header dissector */ -static void ehs_secondary_header_dissector ( int protocol, proto_tree* ehs_secondary_header_tree, tvbuff_t* tvb, int* offset ) +static void +ehs_secondary_header_dissector ( int protocol, proto_tree* ehs_secondary_header_tree, tvbuff_t* tvb, int* offset ) { /* the ehs secondary header structure is potentially different for each and every - * protocol type, including it's size. we support certain protocols but not all. + * protocol type, including its size. we support certain protocols but not all. * for those protocols which are not supported we simply increment the offset * and return. support for these other protocols can easily be added at a later * time if and when it becomes necessary to do so. but for right now, we're only @@ -852,7 +860,8 @@ static void ehs_secondary_header_dissector ( int protocol, proto_tree* ehs_secon /* AOS/LOS data zone dissector */ -static void aoslos_data_zone_dissector ( proto_tree* ehs_tree, tvbuff_t* tvb, int* offset, packet_info* pinfo ) +static void +aoslos_data_zone_dissector ( proto_tree* ehs_tree, tvbuff_t* tvb, int* offset, packet_info* pinfo ) { proto_item *ehs_data_zone; proto_tree *ehs_data_zone_tree; @@ -884,7 +893,8 @@ static void aoslos_data_zone_dissector ( proto_tree* ehs_tree, tvbuff_t* tvb, in /* UDSM data zone dissector */ -static void udsm_data_zone_dissector ( proto_tree* ehs_tree, tvbuff_t* tvb, int* offset, packet_info* pinfo ) +static void +udsm_data_zone_dissector ( proto_tree* ehs_tree, tvbuff_t* tvb, int* offset, packet_info* pinfo ) { proto_item *ehs_data_zone; proto_tree *ehs_data_zone_tree; @@ -981,7 +991,8 @@ static void udsm_data_zone_dissector ( proto_tree* ehs_tree, tvbuff_t* tvb, int* /* data zone dissector */ -static void ehs_data_zone_dissector ( int protocol, proto_tree* ehs_tree, tvbuff_t* tvb, int* offset, packet_info* pinfo ) +static void +ehs_data_zone_dissector ( int protocol, proto_tree* ehs_tree, tvbuff_t* tvb, int* offset, packet_info* pinfo ) { /* the data zone of certain protocols such as AOS/LOS and UDSM is well known. */ @@ -1044,129 +1055,129 @@ static void ehs_data_zone_dissector ( int protocol, proto_tree* ehs_tree, tvbuff static void dissect_ehs(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) { - int offset = 0; - guint16 first_word; + int offset = 0; + guint16 first_word; + + tvbuff_t *new_tvb; + + proto_item *ehs_packet; + proto_tree *ehs_tree; - tvbuff_t *new_tvb; - - proto_item *ehs_packet; - proto_tree *ehs_tree; - - proto_item *ehs_primary_header; - proto_tree *ehs_primary_header_tree; - - proto_item *ehs_secondary_header; - proto_tree *ehs_secondary_header_tree; - - int protocol; - int year, jday, hour, minute, second, tenths; + proto_item *ehs_primary_header; + proto_tree *ehs_primary_header_tree; - col_set_str(pinfo->cinfo, COL_PROTOCOL, "EHS"); - col_set_str(pinfo->cinfo, COL_INFO, "EHS"); - - ehs_packet = proto_tree_add_item ( tree, proto_ehs, tvb, 0, -1, ENC_NA ); - ehs_tree = proto_item_add_subtree ( ehs_packet, ett_ehs ); + proto_item *ehs_secondary_header; + proto_tree *ehs_secondary_header_tree; - /* build the ehs primary header tree */ - ehs_primary_header = proto_tree_add_text ( ehs_tree, tvb, offset, EHS_PRIMARY_HEADER_SIZE, "Primary EHS Header" ); - ehs_primary_header_tree = proto_item_add_subtree ( ehs_primary_header, ett_ehs_primary_header ); + int protocol; + int year, jday, hour, minute, second, tenths; - proto_tree_add_item ( ehs_primary_header_tree, hf_ehs_ph_version, tvb, offset, 1, ENC_BIG_ENDIAN ); - proto_tree_add_item ( ehs_primary_header_tree, hf_ehs_ph_project, tvb, offset, 1, ENC_BIG_ENDIAN ); - ++offset; + col_set_str(pinfo->cinfo, COL_PROTOCOL, "EHS"); + col_set_str(pinfo->cinfo, COL_INFO, "EHS"); - proto_tree_add_item ( ehs_primary_header_tree, hf_ehs_ph_support_mode, tvb, offset, 1, ENC_BIG_ENDIAN ); - proto_tree_add_item ( ehs_primary_header_tree, hf_ehs_ph_data_mode, tvb, offset, 1, ENC_BIG_ENDIAN ); - ++offset; + ehs_packet = proto_tree_add_item ( tree, proto_ehs, tvb, 0, -1, ENC_NA ); + ehs_tree = proto_item_add_subtree ( ehs_packet, ett_ehs ); - proto_tree_add_item ( ehs_primary_header_tree, hf_ehs_ph_mission, tvb, offset, 1, ENC_BIG_ENDIAN ); - ++offset; + /* build the ehs primary header tree */ + ehs_primary_header = proto_tree_add_text ( ehs_tree, tvb, offset, EHS_PRIMARY_HEADER_SIZE, "Primary EHS Header" ); + ehs_primary_header_tree = proto_item_add_subtree ( ehs_primary_header, ett_ehs_primary_header ); - /* save protocol for use later on */ - protocol = tvb_get_guint8 ( tvb, offset ); - proto_tree_add_item ( ehs_primary_header_tree, hf_ehs_ph_protocol, tvb, offset, 1, ENC_BIG_ENDIAN ); - ++offset; + proto_tree_add_item ( ehs_primary_header_tree, hf_ehs_ph_version, tvb, offset, 1, ENC_BIG_ENDIAN ); + proto_tree_add_item ( ehs_primary_header_tree, hf_ehs_ph_project, tvb, offset, 1, ENC_BIG_ENDIAN ); + ++offset; - year = tvb_get_guint8 ( tvb, offset ); - proto_tree_add_item ( ehs_primary_header_tree, hf_ehs_ph_year, tvb, offset, 1, ENC_BIG_ENDIAN ); - ++offset; + proto_tree_add_item ( ehs_primary_header_tree, hf_ehs_ph_support_mode, tvb, offset, 1, ENC_BIG_ENDIAN ); + proto_tree_add_item ( ehs_primary_header_tree, hf_ehs_ph_data_mode, tvb, offset, 1, ENC_BIG_ENDIAN ); + ++offset; - jday = tvb_get_ntohs ( tvb, offset ); - proto_tree_add_item ( ehs_primary_header_tree, hf_ehs_ph_jday, tvb, offset, 2, ENC_BIG_ENDIAN ); - offset += 2; + proto_tree_add_item ( ehs_primary_header_tree, hf_ehs_ph_mission, tvb, offset, 1, ENC_BIG_ENDIAN ); + ++offset; - hour = tvb_get_guint8 ( tvb, offset ); - proto_tree_add_item ( ehs_primary_header_tree, hf_ehs_ph_hour, tvb, offset, 1, ENC_BIG_ENDIAN ); - ++offset; + /* save protocol for use later on */ + protocol = tvb_get_guint8 ( tvb, offset ); + proto_tree_add_item ( ehs_primary_header_tree, hf_ehs_ph_protocol, tvb, offset, 1, ENC_BIG_ENDIAN ); + ++offset; - minute = tvb_get_guint8 ( tvb, offset ); - proto_tree_add_item ( ehs_primary_header_tree, hf_ehs_ph_minute, tvb, offset, 1, ENC_BIG_ENDIAN ); - ++offset; + year = tvb_get_guint8 ( tvb, offset ); + proto_tree_add_item ( ehs_primary_header_tree, hf_ehs_ph_year, tvb, offset, 1, ENC_BIG_ENDIAN ); + ++offset; - second = tvb_get_guint8 ( tvb, offset ); - proto_tree_add_item ( ehs_primary_header_tree, hf_ehs_ph_second, tvb, offset, 1, ENC_BIG_ENDIAN ); - ++offset; + jday = tvb_get_ntohs ( tvb, offset ); + proto_tree_add_item ( ehs_primary_header_tree, hf_ehs_ph_jday, tvb, offset, 2, ENC_BIG_ENDIAN ); + offset += 2; - tenths = tvb_get_guint8 ( tvb, offset ) >> 4; - proto_tree_add_item ( ehs_primary_header_tree, hf_ehs_ph_tenths, tvb, offset, 1, ENC_BIG_ENDIAN ); + hour = tvb_get_guint8 ( tvb, offset ); + proto_tree_add_item ( ehs_primary_header_tree, hf_ehs_ph_hour, tvb, offset, 1, ENC_BIG_ENDIAN ); + ++offset; - /* format a more readable ground receipt time string */ - proto_tree_add_text ( ehs_primary_header_tree, tvb, offset-7, 7, - "%04d/%03d:%02d:%02d:%02d.%1d = EHS Ground Receipt Time", year + 1900, jday, hour, minute, second, tenths ); + minute = tvb_get_guint8 ( tvb, offset ); + proto_tree_add_item ( ehs_primary_header_tree, hf_ehs_ph_minute, tvb, offset, 1, ENC_BIG_ENDIAN ); + ++offset; - proto_tree_add_item ( ehs_primary_header_tree, hf_ehs_ph_new_data_flag, tvb, offset, 1, ENC_BIG_ENDIAN ); - /* proto_tree_add_item ( ehs_primary_header_tree, hf_ehs_ph_pad1, tvb, offset, 1, ENC_BIG_ENDIAN ); */ - proto_tree_add_item ( ehs_primary_header_tree, hf_ehs_ph_hold_flag, tvb, offset, 1, ENC_BIG_ENDIAN ); - proto_tree_add_item ( ehs_primary_header_tree, hf_ehs_ph_sign_flag, tvb, offset, 1, ENC_BIG_ENDIAN ); - ++offset; + second = tvb_get_guint8 ( tvb, offset ); + proto_tree_add_item ( ehs_primary_header_tree, hf_ehs_ph_second, tvb, offset, 1, ENC_BIG_ENDIAN ); + ++offset; - /* proto_tree_add_item ( ehs_primary_header_tree, hf_ehs_ph_pad2, tvb, offset, 1, ENC_BIG_ENDIAN ); */ - ++offset; - /* proto_tree_add_item ( ehs_primary_header_tree, hf_ehs_ph_pad3, tvb, offset, 1, ENC_BIG_ENDIAN ); */ - ++offset; - /* proto_tree_add_item ( ehs_primary_header_tree, hf_ehs_ph_pad4, tvb, offset, 1, ENC_BIG_ENDIAN ); */ - ++offset; + tenths = tvb_get_guint8 ( tvb, offset ) >> 4; + proto_tree_add_item ( ehs_primary_header_tree, hf_ehs_ph_tenths, tvb, offset, 1, ENC_BIG_ENDIAN ); - proto_tree_add_item ( ehs_primary_header_tree, hf_ehs_ph_hosc_packet_size, tvb, offset, 2, ENC_BIG_ENDIAN ); - offset += 2; + /* format a more readable ground receipt time string */ + proto_tree_add_text ( ehs_primary_header_tree, tvb, offset-7, 7, + "%04d/%03d:%02d:%02d:%02d.%1d = EHS Ground Receipt Time", year + 1900, jday, hour, minute, second, tenths ); - /* build the ehs secondary header tree */ - ehs_secondary_header = proto_tree_add_text ( ehs_tree, tvb, offset, - ehs_secondary_header_size ( protocol, tvb, offset ), "Secondary EHS Header" ); - ehs_secondary_header_tree = proto_item_add_subtree ( ehs_secondary_header, ett_ehs_secondary_header ); + proto_tree_add_item ( ehs_primary_header_tree, hf_ehs_ph_new_data_flag, tvb, offset, 1, ENC_BIG_ENDIAN ); + /* proto_tree_add_item ( ehs_primary_header_tree, hf_ehs_ph_pad1, tvb, offset, 1, ENC_BIG_ENDIAN ); */ + proto_tree_add_item ( ehs_primary_header_tree, hf_ehs_ph_hold_flag, tvb, offset, 1, ENC_BIG_ENDIAN ); + proto_tree_add_item ( ehs_primary_header_tree, hf_ehs_ph_sign_flag, tvb, offset, 1, ENC_BIG_ENDIAN ); + ++offset; - /* since each protocol can have a different ehs secondary header structure, we will offload - * this processing to lower levels of code so we don't have to insert all of that complexity - * directly inline here, which would no doubt make this difficult to read at best. - */ - ehs_secondary_header_dissector ( protocol, ehs_secondary_header_tree, tvb, &offset ); + /* proto_tree_add_item ( ehs_primary_header_tree, hf_ehs_ph_pad2, tvb, offset, 1, ENC_BIG_ENDIAN ); */ + ++offset; + /* proto_tree_add_item ( ehs_primary_header_tree, hf_ehs_ph_pad3, tvb, offset, 1, ENC_BIG_ENDIAN ); */ + ++offset; + /* proto_tree_add_item ( ehs_primary_header_tree, hf_ehs_ph_pad4, tvb, offset, 1, ENC_BIG_ENDIAN ); */ + ++offset; - /* for ccsds protocol types pass the remaining packet off to the ccsds packet dissector */ - switch ( protocol ) - { - case EHS_PROTOCOL__TDM_TELEMETRY: - case EHS_PROTOCOL__PSEUDO_TELEMETRY: - case EHS_PROTOCOL__AOS_LOS: - case EHS_PROTOCOL__PDSS_PAYLOAD_CCSDS_PACKET: - case EHS_PROTOCOL__PDSS_CORE_CCSDS_PACKET: - case EHS_PROTOCOL__PDSS_UDSM: - new_tvb = tvb_new_subset_remaining ( tvb, offset); - call_dissector ( ccsds_handle, new_tvb, pinfo, ehs_tree ); - - /* bump the offset to the data zone area */ - first_word = tvb_get_ntohs ( tvb, offset ); - - offset += CCSDS_PRIMARY_HEADER_LENGTH; - if ( first_word & HDR_SECHDR ) offset += CCSDS_SECONDARY_HEADER_LENGTH; - break; - - - default: - break; - } - - /* build the ehs data zone tree for well known protocols such as AOS/LOS and UDSM */ - ehs_data_zone_dissector ( protocol, ehs_tree, tvb, &offset, pinfo ); + proto_tree_add_item ( ehs_primary_header_tree, hf_ehs_ph_hosc_packet_size, tvb, offset, 2, ENC_BIG_ENDIAN ); + offset += 2; + + /* build the ehs secondary header tree */ + ehs_secondary_header = proto_tree_add_text ( ehs_tree, tvb, offset, + ehs_secondary_header_size ( protocol, tvb, offset ), "Secondary EHS Header" ); + ehs_secondary_header_tree = proto_item_add_subtree ( ehs_secondary_header, ett_ehs_secondary_header ); + + /* since each protocol can have a different ehs secondary header structure, we will offload + * this processing to lower levels of code so we don't have to insert all of that complexity + * directly inline here, which would no doubt make this difficult to read at best. + */ + ehs_secondary_header_dissector ( protocol, ehs_secondary_header_tree, tvb, &offset ); + + /* for ccsds protocol types pass the remaining packet off to the ccsds packet dissector */ + switch ( protocol ) + { + case EHS_PROTOCOL__TDM_TELEMETRY: + case EHS_PROTOCOL__PSEUDO_TELEMETRY: + case EHS_PROTOCOL__AOS_LOS: + case EHS_PROTOCOL__PDSS_PAYLOAD_CCSDS_PACKET: + case EHS_PROTOCOL__PDSS_CORE_CCSDS_PACKET: + case EHS_PROTOCOL__PDSS_UDSM: + new_tvb = tvb_new_subset_remaining ( tvb, offset); + call_dissector ( ccsds_handle, new_tvb, pinfo, ehs_tree ); + + /* bump the offset to the data zone area */ + first_word = tvb_get_ntohs ( tvb, offset ); + + offset += CCSDS_PRIMARY_HEADER_LENGTH; + if ( first_word & HDR_SECHDR ) offset += CCSDS_SECONDARY_HEADER_LENGTH; + break; + + + default: + break; + } + + /* build the ehs data zone tree for well known protocols such as AOS/LOS and UDSM */ + ehs_data_zone_dissector ( protocol, ehs_tree, tvb, &offset, pinfo ); } @@ -1178,740 +1189,735 @@ dissect_ehs(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) void proto_register_ehs(void) { - /* Setup list of header fields See Section 1.6.1 for details*/ - static hf_register_info hf[] = - { - /* primary ehs header */ - { &hf_ehs_ph_version, - { "Version", "ehs.version", - FT_UINT8, BASE_DEC, NULL, 0xf0, - NULL, HFILL } - }, - { &hf_ehs_ph_project, - { "Project", "ehs.project", - FT_UINT8, BASE_DEC, VALS(ehs_primary_header_project), 0x0f, - NULL, HFILL } - }, - - { &hf_ehs_ph_support_mode, - { "Support Mode", "ehs.support_mode", - FT_UINT8, BASE_DEC, VALS(ehs_primary_header_support_mode), 0xf0, - NULL, HFILL } - }, - { &hf_ehs_ph_data_mode, - { "Data Mode", "ehs.data_mode", - FT_UINT8, BASE_DEC, VALS(ehs_primary_header_data_mode), 0x0f, - NULL, HFILL } - }, - - { &hf_ehs_ph_mission, - { "Mission", "ehs.mission", - FT_UINT8, BASE_DEC, NULL, 0xff, - NULL, HFILL } - }, - - { &hf_ehs_ph_protocol, - { "Protocol", "ehs.protocol", - FT_UINT8, BASE_DEC, VALS(ehs_primary_header_protocol), 0xff, - NULL, HFILL } - }, - - { &hf_ehs_ph_year, - { "Years since 1900", "ehs.year", - FT_UINT8, BASE_DEC, NULL, 0xff, - NULL, HFILL } - }, - - { &hf_ehs_ph_jday, - { "Julian Day of Year", "ehs.jday", - FT_UINT16, BASE_DEC, NULL, 0xffff, - NULL, HFILL } - }, - - { &hf_ehs_ph_hour, - { "Hour", "ehs.hour", - FT_UINT8, BASE_DEC, NULL, 0xff, - NULL, HFILL } - }, - - { &hf_ehs_ph_minute, - { "Minute", "ehs.minute", - FT_UINT8, BASE_DEC, NULL, 0xff, - NULL, HFILL } - }, - - { &hf_ehs_ph_second, - { "Second", "ehs.second", - FT_UINT8, BASE_DEC, NULL, 0xff, - NULL, HFILL } - }, - - { &hf_ehs_ph_tenths, - { "Tenths", "ehs.tenths", - FT_UINT8, BASE_DEC, NULL, 0xf0, - NULL, HFILL } - }, - { &hf_ehs_ph_new_data_flag, - { "New Data Flag", "ehs.new_data_flag", - FT_BOOLEAN, 8, NULL, 0x08, - NULL, HFILL } - }, - { &hf_ehs_ph_pad1, - { "Pad1", "ehs.pad1", - FT_UINT8, BASE_DEC, NULL, 0x04, - NULL, HFILL } - }, - { &hf_ehs_ph_hold_flag, - { "Hold Flag", "ehs.hold_flag", - FT_BOOLEAN, 8, NULL, 0x02, - NULL, HFILL } - }, - { &hf_ehs_ph_sign_flag, - { "Sign Flag (1->CDT)", "ehs.sign_flag", - FT_UINT8, BASE_DEC, NULL, 0x01, - NULL, HFILL } - }, - - { &hf_ehs_ph_pad2, - { "Pad2", "ehs.pad2", - FT_UINT8, BASE_DEC, NULL, 0xff, - NULL, HFILL } - }, - - { &hf_ehs_ph_pad3, - { "Pad3", "ehs.pad3", - FT_UINT8, BASE_DEC, NULL, 0xff, - NULL, HFILL } - }, - - { &hf_ehs_ph_pad4, - { "Pad4", "ehs.pad4", - FT_UINT8, BASE_DEC, NULL, 0xff, - NULL, HFILL } - }, - - { &hf_ehs_ph_hosc_packet_size, - { "HOSC Packet Size", "ehs.hosc_packet_size", - FT_UINT16, BASE_DEC, NULL, 0xffff, - NULL, HFILL } - }, - - - /* secondary ehs header */ - { &hf_ehs_sh_version, - { "Version", "ehs2.version", - FT_UINT8, BASE_DEC, NULL, 0xc0, - NULL, HFILL } - }, - { &hf_ehs_sh_data_status_bit_5, - { "Data Status Bit 5", "ehs2.data_status_bit_5", - FT_UINT8, BASE_DEC, NULL, 0x20, - NULL, HFILL } - }, - { &hf_ehs_sh_data_status_bit_4, - { "Data Status Bit 4", "ehs2.data_status_bit_4", - FT_UINT8, BASE_DEC, NULL, 0x10, - NULL, HFILL } - }, - { &hf_ehs_sh_data_status_bit_3, - { "Data Status Bit 3", "ehs2.data_status_bit_3", - FT_UINT8, BASE_DEC, NULL, 0x08, - NULL, HFILL } - }, - { &hf_ehs_sh_data_status_bit_2, - { "Data Status Bit 2", "ehs2.data_status_bit_2", - FT_UINT8, BASE_DEC, NULL, 0x04, - NULL, HFILL } - }, - { &hf_ehs_sh_data_status_bit_1, - { "Data Status Bit 1", "ehs2.data_status_bit_1", - FT_UINT8, BASE_DEC, NULL, 0x02, - NULL, HFILL } - }, - { &hf_ehs_sh_data_status_bit_0, - { "Data Status Bit 0", "ehs2.data_status_bit_0", - FT_UINT8, BASE_DEC, NULL, 0x01, - NULL, HFILL } - }, - - - /* other common remappings of the data status bits specific to certain secondary ehs header values */ - { &hf_ehs_sh_parent_stream_error, - { "Parent Stream Error", "ehs2.parent_stream_error", - FT_BOOLEAN, 8, NULL, 0x08, - NULL, HFILL } - }, - { &hf_ehs_sh_vcdu_sequence_error, - { "VCDU Sequence Error", "ehs2.vcdu_sequence_error", - FT_BOOLEAN, 8, NULL, 0x04, - NULL, HFILL } - }, - { &hf_ehs_sh_packet_sequence_error, - { "Packet Sequence Error", "ehs2.packet_sequence_error", - FT_UINT8, BASE_DEC, NULL, 0x02, - NULL, HFILL } - }, - - - /* common ehs secondary header values */ - { &hf_ehs_sh_vcdu_sequence_number, - { "VCDU Sequence Number", "ehs2.vcdu_seqno", - FT_UINT24, BASE_DEC, NULL, 0xffffff, - NULL, HFILL } - }, - - { &hf_ehs_sh_data_stream_id, - { "Data Stream ID", "ehs2.data_stream_id", - FT_UINT8, BASE_DEC, VALS(ehs_secondary_header_data_stream_id), 0x80, - NULL, HFILL } - }, - { &hf_ehs_sh_pdss_reserved_1, - { "Pdss Reserved 1", "ehs2.pdss_reserved_1", - FT_UINT8, BASE_DEC, NULL, 0x7f, - NULL, HFILL } - }, - - { &hf_ehs_sh_pdss_reserved_2, - { "Pdss Reserved 2", "ehs2.pdss_reserved_2", - FT_UINT8, BASE_DEC, NULL, 0xff, - NULL, HFILL } - }, - - { &hf_ehs_sh_pdss_reserved_3, - { "Pdss Reserved 3", "ehs2.pdss_reserved_3", - FT_UINT16, BASE_DEC, NULL, 0xe000, - NULL, HFILL } - }, - { &hf_ehs_sh_gse_pkt_id, - { "GSE Packet ID (1=GSE)", "ehs2.gse_pkt_id", - FT_UINT16, BASE_DEC, NULL, 0x1000, - NULL, HFILL } - }, - { &hf_ehs_sh_payload_vs_core_id, - { "Payload vs Core ID", "ehs2.payload_vs_core_id", - FT_UINT16, BASE_DEC, VALS(ehs_secondary_header_payload_vs_core_id), 0x0800, - NULL, HFILL } - }, - { &hf_ehs_sh_apid, - { "APID", "ehs2.apid", - FT_UINT16, BASE_DEC, NULL, 0x07ff, - NULL, HFILL } - }, - - { &hf_ehs_sh_virtual_channel, - { "Virtual Channel", "ehs2.vcid", - FT_UINT16, BASE_DEC, NULL, 0xffff, - NULL, HFILL } - }, - - { &hf_ehs_sh_pdss_reserved_sync, - { "Pdss Reserved Sync", "ehs2.sync", - FT_UINT16, BASE_HEX, NULL, 0xffff, - NULL, HFILL } - }, - - - /* tdm ehs secondary header values */ - { &hf_ehs_sh_tdm_secondary_header_length, - { "Secondary Header Length", "ehs2.tdm_secondary_header_length", - FT_UINT16, BASE_DEC, NULL, 0xffff, - NULL, HFILL } - }, - - { &hf_ehs_sh_tdm_extra_data_packet, - { "Extra Data Packet", "ehs2.tdm_extra_data_packet", - FT_BOOLEAN, 8, NULL, 0x80, - NULL, HFILL } - }, - { &hf_ehs_sh_tdm_backup_stream_id_number, - { "Backup Stream ID Number", "ehs2.tdm_backup_stream_id_number", - FT_UINT8, BASE_DEC, VALS(ehs_secondary_header_tdm_backup_stream_id), 0x60, - NULL, HFILL } - }, - { &hf_ehs_sh_tdm_end_of_data_flag, - { "End of Data Flag", "ehs2tdm_end_of_data_flag.tdm_end_of_data_flag", - FT_UINT8, BASE_DEC, VALS(ehs_secondary_header_tdm_end_of_data_flag), 0x18, - NULL, HFILL } - }, - { &hf_ehs_sh_tdm_parent_frame_error, - { "Parent Frame Error", "ehs2.tdm_parent_frame_error", - FT_BOOLEAN, 8, NULL, 0x04, - NULL, HFILL } - }, - { &hf_ehs_sh_tdm_checksum_error, - { "Checksum Error", "ehs2.tdm_checksum_error", - FT_BOOLEAN, 8, NULL, 0x02, - NULL, HFILL } - }, - { &hf_ehs_sh_tdm_fixed_value_error, - { "Fixed Value Error", "ehs2.tdm_fixed_value_error", - FT_BOOLEAN, 8, NULL, 0x01, - NULL, HFILL } - }, - - { &hf_ehs_sh_tdm_minor_frame_counter_error, - { "Minor Frame Counter Error", "ehs2.tdm_minor_frame_counter_error", - FT_BOOLEAN, 8, NULL, 0x80, - NULL, HFILL } - }, - { &hf_ehs_sh_tdm_format_id_error, - { "Format ID Error", "ehs2.tdm_format_id_error", - FT_BOOLEAN, 8, NULL, 0x40, - NULL, HFILL } - }, - { &hf_ehs_sh_tdm_bit_slip_error, - { "Bit Slip Error", "ehs2.tdm_bit_slip_error", - FT_BOOLEAN, 8, NULL, 0x20, - NULL, HFILL } - }, - { &hf_ehs_sh_tdm_sync_error, - { "Sync Error", "ehs2.tdm_sync_error", - FT_BOOLEAN, 8, NULL, 0x10, - NULL, HFILL } - }, - { &hf_ehs_sh_tdm_aoslos_flag, - { "AOS/LOS Flag", "ehs2.tdm_aoslos_flag", - FT_BOOLEAN, 8, TFS(&ehs_tfs_secondary_header_tdm_aoslos_flag), 0x08, - NULL, HFILL } - }, - { &hf_ehs_sh_tdm_override_errors_flag, - { "Override Errors", "ehs2.tdm_override_errors_flag", - FT_BOOLEAN, 8, NULL, 0x04, - NULL, HFILL } - }, - { &hf_ehs_sh_tdm_data_status, - { "Data Status", "ehs2.tdm_data_status", - FT_UINT8, BASE_DEC, VALS(ehs_secondary_header_tdm_data_status), 0x03, - NULL, HFILL } - }, - - { &hf_ehs_sh_tdm_idq, - { "IDQ", "ehs2.tdm_idq", - FT_UINT16, BASE_DEC, NULL, 0xffff, - NULL, HFILL } - }, - - { &hf_ehs_sh_tdm_cdq, - { "CDQ", "ehs2.tdm_cdq", - FT_UINT16, BASE_DEC, NULL, 0xffff, - NULL, HFILL } - }, - - { &hf_ehs_sh_tdm_adq, - { "ADQ", "ehs2.tdm_adq", - FT_UINT16, BASE_DEC, NULL, 0xffff, - NULL, HFILL } - }, - - { &hf_ehs_sh_tdm_data_dq, - { "Data DQ", "ehs2.tdm_data_dq", - FT_UINT16, BASE_DEC, NULL, 0xffff, - NULL, HFILL } - }, - - { &hf_ehs_sh_tdm_unused, - { "Unused", "ehs2.tdm_unused", - FT_UINT16, BASE_DEC, NULL, 0xffff, - NULL, HFILL } - }, - - { &hf_ehs_sh_tdm_format_id, - { "Format ID", "ehs2.tdm_format_id", - FT_UINT16, BASE_HEX, NULL, 0xffff, - NULL, HFILL } - }, - - { &hf_ehs_sh_tdm_major_frame_packet_index, - { "Major Frame Packet Index", "ehs2.tdm_major_frame_packet_index", - FT_UINT8, BASE_DEC, NULL, 0xff, - NULL, HFILL } - }, - - { &hf_ehs_sh_tdm_numpkts_per_major_frame, - { "Num Packets per Major Frame", "ehs2.tdm_numpkts_per_major_frame", - FT_UINT8, BASE_DEC, NULL, 0xff, - NULL, HFILL } - }, - - { &hf_ehs_sh_tdm_num_minor_frames_per_packet, - { "Num Minor Frames per Packet", "ehs2.tdm_num_minor_frame_per_packet", - FT_UINT8, BASE_DEC, NULL, 0xff, - NULL, HFILL } - }, - - { &hf_ehs_sh_tdm_cntmet_present, - { "CNT or MET Present", "ehs2.tdm_cntmet_present", - FT_BOOLEAN, 8, NULL, 0x80, - NULL, HFILL } - }, - { &hf_ehs_sh_tdm_obt_present, - { "OBT Present", "ehs2.tdm_obt_present", - FT_BOOLEAN, 8, NULL, 0x40, - NULL, HFILL } - }, - { &hf_ehs_sh_tdm_major_frame_status_present, - { "Major Frame Status Present", "ehs2.tdm_major_frame_status_present", - FT_BOOLEAN, 8, NULL, 0x20, - NULL, HFILL } - }, - { &hf_ehs_sh_tdm_reserved, - { "Reserved", "ehs2.tdm_reserved", - FT_UINT8, BASE_DEC, NULL, 0x1f, - NULL, HFILL } - }, - - { &hf_ehs_sh_tdm_cnt_year, - { "CNT Years since 1900", "ehs2.tdm_cnt_year", - FT_UINT8, BASE_DEC, NULL, 0xff, - NULL, HFILL } - }, - { &hf_ehs_sh_tdm_cnt_jday, - { "CNT Julian Day of Year", "ehs2.tdm_cnt_jday", - FT_UINT16, BASE_DEC, NULL, 0xffff, - NULL, HFILL } - }, - { &hf_ehs_sh_tdm_cnt_hour, - { "CNT Hour", "ehs2.tdm_cnt_hour", - FT_UINT8, BASE_DEC, NULL, 0xff, - NULL, HFILL } - }, - { &hf_ehs_sh_tdm_cnt_minute, - { "CNT Minute", "ehs2.tdm_cnt_minute", - FT_UINT8, BASE_DEC, NULL, 0xff, - NULL, HFILL } - }, - { &hf_ehs_sh_tdm_cnt_second, - { "CNT Second", "ehs2.tdm_cnt_second", - FT_UINT8, BASE_DEC, NULL, 0xff, - NULL, HFILL } - }, - { &hf_ehs_sh_tdm_cnt_tenths, - { "CNT Tenths", "ehs2.tdm_cnt_tenths", - FT_UINT8, BASE_DEC, NULL, 0xf0, - NULL, HFILL } - }, - - { &hf_ehs_sh_tdm_obt_year, - { "OBT Years since 1900", "ehs2.tdm_cnt_year", - FT_UINT8, BASE_DEC, NULL, 0xff, - NULL, HFILL } - }, - { &hf_ehs_sh_tdm_obt_jday, - { "OBT Julian Day of Year", "ehs2.tdm_cnt_jday", - FT_UINT16, BASE_DEC, NULL, 0xffff, - NULL, HFILL } - }, - { &hf_ehs_sh_tdm_obt_hour, - { "OBT Hour", "ehs2.tdm_cnt_hour", - FT_UINT8, BASE_DEC, NULL, 0xff, - NULL, HFILL } - }, - { &hf_ehs_sh_tdm_obt_minute, - { "OBT Minute", "ehs2.tdm_cnt_minute", - FT_UINT8, BASE_DEC, NULL, 0xff, - NULL, HFILL } - }, - { &hf_ehs_sh_tdm_obt_second, - { "OBT Second", "ehs2.tdm_cnt_second", - FT_UINT8, BASE_DEC, NULL, 0xff, - NULL, HFILL } - }, - { &hf_ehs_sh_tdm_obt_tenths, - { "OBT Tenths", "ehs2.tdm_cnt_tenths", - FT_UINT8, BASE_DEC, NULL, 0xf0, - NULL, HFILL } - }, - - { &hf_ehs_sh_tdm_obt_delta_time_flag, - { "OBT is Delta Time Instead of GMT", "ehs2.tdm_obt_delta_time_flag", - FT_BOOLEAN, 16, NULL, 0x8000, - NULL, HFILL } - }, - { &hf_ehs_sh_tdm_obt_computed_flag, - { "OBT Computed", "ehs2.tdm_obt_computed_flag", - FT_BOOLEAN, 16, NULL, 0x4000, - NULL, HFILL } - }, - { &hf_ehs_sh_tdm_obt_not_retrieved_flag, - { "OBT Not Retrieved", "ehs2.tdm_obt_not_retrieved_flag", - FT_BOOLEAN, 16, NULL, 0x2000, - NULL, HFILL } - }, - { &hf_ehs_sh_tdm_obt_reserved, - { "OBT Reserved", "ehs2.tdm_obt_reserved", - FT_BOOLEAN, 16, NULL, 0x1800, - NULL, HFILL } - }, - { &hf_ehs_sh_tdm_obt_source_apid, - { "OBT Source APID", "ehs2.tdm_obt_source_apid", - FT_UINT16, BASE_DEC, NULL, 0x07ff, - NULL, HFILL } - }, - - { &hf_ehs_sh_tdm_num_major_frame_status_words, - { "Number of Major Frame Status Words", "ehs2.tdm_num_major_frame_status_words", - FT_UINT8, BASE_DEC, NULL, 0x0ff, - NULL, HFILL } - }, - - { &hf_ehs_sh_tdm_mjfs_reserved, - { "Reserved", "ehs2.tdm_mjfs_reserved", - FT_UINT8, BASE_DEC, NULL, 0xf8, - NULL, HFILL } - }, - { &hf_ehs_sh_tdm_mjfs_parent_frame_error, - { "Parent Frame Error", "ehs2.tdm_mjfs_parent_frame_error", - FT_BOOLEAN, 8, NULL, 0x04, - NULL, HFILL } - }, - { &hf_ehs_sh_tdm_mjfs_checksum_error, - { "Checksum Error", "ehs2.tdm_mjfs_checksum_error", - FT_BOOLEAN, 8, NULL, 0x02, - NULL, HFILL } - }, - { &hf_ehs_sh_tdm_mjfs_fixed_value_error, - { "Fixed Value Error", "ehs2.tdm_mjfs_fixed_value_error", - FT_BOOLEAN, 8, NULL, 0x01, - NULL, HFILL } - }, - - { &hf_ehs_sh_tdm_mnfs_parent_frame_error, - { "Parent Frame Error", "ehs2.tdm_mnfs_parent_frame_error", - FT_BOOLEAN, 8, NULL, 0x80, - NULL, HFILL } - }, - { &hf_ehs_sh_tdm_mnfs_data_not_available, - { "Data Not Available", "ehs2.tdm_mnfs_data_not_available", - FT_BOOLEAN, 8, NULL, 0x40, - NULL, HFILL } - }, - { &hf_ehs_sh_tdm_mnfs_checksum_error, - { "Checksum Error", "ehs2.tdm_mnfs_checksum_error", - FT_BOOLEAN, 8, NULL, 0x20, - NULL, HFILL } - }, - { &hf_ehs_sh_tdm_mnfs_fixed_value_error, - { "Fixed Value Error", "ehs2.tdm_mnfs_fixed_value_error", - FT_BOOLEAN, 8, NULL, 0x10, - NULL, HFILL } - }, - { &hf_ehs_sh_tdm_mnfs_counter_error, - { "Counter Error", "ehs2.tdm_mnfs_counter_error", - FT_BOOLEAN, 8, NULL, 0x08, - NULL, HFILL } - }, - { &hf_ehs_sh_tdm_mnfs_format_id_error, - { "Format ID Error", "ehs2.tdm_mnfs_format_id_error", - FT_BOOLEAN, 8, NULL, 0x04, - NULL, HFILL } - }, - { &hf_ehs_sh_tdm_mnfs_bit_slip_error, - { "Bit Slip Error", "ehs2.tdm_mnfs_bit_slip_error", - FT_BOOLEAN, 8, NULL, 0x02, - NULL, HFILL } - }, - { &hf_ehs_sh_tdm_mnfs_sync_error, - { "Sync Error", "ehs2.tdm_mnfs_sync_error", - FT_BOOLEAN, 8, NULL, 0x01, - NULL, HFILL } - }, - - - /* pseudo secondary header */ - { &hf_ehs_sh_pseudo_unused, - { "Unused", "ehs2.pseudo_unused", - FT_UINT16, BASE_DEC, NULL, 0xffff, - NULL, HFILL } - }, - { &hf_ehs_sh_pseudo_workstation_id, - { "Workstation ID", "ehs2.pseudo_workstation_id", - FT_UINT16, BASE_DEC, NULL, 0xffff, - NULL, HFILL } - }, - { &hf_ehs_sh_pseudo_user_id, - { "User ID", "ehs2.pseudo_user_id", - FT_UINT16, BASE_DEC, NULL, 0xffff, - NULL, HFILL } - }, - { &hf_ehs_sh_pseudo_comp_id, - { "Comp ID", "ehs2.pseudo_comp_id", - FT_UINT16, BASE_DEC, NULL, 0xffff, - NULL, HFILL } - }, - - - /* aos/los protocol data zone */ - { &hf_ehs_dz_aoslos_indicator, - { "AOS/LOS Indicator", "dz.aoslos_indicator", - FT_UINT8, BASE_DEC, VALS(ehs_data_zone_aoslos_indicator), 0x03, - NULL, HFILL } - }, - - - /* udsm protocol data zone */ - { &hf_ehs_dz_udsm_ccsds_vs_bpdu, - { "CCSDS vs BPDU", "dz.udsm_ccsds_vs_bpdu", - FT_UINT8, BASE_DEC, VALS(ehs_data_zone_udsm_ccsds_vs_bpdu), 0x80, - NULL, HFILL } - }, - { &hf_ehs_dz_udsm_unused1, - { "Unused 1", "dz.udsm_unused1", - FT_UINT8, BASE_DEC, NULL, 0x7f, - NULL, HFILL } - }, - - { &hf_ehs_dz_udsm_unused2, - { "Unused 2", "dz.udsm_unused2", - FT_UINT8, BASE_DEC, NULL, 0xff, - NULL, HFILL } - }, - - { &hf_ehs_dz_udsm_unused3, - { "Unused 3", "dz.udsm_unused3", - FT_UINT16, BASE_DEC, NULL, 0xe000, - NULL, HFILL } - }, - { &hf_ehs_dz_udsm_gse_pkt_id, - { "GSE Pkt ID", "dz.udsm_gse_pkt_id", - FT_BOOLEAN, 16, NULL, 0x1000, - NULL, HFILL } - }, - { &hf_ehs_dz_udsm_payload_vs_core, - { "Payload vs Core", "dz.udsm_payload_vs_core", - FT_UINT16, BASE_DEC, VALS(ehs_data_zone_udsm_payload_vs_core), 0x0800, - NULL, HFILL } - }, - { &hf_ehs_dz_udsm_apid, - { "APID", "dz.udsm_apid", - FT_UINT16, BASE_DEC, NULL, 0x07ff, - NULL, HFILL } - }, - - { &hf_ehs_dz_udsm_start_time_year, - { "Start Time Years since 1900", "dz.udsm_start_time_year", - FT_UINT8, BASE_DEC, NULL, 0xff, - NULL, HFILL } - }, - { &hf_ehs_dz_udsm_start_time_jday, - { "Start Time Julian Day", "dz.udsm_start_time_jday", - FT_UINT16, BASE_DEC, NULL, 0xffff, - NULL, HFILL } - }, - { &hf_ehs_dz_udsm_start_time_hour, - { "Start Time Hour", "dz.udsm_start_time_hour", - FT_UINT8, BASE_DEC, NULL, 0xff, - NULL, HFILL } - }, - { &hf_ehs_dz_udsm_start_time_minute, - { "Start Time Minute", "dz.udsm_start_time_minute", - FT_UINT8, BASE_DEC, NULL, 0xff, - NULL, HFILL } - }, - { &hf_ehs_dz_udsm_start_time_second, - { "Start Time Second", "dz.udsm_start_time_second", - FT_UINT8, BASE_DEC, NULL, 0xff, - NULL, HFILL } - }, - - { &hf_ehs_dz_udsm_stop_time_year, - { "Stop Time Years since 1900", "dz.udsm_stop_time_year", - FT_UINT8, BASE_DEC, NULL, 0xff, - NULL, HFILL } - }, - { &hf_ehs_dz_udsm_stop_time_jday, - { "Stop Time Julian Day", "dz.udsm_stop_time_jday", - FT_UINT16, BASE_DEC, NULL, 0xffff, - NULL, HFILL } - }, - { &hf_ehs_dz_udsm_stop_time_hour, - { "Stop Time Hour", "dz.udsm_stop_time_hour", - FT_UINT8, BASE_DEC, NULL, 0xff, - NULL, HFILL } - }, - { &hf_ehs_dz_udsm_stop_time_minute, - { "Stop Time Minute", "dz.udsm_stop_time_minute", - FT_UINT8, BASE_DEC, NULL, 0xff, - NULL, HFILL } - }, - { &hf_ehs_dz_udsm_stop_time_second, - { "Stop Time Second", "dz.udsm_stop_time_second", - FT_UINT8, BASE_DEC, NULL, 0xff, - NULL, HFILL } - }, - - { &hf_ehs_dz_udsm_unused4, - { "Unused 4", "dz.udsm_unused4", - FT_UINT16, BASE_DEC, NULL, 0xffff, - NULL, HFILL } - }, - - { &hf_ehs_dz_udsm_num_pkts_xmtd, - { "Num Pkts Transmitted", "dz.udsm_num_pkts_xmtd", - FT_UINT16, BASE_DEC, NULL, 0xffff, - NULL, HFILL } - }, - - { &hf_ehs_dz_udsm_num_vcdu_seqerrs, - { "Num VCDU Sequence Errors", "dz.udsm_num_vcdu_seqerrs", - FT_UINT16, BASE_DEC, NULL, 0xffff, - NULL, HFILL } - }, - - { &hf_ehs_dz_udsm_num_pkt_seqerrs, - { "Num Packet Sequence Errors", "dz.udsm_num_pkt_seqerrs", - FT_UINT16, BASE_DEC, NULL, 0xffff, - NULL, HFILL } - }, - - { &hf_ehs_dz_udsm_num_pktlen_errors, - { "Num Pkt Length Errors", "dz.udsm_num_pktlen_errors", - FT_UINT16, BASE_DEC, NULL, 0xffff, - NULL, HFILL } - }, - - { &hf_ehs_dz_udsm_event, - { "UDSM Event Code", "dz.udsm_event", - FT_UINT8, BASE_DEC, VALS(ehs_data_zone_udsm_event), 0xff, - NULL, HFILL } - }, - - { &hf_ehs_dz_udsm_num_pkts_xmtd_rollover, - { "Num Pkts Transmitted Rollover Counter", "dz.udsm_num_pkts_xmtd_rollover", - FT_UINT8, BASE_DEC, NULL, 0xff, - NULL, HFILL } - }, - - }; - - /* Setup protocol subtree array */ - static gint *ett[] = { - &ett_ehs, - &ett_ehs_primary_header, - &ett_ehs_secondary_header, - &ett_ehs_data_zone - }; - - /* Register the protocol name and description */ - proto_ehs = proto_register_protocol("EHS", "EHS", "ehs"); - - /* Required function calls to register the header fields and subtrees used */ - proto_register_field_array(proto_ehs, hf, array_length(hf)); - proto_register_subtree_array(ett, array_length(ett)); - - /* XX: Does this dissector need to be publicly registered ?? */ - register_dissector ( "ehs", dissect_ehs, proto_ehs ); + /* Setup list of header fields See Section 1.6.1 for details*/ + static hf_register_info hf[] = + { + /* primary ehs header */ + { &hf_ehs_ph_version, + { "Version", "ehs.version", + FT_UINT8, BASE_DEC, NULL, 0xf0, + NULL, HFILL } + }, + { &hf_ehs_ph_project, + { "Project", "ehs.project", + FT_UINT8, BASE_DEC, VALS(ehs_primary_header_project), 0x0f, + NULL, HFILL } + }, + + { &hf_ehs_ph_support_mode, + { "Support Mode", "ehs.support_mode", + FT_UINT8, BASE_DEC, VALS(ehs_primary_header_support_mode), 0xf0, + NULL, HFILL } + }, + { &hf_ehs_ph_data_mode, + { "Data Mode", "ehs.data_mode", + FT_UINT8, BASE_DEC, VALS(ehs_primary_header_data_mode), 0x0f, + NULL, HFILL } + }, + + { &hf_ehs_ph_mission, + { "Mission", "ehs.mission", + FT_UINT8, BASE_DEC, NULL, 0xff, + NULL, HFILL } + }, + + { &hf_ehs_ph_protocol, + { "Protocol", "ehs.protocol", + FT_UINT8, BASE_DEC, VALS(ehs_primary_header_protocol), 0xff, + NULL, HFILL } + }, + + { &hf_ehs_ph_year, + { "Years since 1900", "ehs.year", + FT_UINT8, BASE_DEC, NULL, 0xff, + NULL, HFILL } + }, + + { &hf_ehs_ph_jday, + { "Julian Day of Year", "ehs.jday", + FT_UINT16, BASE_DEC, NULL, 0xffff, + NULL, HFILL } + }, + + { &hf_ehs_ph_hour, + { "Hour", "ehs.hour", + FT_UINT8, BASE_DEC, NULL, 0xff, + NULL, HFILL } + }, + + { &hf_ehs_ph_minute, + { "Minute", "ehs.minute", + FT_UINT8, BASE_DEC, NULL, 0xff, + NULL, HFILL } + }, + + { &hf_ehs_ph_second, + { "Second", "ehs.second", + FT_UINT8, BASE_DEC, NULL, 0xff, + NULL, HFILL } + }, + + { &hf_ehs_ph_tenths, + { "Tenths", "ehs.tenths", + FT_UINT8, BASE_DEC, NULL, 0xf0, + NULL, HFILL } + }, + { &hf_ehs_ph_new_data_flag, + { "New Data Flag", "ehs.new_data_flag", + FT_BOOLEAN, 8, NULL, 0x08, + NULL, HFILL } + }, + { &hf_ehs_ph_pad1, + { "Pad1", "ehs.pad1", + FT_UINT8, BASE_DEC, NULL, 0x04, + NULL, HFILL } + }, + { &hf_ehs_ph_hold_flag, + { "Hold Flag", "ehs.hold_flag", + FT_BOOLEAN, 8, NULL, 0x02, + NULL, HFILL } + }, + { &hf_ehs_ph_sign_flag, + { "Sign Flag (1->CDT)", "ehs.sign_flag", + FT_UINT8, BASE_DEC, NULL, 0x01, + NULL, HFILL } + }, + + { &hf_ehs_ph_pad2, + { "Pad2", "ehs.pad2", + FT_UINT8, BASE_DEC, NULL, 0xff, + NULL, HFILL } + }, + + { &hf_ehs_ph_pad3, + { "Pad3", "ehs.pad3", + FT_UINT8, BASE_DEC, NULL, 0xff, + NULL, HFILL } + }, + + { &hf_ehs_ph_pad4, + { "Pad4", "ehs.pad4", + FT_UINT8, BASE_DEC, NULL, 0xff, + NULL, HFILL } + }, + + { &hf_ehs_ph_hosc_packet_size, + { "HOSC Packet Size", "ehs.hosc_packet_size", + FT_UINT16, BASE_DEC, NULL, 0xffff, + NULL, HFILL } + }, + + + /* secondary ehs header */ + { &hf_ehs_sh_version, + { "Version", "ehs2.version", + FT_UINT8, BASE_DEC, NULL, 0xc0, + NULL, HFILL } + }, + { &hf_ehs_sh_data_status_bit_5, + { "Data Status Bit 5", "ehs2.data_status_bit_5", + FT_UINT8, BASE_DEC, NULL, 0x20, + NULL, HFILL } + }, + { &hf_ehs_sh_data_status_bit_4, + { "Data Status Bit 4", "ehs2.data_status_bit_4", + FT_UINT8, BASE_DEC, NULL, 0x10, + NULL, HFILL } + }, + { &hf_ehs_sh_data_status_bit_3, + { "Data Status Bit 3", "ehs2.data_status_bit_3", + FT_UINT8, BASE_DEC, NULL, 0x08, + NULL, HFILL } + }, + { &hf_ehs_sh_data_status_bit_2, + { "Data Status Bit 2", "ehs2.data_status_bit_2", + FT_UINT8, BASE_DEC, NULL, 0x04, + NULL, HFILL } + }, + { &hf_ehs_sh_data_status_bit_1, + { "Data Status Bit 1", "ehs2.data_status_bit_1", + FT_UINT8, BASE_DEC, NULL, 0x02, + NULL, HFILL } + }, + { &hf_ehs_sh_data_status_bit_0, + { "Data Status Bit 0", "ehs2.data_status_bit_0", + FT_UINT8, BASE_DEC, NULL, 0x01, + NULL, HFILL } + }, + + + /* other common remappings of the data status bits specific to certain secondary ehs header values */ + { &hf_ehs_sh_parent_stream_error, + { "Parent Stream Error", "ehs2.parent_stream_error", + FT_BOOLEAN, 8, NULL, 0x08, + NULL, HFILL } + }, + { &hf_ehs_sh_vcdu_sequence_error, + { "VCDU Sequence Error", "ehs2.vcdu_sequence_error", + FT_BOOLEAN, 8, NULL, 0x04, + NULL, HFILL } + }, + { &hf_ehs_sh_packet_sequence_error, + { "Packet Sequence Error", "ehs2.packet_sequence_error", + FT_UINT8, BASE_DEC, NULL, 0x02, + NULL, HFILL } + }, + + + /* common ehs secondary header values */ + { &hf_ehs_sh_vcdu_sequence_number, + { "VCDU Sequence Number", "ehs2.vcdu_seqno", + FT_UINT24, BASE_DEC, NULL, 0xffffff, + NULL, HFILL } + }, + + { &hf_ehs_sh_data_stream_id, + { "Data Stream ID", "ehs2.data_stream_id", + FT_UINT8, BASE_DEC, VALS(ehs_secondary_header_data_stream_id), 0x80, + NULL, HFILL } + }, + { &hf_ehs_sh_pdss_reserved_1, + { "Pdss Reserved 1", "ehs2.pdss_reserved_1", + FT_UINT8, BASE_DEC, NULL, 0x7f, + NULL, HFILL } + }, + + { &hf_ehs_sh_pdss_reserved_2, + { "Pdss Reserved 2", "ehs2.pdss_reserved_2", + FT_UINT8, BASE_DEC, NULL, 0xff, + NULL, HFILL } + }, + + { &hf_ehs_sh_pdss_reserved_3, + { "Pdss Reserved 3", "ehs2.pdss_reserved_3", + FT_UINT16, BASE_DEC, NULL, 0xe000, + NULL, HFILL } + }, + { &hf_ehs_sh_gse_pkt_id, + { "GSE Packet ID (1=GSE)", "ehs2.gse_pkt_id", + FT_UINT16, BASE_DEC, NULL, 0x1000, + NULL, HFILL } + }, + { &hf_ehs_sh_payload_vs_core_id, + { "Payload vs Core ID", "ehs2.payload_vs_core_id", + FT_UINT16, BASE_DEC, VALS(ehs_secondary_header_payload_vs_core_id), 0x0800, + NULL, HFILL } + }, + { &hf_ehs_sh_apid, + { "APID", "ehs2.apid", + FT_UINT16, BASE_DEC, NULL, 0x07ff, + NULL, HFILL } + }, + + { &hf_ehs_sh_virtual_channel, + { "Virtual Channel", "ehs2.vcid", + FT_UINT16, BASE_DEC, NULL, 0xffff, + NULL, HFILL } + }, + + { &hf_ehs_sh_pdss_reserved_sync, + { "Pdss Reserved Sync", "ehs2.sync", + FT_UINT16, BASE_HEX, NULL, 0xffff, + NULL, HFILL } + }, + + + /* tdm ehs secondary header values */ + { &hf_ehs_sh_tdm_secondary_header_length, + { "Secondary Header Length", "ehs2.tdm_secondary_header_length", + FT_UINT16, BASE_DEC, NULL, 0xffff, + NULL, HFILL } + }, + + { &hf_ehs_sh_tdm_extra_data_packet, + { "Extra Data Packet", "ehs2.tdm_extra_data_packet", + FT_BOOLEAN, 8, NULL, 0x80, + NULL, HFILL } + }, + { &hf_ehs_sh_tdm_backup_stream_id_number, + { "Backup Stream ID Number", "ehs2.tdm_backup_stream_id_number", + FT_UINT8, BASE_DEC, VALS(ehs_secondary_header_tdm_backup_stream_id), 0x60, + NULL, HFILL } + }, + { &hf_ehs_sh_tdm_end_of_data_flag, + { "End of Data Flag", "ehs2tdm_end_of_data_flag.tdm_end_of_data_flag", + FT_UINT8, BASE_DEC, VALS(ehs_secondary_header_tdm_end_of_data_flag), 0x18, + NULL, HFILL } + }, + { &hf_ehs_sh_tdm_parent_frame_error, + { "Parent Frame Error", "ehs2.tdm_parent_frame_error", + FT_BOOLEAN, 8, NULL, 0x04, + NULL, HFILL } + }, + { &hf_ehs_sh_tdm_checksum_error, + { "Checksum Error", "ehs2.tdm_checksum_error", + FT_BOOLEAN, 8, NULL, 0x02, + NULL, HFILL } + }, + { &hf_ehs_sh_tdm_fixed_value_error, + { "Fixed Value Error", "ehs2.tdm_fixed_value_error", + FT_BOOLEAN, 8, NULL, 0x01, + NULL, HFILL } + }, + + { &hf_ehs_sh_tdm_minor_frame_counter_error, + { "Minor Frame Counter Error", "ehs2.tdm_minor_frame_counter_error", + FT_BOOLEAN, 8, NULL, 0x80, + NULL, HFILL } + }, + { &hf_ehs_sh_tdm_format_id_error, + { "Format ID Error", "ehs2.tdm_format_id_error", + FT_BOOLEAN, 8, NULL, 0x40, + NULL, HFILL } + }, + { &hf_ehs_sh_tdm_bit_slip_error, + { "Bit Slip Error", "ehs2.tdm_bit_slip_error", + FT_BOOLEAN, 8, NULL, 0x20, + NULL, HFILL } + }, + { &hf_ehs_sh_tdm_sync_error, + { "Sync Error", "ehs2.tdm_sync_error", + FT_BOOLEAN, 8, NULL, 0x10, + NULL, HFILL } + }, + { &hf_ehs_sh_tdm_aoslos_flag, + { "AOS/LOS Flag", "ehs2.tdm_aoslos_flag", + FT_BOOLEAN, 8, TFS(&ehs_tfs_secondary_header_tdm_aoslos_flag), 0x08, + NULL, HFILL } + }, + { &hf_ehs_sh_tdm_override_errors_flag, + { "Override Errors", "ehs2.tdm_override_errors_flag", + FT_BOOLEAN, 8, NULL, 0x04, + NULL, HFILL } + }, + { &hf_ehs_sh_tdm_data_status, + { "Data Status", "ehs2.tdm_data_status", + FT_UINT8, BASE_DEC, VALS(ehs_secondary_header_tdm_data_status), 0x03, + NULL, HFILL } + }, + + { &hf_ehs_sh_tdm_idq, + { "IDQ", "ehs2.tdm_idq", + FT_UINT16, BASE_DEC, NULL, 0xffff, + NULL, HFILL } + }, + + { &hf_ehs_sh_tdm_cdq, + { "CDQ", "ehs2.tdm_cdq", + FT_UINT16, BASE_DEC, NULL, 0xffff, + NULL, HFILL } + }, + + { &hf_ehs_sh_tdm_adq, + { "ADQ", "ehs2.tdm_adq", + FT_UINT16, BASE_DEC, NULL, 0xffff, + NULL, HFILL } + }, + + { &hf_ehs_sh_tdm_data_dq, + { "Data DQ", "ehs2.tdm_data_dq", + FT_UINT16, BASE_DEC, NULL, 0xffff, + NULL, HFILL } + }, + + { &hf_ehs_sh_tdm_unused, + { "Unused", "ehs2.tdm_unused", + FT_UINT16, BASE_DEC, NULL, 0xffff, + NULL, HFILL } + }, + + { &hf_ehs_sh_tdm_format_id, + { "Format ID", "ehs2.tdm_format_id", + FT_UINT16, BASE_HEX, NULL, 0xffff, + NULL, HFILL } + }, + + { &hf_ehs_sh_tdm_major_frame_packet_index, + { "Major Frame Packet Index", "ehs2.tdm_major_frame_packet_index", + FT_UINT8, BASE_DEC, NULL, 0xff, + NULL, HFILL } + }, + + { &hf_ehs_sh_tdm_numpkts_per_major_frame, + { "Num Packets per Major Frame", "ehs2.tdm_numpkts_per_major_frame", + FT_UINT8, BASE_DEC, NULL, 0xff, + NULL, HFILL } + }, + + { &hf_ehs_sh_tdm_num_minor_frames_per_packet, + { "Num Minor Frames per Packet", "ehs2.tdm_num_minor_frame_per_packet", + FT_UINT8, BASE_DEC, NULL, 0xff, + NULL, HFILL } + }, + + { &hf_ehs_sh_tdm_cntmet_present, + { "CNT or MET Present", "ehs2.tdm_cntmet_present", + FT_BOOLEAN, 8, NULL, 0x80, + NULL, HFILL } + }, + { &hf_ehs_sh_tdm_obt_present, + { "OBT Present", "ehs2.tdm_obt_present", + FT_BOOLEAN, 8, NULL, 0x40, + NULL, HFILL } + }, + { &hf_ehs_sh_tdm_major_frame_status_present, + { "Major Frame Status Present", "ehs2.tdm_major_frame_status_present", + FT_BOOLEAN, 8, NULL, 0x20, + NULL, HFILL } + }, + { &hf_ehs_sh_tdm_reserved, + { "Reserved", "ehs2.tdm_reserved", + FT_UINT8, BASE_DEC, NULL, 0x1f, + NULL, HFILL } + }, + + { &hf_ehs_sh_tdm_cnt_year, + { "CNT Years since 1900", "ehs2.tdm_cnt_year", + FT_UINT8, BASE_DEC, NULL, 0xff, + NULL, HFILL } + }, + { &hf_ehs_sh_tdm_cnt_jday, + { "CNT Julian Day of Year", "ehs2.tdm_cnt_jday", + FT_UINT16, BASE_DEC, NULL, 0xffff, + NULL, HFILL } + }, + { &hf_ehs_sh_tdm_cnt_hour, + { "CNT Hour", "ehs2.tdm_cnt_hour", + FT_UINT8, BASE_DEC, NULL, 0xff, + NULL, HFILL } + }, + { &hf_ehs_sh_tdm_cnt_minute, + { "CNT Minute", "ehs2.tdm_cnt_minute", + FT_UINT8, BASE_DEC, NULL, 0xff, + NULL, HFILL } + }, + { &hf_ehs_sh_tdm_cnt_second, + { "CNT Second", "ehs2.tdm_cnt_second", + FT_UINT8, BASE_DEC, NULL, 0xff, + NULL, HFILL } + }, + { &hf_ehs_sh_tdm_cnt_tenths, + { "CNT Tenths", "ehs2.tdm_cnt_tenths", + FT_UINT8, BASE_DEC, NULL, 0xf0, + NULL, HFILL } + }, + + { &hf_ehs_sh_tdm_obt_year, + { "OBT Years since 1900", "ehs2.tdm_cnt_year", + FT_UINT8, BASE_DEC, NULL, 0xff, + NULL, HFILL } + }, + { &hf_ehs_sh_tdm_obt_jday, + { "OBT Julian Day of Year", "ehs2.tdm_cnt_jday", + FT_UINT16, BASE_DEC, NULL, 0xffff, + NULL, HFILL } + }, + { &hf_ehs_sh_tdm_obt_hour, + { "OBT Hour", "ehs2.tdm_cnt_hour", + FT_UINT8, BASE_DEC, NULL, 0xff, + NULL, HFILL } + }, + { &hf_ehs_sh_tdm_obt_minute, + { "OBT Minute", "ehs2.tdm_cnt_minute", + FT_UINT8, BASE_DEC, NULL, 0xff, + NULL, HFILL } + }, + { &hf_ehs_sh_tdm_obt_second, + { "OBT Second", "ehs2.tdm_cnt_second", + FT_UINT8, BASE_DEC, NULL, 0xff, + NULL, HFILL } + }, + { &hf_ehs_sh_tdm_obt_tenths, + { "OBT Tenths", "ehs2.tdm_cnt_tenths", + FT_UINT8, BASE_DEC, NULL, 0xf0, + NULL, HFILL } + }, + + { &hf_ehs_sh_tdm_obt_delta_time_flag, + { "OBT is Delta Time Instead of GMT", "ehs2.tdm_obt_delta_time_flag", + FT_BOOLEAN, 16, NULL, 0x8000, + NULL, HFILL } + }, + { &hf_ehs_sh_tdm_obt_computed_flag, + { "OBT Computed", "ehs2.tdm_obt_computed_flag", + FT_BOOLEAN, 16, NULL, 0x4000, + NULL, HFILL } + }, + { &hf_ehs_sh_tdm_obt_not_retrieved_flag, + { "OBT Not Retrieved", "ehs2.tdm_obt_not_retrieved_flag", + FT_BOOLEAN, 16, NULL, 0x2000, + NULL, HFILL } + }, + { &hf_ehs_sh_tdm_obt_reserved, + { "OBT Reserved", "ehs2.tdm_obt_reserved", + FT_BOOLEAN, 16, NULL, 0x1800, + NULL, HFILL } + }, + { &hf_ehs_sh_tdm_obt_source_apid, + { "OBT Source APID", "ehs2.tdm_obt_source_apid", + FT_UINT16, BASE_DEC, NULL, 0x07ff, + NULL, HFILL } + }, + + { &hf_ehs_sh_tdm_num_major_frame_status_words, + { "Number of Major Frame Status Words", "ehs2.tdm_num_major_frame_status_words", + FT_UINT8, BASE_DEC, NULL, 0x0ff, + NULL, HFILL } + }, + + { &hf_ehs_sh_tdm_mjfs_reserved, + { "Reserved", "ehs2.tdm_mjfs_reserved", + FT_UINT8, BASE_DEC, NULL, 0xf8, + NULL, HFILL } + }, + { &hf_ehs_sh_tdm_mjfs_parent_frame_error, + { "Parent Frame Error", "ehs2.tdm_mjfs_parent_frame_error", + FT_BOOLEAN, 8, NULL, 0x04, + NULL, HFILL } + }, + { &hf_ehs_sh_tdm_mjfs_checksum_error, + { "Checksum Error", "ehs2.tdm_mjfs_checksum_error", + FT_BOOLEAN, 8, NULL, 0x02, + NULL, HFILL } + }, + { &hf_ehs_sh_tdm_mjfs_fixed_value_error, + { "Fixed Value Error", "ehs2.tdm_mjfs_fixed_value_error", + FT_BOOLEAN, 8, NULL, 0x01, + NULL, HFILL } + }, + + { &hf_ehs_sh_tdm_mnfs_parent_frame_error, + { "Parent Frame Error", "ehs2.tdm_mnfs_parent_frame_error", + FT_BOOLEAN, 8, NULL, 0x80, + NULL, HFILL } + }, + { &hf_ehs_sh_tdm_mnfs_data_not_available, + { "Data Not Available", "ehs2.tdm_mnfs_data_not_available", + FT_BOOLEAN, 8, NULL, 0x40, + NULL, HFILL } + }, + { &hf_ehs_sh_tdm_mnfs_checksum_error, + { "Checksum Error", "ehs2.tdm_mnfs_checksum_error", + FT_BOOLEAN, 8, NULL, 0x20, + NULL, HFILL } + }, + { &hf_ehs_sh_tdm_mnfs_fixed_value_error, + { "Fixed Value Error", "ehs2.tdm_mnfs_fixed_value_error", + FT_BOOLEAN, 8, NULL, 0x10, + NULL, HFILL } + }, + { &hf_ehs_sh_tdm_mnfs_counter_error, + { "Counter Error", "ehs2.tdm_mnfs_counter_error", + FT_BOOLEAN, 8, NULL, 0x08, + NULL, HFILL } + }, + { &hf_ehs_sh_tdm_mnfs_format_id_error, + { "Format ID Error", "ehs2.tdm_mnfs_format_id_error", + FT_BOOLEAN, 8, NULL, 0x04, + NULL, HFILL } + }, + { &hf_ehs_sh_tdm_mnfs_bit_slip_error, + { "Bit Slip Error", "ehs2.tdm_mnfs_bit_slip_error", + FT_BOOLEAN, 8, NULL, 0x02, + NULL, HFILL } + }, + { &hf_ehs_sh_tdm_mnfs_sync_error, + { "Sync Error", "ehs2.tdm_mnfs_sync_error", + FT_BOOLEAN, 8, NULL, 0x01, + NULL, HFILL } + }, + + + /* pseudo secondary header */ + { &hf_ehs_sh_pseudo_unused, + { "Unused", "ehs2.pseudo_unused", + FT_UINT16, BASE_DEC, NULL, 0xffff, + NULL, HFILL } + }, + { &hf_ehs_sh_pseudo_workstation_id, + { "Workstation ID", "ehs2.pseudo_workstation_id", + FT_UINT16, BASE_DEC, NULL, 0xffff, + NULL, HFILL } + }, + { &hf_ehs_sh_pseudo_user_id, + { "User ID", "ehs2.pseudo_user_id", + FT_UINT16, BASE_DEC, NULL, 0xffff, + NULL, HFILL } + }, + { &hf_ehs_sh_pseudo_comp_id, + { "Comp ID", "ehs2.pseudo_comp_id", + FT_UINT16, BASE_DEC, NULL, 0xffff, + NULL, HFILL } + }, + + + /* aos/los protocol data zone */ + { &hf_ehs_dz_aoslos_indicator, + { "AOS/LOS Indicator", "dz.aoslos_indicator", + FT_UINT8, BASE_DEC, VALS(ehs_data_zone_aoslos_indicator), 0x03, + NULL, HFILL } + }, + + + /* udsm protocol data zone */ + { &hf_ehs_dz_udsm_ccsds_vs_bpdu, + { "CCSDS vs BPDU", "dz.udsm_ccsds_vs_bpdu", + FT_UINT8, BASE_DEC, VALS(ehs_data_zone_udsm_ccsds_vs_bpdu), 0x80, + NULL, HFILL } + }, + { &hf_ehs_dz_udsm_unused1, + { "Unused 1", "dz.udsm_unused1", + FT_UINT8, BASE_DEC, NULL, 0x7f, + NULL, HFILL } + }, + + { &hf_ehs_dz_udsm_unused2, + { "Unused 2", "dz.udsm_unused2", + FT_UINT8, BASE_DEC, NULL, 0xff, + NULL, HFILL } + }, + + { &hf_ehs_dz_udsm_unused3, + { "Unused 3", "dz.udsm_unused3", + FT_UINT16, BASE_DEC, NULL, 0xe000, + NULL, HFILL } + }, + { &hf_ehs_dz_udsm_gse_pkt_id, + { "GSE Pkt ID", "dz.udsm_gse_pkt_id", + FT_BOOLEAN, 16, NULL, 0x1000, + NULL, HFILL } + }, + { &hf_ehs_dz_udsm_payload_vs_core, + { "Payload vs Core", "dz.udsm_payload_vs_core", + FT_UINT16, BASE_DEC, VALS(ehs_data_zone_udsm_payload_vs_core), 0x0800, + NULL, HFILL } + }, + { &hf_ehs_dz_udsm_apid, + { "APID", "dz.udsm_apid", + FT_UINT16, BASE_DEC, NULL, 0x07ff, + NULL, HFILL } + }, + + { &hf_ehs_dz_udsm_start_time_year, + { "Start Time Years since 1900", "dz.udsm_start_time_year", + FT_UINT8, BASE_DEC, NULL, 0xff, + NULL, HFILL } + }, + { &hf_ehs_dz_udsm_start_time_jday, + { "Start Time Julian Day", "dz.udsm_start_time_jday", + FT_UINT16, BASE_DEC, NULL, 0xffff, + NULL, HFILL } + }, + { &hf_ehs_dz_udsm_start_time_hour, + { "Start Time Hour", "dz.udsm_start_time_hour", + FT_UINT8, BASE_DEC, NULL, 0xff, + NULL, HFILL } + }, + { &hf_ehs_dz_udsm_start_time_minute, + { "Start Time Minute", "dz.udsm_start_time_minute", + FT_UINT8, BASE_DEC, NULL, 0xff, + NULL, HFILL } + }, + { &hf_ehs_dz_udsm_start_time_second, + { "Start Time Second", "dz.udsm_start_time_second", + FT_UINT8, BASE_DEC, NULL, 0xff, + NULL, HFILL } + }, + + { &hf_ehs_dz_udsm_stop_time_year, + { "Stop Time Years since 1900", "dz.udsm_stop_time_year", + FT_UINT8, BASE_DEC, NULL, 0xff, + NULL, HFILL } + }, + { &hf_ehs_dz_udsm_stop_time_jday, + { "Stop Time Julian Day", "dz.udsm_stop_time_jday", + FT_UINT16, BASE_DEC, NULL, 0xffff, + NULL, HFILL } + }, + { &hf_ehs_dz_udsm_stop_time_hour, + { "Stop Time Hour", "dz.udsm_stop_time_hour", + FT_UINT8, BASE_DEC, NULL, 0xff, + NULL, HFILL } + }, + { &hf_ehs_dz_udsm_stop_time_minute, + { "Stop Time Minute", "dz.udsm_stop_time_minute", + FT_UINT8, BASE_DEC, NULL, 0xff, + NULL, HFILL } + }, + { &hf_ehs_dz_udsm_stop_time_second, + { "Stop Time Second", "dz.udsm_stop_time_second", + FT_UINT8, BASE_DEC, NULL, 0xff, + NULL, HFILL } + }, + + { &hf_ehs_dz_udsm_unused4, + { "Unused 4", "dz.udsm_unused4", + FT_UINT16, BASE_DEC, NULL, 0xffff, + NULL, HFILL } + }, + + { &hf_ehs_dz_udsm_num_pkts_xmtd, + { "Num Pkts Transmitted", "dz.udsm_num_pkts_xmtd", + FT_UINT16, BASE_DEC, NULL, 0xffff, + NULL, HFILL } + }, + + { &hf_ehs_dz_udsm_num_vcdu_seqerrs, + { "Num VCDU Sequence Errors", "dz.udsm_num_vcdu_seqerrs", + FT_UINT16, BASE_DEC, NULL, 0xffff, + NULL, HFILL } + }, + + { &hf_ehs_dz_udsm_num_pkt_seqerrs, + { "Num Packet Sequence Errors", "dz.udsm_num_pkt_seqerrs", + FT_UINT16, BASE_DEC, NULL, 0xffff, + NULL, HFILL } + }, + + { &hf_ehs_dz_udsm_num_pktlen_errors, + { "Num Pkt Length Errors", "dz.udsm_num_pktlen_errors", + FT_UINT16, BASE_DEC, NULL, 0xffff, + NULL, HFILL } + }, + + { &hf_ehs_dz_udsm_event, + { "UDSM Event Code", "dz.udsm_event", + FT_UINT8, BASE_DEC, VALS(ehs_data_zone_udsm_event), 0xff, + NULL, HFILL } + }, + + { &hf_ehs_dz_udsm_num_pkts_xmtd_rollover, + { "Num Pkts Transmitted Rollover Counter", "dz.udsm_num_pkts_xmtd_rollover", + FT_UINT8, BASE_DEC, NULL, 0xff, + NULL, HFILL } + }, + + }; + + /* Setup protocol subtree array */ + static gint *ett[] = { + &ett_ehs, + &ett_ehs_primary_header, + &ett_ehs_secondary_header, + &ett_ehs_data_zone + }; + + /* Register the protocol name and description */ + proto_ehs = proto_register_protocol("EHS", "EHS", "ehs"); + + /* Required function calls to register the header fields and subtrees used */ + proto_register_field_array(proto_ehs, hf, array_length(hf)); + proto_register_subtree_array(ett, array_length(ett)); + + /* XX: Does this dissector need to be publicly registered ?? */ + register_dissector ( "ehs", dissect_ehs, proto_ehs ); } - -/* If this dissector uses sub-dissector registration add a registration routine. - * This format is required because a script is used to find these routines and - * create the code that calls these routines. - */ void proto_reg_handoff_ehs(void) { - dissector_add_handle ( "udp.port", find_dissector("ehs") ); /* for 'decode as' */ - ccsds_handle = find_dissector ( "ccsds" ); + dissector_add_handle ( "udp.port", find_dissector("ehs") ); /* for 'decode as' */ + ccsds_handle = find_dissector ( "ccsds" ); } diff --git a/epan/dissectors/packet-gre.c b/epan/dissectors/packet-gre.c index bf42b59ca7..ff693d2dd6 100644 --- a/epan/dissectors/packet-gre.c +++ b/epan/dissectors/packet-gre.c @@ -29,14 +29,14 @@ #include <glib.h> #include <epan/packet.h> -#include "packet-gre.h" -#include "packet-wccp.h" -#include <epan/in_cksum.h> #include <epan/etypes.h> +#include <epan/in_cksum.h> +#include <epan/expert.h> #include <epan/greproto.h> #include <epan/ipproto.h> #include <epan/llcsaps.h> -#include <epan/expert.h> +#include "packet-gre.h" +#include "packet-wccp.h" /* * See RFC 1701 "Generic Routing Encapsulation (GRE)", RFC 1702 @@ -101,64 +101,64 @@ static dissector_table_t gre_dissector_table; static dissector_handle_t data_handle; /* bit positions for flags in header */ -#define GRE_CHECKSUM 0x8000 -#define GRE_ROUTING 0x4000 -#define GRE_KEY 0x2000 -#define GRE_SEQUENCE 0x1000 -#define GRE_STRICTSOURCE 0x0800 -#define GRE_RECURSION 0x0700 -#define GRE_ACK 0x0080 /* only in special PPTPized GRE header */ -#define GRE_RESERVED_PPP 0x0078 /* only in special PPTPized GRE header */ -#define GRE_RESERVED 0x00F8 -#define GRE_VERSION 0x0007 +#define GRE_CHECKSUM 0x8000 +#define GRE_ROUTING 0x4000 +#define GRE_KEY 0x2000 +#define GRE_SEQUENCE 0x1000 +#define GRE_STRICTSOURCE 0x0800 +#define GRE_RECURSION 0x0700 +#define GRE_ACK 0x0080 /* only in special PPTPized GRE header */ +#define GRE_RESERVED_PPP 0x0078 /* only in special PPTPized GRE header */ +#define GRE_RESERVED 0x00F8 +#define GRE_VERSION 0x0007 const value_string gre_version[] = { - { 0, "GRE" }, /* [RFC2784] */ - { 1, "Enhanced GRE" }, /* [RFC2637] */ - { 0, NULL} + { 0, "GRE" }, /* [RFC2784] */ + { 1, "Enhanced GRE" }, /* [RFC2637] */ + { 0, NULL} }; const value_string gre_typevals[] = { - { ETHERTYPE_PPP, "PPP" }, - { ETHERTYPE_IP, "IP" }, - { SAP_OSINL5, "OSI"}, - { GRE_WCCP, "WCCP"}, - { GRE_NHRP, "NHRP"}, - { GRE_ERSPAN_88BE, "ERSPAN"}, - { GRE_ERSPAN_22EB, "ERSPAN"}, - { ETHERTYPE_IPX, "IPX"}, - { ETHERTYPE_ETHBRIDGE, "Transparent Ethernet bridging" }, - { ETHERTYPE_RAW_FR, "Frame Relay"}, - { ETHERTYPE_IPv6, "IPv6" }, - { ETHERTYPE_MPLS, "MPLS label switched packet" }, - { ETHERTYPE_CDMA2000_A10_UBS,"CDMA2000 A10 Unstructured byte stream" }, - { ETHERTYPE_3GPP2, "CDMA2000 A10 3GPP2 Packet" }, - { GRE_ARUBA_8200, "ARUBA WLAN" }, - { GRE_ARUBA_8210, "ARUBA WLAN" }, - { GRE_ARUBA_8220, "ARUBA WLAN" }, - { GRE_ARUBA_8230, "ARUBA WLAN" }, - { GRE_ARUBA_8240, "ARUBA WLAN" }, - { GRE_ARUBA_8250, "ARUBA WLAN" }, - { GRE_ARUBA_8260, "ARUBA WLAN" }, - { GRE_ARUBA_8270, "ARUBA WLAN" }, - { GRE_ARUBA_8280, "ARUBA WLAN" }, - { GRE_ARUBA_8290, "ARUBA WLAN" }, - { GRE_ARUBA_82A0, "ARUBA WLAN" }, - { GRE_ARUBA_82B0, "ARUBA WLAN" }, - { GRE_ARUBA_82C0, "ARUBA WLAN" }, - { GRE_ARUBA_82D0, "ARUBA WLAN" }, - { GRE_ARUBA_82E0, "ARUBA WLAN" }, - { GRE_ARUBA_82F0, "ARUBA WLAN" }, - { GRE_ARUBA_8300, "ARUBA WLAN" }, - { GRE_ARUBA_8310, "ARUBA WLAN" }, - { GRE_ARUBA_8320, "ARUBA WLAN" }, - { GRE_ARUBA_8330, "ARUBA WLAN" }, - { GRE_ARUBA_8340, "ARUBA WLAN" }, - { GRE_ARUBA_8350, "ARUBA WLAN" }, - { GRE_ARUBA_8360, "ARUBA WLAN" }, - { GRE_ARUBA_8370, "ARUBA WLAN" }, - { GRE_ARUBA_9000, "ARUBA WLAN" }, - { 0, NULL } + { ETHERTYPE_PPP, "PPP" }, + { ETHERTYPE_IP, "IP" }, + { SAP_OSINL5, "OSI"}, + { GRE_WCCP, "WCCP"}, + { GRE_NHRP, "NHRP"}, + { GRE_ERSPAN_88BE, "ERSPAN"}, + { GRE_ERSPAN_22EB, "ERSPAN"}, + { ETHERTYPE_IPX, "IPX"}, + { ETHERTYPE_ETHBRIDGE, "Transparent Ethernet bridging" }, + { ETHERTYPE_RAW_FR, "Frame Relay"}, + { ETHERTYPE_IPv6, "IPv6" }, + { ETHERTYPE_MPLS, "MPLS label switched packet" }, + { ETHERTYPE_CDMA2000_A10_UBS,"CDMA2000 A10 Unstructured byte stream" }, + { ETHERTYPE_3GPP2, "CDMA2000 A10 3GPP2 Packet" }, + { GRE_ARUBA_8200, "ARUBA WLAN" }, + { GRE_ARUBA_8210, "ARUBA WLAN" }, + { GRE_ARUBA_8220, "ARUBA WLAN" }, + { GRE_ARUBA_8230, "ARUBA WLAN" }, + { GRE_ARUBA_8240, "ARUBA WLAN" }, + { GRE_ARUBA_8250, "ARUBA WLAN" }, + { GRE_ARUBA_8260, "ARUBA WLAN" }, + { GRE_ARUBA_8270, "ARUBA WLAN" }, + { GRE_ARUBA_8280, "ARUBA WLAN" }, + { GRE_ARUBA_8290, "ARUBA WLAN" }, + { GRE_ARUBA_82A0, "ARUBA WLAN" }, + { GRE_ARUBA_82B0, "ARUBA WLAN" }, + { GRE_ARUBA_82C0, "ARUBA WLAN" }, + { GRE_ARUBA_82D0, "ARUBA WLAN" }, + { GRE_ARUBA_82E0, "ARUBA WLAN" }, + { GRE_ARUBA_82F0, "ARUBA WLAN" }, + { GRE_ARUBA_8300, "ARUBA WLAN" }, + { GRE_ARUBA_8310, "ARUBA WLAN" }, + { GRE_ARUBA_8320, "ARUBA WLAN" }, + { GRE_ARUBA_8330, "ARUBA WLAN" }, + { GRE_ARUBA_8340, "ARUBA WLAN" }, + { GRE_ARUBA_8350, "ARUBA WLAN" }, + { GRE_ARUBA_8360, "ARUBA WLAN" }, + { GRE_ARUBA_8370, "ARUBA WLAN" }, + { GRE_ARUBA_9000, "ARUBA WLAN" }, + { 0, NULL } }; #define ID_3GPP2_SDI_FLAG 1 @@ -167,339 +167,339 @@ const value_string gre_typevals[] = { #define ID_3GPP2_SEG 4 static const value_string gre_3ggp2_seg_vals[] = { - { 0x00, "Packet Started" }, - { 0x01, "Packet continued" }, - { 0x02, "Packet Ended" }, - { 0, NULL } + { 0x00, "Packet Started" }, + { 0x01, "Packet continued" }, + { 0x02, "Packet Ended" }, + { 0, NULL } }; /* 3GPP2 A.S0012-C v2.0 * 2.6.1 GRE Attributes */ static const value_string gre_3ggp2_attrib_id_vals[] = { - { 0x01, "1x SDB/HRPD DOS Indicator" }, - { 0x02, "Flow Control Indication" }, - /* A.S0008-A v1.0 */ - { 0x03, "IP Flow Discriminator" }, - { 0x04, "Segmentation Indication" }, - { 0, NULL } + { 0x01, "1x SDB/HRPD DOS Indicator" }, + { 0x02, "Flow Control Indication" }, + /* A.S0008-A v1.0 */ + { 0x03, "IP Flow Discriminator" }, + { 0x04, "Segmentation Indication" }, + { 0, NULL } }; static const true_false_string gre_3ggp2_sdi_val = { - "Packet suitable for 1x SDB or HRPD DOS transmission", - "Reserved" + "Packet suitable for 1x SDB or HRPD DOS transmission", + "Reserved" }; static const true_false_string gre_3ggp2_fci_val = { - "XOFF", - "XON" + "XOFF", + "XON" }; static const true_false_string gre_3ggp2_di_val = { - "INDEFINITE:", - "TEMPORARY" + "INDEFINITE:", + "TEMPORARY" }; static const true_false_string gre_wccp_dynamic_service_val = { - "Dynamic service", - "Well-known service" + "Dynamic service", + "Well-known service" }; static const true_false_string gre_wccp_alternative_bucket_used_val = { - "Alternative bucket used", - "Primary bucket used", + "Alternative bucket used", + "Primary bucket used", }; static int dissect_gre_3gpp2_attribs(tvbuff_t *tvb, int offset, proto_tree *tree) { - gboolean last_attrib = FALSE; - proto_item* attr_item; - proto_tree* attr_tree; - guint8 value; - int start_offset = offset; + gboolean last_attrib = FALSE; + proto_item *attr_item; + proto_tree *attr_tree; + guint8 value; + int start_offset = offset; - proto_item* ti = proto_tree_add_item(tree, hf_gre_3ggp2_attrib, tvb, offset, 0, ENC_NA); - proto_tree* atree = proto_item_add_subtree(ti, ett_3gpp2_attribs); + proto_item *ti = proto_tree_add_item(tree, hf_gre_3ggp2_attrib, tvb, offset, 0, ENC_NA); + proto_tree *atree = proto_item_add_subtree(ti, ett_3gpp2_attribs); - while(last_attrib != TRUE) - { - guint8 attrib_id = tvb_get_guint8(tvb, offset); - guint8 attrib_length = tvb_get_guint8(tvb, offset + 1); + while(last_attrib != TRUE) + { + guint8 attrib_id = tvb_get_guint8(tvb, offset); + guint8 attrib_length = tvb_get_guint8(tvb, offset + 1); - attr_item = proto_tree_add_text(atree, tvb, offset, attrib_length + 1 + 1, "%s", - val_to_str((attrib_id&0x7f), gre_3ggp2_attrib_id_vals, "%u (Unknown)")); - attr_tree = proto_item_add_subtree(attr_item, ett_3gpp2_attr); + attr_item = proto_tree_add_text(atree, tvb, offset, attrib_length + 1 + 1, "%s", + val_to_str((attrib_id&0x7f), gre_3ggp2_attrib_id_vals, "%u (Unknown)")); + attr_tree = proto_item_add_subtree(attr_item, ett_3gpp2_attr); - proto_tree_add_item(attr_tree, hf_gre_3ggp2_attrib_id, tvb, offset, 1, ENC_BIG_ENDIAN); - proto_tree_add_item(attr_tree, hf_gre_3ggp2_attrib_length, tvb, offset+1, 1, ENC_BIG_ENDIAN); + proto_tree_add_item(attr_tree, hf_gre_3ggp2_attrib_id, tvb, offset, 1, ENC_BIG_ENDIAN); + proto_tree_add_item(attr_tree, hf_gre_3ggp2_attrib_length, tvb, offset+1, 1, ENC_BIG_ENDIAN); - offset += 2; - last_attrib = (attrib_id & 0x80)?TRUE:FALSE; - attrib_id &= 0x7F; + offset += 2; + last_attrib = (attrib_id & 0x80)?TRUE:FALSE; + attrib_id &= 0x7F; - switch(attrib_id) - { + switch(attrib_id) + { case ID_3GPP2_FLOW_DISCRIMINATOR: - { - value = tvb_get_guint8(tvb,offset); - proto_tree_add_item(attr_tree, hf_gre_3ggp2_flow_disc, tvb, offset, attrib_length, ENC_NA); - proto_item_append_text(attr_item," - 0x%x",value); - } - break; + { + value = tvb_get_guint8(tvb,offset); + proto_tree_add_item(attr_tree, hf_gre_3ggp2_flow_disc, tvb, offset, attrib_length, ENC_NA); + proto_item_append_text(attr_item," - 0x%x",value); + } + break; case ID_3GPP2_SDI_FLAG: - { - value = tvb_get_guint8(tvb,offset); - proto_tree_add_item(attr_tree, hf_gre_3ggp2_sdi, tvb, offset, attrib_length, ENC_BIG_ENDIAN); - proto_item_append_text(attr_item," - %s", - (value & 0x80) ? "Packet suitable for 1x SDB or HRPD DOS transmission" : "Reserved"); - - } - break; + { + value = tvb_get_guint8(tvb,offset); + proto_tree_add_item(attr_tree, hf_gre_3ggp2_sdi, tvb, offset, attrib_length, ENC_BIG_ENDIAN); + proto_item_append_text(attr_item," - %s", + (value & 0x80) ? "Packet suitable for 1x SDB or HRPD DOS transmission" : "Reserved"); + + } + break; case ID_3GPP2_SEG: - { - value = tvb_get_guint8(tvb,offset) >>6; - proto_tree_add_item(attr_tree, hf_gre_3ggp2_seg, tvb, offset, attrib_length, ENC_BIG_ENDIAN); - proto_item_append_text(attr_item," - %s",val_to_str(value, gre_3ggp2_seg_vals, "0x%02X - Unknown")); - } - break; + { + value = tvb_get_guint8(tvb,offset) >>6; + proto_tree_add_item(attr_tree, hf_gre_3ggp2_seg, tvb, offset, attrib_length, ENC_BIG_ENDIAN); + proto_item_append_text(attr_item," - %s",val_to_str(value, gre_3ggp2_seg_vals, "0x%02X - Unknown")); + } + break; case ID_3GPP2_FLOW_CTRL: - { - value = tvb_get_guint8(tvb,offset); - proto_tree_add_item(attr_tree, hf_gre_3ggp2_fci, tvb, offset, attrib_length, ENC_BIG_ENDIAN); - proto_item_append_text(attr_item," - %s", - (value & 0x80) ? "XON" : "XOFF"); - proto_tree_add_item(attr_tree, hf_gre_3ggp2_di, tvb, offset, attrib_length, ENC_BIG_ENDIAN); - proto_item_append_text(attr_item,"/%s", - (value & 0x40) ? "INDEFINITE" : "TEMPORARY"); - } - break; - } - - offset += attrib_length; - } - proto_item_set_len(ti, offset - start_offset); - - return offset; + { + value = tvb_get_guint8(tvb,offset); + proto_tree_add_item(attr_tree, hf_gre_3ggp2_fci, tvb, offset, attrib_length, ENC_BIG_ENDIAN); + proto_item_append_text(attr_item," - %s", + (value & 0x80) ? "XON" : "XOFF"); + proto_tree_add_item(attr_tree, hf_gre_3ggp2_di, tvb, offset, attrib_length, ENC_BIG_ENDIAN); + proto_item_append_text(attr_item,"/%s", + (value & 0x40) ? "INDEFINITE" : "TEMPORARY"); + } + break; + } + + offset += attrib_length; + } + proto_item_set_len(ti, offset - start_offset); + + return offset; } static void dissect_gre_wccp2_redirect_header(tvbuff_t *tvb, int offset, proto_tree *tree) { - proto_item * ti; - proto_tree * rh_tree; + proto_item *ti; + proto_tree *rh_tree; - ti = proto_tree_add_item(tree, hf_gre_wccp_redirect_header, tvb, offset, 4, ENC_NA); - rh_tree = proto_item_add_subtree(ti, ett_gre_wccp2_redirect_header); + ti = proto_tree_add_item(tree, hf_gre_wccp_redirect_header, tvb, offset, 4, ENC_NA); + rh_tree = proto_item_add_subtree(ti, ett_gre_wccp2_redirect_header); - proto_tree_add_item(rh_tree, hf_gre_wccp_dynamic_service, tvb, offset, 1, ENC_BIG_ENDIAN); + proto_tree_add_item(rh_tree, hf_gre_wccp_dynamic_service, tvb, offset, 1, ENC_BIG_ENDIAN); - proto_tree_add_item(rh_tree, hf_gre_wccp_alternative_bucket_used, tvb, offset, 1, ENC_BIG_ENDIAN); + proto_tree_add_item(rh_tree, hf_gre_wccp_alternative_bucket_used, tvb, offset, 1, ENC_BIG_ENDIAN); - proto_tree_add_item(rh_tree, hf_gre_wccp_service_id, tvb, offset +1, 1, ENC_BIG_ENDIAN); + proto_tree_add_item(rh_tree, hf_gre_wccp_service_id, tvb, offset +1, 1, ENC_BIG_ENDIAN); - proto_tree_add_item(rh_tree, hf_gre_wccp_alternative_bucket, tvb, offset +2, 1, ENC_BIG_ENDIAN); + proto_tree_add_item(rh_tree, hf_gre_wccp_alternative_bucket, tvb, offset +2, 1, ENC_BIG_ENDIAN); - proto_tree_add_item(rh_tree, hf_gre_wccp_primary_bucket, tvb, offset +3, 1, ENC_BIG_ENDIAN); + proto_tree_add_item(rh_tree, hf_gre_wccp_primary_bucket, tvb, offset +3, 1, ENC_BIG_ENDIAN); } static void dissect_gre(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) { - int offset = 0; - guint16 flags_and_ver; - guint16 type; - gboolean is_ppp = FALSE; - gboolean is_wccp2 = FALSE; - proto_item *ti, *it_flags; - proto_tree *gre_tree, *fv_tree = NULL; - guint16 sre_af; - guint8 sre_length; - tvbuff_t *next_tvb; - - flags_and_ver = tvb_get_ntohs(tvb, offset); - type = tvb_get_ntohs(tvb, offset + 2); - - col_set_str(pinfo->cinfo, COL_PROTOCOL, "GRE"); - - col_add_fstr(pinfo->cinfo, COL_INFO, "Encapsulated %s", val_to_str(type, gre_typevals, "0x%04X (unknown)")); - - switch (type) { - - case ETHERTYPE_PPP: - if (flags_and_ver & GRE_ACK) - is_ppp = TRUE; - break; - case ETHERTYPE_3GPP2: - case ETHERTYPE_CDMA2000_A10_UBS: - is_ppp = TRUE; - break; - - case GRE_WCCP: - /* WCCP2 puts an extra 4 octets into the header, but uses the same - encapsulation type; if it looks as if the first octet of the packet - isn't the beginning of an IPv4 header, assume it's WCCP2. */ - if ((tvb_get_guint8(tvb, offset + 2 + 2) & 0xF0) != 0x40) { - is_wccp2 = TRUE; + int offset = 0; + guint16 flags_and_ver; + guint16 type; + gboolean is_ppp = FALSE; + gboolean is_wccp2 = FALSE; + proto_item *ti, *it_flags; + proto_tree *gre_tree, *fv_tree = NULL; + guint16 sre_af; + guint8 sre_length; + tvbuff_t *next_tvb; + + flags_and_ver = tvb_get_ntohs(tvb, offset); + type = tvb_get_ntohs(tvb, offset + 2); + + col_set_str(pinfo->cinfo, COL_PROTOCOL, "GRE"); + + col_add_fstr(pinfo->cinfo, COL_INFO, "Encapsulated %s", val_to_str(type, gre_typevals, "0x%04X (unknown)")); + + switch (type) { + + case ETHERTYPE_PPP: + if (flags_and_ver & GRE_ACK) + is_ppp = TRUE; + break; + case ETHERTYPE_3GPP2: + case ETHERTYPE_CDMA2000_A10_UBS: + is_ppp = TRUE; + break; + + case GRE_WCCP: + /* WCCP2 puts an extra 4 octets into the header, but uses the same + encapsulation type; if it looks as if the first octet of the packet + isn't the beginning of an IPv4 header, assume it's WCCP2. */ + if ((tvb_get_guint8(tvb, offset + 2 + 2) & 0xF0) != 0x40) { + is_wccp2 = TRUE; + } + break; } - break; - } - /* Per README.developer, section 1.2, we must call subdissectors regardless - * of whether "tree" is NULL or not. That is done below using - * call_dissector(), but since the next_tvb must begin at the correct offset, - * it's easier and more readable to always enter this block in order to - * compute the correct offset to pass to tvb_new_subset_remaining(). - */ - if (1) { - ti = proto_tree_add_protocol_format(tree, proto_gre, tvb, offset, -1, "Generic Routing Encapsulation (%s)", - val_to_str(type, gre_typevals, "0x%04X - unknown")); - gre_tree = proto_item_add_subtree(ti, ett_gre); + /* Per README.developer, section 1.2, we must call subdissectors regardless + * of whether "tree" is NULL or not. That is done below using + * call_dissector(), but since the next_tvb must begin at the correct offset, + * it's easier and more readable to always enter this block in order to + * compute the correct offset to pass to tvb_new_subset_remaining(). + */ + if (1) { + ti = proto_tree_add_protocol_format(tree, proto_gre, tvb, offset, -1, "Generic Routing Encapsulation (%s)", + val_to_str(type, gre_typevals, "0x%04X - unknown")); + gre_tree = proto_item_add_subtree(ti, ett_gre); - it_flags = proto_tree_add_item(gre_tree, hf_gre_flags_and_version, tvb, offset, 2, ENC_BIG_ENDIAN); - fv_tree = proto_item_add_subtree(it_flags, ett_gre_flags); + it_flags = proto_tree_add_item(gre_tree, hf_gre_flags_and_version, tvb, offset, 2, ENC_BIG_ENDIAN); + fv_tree = proto_item_add_subtree(it_flags, ett_gre_flags); - proto_tree_add_item(fv_tree, hf_gre_flags_checksum, tvb, offset, 2, ENC_BIG_ENDIAN); + proto_tree_add_item(fv_tree, hf_gre_flags_checksum, tvb, offset, 2, ENC_BIG_ENDIAN); - proto_tree_add_item(fv_tree, hf_gre_flags_routing, tvb, offset, 2, ENC_BIG_ENDIAN); + proto_tree_add_item(fv_tree, hf_gre_flags_routing, tvb, offset, 2, ENC_BIG_ENDIAN); - proto_tree_add_item(fv_tree, hf_gre_flags_key, tvb, offset, 2, ENC_BIG_ENDIAN); + proto_tree_add_item(fv_tree, hf_gre_flags_key, tvb, offset, 2, ENC_BIG_ENDIAN); - proto_tree_add_item(fv_tree, hf_gre_flags_sequence_number, tvb, offset, 2, ENC_BIG_ENDIAN); + proto_tree_add_item(fv_tree, hf_gre_flags_sequence_number, tvb, offset, 2, ENC_BIG_ENDIAN); - proto_tree_add_item(fv_tree, hf_gre_flags_strict_source_route, tvb, offset, 2, ENC_BIG_ENDIAN); + proto_tree_add_item(fv_tree, hf_gre_flags_strict_source_route, tvb, offset, 2, ENC_BIG_ENDIAN); - proto_tree_add_item(fv_tree, hf_gre_flags_recursion_control, tvb, offset, 2, ENC_BIG_ENDIAN); + proto_tree_add_item(fv_tree, hf_gre_flags_recursion_control, tvb, offset, 2, ENC_BIG_ENDIAN); - /* RFC2637 Section 4.1 : Enhanced GRE Header */ - if (is_ppp) { - proto_tree_add_item(fv_tree, hf_gre_flags_ack, tvb, offset, 2, ENC_BIG_ENDIAN); - - proto_tree_add_item(fv_tree, hf_gre_flags_reserved_ppp, tvb, offset, 2, ENC_BIG_ENDIAN); - } - else { - proto_tree_add_item(fv_tree, hf_gre_flags_reserved, tvb, offset, 2, ENC_BIG_ENDIAN); - } + /* RFC2637 Section 4.1 : Enhanced GRE Header */ + if (is_ppp) { + proto_tree_add_item(fv_tree, hf_gre_flags_ack, tvb, offset, 2, ENC_BIG_ENDIAN); - proto_tree_add_item(fv_tree, hf_gre_flags_version, tvb, offset, 2, ENC_BIG_ENDIAN); - - offset += 2; - - proto_tree_add_item(gre_tree, hf_gre_proto, tvb, offset, 2, ENC_BIG_ENDIAN); - offset += 2; - - if (flags_and_ver & GRE_CHECKSUM || flags_and_ver & GRE_ROUTING) { - guint length, reported_length; - proto_item *it_checksum; - vec_t cksum_vec[1]; - guint16 cksum, computed_cksum; - - it_checksum = proto_tree_add_item(gre_tree, hf_gre_checksum, tvb, offset, 2, ENC_BIG_ENDIAN); - /* Checksum check !... */ - cksum = tvb_get_ntohs(tvb, offset); - length = tvb_length(tvb); - reported_length = tvb_reported_length(tvb); - /* The Checksum Present bit is set, and the packet isn't part of a - fragmented datagram and isn't truncated, so we can checksum it. */ - if ((flags_and_ver & GRE_CHECKSUM) && !pinfo->fragmented && length >= reported_length) { - cksum_vec[0].ptr = tvb_get_ptr(tvb, 0, reported_length); - cksum_vec[0].len = reported_length; - computed_cksum = in_cksum(cksum_vec, 1); - if (computed_cksum == 0) { - proto_item_append_text(it_checksum," [correct]"); - } else { - proto_item_append_text(it_checksum," [incorrect, should be 0x%04x]",in_cksum_shouldbe(cksum, computed_cksum)); - expert_add_info_format(pinfo, it_checksum, PI_MALFORMED, PI_WARN, "Incorrect GRE Checksum"); - } - } - - - offset += 2; - - proto_tree_add_item(gre_tree, hf_gre_offset, tvb, offset, 2, ENC_BIG_ENDIAN); - offset += 2; - } + proto_tree_add_item(fv_tree, hf_gre_flags_reserved_ppp, tvb, offset, 2, ENC_BIG_ENDIAN); + } + else { + proto_tree_add_item(fv_tree, hf_gre_flags_reserved, tvb, offset, 2, ENC_BIG_ENDIAN); + } - if (flags_and_ver & GRE_KEY) { - /* RFC2637 Section 4.1 : Enhanced GRE Header */ - if (is_ppp && type!=ETHERTYPE_CDMA2000_A10_UBS) { + proto_tree_add_item(fv_tree, hf_gre_flags_version, tvb, offset, 2, ENC_BIG_ENDIAN); - proto_tree_add_item(gre_tree, hf_gre_key_payload_length, tvb, offset, 2, ENC_BIG_ENDIAN); offset += 2; - proto_tree_add_item(gre_tree, hf_gre_key_call_id, tvb, offset, 2, ENC_BIG_ENDIAN); + proto_tree_add_item(gre_tree, hf_gre_proto, tvb, offset, 2, ENC_BIG_ENDIAN); offset += 2; - } - else { - proto_tree_add_item(gre_tree, hf_gre_key, tvb, offset, 4, ENC_BIG_ENDIAN); - offset += 4; - } - } - if (flags_and_ver & GRE_SEQUENCE) { - - proto_tree_add_item(gre_tree, hf_gre_sequence_number , tvb, offset, 4, ENC_BIG_ENDIAN); - offset += 4; - } - if (is_ppp && (flags_and_ver & GRE_ACK)) { - - proto_tree_add_item(gre_tree, hf_gre_ack_number , tvb, offset, 4, ENC_BIG_ENDIAN); - offset += 4; - } - if (flags_and_ver & GRE_ROUTING) { - proto_item *it_routing; - proto_tree *r_tree; - for (;;) { - - it_routing = proto_tree_add_item(gre_tree, hf_gre_routing, tvb, offset, -1, ENC_NA); - r_tree = proto_item_add_subtree(ti, ett_gre_routing); - - sre_af = tvb_get_ntohs(tvb, offset); - proto_tree_add_item(r_tree, hf_gre_routing_address_family , tvb, offset, 2, ENC_BIG_ENDIAN); - offset += 2; - - proto_tree_add_item(r_tree, hf_gre_routing_sre_offset , tvb, offset, 1, ENC_BIG_ENDIAN); - offset += 1; - - sre_length = tvb_get_guint8(tvb, offset); - proto_tree_add_item(r_tree, hf_gre_routing_sre_length , tvb, offset, 1, ENC_BIG_ENDIAN); - offset += 1; - - proto_item_set_len(it_routing, 2 + 1 +1 + sre_length); - if (sre_af == 0 && sre_length == 0) - break; - - proto_tree_add_item(r_tree, hf_gre_routing_information , tvb, offset, sre_length, ENC_NA); - offset += sre_length; - } - } - - if (type == GRE_WCCP && is_wccp2) { - dissect_gre_wccp2_redirect_header(tvb, offset, gre_tree); - offset += 4; - } - if(type == ETHERTYPE_3GPP2) { - offset = dissect_gre_3gpp2_attribs(tvb, offset, gre_tree); - } - - proto_item_set_len(ti, offset); - - /* If the S bit is not set, this packet might not have a payload, so - check whether there's any data left, first. - XXX - the S bit isn't in RFC 2784, which deprecates that bit - and some other bits in RFC 1701 and says that they should be - zero for RFC 2784-compliant GRE; as such, the absence of the - S bit doesn't necessarily mean there's no payload. */ - if (!(flags_and_ver & GRE_SEQUENCE)) { - if (tvb_reported_length_remaining(tvb, offset) <= 0) - return; /* no payload */ + if (flags_and_ver & GRE_CHECKSUM || flags_and_ver & GRE_ROUTING) { + guint length, reported_length; + proto_item *it_checksum; + vec_t cksum_vec[1]; + guint16 cksum, computed_cksum; + + it_checksum = proto_tree_add_item(gre_tree, hf_gre_checksum, tvb, offset, 2, ENC_BIG_ENDIAN); + /* Checksum check !... */ + cksum = tvb_get_ntohs(tvb, offset); + length = tvb_length(tvb); + reported_length = tvb_reported_length(tvb); + /* The Checksum Present bit is set, and the packet isn't part of a + fragmented datagram and isn't truncated, so we can checksum it. */ + if ((flags_and_ver & GRE_CHECKSUM) && !pinfo->fragmented && length >= reported_length) { + cksum_vec[0].ptr = tvb_get_ptr(tvb, 0, reported_length); + cksum_vec[0].len = reported_length; + computed_cksum = in_cksum(cksum_vec, 1); + if (computed_cksum == 0) { + proto_item_append_text(it_checksum," [correct]"); + } else { + proto_item_append_text(it_checksum," [incorrect, should be 0x%04x]",in_cksum_shouldbe(cksum, computed_cksum)); + expert_add_info_format(pinfo, it_checksum, PI_MALFORMED, PI_WARN, "Incorrect GRE Checksum"); + } + } + + + offset += 2; + + proto_tree_add_item(gre_tree, hf_gre_offset, tvb, offset, 2, ENC_BIG_ENDIAN); + offset += 2; + } + + if (flags_and_ver & GRE_KEY) { + /* RFC2637 Section 4.1 : Enhanced GRE Header */ + if (is_ppp && type!=ETHERTYPE_CDMA2000_A10_UBS) { + + proto_tree_add_item(gre_tree, hf_gre_key_payload_length, tvb, offset, 2, ENC_BIG_ENDIAN); + offset += 2; + + proto_tree_add_item(gre_tree, hf_gre_key_call_id, tvb, offset, 2, ENC_BIG_ENDIAN); + offset += 2; + } + else { + proto_tree_add_item(gre_tree, hf_gre_key, tvb, offset, 4, ENC_BIG_ENDIAN); + offset += 4; + } + } + if (flags_and_ver & GRE_SEQUENCE) { + + proto_tree_add_item(gre_tree, hf_gre_sequence_number , tvb, offset, 4, ENC_BIG_ENDIAN); + offset += 4; + } + if (is_ppp && (flags_and_ver & GRE_ACK)) { + + proto_tree_add_item(gre_tree, hf_gre_ack_number , tvb, offset, 4, ENC_BIG_ENDIAN); + offset += 4; + } + if (flags_and_ver & GRE_ROUTING) { + proto_item *it_routing; + proto_tree *r_tree; + for (;;) { + + it_routing = proto_tree_add_item(gre_tree, hf_gre_routing, tvb, offset, -1, ENC_NA); + r_tree = proto_item_add_subtree(ti, ett_gre_routing); + + sre_af = tvb_get_ntohs(tvb, offset); + proto_tree_add_item(r_tree, hf_gre_routing_address_family , tvb, offset, 2, ENC_BIG_ENDIAN); + offset += 2; + + proto_tree_add_item(r_tree, hf_gre_routing_sre_offset , tvb, offset, 1, ENC_BIG_ENDIAN); + offset += 1; + + sre_length = tvb_get_guint8(tvb, offset); + proto_tree_add_item(r_tree, hf_gre_routing_sre_length , tvb, offset, 1, ENC_BIG_ENDIAN); + offset += 1; + + proto_item_set_len(it_routing, 2 + 1 +1 + sre_length); + if (sre_af == 0 && sre_length == 0) + break; + + proto_tree_add_item(r_tree, hf_gre_routing_information , tvb, offset, sre_length, ENC_NA); + offset += sre_length; + } + } + + if (type == GRE_WCCP && is_wccp2) { + dissect_gre_wccp2_redirect_header(tvb, offset, gre_tree); + offset += 4; + } + if (type == ETHERTYPE_3GPP2) { + offset = dissect_gre_3gpp2_attribs(tvb, offset, gre_tree); + } + + proto_item_set_len(ti, offset); + + /* If the S bit is not set, this packet might not have a payload, so + check whether there's any data left, first. + + XXX - the S bit isn't in RFC 2784, which deprecates that bit + and some other bits in RFC 1701 and says that they should be + zero for RFC 2784-compliant GRE; as such, the absence of the + S bit doesn't necessarily mean there's no payload. */ + if (!(flags_and_ver & GRE_SEQUENCE)) { + if (tvb_reported_length_remaining(tvb, offset) <= 0) + return; /* no payload */ + } + next_tvb = tvb_new_subset_remaining(tvb, offset); + pinfo->flags.in_gre_pkt = TRUE; + if (!dissector_try_uint(gre_dissector_table, type, next_tvb, pinfo, tree)) + call_dissector(data_handle,next_tvb, pinfo, gre_tree); } - next_tvb = tvb_new_subset_remaining(tvb, offset); - pinfo->flags.in_gre_pkt = TRUE; - if (!dissector_try_uint(gre_dissector_table, type, next_tvb, pinfo, tree)) - call_dissector(data_handle,next_tvb, pinfo, gre_tree); - } } @@ -507,186 +507,223 @@ void proto_register_gre(void) { static hf_register_info hf[] = { - { &hf_gre_proto, - { "Protocol Type", "gre.proto", - FT_UINT16, BASE_HEX, VALS(gre_typevals), 0x0, - "The protocol that is GRE encapsulated", HFILL }}, - { &hf_gre_flags_and_version, - { "Flags and Version", "gre.flags_and_version", - FT_UINT16, BASE_HEX, NULL, 0x0, - "The GRE flags are encoded in the first two octets", HFILL }}, - { &hf_gre_flags_checksum, - { "Checksum Bit", "gre.flags.checksum", - FT_BOOLEAN, 16, TFS(&tfs_yes_no), GRE_CHECKSUM, - "Indicates if the Checksum field is present", HFILL }}, - { &hf_gre_flags_routing, - { "Routing Bit", "gre.flags.routing", - FT_BOOLEAN, 16, TFS(&tfs_yes_no), GRE_ROUTING, - "Indicates if the Routing and Checksum/Offset field are present", HFILL }}, - { &hf_gre_flags_key, - { "Key Bit", "gre.flags.key", - FT_BOOLEAN, 16, TFS(&tfs_yes_no), GRE_KEY, - "Indicates if the Key field is present", HFILL }}, - { &hf_gre_flags_sequence_number, - { "Sequence Number Bit", "gre.flags.sequence_number", - FT_BOOLEAN, 16, TFS(&tfs_yes_no), GRE_SEQUENCE, - "Indicates if the Sequence Number field is present", HFILL }}, - { &hf_gre_flags_strict_source_route, - { "Strict Source Route Bit", "gre.flags.strict_source_route", - FT_BOOLEAN, 16, TFS(&tfs_yes_no), GRE_STRICTSOURCE, - NULL, HFILL }}, - { &hf_gre_flags_recursion_control, - { "Recursion control", "gre.flags.recursion_control", - FT_UINT16, BASE_DEC, NULL, GRE_RECURSION, - NULL, HFILL }}, - { &hf_gre_flags_ack, - { "Acknowledgment", "gre.flags.ack", - FT_BOOLEAN, 16, TFS(&tfs_yes_no), GRE_ACK, - "Indicates if the packet packet contains Acknowledgment Number to be used for acknowledging previously transmitted data", HFILL }}, - { &hf_gre_flags_reserved, - { "Flags (Reserved)", "gre.flags.reserved", - FT_UINT16, BASE_DEC, NULL, GRE_RESERVED, - NULL, HFILL }}, - { &hf_gre_flags_reserved_ppp, - { "Flags (Reserved)", "gre.flags.reserved", - FT_UINT16, BASE_DEC, NULL, GRE_RESERVED_PPP, - NULL, HFILL }}, - { &hf_gre_flags_version, - { "Version", "gre.flags.version", - FT_UINT16, BASE_DEC, VALS(gre_version), GRE_VERSION, - NULL, HFILL }}, - { &hf_gre_checksum, - { "Checksum", "gre.checksum", - FT_UINT16, BASE_HEX, NULL, 0x0, - "The Checksum field contains the IP (one's complement) checksum of the GRE header and the payload packet", HFILL }}, - { &hf_gre_offset, - { "Offset", "gre.offset", - FT_UINT16, BASE_DEC, NULL, 0x0, - "The offset field indicates the octet offset from the start of the Routing field to the first octet of the active Source Route Entry to be examined", HFILL }}, - { &hf_gre_key, - { "Key", "gre.key", - FT_UINT32, BASE_HEX, NULL, 0x0, - "The Key field contains a four octet number which was inserted by the encapsulator", HFILL }}, - { &hf_gre_key_payload_length, - { "Payload Length", "gre.key.payload_length", - FT_UINT16, BASE_DEC, NULL, 0x0, - "Size of the payload, not including the GRE header", HFILL }}, - { &hf_gre_key_call_id, - { "Call ID", "gre.key.call_id", - FT_UINT16, BASE_DEC, NULL, 0x0, - "Contains the Peer's Call ID for the session to which this packet belongs.", HFILL }}, - { &hf_gre_sequence_number, - { "Sequence Number", "gre.sequence_number", - FT_UINT32, BASE_DEC, NULL, 0x0, - "The Sequence Number field contains an unsigned 32 bit integer which is inserted by the encapsulator", HFILL }}, - { &hf_gre_ack_number, - { "Acknowledgment Number", "gre.ack_number", - FT_UINT32, BASE_DEC, NULL, 0x0, - "Contains the sequence number of the highest numbered GRE packet received by the sending peer for this user session", HFILL }}, - { &hf_gre_routing, - { "Routing", "gre.routing", - FT_NONE, BASE_NONE, NULL, 0x0, - "The Routing field is a list of Source Route Entries (SREs)", HFILL }}, - { &hf_gre_routing_address_family, - { "Address Family", "gre.routing.address_family", - FT_UINT16, BASE_DEC, NULL, 0x0, - "The Address Family field contains a two octet value which indicates the syntax and semantics of the Routing Information field", HFILL }}, - { &hf_gre_routing_sre_offset, - { "SRE Offset", "gre.routing.sre_offset", - FT_UINT8, BASE_DEC, NULL, 0x0, - "The Address Family field contains a two octet value which indicates the syntax and semantics of the Routing Information field", HFILL }}, - { &hf_gre_routing_sre_length, - { "SRE Length", "gre.routing.src_length", - FT_UINT8, BASE_DEC, NULL, 0x0, - "The SRE Length field contains the number of octets in the SRE", HFILL }}, - { &hf_gre_routing_information, - { "Routing Information", "gre.routing.information", - FT_BYTES, BASE_NONE, NULL, 0x0, - "The Routing Information field contains data which may be used in routing this packet", HFILL }}, - { &hf_gre_3ggp2_attrib, - { "3GGP2 Attributes", "gre.ggp2_attrib", - FT_NONE, BASE_NONE, NULL, 0x0, - NULL, HFILL }}, - { &hf_gre_3ggp2_attrib_id, - { "Type", "gre.ggp2_attrib_id", - FT_UINT8, BASE_HEX, VALS(gre_3ggp2_attrib_id_vals), 0x7f, - NULL, HFILL }}, - { &hf_gre_3ggp2_attrib_length, - { "Length", "gre.ggp2_attrib_length", - FT_UINT8, BASE_HEX, NULL, 0x0, - NULL, HFILL }}, - { &hf_gre_3ggp2_sdi, - { "SDI/DOS", "gre.3ggp2_sdi", - FT_BOOLEAN, 16, TFS(&gre_3ggp2_sdi_val), 0x8000, - "Short Data Indicator(SDI)/Data Over Signaling (DOS)", HFILL }}, - { &hf_gre_3ggp2_fci, - { "Flow Control Indicator", "gre.3ggp2_fci", - FT_BOOLEAN, 16, TFS(&gre_3ggp2_fci_val), 0x8000, - NULL, HFILL }}, - { &hf_gre_3ggp2_di, - { "Duration Indicator", "gre.3ggp2_di", - FT_BOOLEAN, 16, TFS(&gre_3ggp2_di_val), 0x4000, - NULL, HFILL }}, - { &hf_gre_3ggp2_flow_disc, - { "Flow ID", "gre.ggp2_flow_disc", - FT_BYTES, BASE_NONE, NULL, 0x0, - NULL, HFILL }}, - { &hf_gre_3ggp2_seg, - { "Type", "gre.ggp2_3ggp2_seg", - FT_UINT16, BASE_HEX, VALS(gre_3ggp2_seg_vals), 0xc000, - NULL, HFILL }}, - - { &hf_gre_wccp_redirect_header, - { "Redirect Header", "gre.wccp.redirect_header", - FT_NONE, BASE_NONE, NULL, 0x0, - NULL, HFILL }}, - { &hf_gre_wccp_dynamic_service, - { "Dynamic Service", "gre.wccp.dynamic_service", - FT_BOOLEAN, 8, TFS(&gre_wccp_dynamic_service_val), 0x80, - NULL, HFILL }}, - { &hf_gre_wccp_alternative_bucket_used, - { "Alternative bucket used", "gre.wccp.alternative_bucket_used", - FT_BOOLEAN, 8, TFS(&gre_wccp_alternative_bucket_used_val), 0x40, - NULL, HFILL }}, - { &hf_gre_wccp_service_id, - { "Service ID", "gre.wccp.service_id", - FT_UINT8, BASE_DEC, VALS(service_id_vals), 0x00, - "Service Group identifier", HFILL }}, - { &hf_gre_wccp_alternative_bucket, - { "Alternative Bucket", "gre.wccp.alternative_bucket", - FT_UINT8, BASE_DEC, NULL, 0x0, - "Alternative bucket index used to redirect the packet.", HFILL }}, - { &hf_gre_wccp_primary_bucket, - { "Primary Bucket", "gre.wccp.primary_bucket", - FT_UINT8, BASE_DEC, NULL, 0x0, - "Primary bucket index used to redirect the packet.", HFILL }}, - - }; - static gint *ett[] = { - &ett_gre, - &ett_gre_flags, - &ett_gre_routing, - &ett_gre_wccp2_redirect_header, - &ett_3gpp2_attribs, - &ett_3gpp2_attr, - }; - - proto_gre = proto_register_protocol("Generic Routing Encapsulation", - "GRE", "gre"); - proto_register_field_array(proto_gre, hf, array_length(hf)); - proto_register_subtree_array(ett, array_length(ett)); - - /* subdissector code */ - gre_dissector_table = register_dissector_table("gre.proto", - "GRE protocol type", FT_UINT16, BASE_HEX); + { &hf_gre_proto, + { "Protocol Type", "gre.proto", + FT_UINT16, BASE_HEX, VALS(gre_typevals), 0x0, + "The protocol that is GRE encapsulated", HFILL } + }, + { &hf_gre_flags_and_version, + { "Flags and Version", "gre.flags_and_version", + FT_UINT16, BASE_HEX, NULL, 0x0, + "The GRE flags are encoded in the first two octets", HFILL } + }, + { &hf_gre_flags_checksum, + { "Checksum Bit", "gre.flags.checksum", + FT_BOOLEAN, 16, TFS(&tfs_yes_no), GRE_CHECKSUM, + "Indicates if the Checksum field is present", HFILL } + }, + { &hf_gre_flags_routing, + { "Routing Bit", "gre.flags.routing", + FT_BOOLEAN, 16, TFS(&tfs_yes_no), GRE_ROUTING, + "Indicates if the Routing and Checksum/Offset field are present", HFILL } + }, + { &hf_gre_flags_key, + { "Key Bit", "gre.flags.key", + FT_BOOLEAN, 16, TFS(&tfs_yes_no), GRE_KEY, + "Indicates if the Key field is present", HFILL } + }, + { &hf_gre_flags_sequence_number, + { "Sequence Number Bit", "gre.flags.sequence_number", + FT_BOOLEAN, 16, TFS(&tfs_yes_no), GRE_SEQUENCE, + "Indicates if the Sequence Number field is present", HFILL } + }, + { &hf_gre_flags_strict_source_route, + { "Strict Source Route Bit", "gre.flags.strict_source_route", + FT_BOOLEAN, 16, TFS(&tfs_yes_no), GRE_STRICTSOURCE, + NULL, HFILL } + }, + { &hf_gre_flags_recursion_control, + { "Recursion control", "gre.flags.recursion_control", + FT_UINT16, BASE_DEC, NULL, GRE_RECURSION, + NULL, HFILL } + }, + { &hf_gre_flags_ack, + { "Acknowledgment", "gre.flags.ack", + FT_BOOLEAN, 16, TFS(&tfs_yes_no), GRE_ACK, + "Indicates if the packet packet contains Acknowledgment Number to be used for acknowledging previously transmitted data", HFILL } + }, + { &hf_gre_flags_reserved, + { "Flags (Reserved)", "gre.flags.reserved", + FT_UINT16, BASE_DEC, NULL, GRE_RESERVED, + NULL, HFILL } + }, + { &hf_gre_flags_reserved_ppp, + { "Flags (Reserved)", "gre.flags.reserved", + FT_UINT16, BASE_DEC, NULL, GRE_RESERVED_PPP, + NULL, HFILL } + }, + { &hf_gre_flags_version, + { "Version", "gre.flags.version", + FT_UINT16, BASE_DEC, VALS(gre_version), GRE_VERSION, + NULL, HFILL } + }, + { &hf_gre_checksum, + { "Checksum", "gre.checksum", + FT_UINT16, BASE_HEX, NULL, 0x0, + "The Checksum field contains the IP (one's complement) checksum of the GRE header and the payload packet", HFILL } + }, + { &hf_gre_offset, + { "Offset", "gre.offset", + FT_UINT16, BASE_DEC, NULL, 0x0, + "The offset field indicates the octet offset from the start of the Routing field to the first octet of the active Source Route Entry to be examined", HFILL } + }, + { &hf_gre_key, + { "Key", "gre.key", + FT_UINT32, BASE_HEX, NULL, 0x0, + "The Key field contains a four octet number which was inserted by the encapsulator", HFILL } + }, + { &hf_gre_key_payload_length, + { "Payload Length", "gre.key.payload_length", + FT_UINT16, BASE_DEC, NULL, 0x0, + "Size of the payload, not including the GRE header", HFILL } + }, + { &hf_gre_key_call_id, + { "Call ID", "gre.key.call_id", + FT_UINT16, BASE_DEC, NULL, 0x0, + "Contains the Peer's Call ID for the session to which this packet belongs.", HFILL } + }, + { &hf_gre_sequence_number, + { "Sequence Number", "gre.sequence_number", + FT_UINT32, BASE_DEC, NULL, 0x0, + "The Sequence Number field contains an unsigned 32 bit integer which is inserted by the encapsulator", HFILL } + }, + { &hf_gre_ack_number, + { "Acknowledgment Number", "gre.ack_number", + FT_UINT32, BASE_DEC, NULL, 0x0, + "Contains the sequence number of the highest numbered GRE packet received by the sending peer for this user session", HFILL } + }, + { &hf_gre_routing, + { "Routing", "gre.routing", + FT_NONE, BASE_NONE, NULL, 0x0, + "The Routing field is a list of Source Route Entries (SREs)", HFILL } + }, + { &hf_gre_routing_address_family, + { "Address Family", "gre.routing.address_family", + FT_UINT16, BASE_DEC, NULL, 0x0, + "The Address Family field contains a two octet value which indicates the syntax and semantics of the Routing Information field", HFILL } + }, + { &hf_gre_routing_sre_offset, + { "SRE Offset", "gre.routing.sre_offset", + FT_UINT8, BASE_DEC, NULL, 0x0, + "The Address Family field contains a two octet value which indicates the syntax and semantics of the Routing Information field", HFILL } + }, + { &hf_gre_routing_sre_length, + { "SRE Length", "gre.routing.src_length", + FT_UINT8, BASE_DEC, NULL, 0x0, + "The SRE Length field contains the number of octets in the SRE", HFILL } + }, + { &hf_gre_routing_information, + { "Routing Information", "gre.routing.information", + FT_BYTES, BASE_NONE, NULL, 0x0, + "The Routing Information field contains data which may be used in routing this packet", HFILL } + }, + { &hf_gre_3ggp2_attrib, + { "3GGP2 Attributes", "gre.ggp2_attrib", + FT_NONE, BASE_NONE, NULL, 0x0, + NULL, HFILL } + }, + { &hf_gre_3ggp2_attrib_id, + { "Type", "gre.ggp2_attrib_id", + FT_UINT8, BASE_HEX, VALS(gre_3ggp2_attrib_id_vals), 0x7f, + NULL, HFILL } + }, + { &hf_gre_3ggp2_attrib_length, + { "Length", "gre.ggp2_attrib_length", + FT_UINT8, BASE_HEX, NULL, 0x0, + NULL, HFILL } + }, + { &hf_gre_3ggp2_sdi, + { "SDI/DOS", "gre.3ggp2_sdi", + FT_BOOLEAN, 16, TFS(&gre_3ggp2_sdi_val), 0x8000, + "Short Data Indicator(SDI)/Data Over Signaling (DOS)", HFILL } + }, + { &hf_gre_3ggp2_fci, + { "Flow Control Indicator", "gre.3ggp2_fci", + FT_BOOLEAN, 16, TFS(&gre_3ggp2_fci_val), 0x8000, + NULL, HFILL } + }, + { &hf_gre_3ggp2_di, + { "Duration Indicator", "gre.3ggp2_di", + FT_BOOLEAN, 16, TFS(&gre_3ggp2_di_val), 0x4000, + NULL, HFILL } + }, + { &hf_gre_3ggp2_flow_disc, + { "Flow ID", "gre.ggp2_flow_disc", + FT_BYTES, BASE_NONE, NULL, 0x0, + NULL, HFILL } + }, + { &hf_gre_3ggp2_seg, + { "Type", "gre.ggp2_3ggp2_seg", + FT_UINT16, BASE_HEX, VALS(gre_3ggp2_seg_vals), 0xc000, + NULL, HFILL } + }, + + { &hf_gre_wccp_redirect_header, + { "Redirect Header", "gre.wccp.redirect_header", + FT_NONE, BASE_NONE, NULL, 0x0, + NULL, HFILL } + }, + { &hf_gre_wccp_dynamic_service, + { "Dynamic Service", "gre.wccp.dynamic_service", + FT_BOOLEAN, 8, TFS(&gre_wccp_dynamic_service_val), 0x80, + NULL, HFILL } + }, + { &hf_gre_wccp_alternative_bucket_used, + { "Alternative bucket used", "gre.wccp.alternative_bucket_used", + FT_BOOLEAN, 8, TFS(&gre_wccp_alternative_bucket_used_val), 0x40, + NULL, HFILL } + }, + { &hf_gre_wccp_service_id, + { "Service ID", "gre.wccp.service_id", + FT_UINT8, BASE_DEC, VALS(service_id_vals), 0x00, + "Service Group identifier", HFILL } + }, + { &hf_gre_wccp_alternative_bucket, + { "Alternative Bucket", "gre.wccp.alternative_bucket", + FT_UINT8, BASE_DEC, NULL, 0x0, + "Alternative bucket index used to redirect the packet.", HFILL } + }, + { &hf_gre_wccp_primary_bucket, + { "Primary Bucket", "gre.wccp.primary_bucket", + FT_UINT8, BASE_DEC, NULL, 0x0, + "Primary bucket index used to redirect the packet.", HFILL } + }, + }; + static gint *ett[] = { + &ett_gre, + &ett_gre_flags, + &ett_gre_routing, + &ett_gre_wccp2_redirect_header, + &ett_3gpp2_attribs, + &ett_3gpp2_attr, + }; + + proto_gre = proto_register_protocol("Generic Routing Encapsulation", + "GRE", "gre"); + proto_register_field_array(proto_gre, hf, array_length(hf)); + proto_register_subtree_array(ett, array_length(ett)); + + /* subdissector code */ + gre_dissector_table = register_dissector_table("gre.proto", + "GRE protocol type", FT_UINT16, BASE_HEX); } void proto_reg_handoff_gre(void) { - dissector_handle_t gre_handle; + dissector_handle_t gre_handle; - gre_handle = create_dissector_handle(dissect_gre, proto_gre); - dissector_add_uint("ip.proto", IP_PROTO_GRE, gre_handle); - data_handle = find_dissector("data"); + gre_handle = create_dissector_handle(dissect_gre, proto_gre); + dissector_add_uint("ip.proto", IP_PROTO_GRE, gre_handle); + data_handle = find_dissector("data"); } diff --git a/epan/dissectors/packet-gsm_a_gm.c b/epan/dissectors/packet-gsm_a_gm.c index 3bcb7a67f3..157802a21a 100644 --- a/epan/dissectors/packet-gsm_a_gm.c +++ b/epan/dissectors/packet-gsm_a_gm.c @@ -446,7 +446,7 @@ de_gmm_attach_res(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint proto_tree_add_item(tree, hf_gsm_a_gm_res_of_attach, tvb, offset, 1, ENC_BIG_ENDIAN); /* no length check possible */ - return(1); + return (1); } /* @@ -462,8 +462,8 @@ static const value_string gsm_a_gm_type_of_attach_vals[] = { static guint16 de_gmm_attach_type(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32 offset, guint len _U_, gchar *add_string _U_, int string_len _U_) { - proto_item *tf = NULL; - proto_tree *tf_tree = NULL; + proto_item *tf; + proto_tree *tf_tree; proto_tree_add_bits_item(tree, hf_gsm_a_gm_ciph_key_seq_num, tvb, offset << 3, 4, ENC_BIG_ENDIAN); @@ -471,13 +471,13 @@ de_gmm_attach_type(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guin tvb, offset, 1, "Attach Type"); - tf_tree = proto_item_add_subtree(tf, ett_gmm_attach_type ); + tf_tree = proto_item_add_subtree(tf, ett_gmm_attach_type); proto_tree_add_item(tf_tree, hf_gsm_a_gm_for, tvb, offset, 1, ENC_BIG_ENDIAN); proto_tree_add_item(tf_tree, hf_gsm_a_gm_type_of_attach, tvb, offset, 1, ENC_BIG_ENDIAN); /* no length check possible */ - return(1); + return (1); } /* @@ -502,7 +502,7 @@ de_gmm_ciph_alg(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32 proto_tree_add_item(tree, hf_gsm_a_gm_type_of_ciph_alg, tvb, offset, 1, ENC_BIG_ENDIAN); /* no length check possible */ - return(1); + return (1); } /* @@ -520,7 +520,7 @@ de_gmm_tmsi_stat(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint3 proto_tree_add_item(tree, hf_gsm_a_gm_tmsi_flag, tvb, offset, 1, ENC_BIG_ENDIAN); /* no length check possible */ - return(1); + return (1); } /* @@ -529,36 +529,36 @@ de_gmm_tmsi_stat(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint3 static guint16 de_gmm_detach_type(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32 offset, guint len _U_, gchar *add_string _U_, int string_len _U_) { - guint8 oct; - guint32 curr_offset; - const gchar *str; - const gchar *str_power; - proto_item *tf = NULL; - proto_tree *tf_tree = NULL; + guint8 oct; + guint32 curr_offset; + const gchar *str; + const gchar *str_power; + proto_item *tf; + proto_tree *tf_tree; curr_offset = offset; oct = tvb_get_guint8(tvb, curr_offset); - switch(oct&7) + switch (oct&7) { - case 1: str="GPRS detach/re-attach required"; break; - case 2: str="IMSI detach/re-attach not required"; break; - case 3: str="Combined GPRS/IMSI detach/IMSI detach (after VLR failure)"; break; - default: str="Combined GPRS/IMSI detach/re-attach not required"; + case 1: str = "GPRS detach/re-attach required"; break; + case 2: str = "IMSI detach/re-attach not required"; break; + case 3: str = "Combined GPRS/IMSI detach/IMSI detach (after VLR failure)"; break; + default: str = "Combined GPRS/IMSI detach/re-attach not required"; } - switch(oct&8) + switch (oct&8) { - case 8: str_power="power switched off"; break; - default: str_power="normal detach"; break; + case 8: str_power = "power switched off"; break; + default: str_power = "normal detach"; break; } tf = proto_tree_add_text(tree, tvb, curr_offset, 1, "Detach Type"); - tf_tree = proto_item_add_subtree(tf, ett_gmm_detach_type ); + tf_tree = proto_item_add_subtree(tf, ett_gmm_detach_type); proto_tree_add_text(tf_tree, tvb, curr_offset, 1, @@ -576,7 +576,7 @@ de_gmm_detach_type(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guin /* no length check possible */ - return(curr_offset - offset); + return (curr_offset - offset); } /* @@ -586,7 +586,7 @@ de_gmm_detach_type(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guin * 0 Split pg cycle on CCCH is not supported by the mobile station * 1 Split pg cycle on CCCH is supported by the mobile station */ -static const true_false_string gsm_a_gmm_split_on_ccch_value = { +static const true_false_string gsm_a_gmm_split_on_ccch_value = { "Split pg cycle on CCCH is supported by the mobile station", "Split pg cycle on CCCH is not supported by the mobile station" }; @@ -635,11 +635,11 @@ static const range_string gsm_a_gmm_cn_spec_drs_cycle_len_coef_strings[] = { guint16 de_gmm_drx_param(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32 offset, guint len _U_, gchar *add_string _U_, int string_len _U_) { - guint8 oct; - guint32 curr_offset; - const gchar *str; - proto_item *tf = NULL; - proto_tree *tf_tree = NULL; + guint8 oct; + guint32 curr_offset; + const gchar *str; + proto_item *tf; + proto_tree *tf_tree; curr_offset = offset; @@ -647,48 +647,48 @@ de_gmm_drx_param(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint3 tvb, curr_offset, 2, "DRX Parameter"); - tf_tree = proto_item_add_subtree(tf, ett_gmm_drx ); + tf_tree = proto_item_add_subtree(tf, ett_gmm_drx); oct = tvb_get_guint8(tvb, curr_offset); - switch(oct) + switch (oct) { - case 0: str="704"; break; - case 65: str="71"; break; - case 66: str="72"; break; - case 67: str="74"; break; - case 68: str="75"; break; - case 69: str="77"; break; - case 70: str="79"; break; - case 71: str="80"; break; - case 72: str="83"; break; - case 73: str="86"; break; - case 74: str="88"; break; - case 75: str="90"; break; - case 76: str="92"; break; - case 77: str="96"; break; - case 78: str="101"; break; - case 79: str="103"; break; - case 80: str="107"; break; - case 81: str="112"; break; - case 82: str="116"; break; - case 83: str="118"; break; - case 84: str="128"; break; - case 85: str="141"; break; - case 86: str="144"; break; - case 87: str="150"; break; - case 88: str="160"; break; - case 89: str="171"; break; - case 90: str="176"; break; - case 91: str="192"; break; - case 92: str="214"; break; - case 93: str="224"; break; - case 94: str="235"; break; - case 95: str="256"; break; - case 96: str="288"; break; - case 97: str="320"; break; - case 98: str="352"; break; - default: str="Reserved, interpreted as 1"; + case 0: str = "704"; break; + case 65: str = "71"; break; + case 66: str = "72"; break; + case 67: str = "74"; break; + case 68: str = "75"; break; + case 69: str = "77"; break; + case 70: str = "79"; break; + case 71: str = "80"; break; + case 72: str = "83"; break; + case 73: str = "86"; break; + case 74: str = "88"; break; + case 75: str = "90"; break; + case 76: str = "92"; break; + case 77: str = "96"; break; + case 78: str = "101"; break; + case 79: str = "103"; break; + case 80: str = "107"; break; + case 81: str = "112"; break; + case 82: str = "116"; break; + case 83: str = "118"; break; + case 84: str = "128"; break; + case 85: str = "141"; break; + case 86: str = "144"; break; + case 87: str = "150"; break; + case 88: str = "160"; break; + case 89: str = "171"; break; + case 90: str = "176"; break; + case 91: str = "192"; break; + case 92: str = "214"; break; + case 93: str = "224"; break; + case 94: str = "235"; break; + case 95: str = "256"; break; + case 96: str = "288"; break; + case 97: str = "320"; break; + case 98: str = "352"; break; + default: str = "Reserved, interpreted as 1"; } proto_tree_add_text(tf_tree, @@ -706,7 +706,7 @@ de_gmm_drx_param(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint3 /* no length check possible */ - return(curr_offset - offset); + return (curr_offset - offset); } /* @@ -730,7 +730,7 @@ de_gmm_ftostby(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32 proto_tree_add_bits_item(tree, hf_gsm_a_gm_force_to_standby, tvb, bit_offset + 1, 3, ENC_BIG_ENDIAN); /* no length check possible */ - return(1); + return (1); } /* @@ -747,7 +747,7 @@ de_gmm_ftostby_h(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint3 proto_tree_add_bits_item(tree, hf_gsm_a_gm_force_to_standby, tvb, bit_offset + 1, 3, ENC_BIG_ENDIAN); /* no length check possible */ - return(1); + return (1); } /* @@ -756,19 +756,19 @@ de_gmm_ftostby_h(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint3 static guint16 de_gmm_ptmsi_sig(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32 offset, guint len _U_, gchar *add_string _U_, int string_len _U_) { - guint32 curr_offset; - proto_item *curr_item; + guint32 curr_offset; + proto_item *curr_item; curr_offset = offset; - curr_item= proto_tree_add_item(tree,hf_gsm_a_ptmsi_sig,tvb,curr_offset,3,ENC_BIG_ENDIAN); - proto_item_append_text(curr_item,"%s",add_string ? add_string : ""); + curr_item= proto_tree_add_item(tree, hf_gsm_a_ptmsi_sig, tvb, curr_offset, 3, ENC_BIG_ENDIAN); + proto_item_append_text(curr_item, "%s", add_string ? add_string : ""); - curr_offset+=3; + curr_offset += 3; /* no length check possible */ - return(curr_offset - offset); + return (curr_offset - offset); } /* @@ -777,18 +777,18 @@ de_gmm_ptmsi_sig(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint3 static guint16 de_gmm_ptmsi_sig2(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guint len, gchar *add_string, int string_len _U_) { - guint32 curr_offset; - proto_item *curr_item; + guint32 curr_offset; + proto_item *curr_item; curr_offset = offset; - curr_item= proto_tree_add_item(tree,hf_gsm_a_ptmsi_sig2,tvb,curr_offset,3,ENC_BIG_ENDIAN); - proto_item_append_text(curr_item,"%s",add_string ? add_string : ""); - curr_offset+=3; + curr_item= proto_tree_add_item(tree, hf_gsm_a_ptmsi_sig2, tvb, curr_offset, 3, ENC_BIG_ENDIAN); + proto_item_append_text(curr_item, "%s", add_string ? add_string : ""); + curr_offset += 3; EXTRANEOUS_DATA_CHECK_EXPERT(len, curr_offset - offset, pinfo); - return(curr_offset - offset); + return (curr_offset - offset); } /* @@ -809,7 +809,7 @@ de_gmm_ident_type2(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guin proto_tree_add_item(tree, hf_gsm_a_gm_type_of_identity, tvb, offset, 1, ENC_BIG_ENDIAN); /* no length check possible */ - return(1); + return (1); } /* @@ -833,7 +833,7 @@ de_gmm_imeisv_req(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint proto_tree_add_bits_item(tree, hf_gsm_a_gm_imeisv_req, tvb, bit_offset + 1, 3, ENC_BIG_ENDIAN); /* no length check possible */ - return(1); + return (1); } /* @@ -845,19 +845,19 @@ de_gmm_rec_npdu_lst(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 guint32 curr_offset; guint curr_len; - curr_len = len; + curr_len = len; curr_offset = offset; - if ( len == 0 ) return 0; + if (len == 0) return 0; do { guint32 oct; oct = tvb_get_guint8(tvb, curr_offset); - oct <<=8; + oct <<= 8; oct |= tvb_get_guint8(tvb, curr_offset+1); curr_len -= 2; - oct <<=8; + oct <<= 8; proto_tree_add_text(tree, tvb, curr_offset, 2, @@ -865,9 +865,9 @@ de_gmm_rec_npdu_lst(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 oct>>20, (oct>>12)&0xff, (oct>>12)&0xff); - curr_offset+= 2; + curr_offset += 2; - if ( curr_len > 2 ) + if (curr_len > 2) { oct |= tvb_get_guint8(tvb, curr_offset+2); curr_len--; @@ -882,11 +882,11 @@ de_gmm_rec_npdu_lst(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 curr_offset++; } - } while ( curr_len > 1 ); + } while (curr_len > 1); EXTRANEOUS_DATA_CHECK_EXPERT(len, curr_offset - offset, pinfo); - return(curr_offset - offset); + return (curr_offset - offset); } /* @@ -978,9 +978,9 @@ static const true_false_string gsm_a_gmm_net_cap_nf_vals = { guint16 de_gmm_ms_net_cap(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guint len, gchar *add_string _U_, int string_len _U_) { - guint32 curr_offset; - proto_tree *subtree; - proto_item *item; + guint32 curr_offset; + proto_tree *subtree; + proto_item *item; curr_offset = offset; @@ -1054,20 +1054,20 @@ de_gmm_ms_net_cap(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 o curr_offset++; EXTRANEOUS_DATA_CHECK_EXPERT(len, curr_offset - offset, pinfo); - return(curr_offset - offset); + return (curr_offset - offset); } /* * [7] 10.5.5.12a */ #define GET_DATA /* check if we have enough bits left */ \ - if ( curr_bits_length < bits_needed ) \ + if (curr_bits_length < bits_needed) \ continue; \ /* check if oct has enough bits */ \ - if ( bits_in_oct < bits_needed ) \ + if (bits_in_oct < bits_needed) \ { \ guint32 tmp_oct; \ - if ( curr_len == 0 ) \ + if (curr_len == 0) \ { \ proto_tree_add_text(tf_tree, \ tvb, curr_offset, 1, \ @@ -1077,7 +1077,7 @@ de_gmm_ms_net_cap(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 o oct |= tmp_oct<<(32-8-bits_in_oct); \ curr_len--; \ curr_offset++; \ - if ( bits_in_oct != 0 ) \ + if (bits_in_oct != 0) \ add_ocetets = 1; \ else \ add_ocetets = 0; \ @@ -1278,13 +1278,14 @@ de_gmm_ms_radio_acc_cap(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, gui guint value; const gchar *str; guint indx = 0; - guchar dtm_gprs_mslot = 0; - guchar dtm_egprs_mslot = 4; + + guchar dtm_gprs_mslot = 0; + guchar dtm_egprs_mslot = 4; gboolean finished = TRUE; - curr_len = len; + curr_len = len; curr_offset = offset; - bit_offset = offset<<3; + bit_offset = offset<<3; bits_in_oct = 0; oct = 0; @@ -1293,7 +1294,7 @@ de_gmm_ms_radio_acc_cap(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, gui do { /* check for a new round */ - if (( curr_len*8 + bits_in_oct ) < 11 ) + if ((curr_len*8 + bits_in_oct) < 11) break; /* now read the first 11 bits */ @@ -1301,20 +1302,20 @@ de_gmm_ms_radio_acc_cap(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, gui /* * */ - if ( curr_len != len ) + if (curr_len != len) { bits_needed = 1; GET_DATA; - if (( oct>>(32-bits_needed) ) != 1 ) + if ((oct>>(32-bits_needed)) != 1) { break; } - oct <<= bits_needed; - bits_in_oct -= bits_needed; + oct <<= bits_needed; + bits_in_oct -= bits_needed; bit_offset++; - if (( curr_len*8 + bits_in_oct ) < 11 ) + if ((curr_len*8 + bits_in_oct) < 11) break; curr_bits_length = 11; } @@ -1322,9 +1323,9 @@ de_gmm_ms_radio_acc_cap(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, gui indx++; tf = proto_tree_add_text(tree, tvb, curr_offset, 1, - "MS RA capability %d",indx); + "MS RA capability %d", indx); - tf_tree = proto_item_add_subtree(tf, ett_gmm_radio_cap ); + tf_tree = proto_item_add_subtree(tf, ett_gmm_radio_cap); /* * Access Technology @@ -1335,11 +1336,11 @@ de_gmm_ms_radio_acc_cap(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, gui acc_type = oct>>(32-bits_needed); proto_tree_add_bits_item(tf_tree, hf_gsm_a_gm_acc_tech_type, tvb, bit_offset, 4, ENC_BIG_ENDIAN); - bit_offset+=4; + bit_offset += 4; - curr_bits_length -= bits_needed; - oct <<= bits_needed; - bits_in_oct -= bits_needed; + curr_bits_length -= bits_needed; + oct <<= bits_needed; + bits_in_oct -= bits_needed; /* < Access capabilities struct > ::= */ /* @@ -1355,11 +1356,11 @@ de_gmm_ms_radio_acc_cap(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, gui /* This is already done - length doesn't contain this field curr_bits_length -= bits_needed; */ - bit_offset+=7; - oct <<= bits_needed; - bits_in_oct -= bits_needed; + bit_offset += 7; + oct <<= bits_needed; + bits_in_oct -= bits_needed; - if ( acc_type == 0x0f ) + if (acc_type == 0x0f) { do { @@ -1375,37 +1376,37 @@ de_gmm_ms_radio_acc_cap(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, gui GET_DATA; /* analyse bits */ - switch ( oct>>(32-bits_needed) ) + switch (oct>>(32-bits_needed)) { - case 0x00: str="Not Present"; finished = TRUE; break; - case 0x01: str="Present"; finished = FALSE; break; - default: str="This should not happen"; + case 0x00: str = "Not Present"; finished = TRUE; break; + case 0x01: str = "Present"; finished = FALSE; break; + default: str = "This should not happen"; } proto_tree_add_text(tf_tree, tvb, curr_offset-1-add_ocetets, 1+add_ocetets, "Presence: %s (%u)", str, oct>>(32-bits_needed)); bit_offset++; - curr_bits_length -= bits_needed; - oct <<= bits_needed; - bits_in_oct -= bits_needed; + curr_bits_length -= bits_needed; + oct <<= bits_needed; + bits_in_oct -= bits_needed; if (finished) { /* * No more valid data, get spare bits if any */ - while ( curr_bits_length > 0 ) + while (curr_bits_length > 0) { - if ( curr_bits_length > 8 ) + if (curr_bits_length > 8) bits_needed = 8; else bits_needed = curr_bits_length; GET_DATA; - curr_bits_length -= bits_needed; - oct <<= bits_needed; - bits_in_oct -= bits_needed; - bit_offset+= bits_needed; + curr_bits_length -= bits_needed; + oct <<= bits_needed; + bits_in_oct -= bits_needed; + bit_offset += bits_needed; } continue; } @@ -1419,11 +1420,11 @@ de_gmm_ms_radio_acc_cap(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, gui acc_type = oct>>(32-bits_needed); proto_tree_add_bits_item(tf_tree, hf_gsm_a_gm_acc_cap_struct_len, tvb, bit_offset, 7, ENC_BIG_ENDIAN); - bit_offset+=4; + bit_offset += 4; - curr_bits_length -= bits_needed; - oct <<= bits_needed; - bits_in_oct -= bits_needed; + curr_bits_length -= bits_needed; + oct <<= bits_needed; + bits_in_oct -= bits_needed; /* * RF Power @@ -1433,30 +1434,30 @@ de_gmm_ms_radio_acc_cap(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, gui value = tvb_get_bits8(tvb, bit_offset, 3); /* analyse bits */ - if ( acc_type == 0x04 ) /* GSM 1900 */ + if (acc_type == 0x04) /* GSM 1900 */ { - switch ( value ) + switch (value) { - case 0x01: str="1 W (30 dBm)"; break; - case 0x02: str="0,25 W (24 dBm)"; break; - case 0x03: str="2 W (33 dBm)"; break; - default: str="Not specified"; + case 0x01: str = "1 W (30 dBm)"; break; + case 0x02: str = "0,25 W (24 dBm)"; break; + case 0x03: str = "2 W (33 dBm)"; break; + default: str = "Not specified"; } } - else if ( acc_type == 0x03 ) + else if (acc_type == 0x03) { /* * 3 GSM 1800 */ - switch ( value ) + switch (value) { - case 0x01: str="1 W (30 dBm)"; break; - case 0x02: str="0,25 W (24 dBm)"; break; - case 0x03: str="4 W (36 dBm)"; break; - default: str="Not specified"; + case 0x01: str = "1 W (30 dBm)"; break; + case 0x02: str = "0,25 W (24 dBm)"; break; + case 0x03: str = "4 W (36 dBm)"; break; + default: str = "Not specified"; } } - else if ( acc_type <= 0x08 ) + else if (acc_type <= 0x08) { /* 0 GSM P * 1 GSM E @@ -1466,26 +1467,26 @@ de_gmm_ms_radio_acc_cap(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, gui * 7 GSM 850 */ - switch ( value ) + switch (value) { - case 0x02: str="8 W (39 dBm)"; break; - case 0x03: str="5 W (37 dBm)"; break; - case 0x04: str="2 W (33 dBm)"; break; - case 0x05: str="0,8 W (29 dBm)"; break; - default: str="Not specified"; + case 0x02: str = "8 W (39 dBm)"; break; + case 0x03: str = "5 W (37 dBm)"; break; + case 0x04: str = "2 W (33 dBm)"; break; + case 0x05: str = "0,8 W (29 dBm)"; break; + default: str = "Not specified"; } } else - str="Not specified??"; + str = "Not specified??"; /* decode_bits_in_field(gint bit_offset, gint no_of_bits, guint64 value)*/ proto_tree_add_text(tf_tree, tvb, curr_offset-1-add_ocetets, 1+add_ocetets, "%s RF Power Capability, GMSK Power Class: %s (%u)", decode_bits_in_field(bit_offset, 3, value), str, value); - bit_offset+=3; - curr_bits_length -= bits_needed; - oct <<= bits_needed; - bits_in_oct -= bits_needed; + bit_offset += 3; + curr_bits_length -= bits_needed; + oct <<= bits_needed; + bits_in_oct -= bits_needed; /* * 8PSK Power Class @@ -1495,22 +1496,22 @@ de_gmm_ms_radio_acc_cap(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, gui value = tvb_get_bits8(tvb, bit_offset, 2); /* analyse bits */ - switch ( value ) + switch (value) { - case 0x00: str="8PSK modulation not supported for uplink"; break; - case 0x01: str="Power class E1"; break; - case 0x02: str="Power class E2"; break; - case 0x03: str="Power class E3"; break; - default: str="This should not happen"; + case 0x00: str = "8PSK modulation not supported for uplink"; break; + case 0x01: str = "Power class E1"; break; + case 0x02: str = "Power class E2"; break; + case 0x03: str = "Power class E3"; break; + default: str = "This should not happen"; } proto_tree_add_text(tf_tree, tvb, curr_offset-1-add_ocetets, 1+add_ocetets, - "8PSK Power Class: %s (%u)",str,value); - bit_offset+=2; - curr_bits_length -= bits_needed; - oct <<= bits_needed; - bits_in_oct -= bits_needed; + "8PSK Power Class: %s (%u)", str, value); + bit_offset += 2; + curr_bits_length -= bits_needed; + oct <<= bits_needed; + bits_in_oct -= bits_needed; } while (!finished); @@ -1525,48 +1526,48 @@ de_gmm_ms_radio_acc_cap(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, gui value = tvb_get_bits8(tvb, bit_offset, 3); /* analyse bits */ - if ( acc_type == 0x04 ) /* GSM 1900 */ + if (acc_type == 0x04) /* GSM 1900 */ { - switch ( value ) + switch (value) { - case 0x01: str="1 W (30 dBm)"; break; - case 0x02: str="0,25 W (24 dBm)"; break; - case 0x03: str="2 W (33 dBm)"; break; - default: str="Not specified"; + case 0x01: str = "1 W (30 dBm)"; break; + case 0x02: str = "0,25 W (24 dBm)"; break; + case 0x03: str = "2 W (33 dBm)"; break; + default: str = "Not specified"; } } - else if ( acc_type == 0x03 ) + else if (acc_type == 0x03) { - switch ( value ) + switch (value) { - case 0x01: str="1 W (30 dBm)"; break; - case 0x02: str="0,25 W (24 dBm)"; break; - case 0x03: str="4 W (36 dBm)"; break; - default: str="Not specified"; + case 0x01: str = "1 W (30 dBm)"; break; + case 0x02: str = "0,25 W (24 dBm)"; break; + case 0x03: str = "4 W (36 dBm)"; break; + default: str = "Not specified"; } } - else if ( acc_type <= 0x08 ) + else if (acc_type <= 0x08) { - switch ( value ) + switch (value) { - case 0x02: str="8 W (39 dBm)"; break; - case 0x03: str="5 W (37 dBm)"; break; - case 0x04: str="2 W (33 dBm)"; break; - case 0x05: str="0,8 W (29 dBm)"; break; - default: str="Not specified"; + case 0x02: str = "8 W (39 dBm)"; break; + case 0x03: str = "5 W (37 dBm)"; break; + case 0x04: str = "2 W (33 dBm)"; break; + case 0x05: str = "0,8 W (29 dBm)"; break; + default: str = "Not specified"; } } else - str="Not specified??"; + str = "Not specified??"; proto_tree_add_text(tf_tree, tvb, curr_offset-1-add_ocetets, 1+add_ocetets, - "%s RF Power Capability, GMSK Power Class: %s (%u)", decode_bits_in_field(bit_offset, 3, value),str,value); + "%s RF Power Capability, GMSK Power Class: %s (%u)", decode_bits_in_field(bit_offset, 3, value), str, value); - bit_offset+=3; - curr_bits_length -= bits_needed; - oct <<= bits_needed; - bits_in_oct -= bits_needed; + bit_offset += 3; + curr_bits_length -= bits_needed; + oct <<= bits_needed; + bits_in_oct -= bits_needed; /* * A5 Bits? @@ -1575,15 +1576,16 @@ de_gmm_ms_radio_acc_cap(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, gui GET_DATA; /* analyse bits */ - if ((oct>>(32-bits_needed))==0) + if ((oct>>(32-bits_needed)) == 0) { proto_tree_add_text(tf_tree, tvb, curr_offset-1-add_ocetets, 1+add_ocetets, - "A5 Bits: Same values apply for parameters as in the immediately preceding Access capabilities field within this IE (%u)",oct>>(32-bits_needed)); + "A5 Bits: Same values apply for parameters as in the immediately preceding Access capabilities field within this IE (%u)", + oct>>(32-bits_needed)); bit_offset++; - curr_bits_length -= bits_needed; - oct <<= bits_needed; - bits_in_oct -= bits_needed; + curr_bits_length -= bits_needed; + oct <<= bits_needed; + bits_in_oct -= bits_needed; } else { @@ -1591,14 +1593,14 @@ de_gmm_ms_radio_acc_cap(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, gui proto_tree_add_text(tf_tree, tvb, curr_offset-1-add_ocetets, 1+add_ocetets, - "A5 Bits: A5 bits follow (%u)",oct>>(32-bits_needed)); + "A5 Bits: A5 bits follow (%u)", oct>>(32-bits_needed)); bit_offset++; - curr_bits_length -= bits_needed; - oct <<= bits_needed; - bits_in_oct -= bits_needed; + curr_bits_length -= bits_needed; + oct <<= bits_needed; + bits_in_oct -= bits_needed; - for (i=1; i<= 7 ; i++ ) + for (i=1; i<=7 ; i++) { /* * A5 Bits decoding @@ -1607,20 +1609,20 @@ de_gmm_ms_radio_acc_cap(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, gui GET_DATA; /* analyse bits */ - switch ( oct>>(32-bits_needed) ) + switch (oct>>(32-bits_needed)) { - case 0x00: str="encryption algorithm not available"; break; - case 0x01: str="encryption algorithm available"; break; - default: str="This should not happen"; + case 0x00: str = "encryption algorithm not available"; break; + case 0x01: str = "encryption algorithm available"; break; + default: str = "This should not happen"; } proto_tree_add_text(tf_tree, tvb, curr_offset-1-add_ocetets, 1+add_ocetets, - "A5/%d: %s (%u)",i,str,oct>>(32-bits_needed)); + "A5/%d: %s (%u)", i, str, oct>>(32-bits_needed)); bit_offset++; - curr_bits_length -= bits_needed; - oct <<= bits_needed; - bits_in_oct -= bits_needed; + curr_bits_length -= bits_needed; + oct <<= bits_needed; + bits_in_oct -= bits_needed; } } @@ -1632,9 +1634,9 @@ de_gmm_ms_radio_acc_cap(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, gui proto_tree_add_bits_item(tf_tree, hf_gsm_a_gm_rac_ctrled_early_cm_sending, tvb, bit_offset, 1, ENC_BIG_ENDIAN); bit_offset++; - curr_bits_length -= bits_needed; - oct <<= bits_needed; - bits_in_oct -= bits_needed; + curr_bits_length -= bits_needed; + oct <<= bits_needed; + bits_in_oct -= bits_needed; /* * PS @@ -1644,9 +1646,9 @@ de_gmm_ms_radio_acc_cap(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, gui proto_tree_add_bits_item(tf_tree, hf_gsm_a_gm_rac_pseudo_sync, tvb, bit_offset, 1, ENC_BIG_ENDIAN); bit_offset++; - curr_bits_length -= bits_needed; - oct <<= bits_needed; - bits_in_oct -= bits_needed; + curr_bits_length -= bits_needed; + oct <<= bits_needed; + bits_in_oct -= bits_needed; /* * VGCS @@ -1656,9 +1658,9 @@ de_gmm_ms_radio_acc_cap(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, gui proto_tree_add_bits_item(tf_tree, hf_gsm_a_gm_rac_vgcs, tvb, bit_offset, 1, ENC_BIG_ENDIAN); bit_offset++; - curr_bits_length -= bits_needed; - oct <<= bits_needed; - bits_in_oct -= bits_needed; + curr_bits_length -= bits_needed; + oct <<= bits_needed; + bits_in_oct -= bits_needed; /* * VBS @@ -1668,9 +1670,9 @@ de_gmm_ms_radio_acc_cap(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, gui proto_tree_add_bits_item(tf_tree, hf_gsm_a_gm_rac_vbs, tvb, bit_offset, 1, ENC_BIG_ENDIAN); bit_offset++; - curr_bits_length -= bits_needed; - oct <<= bits_needed; - bits_in_oct -= bits_needed; + curr_bits_length -= bits_needed; + oct <<= bits_needed; + bits_in_oct -= bits_needed; /* * Multislot capability? @@ -1683,12 +1685,12 @@ de_gmm_ms_radio_acc_cap(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, gui mc_item = proto_tree_add_bits_item(tf_tree, hf_gsm_a_gm_rac_multislot_capability, tvb, bit_offset, 1, ENC_BIG_ENDIAN); bit_offset++; - curr_bits_length -= bits_needed; - oct <<= bits_needed; - bits_in_oct -= bits_needed; + curr_bits_length -= bits_needed; + oct <<= bits_needed; + bits_in_oct -= bits_needed; /* analyse bits */ - if (value==1) + if (value == 1) { mc_tree = proto_item_add_subtree(mc_item, ett_gsm_a_gm_msrac_multislot_capability); /* @@ -1698,21 +1700,21 @@ de_gmm_ms_radio_acc_cap(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, gui GET_DATA; /* analyse bits */ - if ((oct>>(32-bits_needed))==0) + if ((oct>>(32-bits_needed)) == 0) { proto_tree_add_text(mc_tree, tvb, curr_offset-1-add_ocetets, 1+add_ocetets, - "HSCSD multislot class: Bits are not available (%u)",oct>>(32-bits_needed)); + "HSCSD multislot class: Bits are not available (%u)", oct>>(32-bits_needed)); bit_offset++; - curr_bits_length -= bits_needed; - oct <<= bits_needed; - bits_in_oct -= bits_needed; + curr_bits_length -= bits_needed; + oct <<= bits_needed; + bits_in_oct -= bits_needed; } else { - curr_bits_length -= bits_needed; - oct <<= bits_needed; - bits_in_oct -= bits_needed; + curr_bits_length -= bits_needed; + oct <<= bits_needed; + bits_in_oct -= bits_needed; bit_offset++; /* @@ -1722,10 +1724,10 @@ de_gmm_ms_radio_acc_cap(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, gui GET_DATA; proto_tree_add_bits_item(tf_tree, hf_gsm_a_gm_rac_hscsd_multi_slot_class, tvb, bit_offset, 5, ENC_BIG_ENDIAN); - bit_offset+=5; - curr_bits_length -= bits_needed; - oct <<= bits_needed; - bits_in_oct -= bits_needed; + bit_offset += 5; + curr_bits_length -= bits_needed; + oct <<= bits_needed; + bits_in_oct -= bits_needed; } /* @@ -1735,21 +1737,21 @@ de_gmm_ms_radio_acc_cap(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, gui GET_DATA; /* analyse bits */ - if ((oct>>(32-bits_needed))==0) + if ((oct>>(32-bits_needed)) == 0) { proto_tree_add_text(mc_tree, tvb, curr_offset-1-add_ocetets, 1+add_ocetets, - "GPRS multislot class: Bits are not available (%u)",oct>>(32-bits_needed)); + "GPRS multislot class: Bits are not available (%u)", oct>>(32-bits_needed)); bit_offset++; - curr_bits_length -= bits_needed; - oct <<= bits_needed; - bits_in_oct -= bits_needed; + curr_bits_length -= bits_needed; + oct <<= bits_needed; + bits_in_oct -= bits_needed; } else { - curr_bits_length -= bits_needed; - oct <<= bits_needed; - bits_in_oct -= bits_needed; + curr_bits_length -= bits_needed; + oct <<= bits_needed; + bits_in_oct -= bits_needed; bit_offset++; /* @@ -1759,10 +1761,10 @@ de_gmm_ms_radio_acc_cap(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, gui GET_DATA; proto_tree_add_bits_item(tf_tree, hf_gsm_a_gm_rac_gprs_multi_slot_class, tvb, bit_offset, 5, ENC_BIG_ENDIAN); - bit_offset+=5; - curr_bits_length -= bits_needed; - oct <<= bits_needed; - bits_in_oct -= bits_needed; + bit_offset += 5; + curr_bits_length -= bits_needed; + oct <<= bits_needed; + bits_in_oct -= bits_needed; /* * GPRS Extended Dynamic Allocation Capability @@ -1772,9 +1774,9 @@ de_gmm_ms_radio_acc_cap(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, gui proto_tree_add_bits_item(tf_tree, hf_gsm_a_gm_rac_gprs_ext_dyn_alloc_cap, tvb, bit_offset, 1, ENC_BIG_ENDIAN); bit_offset++; - curr_bits_length -= bits_needed; - oct <<= bits_needed; - bits_in_oct -= bits_needed; + curr_bits_length -= bits_needed; + oct <<= bits_needed; + bits_in_oct -= bits_needed; } /* @@ -1784,21 +1786,21 @@ de_gmm_ms_radio_acc_cap(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, gui GET_DATA; /* analyse bits */ - if ((oct>>(32-bits_needed))==0) + if ((oct>>(32-bits_needed)) == 0) { proto_tree_add_text(mc_tree, tvb, curr_offset-1-add_ocetets, 1+add_ocetets, - "SMS/SM values: Bits are not available (%u)",oct>>(32-bits_needed)); + "SMS/SM values: Bits are not available (%u)", oct>>(32-bits_needed)); bit_offset++; - curr_bits_length -= bits_needed; - oct <<= bits_needed; - bits_in_oct -= bits_needed; + curr_bits_length -= bits_needed; + oct <<= bits_needed; + bits_in_oct -= bits_needed; } else { - curr_bits_length -= bits_needed; - oct <<= bits_needed; - bits_in_oct -= bits_needed; + curr_bits_length -= bits_needed; + oct <<= bits_needed; + bits_in_oct -= bits_needed; bit_offset++; /* @@ -1809,10 +1811,10 @@ de_gmm_ms_radio_acc_cap(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, gui /* analyse bits */ proto_tree_add_bits_item(mc_tree, hf_gsm_a_gm_sms_value, tvb, bit_offset, 4, ENC_BIG_ENDIAN); - bit_offset+=4; - curr_bits_length -= bits_needed; - oct <<= bits_needed; - bits_in_oct -= bits_needed; + bit_offset += 4; + curr_bits_length -= bits_needed; + oct <<= bits_needed; + bits_in_oct -= bits_needed; /* * Switch-Measure value @@ -1822,10 +1824,10 @@ de_gmm_ms_radio_acc_cap(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, gui /* analyse bits */ proto_tree_add_bits_item(mc_tree, hf_gsm_a_gm_sm_value, tvb, bit_offset, 4, ENC_BIG_ENDIAN); - bit_offset+=4; - curr_bits_length -= bits_needed; - oct <<= bits_needed; - bits_in_oct -= bits_needed; + bit_offset += 4; + curr_bits_length -= bits_needed; + oct <<= bits_needed; + bits_in_oct -= bits_needed; } /* @@ -1835,21 +1837,21 @@ de_gmm_ms_radio_acc_cap(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, gui GET_DATA; /* analyse bits */ - if ((oct>>(32-bits_needed))==0) + if ((oct>>(32-bits_needed)) == 0) { proto_tree_add_text(mc_tree, tvb, curr_offset-1-add_ocetets, 1+add_ocetets, - "ECSD multislot class: Bits are not available (%u)",oct>>(32-bits_needed)); + "ECSD multislot class: Bits are not available (%u)", oct>>(32-bits_needed)); bit_offset++; - curr_bits_length -= bits_needed; - oct <<= bits_needed; - bits_in_oct -= bits_needed; + curr_bits_length -= bits_needed; + oct <<= bits_needed; + bits_in_oct -= bits_needed; } else { - curr_bits_length -= bits_needed; - oct <<= bits_needed; - bits_in_oct -= bits_needed; + curr_bits_length -= bits_needed; + oct <<= bits_needed; + bits_in_oct -= bits_needed; bit_offset++; /* @@ -1859,10 +1861,10 @@ de_gmm_ms_radio_acc_cap(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, gui GET_DATA; proto_tree_add_bits_item(tf_tree, hf_gsm_a_gm_rac_ecsd_multi_slot_class, tvb, bit_offset, 5, ENC_BIG_ENDIAN); - bit_offset+=5; - curr_bits_length -= bits_needed; - oct <<= bits_needed; - bits_in_oct -= bits_needed; + bit_offset += 5; + curr_bits_length -= bits_needed; + oct <<= bits_needed; + bits_in_oct -= bits_needed; } /* @@ -1872,21 +1874,21 @@ de_gmm_ms_radio_acc_cap(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, gui GET_DATA; /* analyse bits */ - if ((oct>>(32-bits_needed))==0) + if ((oct>>(32-bits_needed)) == 0) { proto_tree_add_text(mc_tree, tvb, curr_offset-1-add_ocetets, 1+add_ocetets, - "EGPRS multislot class: Bits are not available (%u)",oct>>(32-bits_needed)); - curr_bits_length -= bits_needed; - oct <<= bits_needed; - bits_in_oct -= bits_needed; + "EGPRS multislot class: Bits are not available (%u)", oct>>(32-bits_needed)); + curr_bits_length -= bits_needed; + oct <<= bits_needed; + bits_in_oct -= bits_needed; bit_offset++; } else { - curr_bits_length -= bits_needed; - oct <<= bits_needed; - bits_in_oct -= bits_needed; + curr_bits_length -= bits_needed; + oct <<= bits_needed; + bits_in_oct -= bits_needed; bit_offset++; /* @@ -1896,10 +1898,10 @@ de_gmm_ms_radio_acc_cap(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, gui GET_DATA; proto_tree_add_bits_item(tf_tree, hf_gsm_a_gm_rac_egprs_multi_slot_class, tvb, bit_offset, 5, ENC_BIG_ENDIAN); - bit_offset+=5; - curr_bits_length -= bits_needed; - oct <<= bits_needed; - bits_in_oct -= bits_needed; + bit_offset += 5; + curr_bits_length -= bits_needed; + oct <<= bits_needed; + bits_in_oct -= bits_needed; /* * EGPRS Extended Dynamic Allocation Capability @@ -1909,9 +1911,9 @@ de_gmm_ms_radio_acc_cap(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, gui proto_tree_add_bits_item(tf_tree, hf_gsm_a_gm_rac_egprs_ext_dyn_alloc_cap, tvb, bit_offset, 1, ENC_BIG_ENDIAN); bit_offset++; - curr_bits_length -= bits_needed; - oct <<= bits_needed; - bits_in_oct -= bits_needed; + curr_bits_length -= bits_needed; + oct <<= bits_needed; + bits_in_oct -= bits_needed; } /* @@ -1921,21 +1923,21 @@ de_gmm_ms_radio_acc_cap(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, gui GET_DATA; /* analyse bits */ - if ((oct>>(32-bits_needed))==0) + if ((oct>>(32-bits_needed)) == 0) { proto_tree_add_text(mc_tree, tvb, curr_offset-1-add_ocetets, 1+add_ocetets, - "DTM GPRS Multi Slot Class: Bits are not available (%u)",oct>>(32-bits_needed)); + "DTM GPRS Multi Slot Class: Bits are not available (%u)", oct>>(32-bits_needed)); bit_offset++; - curr_bits_length -= bits_needed; - oct <<= bits_needed; - bits_in_oct -= bits_needed; + curr_bits_length -= bits_needed; + oct <<= bits_needed; + bits_in_oct -= bits_needed; } else { - curr_bits_length -= bits_needed; - oct <<= bits_needed; - bits_in_oct -= bits_needed; + curr_bits_length -= bits_needed; + oct <<= bits_needed; + bits_in_oct -= bits_needed; bit_offset++; /* @@ -1948,10 +1950,10 @@ de_gmm_ms_radio_acc_cap(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, gui dtm_gprs_mslot = oct>>(32-bits_needed); proto_tree_add_bits_item(tf_tree, hf_gsm_a_gm_rac_dtm_gprs_multi_slot_class, tvb, bit_offset, 2, ENC_BIG_ENDIAN); - bit_offset+=2; - curr_bits_length -= bits_needed; - oct <<= bits_needed; - bits_in_oct -= bits_needed; + bit_offset += 2; + curr_bits_length -= bits_needed; + oct <<= bits_needed; + bits_in_oct -= bits_needed; /* * Single Slot DTM @@ -1961,9 +1963,9 @@ de_gmm_ms_radio_acc_cap(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, gui proto_tree_add_bits_item(mc_tree, hf_gsm_a_gm_rac_single_slt_dtm, tvb, bit_offset, 1, ENC_BIG_ENDIAN); bit_offset++; - curr_bits_length -= bits_needed; - oct <<= bits_needed; - bits_in_oct -= bits_needed; + curr_bits_length -= bits_needed; + oct <<= bits_needed; + bits_in_oct -= bits_needed; /* * DTM EGPRS Multi Slot Class ? @@ -1972,14 +1974,14 @@ de_gmm_ms_radio_acc_cap(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, gui GET_DATA; /* analyse bits */ - dtm_egprs_mslot = oct>>(32-bits_needed); + dtm_egprs_mslot = oct>>(32-bits_needed); proto_tree_add_bits_item(mc_tree, hf_gsm_a_gm_rac_dtm_egprs_multi_slot_cls_pres, tvb, bit_offset, 1, ENC_BIG_ENDIAN); bit_offset++; - curr_bits_length -= bits_needed; - oct <<= bits_needed; - bits_in_oct -= bits_needed; + curr_bits_length -= bits_needed; + oct <<= bits_needed; + bits_in_oct -= bits_needed; - if ((oct>>(32-bits_needed))==1) + if ((oct>>(32-bits_needed)) == 1) { /* * DTM EGPRS Multi Slot Class @@ -1988,10 +1990,10 @@ de_gmm_ms_radio_acc_cap(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, gui GET_DATA; proto_tree_add_bits_item(tf_tree, hf_gsm_a_gm_rac_dtm_egprs_multi_slot_class, tvb, bit_offset, 2, ENC_BIG_ENDIAN); - bit_offset+=2; - curr_bits_length -= bits_needed; - oct <<= bits_needed; - bits_in_oct -= bits_needed; + bit_offset += 2; + curr_bits_length -= bits_needed; + oct <<= bits_needed; + bits_in_oct -= bits_needed; } } } @@ -2004,12 +2006,12 @@ de_gmm_ms_radio_acc_cap(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, gui proto_tree_add_bits_item(tf_tree, hf_gsm_a_gm_rac_8psk_pow_cap_pres, tvb, bit_offset, 1, ENC_BIG_ENDIAN); bit_offset++; - curr_bits_length -= bits_needed; - oct <<= bits_needed; - bits_in_oct -= bits_needed; + curr_bits_length -= bits_needed; + oct <<= bits_needed; + bits_in_oct -= bits_needed; /* analyse bits */ - if ((oct>>(32-bits_needed))==1) + if ((oct>>(32-bits_needed)) == 1) { /* * 8PSK Power Capability @@ -2018,22 +2020,22 @@ de_gmm_ms_radio_acc_cap(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, gui GET_DATA; /* analyse bits */ - switch ( oct>>(32-bits_needed) ) + switch (oct>>(32-bits_needed)) { - case 0x00: str="Reserved"; break; - case 0x01: str="Power class E1"; break; - case 0x02: str="Power class E2"; break; - case 0x03: str="Power class E3"; break; - default: str="This should not happen"; + case 0x00: str = "Reserved"; break; + case 0x01: str = "Power class E1"; break; + case 0x02: str = "Power class E2"; break; + case 0x03: str = "Power class E3"; break; + default: str = "This should not happen"; } proto_tree_add_text(tf_tree, tvb, curr_offset-1-add_ocetets, 1+add_ocetets, - "8PSK Power Capability: %s (%u)",str,oct>>(32-bits_needed)); - bit_offset+=2; - curr_bits_length -= bits_needed; - oct <<= bits_needed; - bits_in_oct -= bits_needed; + "8PSK Power Capability: %s (%u)", str, oct>>(32-bits_needed)); + bit_offset += 2; + curr_bits_length -= bits_needed; + oct <<= bits_needed; + bits_in_oct -= bits_needed; } /* @@ -2044,9 +2046,9 @@ de_gmm_ms_radio_acc_cap(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, gui proto_tree_add_bits_item(tf_tree, hf_gsm_a_gm_rac_comp_int_meas_cap, tvb, bit_offset, 1, ENC_BIG_ENDIAN); bit_offset++; - curr_bits_length -= bits_needed; - oct <<= bits_needed; - bits_in_oct -= bits_needed; + curr_bits_length -= bits_needed; + oct <<= bits_needed; + bits_in_oct -= bits_needed; /* * Revision Level Indicator @@ -2056,9 +2058,9 @@ de_gmm_ms_radio_acc_cap(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, gui proto_tree_add_bits_item(tf_tree, hf_gsm_a_gm_rel_lev_ind, tvb, bit_offset, 1, ENC_BIG_ENDIAN); bit_offset++; - curr_bits_length -= bits_needed; - oct <<= bits_needed; - bits_in_oct -= bits_needed; + curr_bits_length -= bits_needed; + oct <<= bits_needed; + bits_in_oct -= bits_needed; /* * UMTS FDD Radio Access Technology Capability @@ -2068,9 +2070,9 @@ de_gmm_ms_radio_acc_cap(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, gui proto_tree_add_bits_item(tf_tree, hf_gsm_a_gm_rac_umts_fdd_cap, tvb, bit_offset, 1, ENC_BIG_ENDIAN); bit_offset++; - curr_bits_length -= bits_needed; - oct <<= bits_needed; - bits_in_oct -= bits_needed; + curr_bits_length -= bits_needed; + oct <<= bits_needed; + bits_in_oct -= bits_needed; /* * UMTS 3.84 Mcps TDD Radio Access Technology Capability @@ -2080,9 +2082,9 @@ de_gmm_ms_radio_acc_cap(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, gui proto_tree_add_bits_item(tf_tree, hf_gsm_a_gm_rac_umts_384_tdd_ra_cap, tvb, bit_offset, 1, ENC_BIG_ENDIAN); bit_offset++; - curr_bits_length -= bits_needed; - oct <<= bits_needed; - bits_in_oct -= bits_needed; + curr_bits_length -= bits_needed; + oct <<= bits_needed; + bits_in_oct -= bits_needed; /* * CDMA 2000 Radio Access Technology Capability @@ -2092,9 +2094,9 @@ de_gmm_ms_radio_acc_cap(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, gui proto_tree_add_bits_item(tf_tree, hf_gsm_a_gm_rac_cdma2000_cap, tvb, bit_offset, 1, ENC_BIG_ENDIAN); bit_offset++; - curr_bits_length -= bits_needed; - oct <<= bits_needed; - bits_in_oct -= bits_needed; + curr_bits_length -= bits_needed; + oct <<= bits_needed; + bits_in_oct -= bits_needed; /* * UMTS 1.28 Mcps TDD Radio Access Technology Capability @@ -2104,9 +2106,9 @@ de_gmm_ms_radio_acc_cap(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, gui proto_tree_add_bits_item(tf_tree, hf_gsm_a_gm_rac_umts_128_tdd_ra_cap, tvb, bit_offset, 1, ENC_BIG_ENDIAN); bit_offset++; - curr_bits_length -= bits_needed; - oct <<= bits_needed; - bits_in_oct -= bits_needed; + curr_bits_length -= bits_needed; + oct <<= bits_needed; + bits_in_oct -= bits_needed; /* * GERAN Feature Package 1 @@ -2116,9 +2118,9 @@ de_gmm_ms_radio_acc_cap(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, gui proto_tree_add_bits_item(tf_tree, hf_gsm_a_gm_rac_geran_feat_pkg, tvb, bit_offset, 1, ENC_BIG_ENDIAN); bit_offset++; - curr_bits_length -= bits_needed; - oct <<= bits_needed; - bits_in_oct -= bits_needed; + curr_bits_length -= bits_needed; + oct <<= bits_needed; + bits_in_oct -= bits_needed; /* * Extended DTM (E)GPRS Multi Slot Class @@ -2128,21 +2130,21 @@ de_gmm_ms_radio_acc_cap(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, gui GET_DATA; /* analyse bits */ - if ((oct>>(32-bits_needed))==0) + if ((oct>>(32-bits_needed)) == 0) { proto_tree_add_text(tf_tree, tvb, curr_offset-1-add_ocetets, 1+add_ocetets, - "Extended DTM (E)GPRS Multi Slot Class: Bits are not available (%u)",oct>>(32-bits_needed)); - curr_bits_length -= bits_needed; - oct <<= bits_needed; - bits_in_oct -= bits_needed; + "Extended DTM (E)GPRS Multi Slot Class: Bits are not available (%u)", oct>>(32-bits_needed)); + curr_bits_length -= bits_needed; + oct <<= bits_needed; + bits_in_oct -= bits_needed; bit_offset++; } else { - curr_bits_length -= bits_needed; - oct <<= bits_needed; - bits_in_oct -= bits_needed; + curr_bits_length -= bits_needed; + oct <<= bits_needed; + bits_in_oct -= bits_needed; bit_offset++; /* @@ -2152,36 +2154,36 @@ de_gmm_ms_radio_acc_cap(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, gui GET_DATA; /* analyse bits */ - switch ( (oct>>(32-bits_needed))|(dtm_gprs_mslot<<4) ) + switch ((oct>>(32-bits_needed))|(dtm_gprs_mslot<<4)) { - case 0x00: str="Unused. If received, it shall be interpreted as Multislot class 5 supported"; break; - case 0x01: str="Unused. If received, it shall be interpreted as Multislot class 5 supported"; break; - case 0x02: str="Unused. If received, it shall be interpreted as Multislot class 5 supported"; break; - case 0x03: str="Unused. If received, it shall be interpreted as Multislot class 5 supported"; break; - case 0x10: str="Multislot class 5 supported"; break; - case 0x11: str="Multislot class 6 supported"; break; - case 0x12: str="Unused. If received, it shall be interpreted as Multislot class 5 supported"; break; - case 0x13: str="Unused. If received, it shall be interpreted as Multislot class 5 supported"; break; - case 0x20: str="Multislot class 9 supported"; break; - case 0x21: str="Multislot class 10 supported"; break; - case 0x22: str="Unused. If received, it shall be interpreted as Multislot class 9 supported"; break; - case 0x23: str="Unused. If received, it shall be interpreted as Multislot class 9 supported"; break; - case 0x30: str="Multislot class 11 supported"; break; - case 0x31: str="Unused. If received, it shall be interpreted as Multislot class 11 supported"; break; - case 0x32: str="Unused. If received, it shall be interpreted as Multislot class 11 supported"; break; - case 0x33: str="Unused. If received, it shall be interpreted as Multislot class 11 supported"; break; - default: str="This should not happen"; + case 0x00: str = "Unused. If received, it shall be interpreted as Multislot class 5 supported"; break; + case 0x01: str = "Unused. If received, it shall be interpreted as Multislot class 5 supported"; break; + case 0x02: str = "Unused. If received, it shall be interpreted as Multislot class 5 supported"; break; + case 0x03: str = "Unused. If received, it shall be interpreted as Multislot class 5 supported"; break; + case 0x10: str = "Multislot class 5 supported"; break; + case 0x11: str = "Multislot class 6 supported"; break; + case 0x12: str = "Unused. If received, it shall be interpreted as Multislot class 5 supported"; break; + case 0x13: str = "Unused. If received, it shall be interpreted as Multislot class 5 supported"; break; + case 0x20: str = "Multislot class 9 supported"; break; + case 0x21: str = "Multislot class 10 supported"; break; + case 0x22: str = "Unused. If received, it shall be interpreted as Multislot class 9 supported"; break; + case 0x23: str = "Unused. If received, it shall be interpreted as Multislot class 9 supported"; break; + case 0x30: str = "Multislot class 11 supported"; break; + case 0x31: str = "Unused. If received, it shall be interpreted as Multislot class 11 supported"; break; + case 0x32: str = "Unused. If received, it shall be interpreted as Multislot class 11 supported"; break; + case 0x33: str = "Unused. If received, it shall be interpreted as Multislot class 11 supported"; break; + default: str = "This should not happen"; } proto_tree_add_text(tf_tree, tvb, curr_offset-1-add_ocetets, 1+add_ocetets, - "Extended DTM GPRS Multi Slot Class: %s (%u)",str,oct>>(32-bits_needed)); - bit_offset+=2; - curr_bits_length -= bits_needed; - oct <<= bits_needed; - bits_in_oct -= bits_needed; + "Extended DTM GPRS Multi Slot Class: %s (%u)", str, oct>>(32-bits_needed)); + bit_offset += 2; + curr_bits_length -= bits_needed; + oct <<= bits_needed; + bits_in_oct -= bits_needed; - if ( dtm_egprs_mslot <= 3 ) + if (dtm_egprs_mslot <= 3) { /* * Extended DTM EGPRS Multi Slot Class @@ -2190,34 +2192,34 @@ de_gmm_ms_radio_acc_cap(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, gui GET_DATA; /* analyse bits */ - switch ( (oct>>(32-bits_needed))|(dtm_egprs_mslot<<4) ) + switch ((oct>>(32-bits_needed))|(dtm_egprs_mslot<<4) ) { - case 0x00: str="Unused. If received, it shall be interpreted as Multislot class 5 supported"; break; - case 0x01: str="Unused. If received, it shall be interpreted as Multislot class 5 supported"; break; - case 0x02: str="Unused. If received, it shall be interpreted as Multislot class 5 supported"; break; - case 0x03: str="Unused. If received, it shall be interpreted as Multislot class 5 supported"; break; - case 0x10: str="Multislot class 5 supported"; break; - case 0x11: str="Multislot class 6 supported"; break; - case 0x12: str="Unused. If received, it shall be interpreted as Multislot class 5 supported"; break; - case 0x13: str="Unused. If received, it shall be interpreted as Multislot class 5 supported"; break; - case 0x20: str="Multislot class 9 supported"; break; - case 0x21: str="Multislot class 10 supported"; break; - case 0x22: str="Unused. If received, it shall be interpreted as Multislot class 9 supported"; break; - case 0x23: str="Unused. If received, it shall be interpreted as Multislot class 9 supported"; break; - case 0x30: str="Multislot class 11 supported"; break; - case 0x31: str="Unused. If received, it shall be interpreted as Multislot class 11 supported"; break; - case 0x32: str="Unused. If received, it shall be interpreted as Multislot class 11 supported"; break; - case 0x33: str="Unused. If received, it shall be interpreted as Multislot class 11 supported"; break; - default: str="This should not happen"; + case 0x00: str = "Unused. If received, it shall be interpreted as Multislot class 5 supported"; break; + case 0x01: str = "Unused. If received, it shall be interpreted as Multislot class 5 supported"; break; + case 0x02: str = "Unused. If received, it shall be interpreted as Multislot class 5 supported"; break; + case 0x03: str = "Unused. If received, it shall be interpreted as Multislot class 5 supported"; break; + case 0x10: str = "Multislot class 5 supported"; break; + case 0x11: str = "Multislot class 6 supported"; break; + case 0x12: str = "Unused. If received, it shall be interpreted as Multislot class 5 supported"; break; + case 0x13: str = "Unused. If received, it shall be interpreted as Multislot class 5 supported"; break; + case 0x20: str = "Multislot class 9 supported"; break; + case 0x21: str = "Multislot class 10 supported"; break; + case 0x22: str = "Unused. If received, it shall be interpreted as Multislot class 9 supported"; break; + case 0x23: str = "Unused. If received, it shall be interpreted as Multislot class 9 supported"; break; + case 0x30: str = "Multislot class 11 supported"; break; + case 0x31: str = "Unused. If received, it shall be interpreted as Multislot class 11 supported"; break; + case 0x32: str = "Unused. If received, it shall be interpreted as Multislot class 11 supported"; break; + case 0x33: str = "Unused. If received, it shall be interpreted as Multislot class 11 supported"; break; + default: str = "This should not happen"; } proto_tree_add_text(tf_tree, tvb, curr_offset-1-add_ocetets, 1+add_ocetets, - "Extended DTM EGPRS Multi Slot Class: %s (%u)",str, oct>>(32-bits_needed)); - bit_offset+=2; - curr_bits_length -= bits_needed; - oct <<= bits_needed; - bits_in_oct -= bits_needed; + "Extended DTM EGPRS Multi Slot Class: %s (%u)", str, oct>>(32-bits_needed)); + bit_offset += 2; + curr_bits_length -= bits_needed; + oct <<= bits_needed; + bits_in_oct -= bits_needed; } } @@ -2229,9 +2231,9 @@ de_gmm_ms_radio_acc_cap(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, gui proto_tree_add_bits_item(tf_tree, hf_gsm_a_gm_rac_mod_based_multi_slot_class_support, tvb, bit_offset, 1, ENC_BIG_ENDIAN); bit_offset++; - curr_bits_length -= bits_needed; - oct <<= bits_needed; - bits_in_oct -= bits_needed; + curr_bits_length -= bits_needed; + oct <<= bits_needed; + bits_in_oct -= bits_needed; /* * High Multislot Capability @@ -2240,21 +2242,21 @@ de_gmm_ms_radio_acc_cap(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, gui GET_DATA; /* analyse bits */ - if ((oct>>(32-bits_needed))==0) + if ((oct>>(32-bits_needed)) == 0) { proto_tree_add_text(tf_tree, tvb, curr_offset-1-add_ocetets, 1+add_ocetets, - "High Multislot Capability: Bits are not available (%u)",oct>>(32-bits_needed)); + "High Multislot Capability: Bits are not available (%u)", oct>>(32-bits_needed)); bit_offset++; - curr_bits_length -= bits_needed; - oct <<= bits_needed; - bits_in_oct -= bits_needed; + curr_bits_length -= bits_needed; + oct <<= bits_needed; + bits_in_oct -= bits_needed; } else { - curr_bits_length -= bits_needed; - oct <<= bits_needed; - bits_in_oct -= bits_needed; + curr_bits_length -= bits_needed; + oct <<= bits_needed; + bits_in_oct -= bits_needed; bit_offset++; /* @@ -2272,10 +2274,10 @@ de_gmm_ms_radio_acc_cap(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, gui " Release 5 Chap 10.5.5.12 Page 406", oct>>(32-bits_needed), oct>>(32-bits_needed)); - bit_offset+=2; - curr_bits_length -= bits_needed; - oct <<= bits_needed; - bits_in_oct -= bits_needed; + bit_offset += 2; + curr_bits_length -= bits_needed; + oct <<= bits_needed; + bits_in_oct -= bits_needed; } /* @@ -2284,41 +2286,41 @@ de_gmm_ms_radio_acc_cap(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, gui bits_needed = 1; GET_DATA; - value = tvb_get_bits8(tvb, bit_offset, 1); + value = tvb_get_bits8(tvb, bit_offset, 1); proto_tree_add_bits_item(tf_tree, hf_gsm_a_gm_rac_geran_iu_mode_cap, tvb, bit_offset, 1, ENC_BIG_ENDIAN); - bit_offset+=bits_needed; - curr_bits_length -= bits_needed; - oct <<= bits_needed; - bits_in_oct -= bits_needed; + bit_offset += bits_needed; + curr_bits_length -= bits_needed; + oct <<= bits_needed; + bits_in_oct -= bits_needed; if (value) { /* GERAN Iu Mode Capabilities struct present */ - bits_needed = 4; + bits_needed = 4; GET_DATA; - value = tvb_get_bits8(tvb, bit_offset, 4); - bit_offset+=bits_needed; - curr_bits_length -= bits_needed; - oct <<= bits_needed; - bits_in_oct -= bits_needed; + value = tvb_get_bits8(tvb, bit_offset, 4); + bit_offset += bits_needed; + curr_bits_length -= bits_needed; + oct <<= bits_needed; + bits_in_oct -= bits_needed; if (value) { /* * FLO Iu Capability */ - bits_needed = 1; + bits_needed = 1; GET_DATA; proto_tree_add_bits_item(tf_tree, hf_gsm_a_gm_rac_flo_iu_cap, tvb, bit_offset, 1, ENC_BIG_ENDIAN); - bit_offset+=bits_needed; - curr_bits_length -= bits_needed; - oct <<= bits_needed; - bits_in_oct -= bits_needed; + bit_offset += bits_needed; + curr_bits_length -= bits_needed; + oct <<= bits_needed; + bits_in_oct -= bits_needed; value--; /* skip spare bits */ - bit_offset+=value; - curr_bits_length -= value; - oct <<= value; - bits_in_oct -= value; + bit_offset += value; + curr_bits_length -= value; + oct <<= value; + bits_in_oct -= value; } } @@ -2329,22 +2331,22 @@ de_gmm_ms_radio_acc_cap(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, gui GET_DATA; /* analyse bits */ - switch ( oct>>(32-bits_needed) ) + switch (oct>>(32-bits_needed) ) { - case 0x00: str="GMSK_MULTISLOT_POWER_PROFILE 0"; break; - case 0x01: str="GMSK_MULTISLOT_POWER_PROFILE 1"; break; - case 0x02: str="GMSK_MULTISLOT_POWER_PROFILE 2"; break; - case 0x03: str="GMSK_MULTISLOT_POWER_PROFILE 3"; break; - default: str="This should not happen"; + case 0x00: str = "GMSK_MULTISLOT_POWER_PROFILE 0"; break; + case 0x01: str = "GMSK_MULTISLOT_POWER_PROFILE 1"; break; + case 0x02: str = "GMSK_MULTISLOT_POWER_PROFILE 2"; break; + case 0x03: str = "GMSK_MULTISLOT_POWER_PROFILE 3"; break; + default: str = "This should not happen"; } proto_tree_add_text(tf_tree, tvb, curr_offset-1-add_ocetets, 1+add_ocetets, - "GMSK Multislot Power Profile: %s (%u)",str,oct>>(32-bits_needed)); - bit_offset+=2; - curr_bits_length -= bits_needed; - oct <<= bits_needed; - bits_in_oct -= bits_needed; + "GMSK Multislot Power Profile: %s (%u)", str, oct>>(32-bits_needed)); + bit_offset += 2; + curr_bits_length -= bits_needed; + oct <<= bits_needed; + bits_in_oct -= bits_needed; /* * 8-PSK Multislot Power Profile @@ -2353,22 +2355,21 @@ de_gmm_ms_radio_acc_cap(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, gui GET_DATA; /* analyse bits */ - switch ( oct>>(32-bits_needed) ) + switch (oct>>(32-bits_needed) ) { - case 0x00: str="8-PSK_MULTISLOT_POWER_PROFILE 0"; break; - case 0x01: str="8-PSK_MULTISLOT_POWER_PROFILE 1"; break; - case 0x02: str="8-PSK_MULTISLOT_POWER_PROFILE 2"; break; - case 0x03: str="8-PSK_MULTISLOT_POWER_PROFILE 3"; break; - default: str="This should not happen"; + case 0x00: str = "8-PSK_MULTISLOT_POWER_PROFILE 0"; break; + case 0x01: str = "8-PSK_MULTISLOT_POWER_PROFILE 1"; break; + case 0x02: str = "8-PSK_MULTISLOT_POWER_PROFILE 2"; break; + case 0x03: str = "8-PSK_MULTISLOT_POWER_PROFILE 3"; break; + default: str = "This should not happen"; } - proto_tree_add_text(tf_tree, - tvb, curr_offset-1-add_ocetets, 1+add_ocetets, - "8-PSK Multislot Power Profile: %s (%u)",str,oct>>(32-bits_needed)); - bit_offset+=2; - curr_bits_length -= bits_needed; - oct <<= bits_needed; - bits_in_oct -= bits_needed; + proto_tree_add_text(tf_tree, tvb, curr_offset-1-add_ocetets, 1+add_ocetets, + "8-PSK Multislot Power Profile: %s (%u)", str, oct>>(32-bits_needed)); + bit_offset += 2; + curr_bits_length -= bits_needed; + oct <<= bits_needed; + bits_in_oct -= bits_needed; /* * Release 6 @@ -2377,116 +2378,116 @@ de_gmm_ms_radio_acc_cap(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, gui /* * Multiple TBF Capability */ - bits_needed = 1; + bits_needed = 1; GET_DATA; proto_tree_add_bits_item(tf_tree, hf_gsm_a_gm_rac_mult_tbf_cap, tvb, bit_offset, 1, ENC_BIG_ENDIAN); - bit_offset+=bits_needed; - curr_bits_length -= bits_needed; - oct <<= bits_needed; - bits_in_oct -= bits_needed; + bit_offset += bits_needed; + curr_bits_length -= bits_needed; + oct <<= bits_needed; + bits_in_oct -= bits_needed; /* * Downlink Advanced Receiver Performance */ - bits_needed = 2; + bits_needed = 2; GET_DATA; proto_tree_add_bits_item(tf_tree, hf_gsm_a_gm_rac_down_adv_rec_perf, tvb, bit_offset, 2, ENC_BIG_ENDIAN); - bit_offset+=bits_needed; - curr_bits_length -= bits_needed; - oct <<= bits_needed; - bits_in_oct -= bits_needed; + bit_offset += bits_needed; + curr_bits_length -= bits_needed; + oct <<= bits_needed; + bits_in_oct -= bits_needed; /* * Extended RLC/MAC Control Message Segmentation Capability */ - bits_needed = 1; + bits_needed = 1; GET_DATA; proto_tree_add_bits_item(tf_tree, hf_gsm_a_gm_rac_ext_rlc_mac_ctrl_msg_seg_cap, tvb, bit_offset, 1, ENC_BIG_ENDIAN); - bit_offset+=bits_needed; - curr_bits_length -= bits_needed; - oct <<= bits_needed; - bits_in_oct -= bits_needed; + bit_offset += bits_needed; + curr_bits_length -= bits_needed; + oct <<= bits_needed; + bits_in_oct -= bits_needed; /* * DTM Enhancements Capability */ - bits_needed = 1; + bits_needed = 1; GET_DATA; proto_tree_add_bits_item(tf_tree, hf_gsm_a_gm_rac_dtm_enh_cap, tvb, bit_offset, 1, ENC_BIG_ENDIAN); - bit_offset+=bits_needed; - curr_bits_length -= bits_needed; - oct <<= bits_needed; - bits_in_oct -= bits_needed; + bit_offset += bits_needed; + curr_bits_length -= bits_needed; + oct <<= bits_needed; + bits_in_oct -= bits_needed; /* * DTM GPRS High Multi Slot Class & DTM EGPRS High Multi Slot Class */ bits_needed = 1; GET_DATA; - if ((oct>>(32-bits_needed))==0) + if ((oct>>(32-bits_needed)) == 0) { - bit_offset+=bits_needed; - curr_bits_length -= bits_needed; - oct <<= bits_needed; - bits_in_oct -= bits_needed; + bit_offset += bits_needed; + curr_bits_length -= bits_needed; + oct <<= bits_needed; + bits_in_oct -= bits_needed; } else { - bit_offset+=bits_needed; - curr_bits_length -= bits_needed; - oct <<= bits_needed; - bits_in_oct -= bits_needed; + bit_offset += bits_needed; + curr_bits_length -= bits_needed; + oct <<= bits_needed; + bits_in_oct -= bits_needed; /* * DTM GPRS High Multi Slot Class */ - bits_needed = 3; + bits_needed = 3; GET_DATA; proto_tree_add_bits_item(tf_tree, hf_gsm_a_gm_rac_dtm_gprs_high_multi_slot_class, tvb, bit_offset, 3, ENC_BIG_ENDIAN); - bit_offset+=bits_needed; - curr_bits_length -= bits_needed; - oct <<= bits_needed; - bits_in_oct -= bits_needed; + bit_offset += bits_needed; + curr_bits_length -= bits_needed; + oct <<= bits_needed; + bits_in_oct -= bits_needed; bits_needed = 1; GET_DATA; - if ((oct>>(32-bits_needed))==0) + if ((oct>>(32-bits_needed)) == 0) { - bit_offset+=bits_needed; - curr_bits_length -= bits_needed; - oct <<= bits_needed; - bits_in_oct -= bits_needed; + bit_offset += bits_needed; + curr_bits_length -= bits_needed; + oct <<= bits_needed; + bits_in_oct -= bits_needed; } else { - bit_offset+=bits_needed; - curr_bits_length -= bits_needed; - oct <<= bits_needed; - bits_in_oct -= bits_needed; + bit_offset += bits_needed; + curr_bits_length -= bits_needed; + oct <<= bits_needed; + bits_in_oct -= bits_needed; /* * DTM EGPRS High Multi Slot Class */ - bits_needed = 3; + bits_needed = 3; GET_DATA; proto_tree_add_bits_item(tf_tree, hf_gsm_a_gm_rac_dtm_egprs_high_multi_slot_class, tvb, bit_offset, 3, ENC_BIG_ENDIAN); - bit_offset+=bits_needed; - curr_bits_length -= bits_needed; - oct <<= bits_needed; - bits_in_oct -= bits_needed; + bit_offset += bits_needed; + curr_bits_length -= bits_needed; + oct <<= bits_needed; + bits_in_oct -= bits_needed; } } /* * PS Handover Capability */ - bits_needed = 1; + bits_needed = 1; GET_DATA; proto_tree_add_bits_item(tf_tree, hf_gsm_a_gm_rac_ps_ho_cap, tvb, bit_offset, 1, ENC_BIG_ENDIAN); - bit_offset+=bits_needed; - curr_bits_length -= bits_needed; - oct <<= bits_needed; - bits_in_oct -= bits_needed; + bit_offset += bits_needed; + curr_bits_length -= bits_needed; + oct <<= bits_needed; + bits_in_oct -= bits_needed; /* * Release 7 @@ -2495,121 +2496,122 @@ de_gmm_ms_radio_acc_cap(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, gui /* * DTM Handover Capability */ - bits_needed = 1; + bits_needed = 1; GET_DATA; proto_tree_add_bits_item(tf_tree, hf_gsm_a_gm_rac_dtm_ho_cap, tvb, bit_offset, 1, ENC_BIG_ENDIAN); - bit_offset+=bits_needed; - curr_bits_length -= bits_needed; - oct <<= bits_needed; - bits_in_oct -= bits_needed; + bit_offset += bits_needed; + curr_bits_length -= bits_needed; + oct <<= bits_needed; + bits_in_oct -= bits_needed; /* * Multislot Capability Reduction for Downlink Dual Carrier & Downlink Dual Carrier for DTM Capability */ + bits_needed = 1; GET_DATA; - if ((oct>>(32-bits_needed))==0) + if ((oct>>(32-bits_needed)) == 0) { - bit_offset+=bits_needed; - curr_bits_length -= bits_needed; - oct <<= bits_needed; - bits_in_oct -= bits_needed; + bit_offset += bits_needed; + curr_bits_length -= bits_needed; + oct <<= bits_needed; + bits_in_oct -= bits_needed; } else { - bit_offset+=bits_needed; - curr_bits_length -= bits_needed; - oct <<= bits_needed; - bits_in_oct -= bits_needed; + bit_offset += bits_needed; + curr_bits_length -= bits_needed; + oct <<= bits_needed; + bits_in_oct -= bits_needed; /* * Multislot Capability Reduction for Downlink Dual Carrier */ - bits_needed = 3; + bits_needed = 3; GET_DATA; proto_tree_add_bits_item(tf_tree, hf_gsm_a_gm_rac_multi_slot_cap_red_down_dual_carrier, tvb, bit_offset, 3, ENC_BIG_ENDIAN); - bit_offset+=bits_needed; - curr_bits_length -= bits_needed; - oct <<= bits_needed; - bits_in_oct -= bits_needed; + bit_offset += bits_needed; + curr_bits_length -= bits_needed; + oct <<= bits_needed; + bits_in_oct -= bits_needed; /* * Downlink Dual Carrier for DTM Capability */ - bits_needed = 1; + bits_needed = 1; GET_DATA; proto_tree_add_bits_item(tf_tree, hf_gsm_a_gm_rac_down_dual_carrier_dtm_cap, tvb, bit_offset, 1, ENC_BIG_ENDIAN); - bit_offset+=bits_needed; - curr_bits_length -= bits_needed; - oct <<= bits_needed; - bits_in_oct -= bits_needed; + bit_offset += bits_needed; + curr_bits_length -= bits_needed; + oct <<= bits_needed; + bits_in_oct -= bits_needed; } /* * Flexible Timeslot Assignment */ - bits_needed = 1; + bits_needed = 1; GET_DATA; proto_tree_add_bits_item(tf_tree, hf_gsm_a_gm_rac_flex_ts_assign, tvb, bit_offset, 1, ENC_BIG_ENDIAN); - bit_offset+=bits_needed; - curr_bits_length -= bits_needed; - oct <<= bits_needed; - bits_in_oct -= bits_needed; + bit_offset += bits_needed; + curr_bits_length -= bits_needed; + oct <<= bits_needed; + bits_in_oct -= bits_needed; /* * GAN PS Handover Capability */ - bits_needed = 1; + bits_needed = 1; GET_DATA; proto_tree_add_bits_item(tf_tree, hf_gsm_a_gm_rac_gan_ps_ho_cap, tvb, bit_offset, 1, ENC_BIG_ENDIAN); - bit_offset+=bits_needed; - curr_bits_length -= bits_needed; - oct <<= bits_needed; - bits_in_oct -= bits_needed; + bit_offset += bits_needed; + curr_bits_length -= bits_needed; + oct <<= bits_needed; + bits_in_oct -= bits_needed; /* * RLC Non-persistent Mode */ - bits_needed = 1; + bits_needed = 1; GET_DATA; proto_tree_add_bits_item(tf_tree, hf_gsm_a_gm_rac_rlc_non_pers_mode, tvb, bit_offset, 1, ENC_BIG_ENDIAN); - bit_offset+=bits_needed; - curr_bits_length -= bits_needed; - oct <<= bits_needed; - bits_in_oct -= bits_needed; + bit_offset += bits_needed; + curr_bits_length -= bits_needed; + oct <<= bits_needed; + bits_in_oct -= bits_needed; /* * Reduced Latency Capability */ - bits_needed = 1; + bits_needed = 1; GET_DATA; proto_tree_add_bits_item(tf_tree, hf_gsm_a_gm_rac_reduced_lat_cap, tvb, bit_offset, 1, ENC_BIG_ENDIAN); - bit_offset+=bits_needed; - curr_bits_length -= bits_needed; - oct <<= bits_needed; - bits_in_oct -= bits_needed; + bit_offset += bits_needed; + curr_bits_length -= bits_needed; + oct <<= bits_needed; + bits_in_oct -= bits_needed; /* * Uplink EGPRS2 */ - bits_needed = 2; + bits_needed = 2; GET_DATA; proto_tree_add_bits_item(tf_tree, hf_gsm_a_gm_rac_ul_egprs2, tvb, bit_offset, 2, ENC_BIG_ENDIAN); - bit_offset+=bits_needed; - curr_bits_length -= bits_needed; - oct <<= bits_needed; - bits_in_oct -= bits_needed; + bit_offset += bits_needed; + curr_bits_length -= bits_needed; + oct <<= bits_needed; + bits_in_oct -= bits_needed; /* * Downlink EGPRS2 */ - bits_needed = 2; + bits_needed = 2; GET_DATA; proto_tree_add_bits_item(tf_tree, hf_gsm_a_gm_rac_dl_egprs2, tvb, bit_offset, 2, ENC_BIG_ENDIAN); - bit_offset+=bits_needed; - curr_bits_length -= bits_needed; - oct <<= bits_needed; - bits_in_oct -= bits_needed; + bit_offset += bits_needed; + curr_bits_length -= bits_needed; + oct <<= bits_needed; + bits_in_oct -= bits_needed; /* * Release 8 @@ -2618,46 +2620,46 @@ de_gmm_ms_radio_acc_cap(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, gui /* * E-UTRA FDD support */ - bits_needed = 1; + bits_needed = 1; GET_DATA; proto_tree_add_bits_item(tf_tree, hf_gsm_a_gm_rac_eutra_fdd_support, tvb, bit_offset, 1, ENC_BIG_ENDIAN); - bit_offset+=bits_needed; - curr_bits_length -= bits_needed; - oct <<= bits_needed; - bits_in_oct -= bits_needed; + bit_offset += bits_needed; + curr_bits_length -= bits_needed; + oct <<= bits_needed; + bits_in_oct -= bits_needed; /* * E-UTRA TDD support */ - bits_needed = 1; + bits_needed = 1; GET_DATA; proto_tree_add_bits_item(tf_tree, hf_gsm_a_gm_rac_eutra_tdd_support, tvb, bit_offset, 1, ENC_BIG_ENDIAN); - bit_offset+=bits_needed; - curr_bits_length -= bits_needed; - oct <<= bits_needed; - bits_in_oct -= bits_needed; + bit_offset += bits_needed; + curr_bits_length -= bits_needed; + oct <<= bits_needed; + bits_in_oct -= bits_needed; /* * GERAN to E-UTRA support in GERAN packet transfer mode */ - bits_needed = 2; + bits_needed = 2; GET_DATA; proto_tree_add_bits_item(tf_tree, hf_gsm_a_gm_rac_geran_to_eutra_support_in_geran_ptm, tvb, bit_offset, 2, ENC_BIG_ENDIAN); - bit_offset+=bits_needed; - curr_bits_length -= bits_needed; - oct <<= bits_needed; - bits_in_oct -= bits_needed; + bit_offset += bits_needed; + curr_bits_length -= bits_needed; + oct <<= bits_needed; + bits_in_oct -= bits_needed; /* * Priority-based reselection support */ - bits_needed = 1; + bits_needed = 1; GET_DATA; proto_tree_add_bits_item(tf_tree, hf_gsm_a_gm_rac_prio_based_resel_support, tvb, bit_offset, 1, ENC_BIG_ENDIAN); - bit_offset+=bits_needed; - curr_bits_length -= bits_needed; - oct <<= bits_needed; - bits_in_oct -= bits_needed; + bit_offset += bits_needed; + curr_bits_length -= bits_needed; + oct <<= bits_needed; + bits_in_oct -= bits_needed; /* * Release 9 @@ -2668,41 +2670,41 @@ de_gmm_ms_radio_acc_cap(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, gui */ bits_needed = 1; GET_DATA; - if ((oct>>(32-bits_needed))==0) + if ((oct>>(32-bits_needed)) == 0) { - bit_offset+=bits_needed; - curr_bits_length -= bits_needed; - oct <<= bits_needed; - bits_in_oct -= bits_needed; + bit_offset += bits_needed; + curr_bits_length -= bits_needed; + oct <<= bits_needed; + bits_in_oct -= bits_needed; } else { - bit_offset+=bits_needed; - curr_bits_length -= bits_needed; - oct <<= bits_needed; - bits_in_oct -= bits_needed; + bit_offset += bits_needed; + curr_bits_length -= bits_needed; + oct <<= bits_needed; + bits_in_oct -= bits_needed; /* * Alternative EFTA Multislot Class */ - bits_needed = 4; + bits_needed = 4; GET_DATA; proto_tree_add_bits_item(tf_tree, hf_gsm_a_gm_rac_alt_efta_multi_slot_class, tvb, bit_offset, 4, ENC_BIG_ENDIAN); - bit_offset+=bits_needed; - curr_bits_length -= bits_needed; - oct <<= bits_needed; - bits_in_oct -= bits_needed; + bit_offset += bits_needed; + curr_bits_length -= bits_needed; + oct <<= bits_needed; + bits_in_oct -= bits_needed; /* * EFTA Multislot Capability Reduction for Downlink Dual Carrier */ - bits_needed = 3; + bits_needed = 3; GET_DATA; proto_tree_add_bits_item(tf_tree, hf_gsm_a_gm_rac_efta_multi_slot_cap_red_down_dual_carrier, tvb, bit_offset, 3, ENC_BIG_ENDIAN); - bit_offset+=bits_needed; - curr_bits_length -= bits_needed; - oct <<= bits_needed; - bits_in_oct -= bits_needed; + bit_offset += bits_needed; + curr_bits_length -= bits_needed; + oct <<= bits_needed; + bits_in_oct -= bits_needed; } /* @@ -2711,78 +2713,78 @@ de_gmm_ms_radio_acc_cap(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, gui bits_needed = 1; GET_DATA; proto_tree_add_bits_item(tf_tree, hf_gsm_a_gm_rac_ind_up_layer_pdu_start_cap_for_rlc_um, tvb, bit_offset, 1, ENC_BIG_ENDIAN); - bit_offset+=bits_needed; - curr_bits_length -= bits_needed; - oct <<= bits_needed; - bits_in_oct -= bits_needed; + bit_offset += bits_needed; + curr_bits_length -= bits_needed; + oct <<= bits_needed; + bits_in_oct -= bits_needed; /* * EMST Capability */ - bits_needed = 1; + bits_needed = 1; GET_DATA; proto_tree_add_bits_item(tf_tree, hf_gsm_a_gm_rac_emst_cap, tvb, bit_offset, 1, ENC_BIG_ENDIAN); - bit_offset+=bits_needed; - curr_bits_length -= bits_needed; - oct <<= bits_needed; - bits_in_oct -= bits_needed; + bit_offset += bits_needed; + curr_bits_length -= bits_needed; + oct <<= bits_needed; + bits_in_oct -= bits_needed; /* * MTTI Capability */ - bits_needed = 1; + bits_needed = 1; GET_DATA; proto_tree_add_bits_item(tf_tree, hf_gsm_a_gm_rac_mtti_cap, tvb, bit_offset, 1, ENC_BIG_ENDIAN); - bit_offset+=bits_needed; - curr_bits_length -= bits_needed; - oct <<= bits_needed; - bits_in_oct -= bits_needed; + bit_offset += bits_needed; + curr_bits_length -= bits_needed; + oct <<= bits_needed; + bits_in_oct -= bits_needed; /* * UTRA CSG Cells Reporting */ - bits_needed = 1; + bits_needed = 1; GET_DATA; proto_tree_add_bits_item(tf_tree, hf_gsm_a_gm_rac_utra_csg_cell_report, tvb, bit_offset, 1, ENC_BIG_ENDIAN); - bit_offset+=bits_needed; - curr_bits_length -= bits_needed; - oct <<= bits_needed; - bits_in_oct -= bits_needed; + bit_offset += bits_needed; + curr_bits_length -= bits_needed; + oct <<= bits_needed; + bits_in_oct -= bits_needed; /* * E-UTRA CSG Cells Reporting */ - bits_needed = 1; + bits_needed = 1; GET_DATA; proto_tree_add_bits_item(tf_tree, hf_gsm_a_gm_rac_eutra_csg_cell_report, tvb, bit_offset, 1, ENC_BIG_ENDIAN); - bit_offset+=bits_needed; - curr_bits_length -= bits_needed; - oct <<= bits_needed; - bits_in_oct -= bits_needed; + bit_offset += bits_needed; + curr_bits_length -= bits_needed; + oct <<= bits_needed; + bits_in_oct -= bits_needed; /* * we are too long ... so jump over it */ - while ( curr_bits_length > 0 ) + while (curr_bits_length > 0) { - if ( curr_bits_length > 8 ) + if (curr_bits_length > 8) bits_needed = 8; else bits_needed = curr_bits_length; GET_DATA; - curr_bits_length -= bits_needed; - oct <<= bits_needed; - bits_in_oct -= bits_needed; + curr_bits_length -= bits_needed; + oct <<= bits_needed; + bits_in_oct -= bits_needed; } - } while ( 1 ); + } while (1); - curr_offset+= curr_len; + curr_offset += curr_len; EXTRANEOUS_DATA_CHECK_EXPERT(len, curr_offset - offset, pinfo); - return(curr_offset - offset); + return (curr_offset - offset); } /* @@ -2852,7 +2854,7 @@ static const range_string gmm_cause_vals[] = { static guint16 de_gmm_cause(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32 offset, guint len _U_, gchar *add_string _U_, int string_len _U_) { - guint32 curr_offset; + guint32 curr_offset; curr_offset = offset; @@ -2862,7 +2864,7 @@ de_gmm_cause(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32 of /* no length check possible */ - return(curr_offset - offset); + return (curr_offset - offset); } /* @@ -2871,13 +2873,13 @@ de_gmm_cause(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32 of guint16 de_gmm_rai(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guint len _U_, gchar *add_string _U_, int string_len _U_) { - proto_tree *subtree; - proto_item *item; - guint32 mcc; - guint32 mnc; - guint32 lac; - guint32 rac; - guint32 curr_offset; + proto_tree *subtree; + proto_item *item; + guint32 mcc; + guint32 mnc; + guint32 lac; + guint32 rac; + guint32 curr_offset; curr_offset = offset; @@ -2896,7 +2898,7 @@ de_gmm_rai(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, item = proto_tree_add_text(tree, tvb, curr_offset, 6, "Routing area identification: %x-%x-%u-%u", - mcc,mnc,lac,rac); + mcc, mnc, lac, rac); subtree = proto_item_add_subtree(item, ett_gmm_rai); dissect_e212_mcc_mnc(tvb, pinfo, subtree, offset, TRUE); @@ -2904,19 +2906,19 @@ de_gmm_rai(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, proto_tree_add_item(subtree, hf_gsm_a_lac, tvb, curr_offset+3, 2, ENC_BIG_ENDIAN); proto_tree_add_item(subtree, hf_gsm_a_gm_rac, tvb, curr_offset+5, 1, ENC_BIG_ENDIAN); - curr_offset+=6; - if (add_string) - { - if (add_string[0] == '\0') - { - g_snprintf(add_string, string_len, " - RAI: %x-%x-%u-%u", mcc,mnc,lac,rac); - } - } + curr_offset += 6; + if (add_string) + { + if (add_string[0] == '\0') + { + g_snprintf(add_string, string_len, " - RAI: %x-%x-%u-%u", mcc, mnc, lac, rac); + } + } /* no length check possible */ - return(curr_offset - offset); + return (curr_offset - offset); } /* @@ -2935,9 +2937,9 @@ de_gmm_rai2(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, static guint16 de_gmm_update_res(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32 offset, guint len _U_, gchar *add_string _U_, int string_len _U_) { - guint8 oct; - guint32 curr_offset; - const gchar *str; + guint8 oct; + guint32 curr_offset; + const gchar *str; curr_offset = offset; @@ -2946,11 +2948,11 @@ de_gmm_update_res(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint /* IMPORTANT - IT'S ASSUMED THAT THE INFORMATION IS IN THE HIGHER NIBBLE */ oct >>= 4; - switch(oct&7) + switch (oct&7) { - case 0: str="RA updated"; break; - case 1: str="combined RA/LA updated"; break; - default: str="reserved"; + case 0: str = "RA updated"; break; + case 1: str = "combined RA/LA updated"; break; + default: str = "reserved"; } proto_tree_add_text(tree, @@ -2963,7 +2965,7 @@ de_gmm_update_res(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint /* no length check possible */ - return(curr_offset - offset); + return (curr_offset - offset); } /* @@ -2980,8 +2982,8 @@ static const value_string gsm_a_gm_update_type_vals[] = { static guint16 de_gmm_update_type(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32 offset, guint len _U_, gchar *add_string _U_, int string_len _U_) { - proto_item *tf = NULL; - proto_tree *tf_tree = NULL; + proto_item *tf; + proto_tree *tf_tree; proto_tree_add_bits_item(tree, hf_gsm_a_gm_ciph_key_seq_num, tvb, offset << 3, 4, ENC_BIG_ENDIAN); @@ -2989,13 +2991,13 @@ de_gmm_update_type(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guin tvb, offset, 1, "Update Type"); - tf_tree = proto_item_add_subtree(tf, ett_gmm_update_type ); + tf_tree = proto_item_add_subtree(tf, ett_gmm_update_type); proto_tree_add_item(tf_tree, hf_gsm_a_gm_for, tvb, offset, 1, ENC_BIG_ENDIAN); proto_tree_add_item(tf_tree, hf_gsm_a_gm_update_type, tvb, offset, 1, ENC_BIG_ENDIAN); /* no length check possible */ - return(1); + return (1); } /* @@ -3008,7 +3010,7 @@ de_gmm_ac_ref_nr(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint3 proto_tree_add_bits_item(tree, hf_gsm_a_gm_ac_ref_nr, tvb, (offset << 3) + 4, 4, ENC_BIG_ENDIAN); /* no length check possible */ - return(1); + return (1); } /* @@ -3021,7 +3023,7 @@ de_gmm_ac_ref_nr_h(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guin proto_tree_add_bits_item(tree, hf_gsm_a_gm_ac_ref_nr, tvb, offset << 3, 4, ENC_BIG_ENDIAN); /* no length check possible */ - return(1); + return (1); } /* @@ -3043,15 +3045,15 @@ de_gmm_service_type(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, gui bit_offset = offset << 3; proto_tree_add_bits_item(tree, hf_gsm_a_spare_bits, tvb, bit_offset, 1, ENC_BIG_ENDIAN); - bit_offset += 1; + bit_offset += 1; proto_tree_add_bits_item(tree, hf_gsm_a_gm_serv_type, tvb, bit_offset, 3, ENC_BIG_ENDIAN); - bit_offset += 3; + bit_offset += 3; proto_tree_add_bits_item(tree, hf_gsm_a_spare_bits, tvb, bit_offset, 1, ENC_BIG_ENDIAN); - bit_offset += 1; + bit_offset += 1; proto_tree_add_bits_item(tree, hf_gsm_a_gm_ciph_key_seq_num, tvb, bit_offset, 3, ENC_BIG_ENDIAN); /* no length check possible */ - return(1); + return (1); } /* @@ -3110,7 +3112,7 @@ de_gmm_ps_lcs_cap(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 o EXTRANEOUS_DATA_CHECK_EXPERT(len, curr_offset - offset, pinfo); - return(curr_offset - offset); + return (curr_offset - offset); } /* @@ -3119,18 +3121,18 @@ de_gmm_ps_lcs_cap(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 o static guint16 de_gmm_net_feat_supp(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32 offset, guint len _U_, gchar *add_string _U_, int string_len _U_) { - guint8 oct; - guint32 curr_offset; - const gchar *str; + guint8 oct; + guint32 curr_offset; + const gchar *str; curr_offset = offset; oct = tvb_get_guint8(tvb, curr_offset); - switch(oct&8) + switch (oct&8) { - case 8: str="LCS-MOLR via PS domain not supported"; break; - default: str="LCS-MOLR via PS domain supported"; + case 8: str = "LCS-MOLR via PS domain not supported"; break; + default: str ="LCS-MOLR via PS domain supported"; } proto_tree_add_text(tree, @@ -3143,14 +3145,14 @@ de_gmm_net_feat_supp(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, gu /* no length check possible */ - return(curr_offset - offset); + return (curr_offset - offset); } /* [7] 10.5.5.24 Inter RAT information container */ static guint16 de_gmm_rat_info_container(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guint len, gchar *add_string _U_, int string_len _U_) { - guint32 curr_offset; + guint32 curr_offset; tvbuff_t *rrc_irat_ho_info_tvb; curr_offset = offset; @@ -3159,9 +3161,9 @@ de_gmm_rat_info_container(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, g defined in 3GPP TS 25.331 [23c]. If this field includes padding bits, they are defined in 3GPP TS 25.331 [23c].*/ rrc_irat_ho_info_tvb = tvb_new_subset(tvb, curr_offset, len, len); if (rrc_irat_ho_info_handle) - call_dissector(rrc_irat_ho_info_handle, rrc_irat_ho_info_tvb,pinfo , tree); + call_dissector(rrc_irat_ho_info_handle, rrc_irat_ho_info_tvb, pinfo, tree); else - proto_tree_add_text(tree, tvb, curr_offset, len,"INTER RAT HANDOVER INFO - Not decoded"); + proto_tree_add_text(tree, tvb, curr_offset, len, "INTER RAT HANDOVER INFO - Not decoded"); return len; @@ -3184,14 +3186,14 @@ de_gmm_req_ms_info(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guin guint32 bit_offset; curr_offset = offset; - bit_offset = (curr_offset<<3)+4; + bit_offset = (curr_offset<<3)+4; proto_tree_add_bits_item(tree, hf_gsm_a_gm_req_ms_info_irat, tvb, bit_offset, 1, ENC_BIG_ENDIAN); bit_offset++; proto_tree_add_bits_item(tree, hf_gsm_a_gm_req_ms_info_irat2, tvb, bit_offset, 1, ENC_BIG_ENDIAN); bit_offset++; proto_tree_add_bits_item(tree, hf_gsm_a_spare_bits, tvb, bit_offset, 2, ENC_BIG_ENDIAN); - /*bit_offset+=2; + /*bit_offset += 2; curr_offset++;*/ return len; @@ -3205,7 +3207,7 @@ de_gmm_req_ms_info(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guin static guint16 de_gmm_eutran_irat_info_container(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guint len, gchar *add_string _U_, int string_len _U_) { - guint32 curr_offset; + guint32 curr_offset; tvbuff_t *lte_rrc_ue_eutra_cap_tvb; curr_offset = offset; @@ -3216,7 +3218,7 @@ de_gmm_eutran_irat_info_container(tvbuff_t *tvb, proto_tree *tree, packet_info * if (lte_rrc_ue_eutra_cap_handle) call_dissector(lte_rrc_ue_eutra_cap_handle, lte_rrc_ue_eutra_cap_tvb, pinfo, tree); else - proto_tree_add_text(tree, tvb, curr_offset, len,"E-UTRAN Inter RAT information container - Not decoded"); + proto_tree_add_text(tree, tvb, curr_offset, len, "E-UTRAN Inter RAT information container - Not decoded"); return len; } @@ -3241,14 +3243,14 @@ de_gmm_voice_domain_pref(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_ guint32 bit_offset; curr_offset = offset; - bit_offset = curr_offset<<3; + bit_offset = curr_offset<<3; proto_tree_add_bits_item(tree, hf_gsm_a_spare_bits, tvb, bit_offset, 5, ENC_BIG_ENDIAN); - bit_offset+=5; + bit_offset += 5; proto_tree_add_bits_item(tree, hf_gsm_a_gm_ue_usage_setting, tvb, bit_offset, 1, ENC_BIG_ENDIAN); bit_offset++; proto_tree_add_bits_item(tree, hf_gsm_a_gm_voice_domain_pref_for_eutran, tvb, bit_offset, 2, ENC_BIG_ENDIAN); - /*bit_offset+=2; + /*bit_offset += 2; curr_offset++;*/ return len; @@ -3260,11 +3262,11 @@ de_gmm_voice_domain_pref(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_ static guint16 de_gc_context_stat(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guint len _U_, gchar *add_string _U_, int string_len _U_) { - guint8 oct; - guint16 pdp_nr; - guint32 curr_offset; - proto_item *tf = NULL; - proto_tree *tf_tree = NULL; + guint8 oct; + guint16 pdp_nr; + guint32 curr_offset; + proto_item *tf; + proto_tree *tf_tree; curr_offset = offset; @@ -3272,20 +3274,20 @@ de_gc_context_stat(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 tvb, curr_offset, 1, "PDP Context Status"); - tf_tree = proto_item_add_subtree(tf, ett_gmm_context_stat ); + tf_tree = proto_item_add_subtree(tf, ett_gmm_context_stat); oct = tvb_get_guint8(tvb, curr_offset); - for ( pdp_nr=0;pdp_nr<16; pdp_nr++ ) + for (pdp_nr=0; pdp_nr<16; pdp_nr++) { - if ( pdp_nr == 8 ) + if (pdp_nr == 8) { curr_offset++; oct = tvb_get_guint8(tvb, curr_offset); } proto_tree_add_text(tf_tree, tvb, curr_offset, 1, - "NSAPI %d: %s (%u)",pdp_nr, + "NSAPI %d: %s (%u)", pdp_nr, pdp_str[oct&1], oct&1); oct>>=1; @@ -3295,7 +3297,7 @@ de_gc_context_stat(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 EXTRANEOUS_DATA_CHECK_EXPERT(len, curr_offset - offset, pinfo); - return(curr_offset - offset); + return (curr_offset - offset); } /* @@ -3304,21 +3306,21 @@ de_gc_context_stat(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 static guint16 de_gc_radio_prio(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32 offset, guint len _U_, gchar *add_string _U_, int string_len _U_) { - guint8 oct; - guint32 curr_offset; - const gchar *str; + guint8 oct; + guint32 curr_offset; + const gchar *str; curr_offset = offset; oct = tvb_get_guint8(tvb, curr_offset); - switch ( oct&7 ) + switch (oct&7) { - case 1: str="priority level 1 (highest)"; break; - case 2: str="priority level 2"; break; - case 3: str="priority level 3"; break; - case 4: str="priority level 4 (lowest)"; break; - default: str="priority level 4 (lowest)"; + case 1: str = "priority level 1 (highest)"; break; + case 2: str = "priority level 2"; break; + case 3: str = "priority level 3"; break; + case 4: str = "priority level 4 (lowest)"; break; + default: str = "priority level 4 (lowest)"; } proto_tree_add_text(tree, @@ -3329,7 +3331,7 @@ de_gc_radio_prio(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint3 curr_offset++; - return(curr_offset - offset); + return (curr_offset - offset); } /* @@ -3346,26 +3348,26 @@ static const value_string gsm_a_gm_gprs_timer_unit_vals[] = { static guint16 de_gc_timer(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32 offset, guint len _U_, gchar *add_string _U_, int string_len _U_) { - guint8 oct; - guint16 val; - const gchar *str; - proto_tree *subtree; - proto_item *item; + guint8 oct; + guint16 val; + const gchar *str; + proto_tree *subtree; + proto_item *item; oct = tvb_get_guint8(tvb, offset); val = oct&0x1f; - switch(oct>>5) + switch (oct>>5) { - case 0: str="sec"; val*=2; break; - case 1: str="min"; break; - case 2: str="min"; val*=6; break; + case 0: str = "sec"; val*=2; break; + case 1: str = "min"; break; + case 2: str = "min"; val*=6; break; case 7: - proto_tree_add_text(tree, + proto_tree_add_text(tree, tvb, offset, 1, "GPRS Timer: timer is deactivated"); - default: str="min"; + default: str = "min"; } item = proto_tree_add_text(tree, @@ -3379,7 +3381,7 @@ de_gc_timer(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32 off proto_tree_add_item(subtree, hf_gsm_a_gm_gprs_timer_value, tvb, offset, 1, ENC_BIG_ENDIAN); /* no length check possible */ - return(1); + return (1); } /* @@ -3388,10 +3390,10 @@ de_gc_timer(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32 off static guint16 de_gc_timer2(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32 offset, guint len _U_, gchar *add_string, int string_len _U_) { - guint8 oct; - guint16 val; - guint32 curr_offset; - const gchar *str; + guint8 oct; + guint16 val; + guint32 curr_offset; + const gchar *str; curr_offset = offset; @@ -3399,17 +3401,17 @@ de_gc_timer2(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32 of val = oct&0x1f; - switch(oct>>5) + switch (oct>>5) { - case 0: str="sec"; val*=2; break; - case 1: str="min"; break; - case 2: str="min"; val*=6; break; + case 0: str = "sec"; val*=2; break; + case 1: str = "min"; break; + case 2: str = "min"; val*=6; break; case 7: - proto_tree_add_text(tree, - tvb, curr_offset, 1, - "GPRS Timer: timer is deactivated"); + proto_tree_add_text(tree, + tvb, curr_offset, 1, + "GPRS Timer: timer is deactivated"); - default: str="min"; + default: str = "min"; } proto_tree_add_text(tree, @@ -3420,7 +3422,7 @@ de_gc_timer2(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32 of curr_offset++; - return(curr_offset - offset); + return (curr_offset - offset); } /* @@ -3429,9 +3431,9 @@ de_gc_timer2(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32 of static guint16 de_gc_radio_prio2(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32 offset, guint len _U_, gchar *add_string _U_, int string_len _U_) { - guint8 oct; - guint32 curr_offset; - const gchar *str; + guint8 oct; + guint32 curr_offset; + const gchar *str; curr_offset = offset; @@ -3440,13 +3442,13 @@ de_gc_radio_prio2(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint /* IMPORTANT - IT'S ASSUMED THAT THE INFORMATION IS IN THE HIGHER NIBBLE */ oct >>= 4; - switch ( oct&7 ) + switch (oct&7) { - case 1: str="priority level 1 (highest)"; break; - case 2: str="priority level 2"; break; - case 3: str="priority level 3"; break; - case 4: str="priority level 4 (lowest)"; break; - default: str="priority level 4 (lowest)"; + case 1: str = "priority level 1 (highest)"; break; + case 2: str = "priority level 2"; break; + case 3: str = "priority level 3"; break; + case 4: str = "priority level 4 (lowest)"; break; + default: str = "priority level 4 (lowest)"; } proto_tree_add_text(tree, @@ -3457,7 +3459,7 @@ de_gc_radio_prio2(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint curr_offset++; - return(curr_offset - offset); + return (curr_offset - offset); } /* @@ -3466,11 +3468,11 @@ de_gc_radio_prio2(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint static guint16 de_gc_mbms_context_stat(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32 offset, guint len, gchar *add_string _U_, int string_len _U_) { - guint32 curr_offset; - guint i; - guint8 oct, j; - proto_item *tf = NULL; - proto_tree *tf_tree = NULL; + guint32 curr_offset; + guint i; + guint8 oct, j; + proto_item *tf; + proto_tree *tf_tree; curr_offset = offset; @@ -3478,7 +3480,7 @@ de_gc_mbms_context_stat(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, tvb, curr_offset, 1, "MBMS Context Status"); - tf_tree = proto_item_add_subtree(tf, ett_gmm_context_stat ); + tf_tree = proto_item_add_subtree(tf, ett_gmm_context_stat); for (i=0; i<len; i++) { @@ -3488,7 +3490,7 @@ de_gc_mbms_context_stat(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, { proto_tree_add_text(tf_tree, tvb, curr_offset, 1, - "NSAPI %d: %s (%u)",128+i*8+j, + "NSAPI %d: %s (%u)", 128+i*8+j, pdp_str[oct&1], oct&1); oct>>=1; @@ -3496,7 +3498,7 @@ de_gc_mbms_context_stat(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, curr_offset++; } - return(len); + return (len); } /* @@ -3514,7 +3516,7 @@ de_gc_uplink_data_stat(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32 bit_offset; curr_offset = offset; - bit_offset = curr_offset<<3; + bit_offset = curr_offset<<3; proto_tree_add_bits_item(tree, hf_gsm_a_gm_nsapi_7_ul_stat, tvb, bit_offset, 1, ENC_BIG_ENDIAN); bit_offset++; @@ -3523,7 +3525,7 @@ de_gc_uplink_data_stat(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, proto_tree_add_bits_item(tree, hf_gsm_a_gm_nsapi_5_ul_stat, tvb, bit_offset, 1, ENC_BIG_ENDIAN); bit_offset++; proto_tree_add_bits_item(tree, hf_gsm_a_spare_bits, tvb, bit_offset, 5, ENC_BIG_ENDIAN); - bit_offset+=5; + bit_offset += 5; curr_offset++; proto_tree_add_bits_item(tree, hf_gsm_a_gm_nsapi_15_ul_stat, tvb, bit_offset, 1, ENC_BIG_ENDIAN); bit_offset++; @@ -3544,7 +3546,7 @@ de_gc_uplink_data_stat(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, bit_offset++; curr_offset++; */ - return(len); + return (len); } /* @@ -3557,31 +3559,31 @@ de_sm_apn(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, g { guint32 curr_offset; guint curr_len; - guint8 str[MAX_APN_LENGTH+1]; + guint8 str[MAX_APN_LENGTH+1]; curr_offset = offset; /* init buffer and copy it */ - memset ( str , 0 , MAX_APN_LENGTH ); + memset(str, 0, MAX_APN_LENGTH); tvb_memcpy(tvb, str, offset, len<MAX_APN_LENGTH?len:MAX_APN_LENGTH); curr_len = 0; - while (( curr_len < len ) && ( curr_len < MAX_APN_LENGTH )) + while ((curr_len < len) && (curr_len < MAX_APN_LENGTH)) { - guint step = str[curr_len]; - str[curr_len]='.'; - curr_len += step+1; + guint step = str[curr_len]; + str[curr_len] = '.'; + curr_len += step+1; } proto_tree_add_text(tree, tvb, curr_offset, len, - "APN: %s %s", str+1 , add_string ? add_string : ""); + "APN: %s %s", str+1, add_string ? add_string : ""); - curr_offset+= len; + curr_offset += len; EXTRANEOUS_DATA_CHECK_EXPERT(len, curr_offset - offset, pinfo); - return(curr_offset - offset); + return (curr_offset - offset); } /* @@ -3600,11 +3602,11 @@ de_sm_nsapi(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32 off proto_tree_add_text(tree, tvb, curr_offset, 1, "NSAPI: 0x%02x (%u) %s", - oct&0x0f, oct&0x0f,add_string ? add_string : ""); + oct&0x0f, oct&0x0f, add_string ? add_string : ""); curr_offset++; - return(curr_offset - offset); + return (curr_offset - offset); } /* @@ -3655,21 +3657,21 @@ static const value_string gsm_a_gm_link_dir_vals[] = { guint16 de_sm_pco(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guint len, gchar *add_string _U_, int string_len _U_) { - proto_item *generated_item = NULL; - guint32 curr_offset; - guint curr_len; - guchar oct; - struct e_in6_addr ipv6_addr; - int link_dir; - guint32 ipv4_addr; + proto_item *generated_item; + guint32 curr_offset; + guint curr_len; + guchar oct; + struct e_in6_addr ipv6_addr; + int link_dir; + guint32 ipv4_addr; - curr_len = len; + curr_len = len; curr_offset = offset; oct = tvb_get_guint8(tvb, curr_offset); link_dir = pinfo->link_dir; - generated_item =proto_tree_add_int(tree, hf_gsm_a_gm_link_dir, tvb, curr_offset, 0, link_dir); + generated_item = proto_tree_add_int(tree, hf_gsm_a_gm_link_dir, tvb, curr_offset, 0, link_dir); PROTO_ITEM_SET_GENERATED(generated_item); @@ -3683,16 +3685,15 @@ de_sm_pco(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, g * All other values are interpreted as PPP in this version of the protocol. * (3GPP TS 24.008 version 9.4.0 Release 9) */ - proto_tree_add_text(tree,tvb, curr_offset, 1, "Configuration Protocol: PPP for use with IP PDP type or IP PDN type (%u)",oct&0x07); + proto_tree_add_text(tree, tvb, curr_offset, 1, "Configuration Protocol: PPP for use with IP PDP type or IP PDN type (%u)", oct&0x07); curr_len--; curr_offset++; - while ( curr_len > 0 ) + while (curr_len > 0) { guchar e_len; guint16 prot; tvbuff_t *l3_tvb; - dissector_handle_t handle = NULL; /* Protocol ID 1 octet 4 * octet 5 @@ -3700,7 +3701,7 @@ de_sm_pco(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, g * Protocol ID 1 contents octet 7 */ - prot = tvb_get_ntohs(tvb,curr_offset); + prot = tvb_get_ntohs(tvb, curr_offset); proto_tree_add_uint_format(tree, hf_gsm_a_gm_pco_pid, tvb, curr_offset, 2, (guint32)prot, "Protocol or Container ID: %s (%u)", link_dir ? @@ -3708,14 +3709,14 @@ de_sm_pco(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, g val_to_str_const((guint32)prot, gsm_a_sm_pco_ms2net_prot_vals, val_to_str_ext_const(prot, &ppp_vals_ext, "Unknown")), (guint32)prot); - curr_len-=2; - curr_offset+=2; + curr_len -= 2; + curr_offset += 2; e_len = tvb_get_guint8(tvb, curr_offset); - proto_tree_add_text(tree,tvb, curr_offset, 1, "Length: 0x%02x (%u)", e_len , e_len); - curr_len-=1; - curr_offset+=1; + proto_tree_add_text(tree, tvb, curr_offset, 1, "Length: 0x%02x (%u)", e_len, e_len); + curr_len -= 1; + curr_offset += 1; - switch ( prot ) + switch (prot) { case 0x0001: case 0x0003: @@ -3732,7 +3733,7 @@ de_sm_pco(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, g break; case 0x0004: if (link_dir == P2P_DIR_DL) { - proto_tree_add_text(tree,tvb, curr_offset, 1, "Reject Code: 0x%02x (%u)", e_len , e_len); + proto_tree_add_text(tree, tvb, curr_offset, 1, "Reject Code: 0x%02x (%u)", e_len, e_len); } break; case 0x0005: @@ -3762,8 +3763,9 @@ de_sm_pco(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, g default: { if (e_len > 0) { - handle = dissector_get_uint_handle ( gprs_sm_pco_subdissector_table , prot ); - if ( handle != NULL ) + dissector_handle_t handle; + handle = dissector_get_uint_handle (gprs_sm_pco_subdissector_table, prot); + if (handle != NULL) { /* * dissect the embedded message @@ -3771,7 +3773,7 @@ de_sm_pco(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, g l3_tvb = tvb_new_subset(tvb, curr_offset, e_len, e_len); /* In this case we do not want the columns updated */ col_set_writable(pinfo->cinfo, FALSE); - call_dissector(handle, l3_tvb , pinfo , tree ); + call_dissector(handle, l3_tvb, pinfo, tree); col_set_writable(pinfo->cinfo, TRUE); } else @@ -3780,20 +3782,20 @@ de_sm_pco(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, g * dissect the embedded DATA message */ l3_tvb = tvb_new_subset(tvb, curr_offset, e_len, e_len); - call_dissector(data_handle, l3_tvb, pinfo , tree); + call_dissector(data_handle, l3_tvb, pinfo, tree); } } } } - curr_len-= e_len; - curr_offset+= e_len; + curr_len -= e_len; + curr_offset += e_len; } - curr_offset+= curr_len; + curr_offset += curr_len; EXTRANEOUS_DATA_CHECK_EXPERT(len, curr_offset - offset, pinfo); - return(curr_offset - offset); + return (curr_offset - offset); } /* @@ -3809,9 +3811,9 @@ static const value_string gsm_a_sm_pdp_type_org_vals[] = { static guint16 de_sm_pdp_addr(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guint len, gchar *add_string _U_, int string_len _U_) { - guint32 curr_offset; - const gchar *str; - guchar pdp_type_org, pdp_type_num; + guint32 curr_offset; + const gchar *str; + guchar pdp_type_org, pdp_type_num; curr_offset = offset; @@ -3822,14 +3824,14 @@ de_sm_pdp_addr(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offs curr_offset += 1; pdp_type_num = tvb_get_guint8(tvb, curr_offset); - if (pdp_type_org == 0 ) + if (pdp_type_org == 0) { /* ETSI allocated address */ switch (pdp_type_num) { - case 0x00: str="Reserved, used in earlier version of this protocol"; break; - case 0x01: str="PDP-type PPP"; break; - default: str="reserved"; + case 0x00: str = "Reserved, used in earlier version of this protocol"; break; + case 0x01: str = "PDP-type PPP"; break; + default: str = "reserved"; } } else if (pdp_type_org == 1) @@ -3837,36 +3839,36 @@ de_sm_pdp_addr(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offs /* IETF allocated address */ switch (pdp_type_num) { - case 0x21: str="IPv4 address"; break; - case 0x57: str="IPv6 address"; break; - case 0x8d: str="IPv4v6 address"; break; - default: str="Unknown, interpreted as IPv4 address"; + case 0x21: str = "IPv4 address"; break; + case 0x57: str = "IPv6 address"; break; + case 0x8d: str = "IPv4v6 address"; break; + default: str = "Unknown, interpreted as IPv4 address"; } } else if ((pdp_type_num == 0) && (pdp_type_org == 0x0f)) - str="Empty"; + str = "Empty"; else - str="Not specified"; + str = "Not specified"; proto_tree_add_text(tree, tvb, curr_offset, 1, - "PDP type number: %s (%u)",str,pdp_type_num); + "PDP type number: %s (%u)", str, pdp_type_num); - if (( len == 2 ) && (( pdp_type_num == 0x21 ) || ( pdp_type_num == 0x57 ) || (pdp_type_num == 0x8d))) + if ((len == 2) && ((pdp_type_num == 0x21) || (pdp_type_num == 0x57) || (pdp_type_num == 0x8d))) { proto_tree_add_text(tree, tvb, curr_offset, 1, "Dynamic addressing"); curr_offset += 1; - return(curr_offset - offset); + return (curr_offset - offset); } - else if ( len == 2 ) + else if (len == 2) { proto_tree_add_text(tree, tvb, curr_offset, 1, "No PDP address is included"); curr_offset += 1; - return(curr_offset - offset); + return (curr_offset - offset); } curr_offset += 1; @@ -3874,25 +3876,25 @@ de_sm_pdp_addr(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offs switch (pdp_type_num) { case 0x57: - proto_tree_add_item(tree,hf_gsm_a_sm_ip6_address,tvb,curr_offset,16,ENC_NA); - curr_offset+=16; + proto_tree_add_item(tree, hf_gsm_a_sm_ip6_address, tvb, curr_offset, 16, ENC_NA); + curr_offset += 16; break; case 0x8d: - proto_tree_add_item(tree,hf_gsm_a_sm_ip4_address,tvb,curr_offset,4,ENC_BIG_ENDIAN); - curr_offset+=4; - proto_tree_add_item(tree,hf_gsm_a_sm_ip6_address,tvb,curr_offset,16,ENC_NA); - curr_offset+=16; + proto_tree_add_item(tree, hf_gsm_a_sm_ip4_address, tvb, curr_offset, 4, ENC_BIG_ENDIAN); + curr_offset += 4; + proto_tree_add_item(tree, hf_gsm_a_sm_ip6_address, tvb, curr_offset, 16, ENC_NA); + curr_offset += 16; break; default: - proto_tree_add_item(tree,hf_gsm_a_sm_ip4_address,tvb,curr_offset,4,ENC_BIG_ENDIAN); - curr_offset+=4; + proto_tree_add_item(tree, hf_gsm_a_sm_ip4_address, tvb, curr_offset, 4, ENC_BIG_ENDIAN); + curr_offset += 4; } EXTRANEOUS_DATA_CHECK_EXPERT(len, curr_offset - offset, pinfo); - return(curr_offset - offset); + return (curr_offset - offset); } /* @@ -4070,10 +4072,10 @@ qos_calc_ext_bitrate(guint8 oct) guint16 de_sm_qos(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guint len, gchar *add_string _U_, int string_len _U_) { - guint32 curr_offset; - guchar oct, tmp_oct; - const gchar *str; - guint32 temp32; + guint32 curr_offset; + guchar oct, tmp_oct; + const gchar *str; + guint32 temp32; curr_offset = offset; @@ -4081,18 +4083,18 @@ de_sm_qos(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, g proto_tree_add_bits_item(tree, hf_gsm_a_spare_bits, tvb, (curr_offset << 3), 2, ENC_BIG_ENDIAN); proto_tree_add_item(tree, hf_gsm_a_qos_delay_cls, tvb, curr_offset, 1, ENC_BIG_ENDIAN); proto_tree_add_item(tree, hf_gsm_a_qos_reliability_cls, tvb, curr_offset, 1, ENC_BIG_ENDIAN); - curr_offset+= 1; + curr_offset += 1; /* Octet 4 */ proto_tree_add_item(tree, hf_gsm_a_qos_peak_thr, tvb, curr_offset, 1, ENC_BIG_ENDIAN); proto_tree_add_bits_item(tree, hf_gsm_a_spare_bits, tvb, (curr_offset << 3) + 4, 1, ENC_BIG_ENDIAN); proto_tree_add_item(tree, hf_gsm_a_qos_prec_class, tvb, curr_offset, 1, ENC_BIG_ENDIAN); - curr_offset+= 1; + curr_offset += 1; /* Octet 5 */ proto_tree_add_bits_item(tree, hf_gsm_a_spare_bits, tvb, (curr_offset << 3), 3, ENC_BIG_ENDIAN); proto_tree_add_item(tree, hf_gsm_a_qos_mean_thr, tvb, curr_offset, 1, ENC_BIG_ENDIAN); - curr_offset+= 1; + curr_offset += 1; NO_MORE_DATA_CHECK(len); @@ -4100,33 +4102,33 @@ de_sm_qos(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, g proto_tree_add_item(tree, hf_gsm_a_qos_traffic_cls, tvb, curr_offset, 1, ENC_BIG_ENDIAN); proto_tree_add_item(tree, hf_gsm_a_qos_del_order, tvb, curr_offset, 1, ENC_BIG_ENDIAN); proto_tree_add_item(tree, hf_gsm_a_qos_del_of_err_sdu, tvb, curr_offset, 1, ENC_BIG_ENDIAN); - curr_offset+= 1; + curr_offset += 1; NO_MORE_DATA_CHECK(len); /* Octet 7 */ oct = tvb_get_guint8(tvb, curr_offset); - switch ( oct ) + switch (oct) { - case 0x00: str="Subscribed maximum SDU size/reserved"; break; - case 0x97: str="1502 octets"; break; - case 0x98: str="1510 octets"; break; - case 0x99: str="1520 octets"; break; - case 0xff: str="Reserved"; break; - default: str="Unspecified"; + case 0x00: str = "Subscribed maximum SDU size/reserved"; break; + case 0x97: str = "1502 octets"; break; + case 0x98: str = "1510 octets"; break; + case 0x99: str = "1520 octets"; break; + case 0xff: str = "Reserved"; break; + default: str = "Unspecified"; } - if (( oct >= 1 ) && ( oct <= 0x96 )) + if ((oct >= 1) && (oct <= 0x96)) proto_tree_add_text(tree, tvb, curr_offset, 1, - "Maximum SDU size: %u octets (%u)",oct*10, oct); + "Maximum SDU size: %u octets (%u)", oct*10, oct); else proto_tree_add_text(tree, tvb, curr_offset, 1, - "Maximum SDU size: %s (%u)",str, oct); + "Maximum SDU size: %s (%u)", str, oct); - curr_offset+= 1; + curr_offset += 1; NO_MORE_DATA_CHECK(len); @@ -4137,28 +4139,28 @@ de_sm_qos(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, g { case 0x00: str = "Subscribed maximum bit rate for uplink/reserved"; break; case 0xff: str = "0 kbps"; break; - default: str = ep_strdup_printf("%u kbps", qos_calc_bitrate(oct)); + default: str = ep_strdup_printf("%u kbps", qos_calc_bitrate(oct)); } proto_tree_add_uint_format_value(tree, hf_gsm_a_qos_max_bitrate_upl, tvb, curr_offset, 1, oct, "%s (%u)", str, oct); - curr_offset+= 1; + curr_offset += 1; NO_MORE_DATA_CHECK(len); /* Octet 9 */ oct = tvb_get_guint8(tvb, curr_offset); - switch ( oct ) + switch (oct) { - case 0x00: str="Subscribed maximum bit rate for downlink/reserved"; break; - case 0xff: str="0 kbps"; break; - default: str = ep_strdup_printf("%u kbps", qos_calc_bitrate(oct)); + case 0x00: str = "Subscribed maximum bit rate for downlink/reserved"; break; + case 0xff: str = "0 kbps"; break; + default: str = ep_strdup_printf("%u kbps", qos_calc_bitrate(oct)); } proto_tree_add_uint_format_value(tree, hf_gsm_a_qos_max_bitrate_downl, tvb, curr_offset, 1, oct, "%s (%u)", str, oct); - curr_offset+= 1; + curr_offset += 1; NO_MORE_DATA_CHECK(len); @@ -4166,17 +4168,17 @@ de_sm_qos(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, g proto_tree_add_item(tree, hf_gsm_a_qos_ber, tvb, curr_offset, 1, ENC_BIG_ENDIAN); proto_tree_add_item(tree, hf_gsm_a_qos_sdu_err_rat, tvb, curr_offset, 1, ENC_BIG_ENDIAN); - curr_offset+= 1; + curr_offset += 1; NO_MORE_DATA_CHECK(len); /* Octet 11 */ oct = tvb_get_guint8(tvb, curr_offset); - tmp_oct = oct >> 2; + tmp_oct = oct>>2; switch (tmp_oct) { - case 0x00: str="Subscribed transfer delay/reserved"; break; - case 0x3f: str="Reserved"; break; + case 0x00: str = "Subscribed transfer delay/reserved"; break; + case 0x3f: str = "Reserved"; break; default: if (tmp_oct <= 0x0f) temp32 = tmp_oct * 10; @@ -4199,45 +4201,45 @@ de_sm_qos(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, g proto_tree_add_uint_format_value(tree, hf_gsm_a_qos_traf_handl_prio, tvb, curr_offset, 1, oct, "%s (%u)", str, tmp_oct); - curr_offset+= 1; + curr_offset += 1; NO_MORE_DATA_CHECK(len); /* Octet 12 */ oct = tvb_get_guint8(tvb, curr_offset); - switch ( oct ) + switch (oct) { - case 0x00: str="Subscribed guaranteed bit rate for uplink/reserved"; break; - case 0xff: str="0 kbps"; break; - default: str = ep_strdup_printf("%u kbps", qos_calc_bitrate(oct)); + case 0x00: str = "Subscribed guaranteed bit rate for uplink/reserved"; break; + case 0xff: str = "0 kbps"; break; + default: str = ep_strdup_printf("%u kbps", qos_calc_bitrate(oct)); } proto_tree_add_uint_format_value(tree, hf_gsm_a_qos_guar_bitrate_upl, tvb, curr_offset, 1, oct, "%s (%u)", str, oct); - curr_offset+= 1; + curr_offset += 1; NO_MORE_DATA_CHECK(len); /* Octet 13 */ oct = tvb_get_guint8(tvb, curr_offset); - switch ( oct ) + switch (oct) { - case 0x00: str="Subscribed guaranteed bit rate for downlink/reserved"; break; - case 0xff: str="0 kbps"; break; - default: str = ep_strdup_printf("%u kbps", qos_calc_bitrate(oct)); + case 0x00: str = "Subscribed guaranteed bit rate for downlink/reserved"; break; + case 0xff: str = "0 kbps"; break; + default: str = ep_strdup_printf("%u kbps", qos_calc_bitrate(oct)); } proto_tree_add_uint_format_value(tree, hf_gsm_a_qos_guar_bitrate_downl, tvb, curr_offset, 1, oct, "%s (%u)", str, oct); - curr_offset+= 1; + curr_offset += 1; NO_MORE_DATA_CHECK(len); /* Ocet 14 */ oct = tvb_get_guint8(tvb, curr_offset); proto_tree_add_bits_item(tree, hf_gsm_a_spare_bits, tvb, (curr_offset << 3), 3, ENC_BIG_ENDIAN); - proto_tree_add_item(tree, hf_gsm_a_qos_signalling_ind, tvb , curr_offset, 1, ENC_BIG_ENDIAN); + proto_tree_add_item(tree, hf_gsm_a_qos_signalling_ind, tvb, curr_offset, 1, ENC_BIG_ENDIAN); tmp_oct = oct & 7; if (tmp_oct == 0x01) @@ -4248,7 +4250,7 @@ de_sm_qos(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, g proto_tree_add_uint_format_value(tree, hf_gsm_a_qos_source_stat_desc, tvb, curr_offset, 1, oct, "%s (%u)", str, tmp_oct); - curr_offset+= 1; + curr_offset += 1; NO_MORE_DATA_CHECK(len); /* Octet 15 */ @@ -4267,7 +4269,7 @@ de_sm_qos(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, g proto_tree_add_uint_format_value(tree, hf_gsm_a_qos_max_bitrate_downl_ext, tvb, curr_offset, 1, oct, "%s (%u)", str, oct); - curr_offset+= 1; + curr_offset += 1; NO_MORE_DATA_CHECK(len); /* Octet 16 */ @@ -4286,7 +4288,7 @@ de_sm_qos(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, g proto_tree_add_uint_format_value(tree, hf_gsm_a_qos_guar_bitrate_downl_ext, tvb, curr_offset, 1, oct, "%s (%u)", str, oct); - curr_offset+= 1; + curr_offset += 1; NO_MORE_DATA_CHECK(len); /* Maximum bit rate for uplink (extended) Octet 17 */ @@ -4305,7 +4307,7 @@ de_sm_qos(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, g proto_tree_add_uint_format_value(tree, hf_gsm_a_qos_max_bitrate_upl_ext, tvb, curr_offset, 1, oct, "%s (%u)", str, oct); - curr_offset+= 1; + curr_offset += 1; NO_MORE_DATA_CHECK(len); /* Guaranteed bit rate for uplink (extended) Octet 18 */ @@ -4324,11 +4326,11 @@ de_sm_qos(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, g proto_tree_add_uint_format_value(tree, hf_gsm_a_qos_guar_bitrate_upl_ext, tvb, curr_offset, 1, oct, "%s (%u)", str, oct); - curr_offset+= 1; + curr_offset += 1; EXTRANEOUS_DATA_CHECK_EXPERT(len, curr_offset - offset, pinfo); - return(curr_offset - offset); + return (curr_offset - offset); } /* @@ -4382,8 +4384,8 @@ static const value_string gsm_a_sm_cause_vals[] = { static guint16 de_sm_cause(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32 offset, guint len _U_, gchar *add_string _U_, int string_len _U_) { - guint8 oct; - const gchar *str; + guint8 oct; + const gchar *str; oct = tvb_get_guint8(tvb, offset); @@ -4395,7 +4397,7 @@ de_sm_cause(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32 off offset, 1, oct, "%s (%u)", str, oct); /* no length check possible */ - return(1); + return (1); } /* @@ -4404,8 +4406,8 @@ de_sm_cause(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32 off static guint16 de_sm_cause_2(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32 offset, guint len _U_, gchar *add_string _U_, int string_len _U_) { - guint8 oct; - const gchar *str; + guint8 oct; + const gchar *str; oct = tvb_get_guint8(tvb, offset); @@ -4417,7 +4419,7 @@ de_sm_cause_2(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32 o offset, 1, oct, "%s (%u)", str, oct); /* no length check possible */ - return(1); + return (1); } /* * [7] 10.5.6.7 @@ -4434,7 +4436,8 @@ de_sm_linked_ti(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 off guint32 curr_offset; guint curr_len; gchar oct; - curr_len = len; + + curr_len = len; curr_offset = offset; oct = tvb_get_guint8(tvb, curr_offset); @@ -4447,14 +4450,14 @@ de_sm_linked_ti(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 off * value is encoded in bits 7-1 of the second octet. */ - if ( curr_len > 1 ) + if (curr_len > 1) { curr_offset++; oct = tvb_get_guint8(tvb, curr_offset); proto_tree_add_text(tree, tvb, curr_offset, 1, - "TI value: 0x%02x (%u)",oct&0x7f,oct&0x7f); + "TI value: 0x%02x (%u)", oct&0x7f, oct&0x7f); proto_tree_add_item(tree, hf_gsm_a_sm_ext, tvb, offset, 1, ENC_BIG_ENDIAN); @@ -4464,14 +4467,14 @@ de_sm_linked_ti(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 off { proto_tree_add_text(tree, tvb, curr_offset, 1, - "TI value: 0x%02x (%u)",(oct>>4)&7,(oct>>4)&7); + "TI value: 0x%02x (%u)", (oct>>4)&7, (oct>>4)&7); curr_offset++; } EXTRANEOUS_DATA_CHECK_EXPERT(len, curr_offset - offset, pinfo); - return(curr_offset - offset); + return (curr_offset - offset); } /* @@ -4493,7 +4496,7 @@ de_sm_sapi(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32 offs proto_tree_add_item(tree, hf_gsm_a_sm_llc_sapi, tvb, offset, 1, ENC_BIG_ENDIAN); /* no length check possible */ - return(1); + return (1); } /* @@ -4511,7 +4514,7 @@ de_sm_tear_down(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32 proto_tree_add_item(tree, hf_gsm_a_sm_tdi, tvb, offset, 1, ENC_BIG_ENDIAN); /* no length check possible */ - return(1); + return (1); } /* @@ -4531,20 +4534,20 @@ guint16 de_sm_pflow_id(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guint len, gchar *add_string _U_, int string_len _U_) { guint32 curr_offset; - guint value; + guint value; curr_offset = offset; - value = tvb_get_guint8(tvb,curr_offset); + value = tvb_get_guint8(tvb, curr_offset); proto_tree_add_bits_item(tree, hf_gsm_a_spare_bits, tvb, curr_offset << 3, 1, ENC_BIG_ENDIAN); proto_tree_add_item(tree, hf_gsm_a_sm_packet_flow_id, tvb, curr_offset, 1, ENC_BIG_ENDIAN); curr_offset++; - if (add_string) - g_snprintf(add_string, string_len, " - %s", rval_to_str(value, gsm_a_sm_packet_flow_id_vals, "Unknown")); + if (add_string) + g_snprintf(add_string, string_len, " - %s", rval_to_str(value, gsm_a_sm_packet_flow_id_vals, "Unknown")); EXTRANEOUS_DATA_CHECK_EXPERT(len, curr_offset - offset, pinfo); - return(curr_offset - offset); + return (curr_offset - offset); } /* @@ -4564,8 +4567,8 @@ static const value_string gsm_a_tft_op_code_vals[] = { }; static const true_false_string gsm_a_tft_e_bit = { - "Parameters list is included", - "Parameters list is not included" + "Parameters list is included", + "Parameters list is not included" }; static const value_string gsm_a_tft_pkt_flt_dir_vals[] = { @@ -4588,9 +4591,6 @@ de_sm_tflow_temp(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 of { guint32 curr_offset; guint curr_len; - proto_item *tf = NULL; - proto_tree *tf_tree = NULL; - proto_tree *comp_tree = NULL; guchar op_code; guchar pkt_fil_count; guchar e_bit; @@ -4602,7 +4602,7 @@ de_sm_tflow_temp(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 of gint pack_component_type; gint param; - curr_len = len; + curr_len = len; curr_offset = offset; /* @@ -4614,9 +4614,9 @@ de_sm_tflow_temp(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 of pkt_fil_count = oct&0x0f; e_bit = (oct>>4)&1; - proto_tree_add_item(tree,hf_gsm_a_tft_op_code,tvb,curr_offset,1,ENC_BIG_ENDIAN); - proto_tree_add_item(tree,hf_gsm_a_tft_e_bit,tvb,curr_offset,1,ENC_BIG_ENDIAN); - proto_tree_add_item(tree,hf_gsm_a_tft_pkt_flt,tvb,curr_offset,1,ENC_BIG_ENDIAN); + proto_tree_add_item(tree, hf_gsm_a_tft_op_code, tvb, curr_offset, 1, ENC_BIG_ENDIAN); + proto_tree_add_item(tree, hf_gsm_a_tft_e_bit, tvb, curr_offset, 1, ENC_BIG_ENDIAN); + proto_tree_add_item(tree, hf_gsm_a_tft_pkt_flt, tvb, curr_offset, 1, ENC_BIG_ENDIAN); curr_offset++; curr_len--; @@ -4624,21 +4624,23 @@ de_sm_tflow_temp(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 of /* Packet filter list dissect */ count = 0; - if ( op_code == 2 ) /* delete TFT contains no packet filters. so we will jump over it */ + if (op_code == 2) /* delete TFT contains no packet filters. so we will jump over it */ count = pkt_fil_count; - while ( count < pkt_fil_count ) + while (count < pkt_fil_count) { + proto_item *tf; + proto_tree *tf_tree; tf = proto_tree_add_text(tree, tvb, curr_offset, 1, - "Packet filter %d",count); /* 0-> 7 */ + "Packet filter %d", count); /* 0-> 7 */ - tf_tree = proto_item_add_subtree(tf, ett_sm_tft ); + tf_tree = proto_item_add_subtree(tf, ett_sm_tft); - if ( op_code == 5 ) /* Delete packet filters from existing TFT - just a list of identifiers */ + if (op_code == 5) /* Delete packet filters from existing TFT - just a list of identifiers */ { if ((curr_offset-offset)<1) { - proto_tree_add_text(tf_tree,tvb, curr_offset, 1,"Not enough data"); - return(len); + proto_tree_add_text(tf_tree, tvb, curr_offset, 1, "Not enough data"); + return (len); } proto_tree_add_bits_item(tf_tree, hf_gsm_a_spare_bits, tvb, (curr_offset<<3), 4, ENC_BIG_ENDIAN); proto_tree_add_item(tf_tree, hf_gsm_a_tft_pkt_flt_id, tvb, curr_offset, 1, ENC_BIG_ENDIAN); @@ -4650,8 +4652,8 @@ de_sm_tflow_temp(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 of { if ((curr_offset-offset)<1) { - proto_tree_add_text(tf_tree,tvb, curr_offset, 1,"Not enough data"); - return(len); + proto_tree_add_text(tf_tree, tvb, curr_offset, 1, "Not enough data"); + return (len); } proto_tree_add_bits_item(tf_tree, hf_gsm_a_spare_bits, tvb, (curr_offset<<3), 2, ENC_BIG_ENDIAN); proto_tree_add_item(tf_tree, hf_gsm_a_tft_pkt_flt_dir, tvb, curr_offset, 1, ENC_BIG_ENDIAN); @@ -4659,9 +4661,9 @@ de_sm_tflow_temp(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 of curr_offset++; curr_len--; - if ((curr_offset-offset)<1) { - proto_tree_add_text(tf_tree,tvb, curr_offset, 1,"Not enough data"); - return(len); + if ((curr_offset-offset) < 1) { + proto_tree_add_text(tf_tree, tvb, curr_offset, 1, "Not enough data"); + return (len); } oct = tvb_get_guint8(tvb, curr_offset); curr_offset++; @@ -4669,136 +4671,137 @@ de_sm_tflow_temp(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 of proto_tree_add_text(tf_tree, tvb, curr_offset-1, 1, - "Packet evaluation precedence: 0x%02x (%u)",oct,oct ); + "Packet evaluation precedence: 0x%02x (%u)", oct, oct); - if ((curr_offset-offset)<1) { proto_tree_add_text(tf_tree,tvb, curr_offset, 1,"Not enough data"); return(len);} + if ((curr_offset-offset)<1) { proto_tree_add_text(tf_tree, tvb, curr_offset, 1, "Not enough data"); return (len);} pf_length = tvb_get_guint8(tvb, curr_offset); curr_offset++; curr_len--; proto_tree_add_text(tf_tree, tvb, curr_offset-1, 1, - "Packet filter length: 0x%02x (%u)",pf_length,pf_length ); + "Packet filter length: 0x%02x (%u)", pf_length, pf_length); /* New tree for component */ /* Dissect Packet filter Component */ - /* while ( filter_len > 1 ) */ + /* while (filter_len > 1) */ /* packet filter component type identifier: */ - while (pf_length > 0 ){ - if ((curr_offset-offset)<1) { - proto_tree_add_text(tf_tree,tvb, curr_offset, 1,"Not enough data"); - return(len); + while (pf_length > 0) { + proto_tree *comp_tree; + if ((curr_offset-offset) < 1) { + proto_tree_add_text(tf_tree, tvb, curr_offset, 1, "Not enough data"); + return (len); } pack_component_type = tvb_get_guint8(tvb, curr_offset); curr_offset++; curr_len--; pf_length--; - tf=proto_tree_add_text(tf_tree,tvb, curr_offset-1, 1,"Packet filter component type identifier: "); - comp_tree = proto_item_add_subtree(tf, ett_sm_tft ); + tf = proto_tree_add_text(tf_tree, tvb, curr_offset-1, 1, "Packet filter component type identifier: "); + comp_tree = proto_item_add_subtree(tf, ett_sm_tft); - switch ( pack_component_type ){ + switch (pack_component_type) { case 0x10: - str="IPv4 remote address type"; - proto_tree_add_item(comp_tree,hf_gsm_a_sm_ip4_address,tvb,curr_offset,4,ENC_BIG_ENDIAN); - curr_offset+=4; - curr_len-=4; - proto_tree_add_item(comp_tree,hf_gsm_a_sm_ip4_mask,tvb,curr_offset,4,ENC_BIG_ENDIAN); - curr_offset+=4; - curr_len-=4; - pf_length-=8; + str = "IPv4 remote address type"; + proto_tree_add_item(comp_tree, hf_gsm_a_sm_ip4_address, tvb, curr_offset, 4, ENC_BIG_ENDIAN); + curr_offset += 4; + curr_len -= 4; + proto_tree_add_item(comp_tree, hf_gsm_a_sm_ip4_mask, tvb, curr_offset, 4, ENC_BIG_ENDIAN); + curr_offset += 4; + curr_len -= 4; + pf_length -= 8; break; case 0x20: - str="IPv6 remote address type"; - proto_tree_add_item(comp_tree,hf_gsm_a_sm_ip6_address,tvb,curr_offset,16,ENC_NA); - curr_offset+=16; - curr_len-=16; - proto_tree_add_item(comp_tree,hf_gsm_a_sm_ip6_mask,tvb,curr_offset,16,ENC_NA); - curr_offset+=16; - curr_len-=16; - pf_length-=32; + str = "IPv6 remote address type"; + proto_tree_add_item(comp_tree, hf_gsm_a_sm_ip6_address, tvb, curr_offset, 16, ENC_NA); + curr_offset += 16; + curr_len -= 16; + proto_tree_add_item(comp_tree, hf_gsm_a_sm_ip6_mask, tvb, curr_offset, 16, ENC_NA); + curr_offset += 16; + curr_len -= 16; + pf_length -= 32; break; case 0x30: - str="Protocol identifier/Next header type"; - proto_tree_add_item(comp_tree,hf_gsm_a_tft_protocol_header,tvb,curr_offset,1,ENC_BIG_ENDIAN); - curr_offset+=1; - curr_len-=1; - pf_length-=1; + str = "Protocol identifier/Next header type"; + proto_tree_add_item(comp_tree, hf_gsm_a_tft_protocol_header, tvb, curr_offset, 1, ENC_BIG_ENDIAN); + curr_offset += 1; + curr_len -= 1; + pf_length -= 1; break; case 0x40: - str="Single local port type"; - proto_tree_add_item(comp_tree,hf_gsm_a_tft_port,tvb,curr_offset,2,ENC_BIG_ENDIAN); - curr_offset+=2; - curr_len-=2; - pf_length-=2; + str = "Single local port type"; + proto_tree_add_item(comp_tree, hf_gsm_a_tft_port, tvb, curr_offset, 2, ENC_BIG_ENDIAN); + curr_offset += 2; + curr_len -= 2; + pf_length -= 2; break; case 0x41: - str="Local port range type"; - proto_tree_add_item(comp_tree,hf_gsm_a_tft_port_low,tvb,curr_offset,2,ENC_BIG_ENDIAN); - curr_offset+=2; - proto_tree_add_item(comp_tree,hf_gsm_a_tft_port_high,tvb,curr_offset,2,ENC_BIG_ENDIAN); - curr_offset+=2; - curr_len-=4; - pf_length-=4; + str = "Local port range type"; + proto_tree_add_item(comp_tree, hf_gsm_a_tft_port_low, tvb, curr_offset, 2, ENC_BIG_ENDIAN); + curr_offset += 2; + proto_tree_add_item(comp_tree, hf_gsm_a_tft_port_high, tvb, curr_offset, 2, ENC_BIG_ENDIAN); + curr_offset += 2; + curr_len -= 4; + pf_length -= 4; break; case 0x50: - str="Single remote port type"; - proto_tree_add_item(comp_tree,hf_gsm_a_tft_port,tvb,curr_offset,2,ENC_BIG_ENDIAN); - curr_offset+=2; - curr_len-=2; - pf_length-=2; + str = "Single remote port type"; + proto_tree_add_item(comp_tree, hf_gsm_a_tft_port, tvb, curr_offset, 2, ENC_BIG_ENDIAN); + curr_offset += 2; + curr_len -= 2; + pf_length -= 2; break; case 0x51: - str="Remote port range type"; - proto_tree_add_item(comp_tree,hf_gsm_a_tft_port_low,tvb,curr_offset,2,ENC_BIG_ENDIAN); - curr_offset+=2; - proto_tree_add_item(comp_tree,hf_gsm_a_tft_port_high,tvb,curr_offset,2,ENC_BIG_ENDIAN); - curr_offset+=2; - curr_len-=4; - pf_length-=4; + str = "Remote port range type"; + proto_tree_add_item(comp_tree, hf_gsm_a_tft_port_low, tvb, curr_offset, 2, ENC_BIG_ENDIAN); + curr_offset += 2; + proto_tree_add_item(comp_tree, hf_gsm_a_tft_port_high, tvb, curr_offset, 2, ENC_BIG_ENDIAN); + curr_offset += 2; + curr_len -= 4; + pf_length -= 4; break; case 0x60: - str="Security parameter index type"; - proto_tree_add_item(comp_tree,hf_gsm_a_tft_security,tvb,curr_offset,4,ENC_BIG_ENDIAN); - curr_offset+=4; - curr_len-=4; - pf_length-=4; + str = "Security parameter index type"; + proto_tree_add_item(comp_tree, hf_gsm_a_tft_security, tvb, curr_offset, 4, ENC_BIG_ENDIAN); + curr_offset += 4; + curr_len -= 4; + pf_length -= 4; break; case 0x70: - str="Type of service/Traffic class type"; - proto_tree_add_item(comp_tree,hf_gsm_a_tft_traffic_class,tvb,curr_offset,1,ENC_BIG_ENDIAN); + str = "Type of service/Traffic class type"; + proto_tree_add_item(comp_tree, hf_gsm_a_tft_traffic_class, tvb, curr_offset, 1, ENC_BIG_ENDIAN); curr_offset++; - proto_tree_add_item(comp_tree,hf_gsm_a_tft_traffic_mask,tvb,curr_offset,1,ENC_BIG_ENDIAN); + proto_tree_add_item(comp_tree, hf_gsm_a_tft_traffic_mask, tvb, curr_offset, 1, ENC_BIG_ENDIAN); curr_offset++; curr_len-=2; pf_length-=2; break; case 0x80: - str="Flow label type"; + str = "Flow label type"; proto_tree_add_bits_item(comp_tree, hf_gsm_a_spare_bits, tvb, (curr_offset<<3), 4, ENC_BIG_ENDIAN); - proto_tree_add_item(comp_tree,hf_gsm_a_tft_flow_label_type,tvb,curr_offset,3,ENC_BIG_ENDIAN); - curr_offset+=3; - curr_len-=3; - pf_length-=3; + proto_tree_add_item(comp_tree, hf_gsm_a_tft_flow_label_type, tvb, curr_offset, 3, ENC_BIG_ENDIAN); + curr_offset += 3; + curr_len -= 3; + pf_length -= 3; break; default: - str="not specified"; - curr_offset+=pf_length; - curr_len-=pf_length; - pf_length=0; + str = "not specified"; + curr_offset += pf_length; + curr_len -= pf_length; + pf_length = 0; } proto_item_append_text(tf, "%s (%u)", str, pack_component_type); } @@ -4813,13 +4816,15 @@ de_sm_tflow_temp(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 of if ((e_bit == 1) && curr_len) { count = 0; while (curr_len) { + proto_item *tf; + proto_tree *tf_tree; pf_length = tvb_get_guint8(tvb, curr_offset+1); - tf = proto_tree_add_text(tree, tvb, curr_offset, pf_length+2, "Parameter %d" ,count); - tf_tree = proto_item_add_subtree(tf, ett_sm_tft ); - param = tvb_get_guint8(tvb, curr_offset); + tf = proto_tree_add_text(tree, tvb, curr_offset, pf_length+2, "Parameter %d", count); + tf_tree = proto_item_add_subtree(tf, ett_sm_tft); + param = tvb_get_guint8(tvb, curr_offset); proto_tree_add_item(tf_tree, hf_gsm_a_tft_param_id, tvb, curr_offset, 1, ENC_BIG_ENDIAN); curr_offset += 2; - curr_len -= 2; + curr_len -= 2; switch (param) { case 0x01: proto_tree_add_text(tf_tree, tvb, curr_offset, pf_length, "Authorization token value: 0x%s", @@ -4834,7 +4839,7 @@ de_sm_tflow_temp(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 of break; case 0x03: - for (i = 0; i < pf_length; i++) { + for (i=0; i<pf_length; i++) { proto_tree_add_text(tf_tree, tvb, curr_offset+i, 1, "Packet filter identifier %d: %d", i, tvb_get_guint8(tvb, curr_offset+i)); } @@ -4846,14 +4851,14 @@ de_sm_tflow_temp(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 of break; } curr_offset += pf_length; - curr_len -= pf_length; + curr_len -= pf_length; count++; } } EXTRANEOUS_DATA_CHECK_EXPERT(len, curr_offset - offset, pinfo); - return(len); + return (len); } /* @@ -4874,7 +4879,7 @@ de_sm_tmgi(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, EXTRANEOUS_DATA_CHECK_EXPERT(len, curr_offset - offset, pinfo); - return(curr_offset - offset); + return (curr_offset - offset); } /* @@ -4883,8 +4888,8 @@ de_sm_tmgi(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, static guint16 de_sm_mbms_bearer_cap(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guint len, gchar *add_string _U_, int string_len _U_) { - guint32 curr_offset, temp32; - guint8 oct; + guint32 curr_offset, temp32; + guint8 oct; const gchar *str; curr_offset = offset; @@ -4893,14 +4898,14 @@ de_sm_mbms_bearer_cap(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint switch (oct) { - case 0x00: str="Subscribed maximum bit rate for downlink/reserved"; break; - case 0xff: str="0 kbps"; break; - default: str = ep_strdup_printf("%u kbps", qos_calc_bitrate(oct)); + case 0x00: str = "Subscribed maximum bit rate for downlink/reserved"; break; + case 0xff: str = "0 kbps"; break; + default: str = ep_strdup_printf("%u kbps", qos_calc_bitrate(oct)); } proto_tree_add_uint_format_value(tree, hf_gsm_a_qos_max_bitrate_downl, tvb, curr_offset, 1, oct, "%s (%u)", str, oct); - curr_offset+= 1; + curr_offset += 1; NO_MORE_DATA_CHECK(len); @@ -4919,11 +4924,11 @@ de_sm_mbms_bearer_cap(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint proto_tree_add_uint_format_value(tree, hf_gsm_a_qos_max_bitrate_downl_ext, tvb, curr_offset, 1, oct, "%s (%u)", str, oct); - curr_offset+= 1; + curr_offset += 1; EXTRANEOUS_DATA_CHECK_EXPERT(len, curr_offset - offset, pinfo); - return(curr_offset - offset); + return (curr_offset - offset); } /* @@ -4940,7 +4945,7 @@ de_sm_mbms_prot_conf_opt(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, gu EXTRANEOUS_DATA_CHECK_EXPERT(len, curr_offset - offset, pinfo); - return(curr_offset - offset); + return (curr_offset - offset); } /* @@ -4949,7 +4954,7 @@ de_sm_mbms_prot_conf_opt(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, gu static guint16 de_sm_enh_nsapi(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32 offset, guint len _U_, gchar *add_string _U_, int string_len _U_) { - guint8 oct; + guint8 oct; const gchar *str; oct = tvb_get_guint8(tvb, offset); @@ -4966,7 +4971,7 @@ de_sm_enh_nsapi(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32 offset, 1, oct, "%s (%u)", str, oct); /* no length check possible */ - return(1); + return (1); } /* @@ -4986,7 +4991,7 @@ de_sm_req_type(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32 proto_tree_add_item(tree, hf_gsm_a_sm_req_type, tvb, offset, 1, ENC_BIG_ENDIAN); /* no length check possible */ - return(1); + return (1); } /* @@ -5007,70 +5012,70 @@ de_sm_notif_ind(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32 proto_tree_add_item(tree, hf_gsm_a_sm_notif_ind, tvb, curr_offset, 1, ENC_BIG_ENDIAN); - return(len); + return (len); } guint16 (*gm_elem_fcn[])(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32 offset, guint len, gchar *add_string, int string_len) = { /* GPRS Mobility Management Information Elements 10.5.5 */ - de_gmm_attach_res, /* Attach Result */ - de_gmm_attach_type, /* Attach Type */ - de_gmm_ciph_alg, /* Cipher Algorithm */ - de_gmm_tmsi_stat, /* TMSI Status */ - de_gmm_detach_type, /* Detach Type */ - de_gmm_drx_param, /* DRX Parameter */ - de_gmm_ftostby, /* Force to Standby */ - de_gmm_ftostby_h, /* Force to Standby - Info is in the high nibble */ - de_gmm_ptmsi_sig, /* P-TMSI Signature */ - de_gmm_ptmsi_sig2, /* P-TMSI Signature 2 */ - de_gmm_ident_type2, /* Identity Type 2 */ - de_gmm_imeisv_req, /* IMEISV Request */ - de_gmm_rec_npdu_lst, /* Receive N-PDU Numbers List */ - de_gmm_ms_net_cap, /* MS Network Capability */ - de_gmm_ms_radio_acc_cap,/* MS Radio Access Capability */ - de_gmm_cause, /* GMM Cause */ - de_gmm_rai, /* Routing Area Identification */ - de_gmm_rai2, /* Routing Area Identification 2 */ - de_gmm_update_res, /* Update Result */ - de_gmm_update_type, /* Update Type */ - de_gmm_ac_ref_nr, /* A&C Reference Number */ - de_gmm_ac_ref_nr_h, /* A&C Reference Number - Info is in the high nibble */ - de_gmm_service_type, /* Service Type */ - NULL /* no associated data */, /* Cell Notification */ - de_gmm_ps_lcs_cap, /* PS LCS Capability */ - de_gmm_net_feat_supp, /* Network Feature Support */ - de_gmm_rat_info_container, /* Inter RAT information container */ - de_gmm_req_ms_info, /* Requested MS information */ - NULL, /* UE network capability */ - de_gmm_eutran_irat_info_container, /* E-UTRAN inter RAT information container */ - de_gmm_voice_domain_pref, /* Voice domain preference and UE's usage setting */ + de_gmm_attach_res, /* Attach Result */ + de_gmm_attach_type, /* Attach Type */ + de_gmm_ciph_alg, /* Cipher Algorithm */ + de_gmm_tmsi_stat, /* TMSI Status */ + de_gmm_detach_type, /* Detach Type */ + de_gmm_drx_param, /* DRX Parameter */ + de_gmm_ftostby, /* Force to Standby */ + de_gmm_ftostby_h, /* Force to Standby - Info is in the high nibble */ + de_gmm_ptmsi_sig, /* P-TMSI Signature */ + de_gmm_ptmsi_sig2, /* P-TMSI Signature 2 */ + de_gmm_ident_type2, /* Identity Type 2 */ + de_gmm_imeisv_req, /* IMEISV Request */ + de_gmm_rec_npdu_lst, /* Receive N-PDU Numbers List */ + de_gmm_ms_net_cap, /* MS Network Capability */ + de_gmm_ms_radio_acc_cap, /* MS Radio Access Capability */ + de_gmm_cause, /* GMM Cause */ + de_gmm_rai, /* Routing Area Identification */ + de_gmm_rai2, /* Routing Area Identification 2 */ + de_gmm_update_res, /* Update Result */ + de_gmm_update_type, /* Update Type */ + de_gmm_ac_ref_nr, /* A&C Reference Number */ + de_gmm_ac_ref_nr_h, /* A&C Reference Number - Info is in the high nibble */ + de_gmm_service_type, /* Service Type */ + NULL /* no associated data */, /* Cell Notification */ + de_gmm_ps_lcs_cap, /* PS LCS Capability */ + de_gmm_net_feat_supp, /* Network Feature Support */ + de_gmm_rat_info_container, /* Inter RAT information container */ + de_gmm_req_ms_info, /* Requested MS information */ + NULL, /* UE network capability */ + de_gmm_eutran_irat_info_container, /* E-UTRAN inter RAT information container */ + de_gmm_voice_domain_pref, /* Voice domain preference and UE's usage setting */ /* Session Management Information Elements 10.5.6 */ - de_sm_apn, /* Access Point Name */ - de_sm_nsapi, /* Network Service Access Point Identifier */ - de_sm_pco, /* Protocol Configuration Options */ - de_sm_pdp_addr, /* Packet Data Protocol Address */ - de_sm_qos, /* Quality Of Service */ - de_sm_cause, /* SM Cause */ - de_sm_cause_2, /* SM Cause 2 */ - de_sm_linked_ti, /* Linked TI */ - de_sm_sapi, /* LLC Service Access Point Identifier */ - de_sm_tear_down, /* Tear Down Indicator */ - de_sm_pflow_id, /* Packet Flow Identifier */ - de_sm_tflow_temp, /* Traffic Flow Template */ - de_sm_tmgi, /* Temporary Mobile Group Identity (TMGI) */ - de_sm_mbms_bearer_cap, /* MBMS bearer capabilities */ - de_sm_mbms_prot_conf_opt, /* MBMS protocol configuration options */ - de_sm_enh_nsapi, /* Enhanced network service access point identifier */ - de_sm_req_type, /* Request type */ - de_sm_notif_ind, /* Notification indicator */ + de_sm_apn, /* Access Point Name */ + de_sm_nsapi, /* Network Service Access Point Identifier */ + de_sm_pco, /* Protocol Configuration Options */ + de_sm_pdp_addr, /* Packet Data Protocol Address */ + de_sm_qos, /* Quality Of Service */ + de_sm_cause, /* SM Cause */ + de_sm_cause_2, /* SM Cause 2 */ + de_sm_linked_ti, /* Linked TI */ + de_sm_sapi, /* LLC Service Access Point Identifier */ + de_sm_tear_down, /* Tear Down Indicator */ + de_sm_pflow_id, /* Packet Flow Identifier */ + de_sm_tflow_temp, /* Traffic Flow Template */ + de_sm_tmgi, /* Temporary Mobile Group Identity (TMGI) */ + de_sm_mbms_bearer_cap, /* MBMS bearer capabilities */ + de_sm_mbms_prot_conf_opt, /* MBMS protocol configuration options */ + de_sm_enh_nsapi, /* Enhanced network service access point identifier */ + de_sm_req_type, /* Request type */ + de_sm_notif_ind, /* Notification indicator */ /* GPRS Common Information Elements 10.5.7 */ - de_gc_context_stat, /* PDP Context Status */ - de_gc_radio_prio, /* Radio Priority */ - de_gc_timer, /* GPRS Timer */ - de_gc_timer2, /* GPRS Timer 2 */ - de_gc_radio_prio2, /* Radio Priority 2 */ - de_gc_mbms_context_stat,/* 10.5.7.6 MBMS context status */ - de_gc_uplink_data_stat, /* 10.5.7.7 Uplink data status */ + de_gc_context_stat, /* PDP Context Status */ + de_gc_radio_prio, /* Radio Priority */ + de_gc_timer, /* GPRS Timer */ + de_gc_timer2, /* GPRS Timer 2 */ + de_gc_radio_prio2, /* Radio Priority 2 */ + de_gc_mbms_context_stat, /* 10.5.7.6 MBMS context status */ + de_gc_uplink_data_stat, /* 10.5.7.7 Uplink data status */ NULL, /* NONE */ }; @@ -5087,50 +5092,50 @@ dtap_gmm_attach_req(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 guint curr_len; curr_offset = offset; - curr_len = len; + curr_len = len; pinfo->p2p_dir = P2P_DIR_RECV; - ELEM_MAND_LV(GSM_A_PDU_TYPE_GM, DE_MS_NET_CAP, NULL); + ELEM_MAND_LV( GSM_A_PDU_TYPE_GM, DE_MS_NET_CAP, NULL); /* Included in attach type - ELEM_MAND_V(GSM_A_PDU_TYPE_COMMON, DE_CIPH_KEY_SEQ_NUM, NULL); + ELEM_MAND_V( GSM_A_PDU_TYPE_COMMON, DE_CIPH_KEY_SEQ_NUM, NULL); curr_offset--; curr_len++; */ - ELEM_MAND_V(GSM_A_PDU_TYPE_GM, DE_ATTACH_TYPE, NULL); + ELEM_MAND_V( GSM_A_PDU_TYPE_GM, DE_ATTACH_TYPE, NULL); - ELEM_MAND_V(GSM_A_PDU_TYPE_GM, DE_DRX_PARAM, NULL); + ELEM_MAND_V( GSM_A_PDU_TYPE_GM, DE_DRX_PARAM, NULL); - ELEM_MAND_LV(GSM_A_PDU_TYPE_COMMON, DE_MID , NULL); + ELEM_MAND_LV( GSM_A_PDU_TYPE_COMMON, DE_MID, NULL); - ELEM_MAND_V(GSM_A_PDU_TYPE_GM, DE_RAI, " - Old routing area identification"); + ELEM_MAND_V( GSM_A_PDU_TYPE_GM, DE_RAI, " - Old routing area identification"); - ELEM_MAND_LV(GSM_A_PDU_TYPE_GM, DE_MS_RAD_ACC_CAP , NULL); + ELEM_MAND_LV( GSM_A_PDU_TYPE_GM, DE_MS_RAD_ACC_CAP, NULL); - ELEM_OPT_TV( 0x19 , GSM_A_PDU_TYPE_GM, DE_P_TMSI_SIG, " - Old P-TMSI Signature"); + ELEM_OPT_TV( 0x19, GSM_A_PDU_TYPE_GM, DE_P_TMSI_SIG, " - Old P-TMSI Signature"); - ELEM_OPT_TV( 0x17 , GSM_A_PDU_TYPE_GM, DE_GPRS_TIMER , " - Ready Timer" ); + ELEM_OPT_TV( 0x17, GSM_A_PDU_TYPE_GM, DE_GPRS_TIMER, " - Ready Timer"); - ELEM_OPT_TV_SHORT( 0x90 , GSM_A_PDU_TYPE_GM, DE_TMSI_STAT , NULL); + ELEM_OPT_TV_SHORT( 0x90, GSM_A_PDU_TYPE_GM, DE_TMSI_STAT, NULL); - ELEM_OPT_TLV( 0x33 , GSM_A_PDU_TYPE_GM, DE_PS_LCS_CAP , NULL); + ELEM_OPT_TLV( 0x33, GSM_A_PDU_TYPE_GM, DE_PS_LCS_CAP, NULL); - ELEM_OPT_TLV(0x11, GSM_A_PDU_TYPE_COMMON, DE_MS_CM_2, NULL); + ELEM_OPT_TLV( 0x11, GSM_A_PDU_TYPE_COMMON, DE_MS_CM_2, NULL); - ELEM_OPT_TLV(0x20, GSM_A_PDU_TYPE_COMMON, DE_MS_CM_3, NULL); + ELEM_OPT_TLV( 0x20, GSM_A_PDU_TYPE_COMMON, DE_MS_CM_3, NULL); - ELEM_OPT_TLV(0x40, GSM_A_PDU_TYPE_DTAP, DE_SUP_CODEC_LIST, NULL); + ELEM_OPT_TLV( 0x40, GSM_A_PDU_TYPE_DTAP, DE_SUP_CODEC_LIST, NULL); - ELEM_OPT_TLV(0x58, NAS_PDU_TYPE_EMM, DE_EMM_UE_NET_CAP, NULL); + ELEM_OPT_TLV( 0x58, NAS_PDU_TYPE_EMM, DE_EMM_UE_NET_CAP, NULL); - ELEM_OPT_TLV(0x1A, GSM_A_PDU_TYPE_COMMON, DE_MID, " - Additional mobile identity"); + ELEM_OPT_TLV( 0x1A, GSM_A_PDU_TYPE_COMMON, DE_MID, " - Additional mobile identity"); - ELEM_OPT_TLV(0x1B, GSM_A_PDU_TYPE_GM, DE_RAI_2, " - Additional old routing area identification"); + ELEM_OPT_TLV( 0x1B, GSM_A_PDU_TYPE_GM, DE_RAI_2, " - Additional old routing area identification"); - ELEM_OPT_TLV(0x5D, GSM_A_PDU_TYPE_GM, DE_VOICE_DOMAIN_PREF, NULL); + ELEM_OPT_TLV( 0x5D, GSM_A_PDU_TYPE_GM, DE_VOICE_DOMAIN_PREF, NULL); EXTRANEOUS_DATA_CHECK_EXPERT(curr_len, 0, pinfo); } @@ -5146,51 +5151,51 @@ dtap_gmm_attach_acc(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 guint curr_len; curr_offset = offset; - curr_len = len; + curr_len = len; pinfo->p2p_dir = P2P_DIR_SENT; - ELEM_MAND_V(GSM_A_PDU_TYPE_GM, DE_FORCE_TO_STAND_H, NULL); + ELEM_MAND_V( GSM_A_PDU_TYPE_GM, DE_FORCE_TO_STAND_H, NULL); curr_len++; curr_offset--; - ELEM_MAND_V(GSM_A_PDU_TYPE_GM, DE_ATTACH_RES, NULL); + ELEM_MAND_V( GSM_A_PDU_TYPE_GM, DE_ATTACH_RES, NULL); - ELEM_MAND_V(GSM_A_PDU_TYPE_GM, DE_GPRS_TIMER, NULL); + ELEM_MAND_V( GSM_A_PDU_TYPE_GM, DE_GPRS_TIMER, NULL); - ELEM_MAND_V(GSM_A_PDU_TYPE_GM, DE_RAD_PRIO_2, " - Radio priority for TOM8"); + ELEM_MAND_V( GSM_A_PDU_TYPE_GM, DE_RAD_PRIO_2, " - Radio priority for TOM8"); curr_len++; curr_offset--; - ELEM_MAND_V(GSM_A_PDU_TYPE_GM, DE_RAD_PRIO, " - Radio priority for SMS"); + ELEM_MAND_V( GSM_A_PDU_TYPE_GM, DE_RAD_PRIO, " - Radio priority for SMS"); - ELEM_MAND_V(GSM_A_PDU_TYPE_GM, DE_RAI, NULL); + ELEM_MAND_V( GSM_A_PDU_TYPE_GM, DE_RAI, NULL); - ELEM_OPT_TV( 0x19 , GSM_A_PDU_TYPE_GM, DE_P_TMSI_SIG, NULL); + ELEM_OPT_TV( 0x19, GSM_A_PDU_TYPE_GM, DE_P_TMSI_SIG, NULL); - ELEM_OPT_TV( 0x17 , GSM_A_PDU_TYPE_GM, DE_GPRS_TIMER , " - Negotiated Ready Timer" ); + ELEM_OPT_TV( 0x17, GSM_A_PDU_TYPE_GM, DE_GPRS_TIMER, " - Negotiated Ready Timer"); - ELEM_OPT_TLV( 0x18 , GSM_A_PDU_TYPE_COMMON, DE_MID , " - Allocated P-TMSI" ); + ELEM_OPT_TLV( 0x18, GSM_A_PDU_TYPE_COMMON, DE_MID, " - Allocated P-TMSI"); - ELEM_OPT_TLV( 0x23 , GSM_A_PDU_TYPE_COMMON, DE_MID , NULL); + ELEM_OPT_TLV( 0x23, GSM_A_PDU_TYPE_COMMON, DE_MID, NULL); - ELEM_OPT_TV( 0x25 , GSM_A_PDU_TYPE_GM, DE_GMM_CAUSE , NULL); + ELEM_OPT_TV( 0x25, GSM_A_PDU_TYPE_GM, DE_GMM_CAUSE, NULL); - ELEM_OPT_TLV( 0x2A , GSM_A_PDU_TYPE_GM, DE_GPRS_TIMER_2 , " - T3302" ); + ELEM_OPT_TLV( 0x2A, GSM_A_PDU_TYPE_GM, DE_GPRS_TIMER_2, " - T3302"); - ELEM_OPT_T( 0x8C , GSM_A_PDU_TYPE_GM, DE_CELL_NOT , NULL); + ELEM_OPT_T( 0x8C, GSM_A_PDU_TYPE_GM, DE_CELL_NOT, NULL); - ELEM_OPT_TLV( 0x4A , GSM_A_PDU_TYPE_COMMON, DE_PLMN_LIST , NULL); + ELEM_OPT_TLV( 0x4A, GSM_A_PDU_TYPE_COMMON, DE_PLMN_LIST, NULL); - ELEM_OPT_TV_SHORT( 0xB0 , GSM_A_PDU_TYPE_GM, DE_NET_FEAT_SUP , NULL); + ELEM_OPT_TV_SHORT( 0xB0, GSM_A_PDU_TYPE_GM, DE_NET_FEAT_SUP, NULL); - ELEM_OPT_TLV( 0x34 , GSM_A_PDU_TYPE_DTAP, DE_EMERGENCY_NUM_LIST , NULL); + ELEM_OPT_TLV( 0x34, GSM_A_PDU_TYPE_DTAP, DE_EMERGENCY_NUM_LIST, NULL); - ELEM_OPT_TV_SHORT( 0xA0 , GSM_A_PDU_TYPE_GM , DE_REQ_MS_INFO , NULL); + ELEM_OPT_TV_SHORT( 0xA0, GSM_A_PDU_TYPE_GM, DE_REQ_MS_INFO, NULL); - ELEM_OPT_TLV( 0x37 , GSM_A_PDU_TYPE_GM, DE_GPRS_TIMER_2 , " - T3319" ); + ELEM_OPT_TLV( 0x37, GSM_A_PDU_TYPE_GM, DE_GPRS_TIMER_2, " - T3319"); - ELEM_OPT_TLV( 0x38 , GSM_A_PDU_TYPE_GM, DE_GPRS_TIMER_2 , " - T3323" ); + ELEM_OPT_TLV( 0x38, GSM_A_PDU_TYPE_GM, DE_GPRS_TIMER_2, " - T3323" ); EXTRANEOUS_DATA_CHECK_EXPERT(curr_len, 0, pinfo); } @@ -5207,13 +5212,13 @@ dtap_gmm_attach_com(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 guint curr_len; curr_offset = offset; - curr_len = len; + curr_len = len; pinfo->p2p_dir = P2P_DIR_RECV; - ELEM_OPT_TLV(0x27, GSM_A_PDU_TYPE_GM, DE_RAT_INFO_CONTAINER, " - Inter RAT handover information"); + ELEM_OPT_TLV( 0x27, GSM_A_PDU_TYPE_GM, DE_RAT_INFO_CONTAINER, " - Inter RAT handover information"); - ELEM_OPT_TLV(0x2B, GSM_A_PDU_TYPE_GM, DE_EUTRAN_IRAT_INFO_CONTAINER, " - E-UTRAN inter RAT handover information"); + ELEM_OPT_TLV( 0x2B, GSM_A_PDU_TYPE_GM, DE_EUTRAN_IRAT_INFO_CONTAINER, " - E-UTRAN inter RAT handover information"); EXTRANEOUS_DATA_CHECK_EXPERT(curr_len, 0, pinfo); } @@ -5229,13 +5234,13 @@ dtap_gmm_attach_rej(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 guint curr_len; curr_offset = offset; - curr_len = len; + curr_len = len; pinfo->p2p_dir = P2P_DIR_SENT; - ELEM_MAND_V(GSM_A_PDU_TYPE_GM, DE_GMM_CAUSE, NULL); + ELEM_MAND_V( GSM_A_PDU_TYPE_GM, DE_GMM_CAUSE, NULL); - ELEM_OPT_TLV( 0x2A , GSM_A_PDU_TYPE_GM, DE_GPRS_TIMER_2 , " - T3302" ); + ELEM_OPT_TLV( 0x2A, GSM_A_PDU_TYPE_GM, DE_GPRS_TIMER_2, " - T3302" ); EXTRANEOUS_DATA_CHECK_EXPERT(curr_len, 0, pinfo); } @@ -5251,22 +5256,22 @@ dtap_gmm_detach_req(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 guint curr_len; curr_offset = offset; - curr_len = len; + curr_len = len; pinfo->p2p_dir = P2P_DIR_SENT; - ELEM_MAND_V(GSM_A_PDU_TYPE_GM, DE_FORCE_TO_STAND_H, NULL); + ELEM_MAND_V( GSM_A_PDU_TYPE_GM, DE_FORCE_TO_STAND_H, NULL); /* Force to standy might be wrong - To decode it correct, we need the direction */ curr_len++; curr_offset--; - ELEM_MAND_V(GSM_A_PDU_TYPE_GM, DE_DETACH_TYPE, NULL); + ELEM_MAND_V( GSM_A_PDU_TYPE_GM, DE_DETACH_TYPE, NULL); - ELEM_OPT_TV( 0x25 , GSM_A_PDU_TYPE_GM, DE_GMM_CAUSE , NULL); + ELEM_OPT_TV( 0x25, GSM_A_PDU_TYPE_GM, DE_GMM_CAUSE, NULL); - ELEM_OPT_TLV( 0x18 , GSM_A_PDU_TYPE_COMMON, DE_MID , " - P-TMSI" ); + ELEM_OPT_TLV( 0x18, GSM_A_PDU_TYPE_COMMON, DE_MID, " - P-TMSI" ); - ELEM_OPT_TLV( 0x19 , GSM_A_PDU_TYPE_GM, DE_P_TMSI_SIG_2 , NULL); + ELEM_OPT_TLV( 0x19, GSM_A_PDU_TYPE_GM, DE_P_TMSI_SIG_2, NULL); EXTRANEOUS_DATA_CHECK_EXPERT(curr_len, 0, pinfo); } @@ -5282,17 +5287,17 @@ dtap_gmm_detach_acc(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 guint curr_len; curr_offset = offset; - curr_len = len; + curr_len = len; pinfo->p2p_dir = P2P_DIR_RECV; - if ( curr_len != 0 ) + if (curr_len != 0 ) { - ELEM_MAND_V(GSM_A_PDU_TYPE_COMMON, DE_SPARE_NIBBLE, NULL); + ELEM_MAND_V( GSM_A_PDU_TYPE_COMMON, DE_SPARE_NIBBLE, NULL); curr_len++; curr_offset--; - ELEM_MAND_V(GSM_A_PDU_TYPE_GM, DE_FORCE_TO_STAND, NULL); + ELEM_MAND_V( GSM_A_PDU_TYPE_GM, DE_FORCE_TO_STAND, NULL); } EXTRANEOUS_DATA_CHECK_EXPERT(curr_len, 0, pinfo); @@ -5309,21 +5314,21 @@ dtap_gmm_ptmsi_realloc_cmd(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint curr_len; curr_offset = offset; - curr_len = len; + curr_len = len; pinfo->p2p_dir = P2P_DIR_SENT; - ELEM_MAND_LV(GSM_A_PDU_TYPE_COMMON, DE_MID , " - Allocated P-TMSI" ); + ELEM_MAND_LV( GSM_A_PDU_TYPE_COMMON, DE_MID, " - Allocated P-TMSI" ); - ELEM_MAND_V(GSM_A_PDU_TYPE_GM, DE_RAI, NULL); + ELEM_MAND_V( GSM_A_PDU_TYPE_GM, DE_RAI, NULL); - ELEM_MAND_V(GSM_A_PDU_TYPE_COMMON, DE_SPARE_NIBBLE, NULL); + ELEM_MAND_V( GSM_A_PDU_TYPE_COMMON, DE_SPARE_NIBBLE, NULL); curr_len++; curr_offset--; - ELEM_MAND_V(GSM_A_PDU_TYPE_GM, DE_FORCE_TO_STAND, NULL); + ELEM_MAND_V( GSM_A_PDU_TYPE_GM, DE_FORCE_TO_STAND, NULL); - ELEM_OPT_TV( 0x19 , GSM_A_PDU_TYPE_GM, DE_P_TMSI_SIG , " - P-TMSI Signature" ); + ELEM_OPT_TV( 0x19, GSM_A_PDU_TYPE_GM, DE_P_TMSI_SIG, " - P-TMSI Signature" ); EXTRANEOUS_DATA_CHECK_EXPERT(curr_len, 0, pinfo); } @@ -5339,7 +5344,7 @@ dtap_gmm_ptmsi_realloc_com(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint curr_len; curr_offset = offset; - curr_len = len; + curr_len = len; pinfo->p2p_dir = P2P_DIR_RECV; @@ -5358,31 +5363,31 @@ dtap_gmm_auth_ciph_req(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guin guint8 oct; curr_offset = offset; - curr_len = len; + curr_len = len; pinfo->p2p_dir = P2P_DIR_SENT; - ELEM_MAND_V(GSM_A_PDU_TYPE_GM, DE_IMEISV_REQ, NULL); + ELEM_MAND_V( GSM_A_PDU_TYPE_GM, DE_IMEISV_REQ, NULL); curr_offset--; curr_len++; - ELEM_MAND_V(GSM_A_PDU_TYPE_GM, DE_CIPH_ALG, NULL); + ELEM_MAND_V( GSM_A_PDU_TYPE_GM, DE_CIPH_ALG, NULL); - ELEM_MAND_V(GSM_A_PDU_TYPE_GM, DE_AC_REF_NUM_H, NULL); + ELEM_MAND_V( GSM_A_PDU_TYPE_GM, DE_AC_REF_NUM_H, NULL); curr_offset--; curr_len++; - ELEM_MAND_V(GSM_A_PDU_TYPE_GM, DE_FORCE_TO_STAND, NULL); + ELEM_MAND_V( GSM_A_PDU_TYPE_GM, DE_FORCE_TO_STAND, NULL); - ELEM_OPT_TV( 0x21 , GSM_A_PDU_TYPE_DTAP, DE_AUTH_PARAM_RAND , NULL); + ELEM_OPT_TV( 0x21, GSM_A_PDU_TYPE_DTAP, DE_AUTH_PARAM_RAND, NULL); #if 0 - ELEM_OPT_TV_SHORT( 0x08 , GSM_A_PDU_TYPE_COMMON, DE_CIPH_KEY_SEQ_NUM , NULL); + ELEM_OPT_TV_SHORT( 0x08, GSM_A_PDU_TYPE_COMMON, DE_CIPH_KEY_SEQ_NUM, NULL); #else - if ( curr_len > 0 ) + if (curr_len > 0) { oct = tvb_get_guint8(tvb, curr_offset); - if (( oct & 0xf0 ) == 0x80 ) + if ((oct & 0xf0) == 0x80 ) { /* The ciphering key sequence number is added here */ proto_tree_add_text(tree, @@ -5396,13 +5401,13 @@ dtap_gmm_auth_ciph_req(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guin } #endif - if ( curr_len == 0 ) + if (curr_len == 0 ) { EXTRANEOUS_DATA_CHECK_EXPERT(curr_len, 0, pinfo); return; } - ELEM_OPT_TLV( 0x28 , GSM_A_PDU_TYPE_DTAP, DE_AUTH_PARAM_AUTN , NULL); + ELEM_OPT_TLV( 0x28, GSM_A_PDU_TYPE_DTAP, DE_AUTH_PARAM_AUTN, NULL); EXTRANEOUS_DATA_CHECK_EXPERT(curr_len, 0, pinfo); } @@ -5418,21 +5423,21 @@ dtap_gmm_auth_ciph_resp(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, gui guint curr_len; curr_offset = offset; - curr_len = len; + curr_len = len; pinfo->p2p_dir = P2P_DIR_RECV; - ELEM_MAND_V(GSM_A_PDU_TYPE_COMMON, DE_SPARE_NIBBLE, NULL); + ELEM_MAND_V( GSM_A_PDU_TYPE_COMMON, DE_SPARE_NIBBLE, NULL); curr_offset--; curr_len++; - ELEM_MAND_V(GSM_A_PDU_TYPE_GM, DE_AC_REF_NUM, NULL); + ELEM_MAND_V( GSM_A_PDU_TYPE_GM, DE_AC_REF_NUM, NULL); - ELEM_OPT_TV( 0x22 , GSM_A_PDU_TYPE_DTAP, DE_AUTH_RESP_PARAM , NULL); + ELEM_OPT_TV( 0x22, GSM_A_PDU_TYPE_DTAP, DE_AUTH_RESP_PARAM, NULL); - ELEM_OPT_TLV( 0x23 , GSM_A_PDU_TYPE_COMMON, DE_MID , " - IMEISV" ); + ELEM_OPT_TLV( 0x23, GSM_A_PDU_TYPE_COMMON, DE_MID, " - IMEISV" ); - ELEM_OPT_TLV( 0x29 , GSM_A_PDU_TYPE_DTAP, DE_AUTH_RESP_PARAM_EXT , NULL); + ELEM_OPT_TLV( 0x29, GSM_A_PDU_TYPE_DTAP, DE_AUTH_RESP_PARAM_EXT, NULL); EXTRANEOUS_DATA_CHECK_EXPERT(curr_len, 0, pinfo); } @@ -5447,7 +5452,7 @@ dtap_gmm_auth_ciph_rej(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guin guint curr_len; curr_offset = offset; - curr_len = len; + curr_len = len; pinfo->p2p_dir = P2P_DIR_SENT; @@ -5465,13 +5470,13 @@ dtap_gmm_auth_ciph_fail(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, gui guint curr_len; curr_offset = offset; - curr_len = len; + curr_len = len; pinfo->p2p_dir = P2P_DIR_RECV; - ELEM_MAND_V(GSM_A_PDU_TYPE_GM, DE_GMM_CAUSE, NULL); + ELEM_MAND_V( GSM_A_PDU_TYPE_GM, DE_GMM_CAUSE, NULL); - ELEM_OPT_TLV( 0x30 , GSM_A_PDU_TYPE_DTAP, DE_AUTH_FAIL_PARAM , NULL); + ELEM_OPT_TLV( 0x30, GSM_A_PDU_TYPE_DTAP, DE_AUTH_FAIL_PARAM, NULL); EXTRANEOUS_DATA_CHECK_EXPERT(curr_len, 0, pinfo); } @@ -5486,23 +5491,23 @@ dtap_gmm_ident_req(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 guint curr_len; curr_offset = offset; - curr_len = len; + curr_len = len; pinfo->p2p_dir = P2P_DIR_SENT; /* If the half octet that are about to get decoded is the LAST in the octetstream, the macro will call return BEFORE we get a chance to fix the index. The end result will be that the first half-octet will be decoded but not the last. */ #if 0 - ELEM_MAND_V(GSM_A_PDU_TYPE_GM, DE_ID_TYPE_2, NULL); + ELEM_MAND_V( GSM_A_PDU_TYPE_GM, DE_ID_TYPE_2, NULL); curr_offset--; curr_len++; - ELEM_MAND_V(GSM_A_PDU_TYPE_GM, DE_FORCE_TO_STAND_H, NULL); + ELEM_MAND_V( GSM_A_PDU_TYPE_GM, DE_FORCE_TO_STAND_H, NULL); #endif elem_v(tvb, tree, pinfo, GSM_A_PDU_TYPE_GM, DE_FORCE_TO_STAND_H, curr_offset, NULL); elem_v(tvb, tree, pinfo, GSM_A_PDU_TYPE_GM, DE_ID_TYPE_2, curr_offset, NULL); - curr_offset+=1; - curr_len-=1; + curr_offset += 1; + curr_len -= 1; EXTRANEOUS_DATA_CHECK_EXPERT(curr_len, 0, pinfo); } @@ -5518,11 +5523,11 @@ dtap_gmm_ident_res(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 guint curr_len; curr_offset = offset; - curr_len = len; + curr_len = len; pinfo->p2p_dir = P2P_DIR_RECV; - ELEM_MAND_LV(GSM_A_PDU_TYPE_COMMON, DE_MID , NULL); + ELEM_MAND_LV( GSM_A_PDU_TYPE_COMMON, DE_MID, NULL); EXTRANEOUS_DATA_CHECK_EXPERT(curr_len, 0, pinfo); } @@ -5538,53 +5543,53 @@ dtap_gmm_rau_req(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 of guint curr_len; curr_offset = offset; - curr_len = len; + curr_len = len; pinfo->p2p_dir = P2P_DIR_RECV; /* is included in update type - ELEM_MAND_V(GSM_A_PDU_TYPE_COMMON, DE_CIPH_KEY_SEQ_NUM, NULL); + ELEM_MAND_V( GSM_A_PDU_TYPE_COMMON, DE_CIPH_KEY_SEQ_NUM, NULL); curr_offset--; curr_len++; */ - ELEM_MAND_V(GSM_A_PDU_TYPE_GM, DE_UPD_TYPE, NULL); + ELEM_MAND_V( GSM_A_PDU_TYPE_GM, DE_UPD_TYPE, NULL); - ELEM_MAND_V(GSM_A_PDU_TYPE_GM, DE_RAI, " - Old routing area identification"); + ELEM_MAND_V( GSM_A_PDU_TYPE_GM, DE_RAI, " - Old routing area identification"); - ELEM_MAND_LV(GSM_A_PDU_TYPE_GM, DE_MS_RAD_ACC_CAP , NULL); + ELEM_MAND_LV( GSM_A_PDU_TYPE_GM, DE_MS_RAD_ACC_CAP, NULL); - ELEM_OPT_TV( 0x19 , GSM_A_PDU_TYPE_GM, DE_P_TMSI_SIG , " - Old P-TMSI Signature" ); + ELEM_OPT_TV( 0x19, GSM_A_PDU_TYPE_GM, DE_P_TMSI_SIG, " - Old P-TMSI Signature" ); - ELEM_OPT_TV( 0x17 , GSM_A_PDU_TYPE_GM, DE_GPRS_TIMER , " - Requested Ready Timer" ); + ELEM_OPT_TV( 0x17, GSM_A_PDU_TYPE_GM, DE_GPRS_TIMER, " - Requested Ready Timer" ); - ELEM_OPT_TV( 0x27 , GSM_A_PDU_TYPE_GM, DE_DRX_PARAM , NULL); + ELEM_OPT_TV( 0x27, GSM_A_PDU_TYPE_GM, DE_DRX_PARAM, NULL); - ELEM_OPT_TV_SHORT( 0x90 , GSM_A_PDU_TYPE_GM, DE_TMSI_STAT , NULL); + ELEM_OPT_TV_SHORT( 0x90, GSM_A_PDU_TYPE_GM, DE_TMSI_STAT, NULL); - ELEM_OPT_TLV( 0x18 , GSM_A_PDU_TYPE_COMMON, DE_MID , " - P-TMSI" ); + ELEM_OPT_TLV( 0x18, GSM_A_PDU_TYPE_COMMON, DE_MID, " - P-TMSI" ); - ELEM_OPT_TLV( 0x31 , GSM_A_PDU_TYPE_GM, DE_MS_NET_CAP , NULL); + ELEM_OPT_TLV( 0x31, GSM_A_PDU_TYPE_GM, DE_MS_NET_CAP, NULL); - ELEM_OPT_TLV( 0x32 , GSM_A_PDU_TYPE_GM, DE_PDP_CONTEXT_STAT , NULL); + ELEM_OPT_TLV( 0x32, GSM_A_PDU_TYPE_GM, DE_PDP_CONTEXT_STAT, NULL); - ELEM_OPT_TLV( 0x33 , GSM_A_PDU_TYPE_GM, DE_PS_LCS_CAP , NULL); + ELEM_OPT_TLV( 0x33, GSM_A_PDU_TYPE_GM, DE_PS_LCS_CAP, NULL); - ELEM_OPT_TLV(0x35, GSM_A_PDU_TYPE_GM, DE_MBMS_CTX_STATUS, NULL); + ELEM_OPT_TLV( 0x35, GSM_A_PDU_TYPE_GM, DE_MBMS_CTX_STATUS, NULL); - ELEM_OPT_TLV(0x58, NAS_PDU_TYPE_EMM, DE_EMM_UE_NET_CAP, NULL); + ELEM_OPT_TLV( 0x58, NAS_PDU_TYPE_EMM, DE_EMM_UE_NET_CAP, NULL); - ELEM_OPT_TLV(0x1A, GSM_A_PDU_TYPE_COMMON, DE_MID, " - Additional mobile identity"); + ELEM_OPT_TLV( 0x1A, GSM_A_PDU_TYPE_COMMON, DE_MID, " - Additional mobile identity"); - ELEM_OPT_TLV(0x1B, GSM_A_PDU_TYPE_GM, DE_RAI_2, " - Additional old routing area identification"); + ELEM_OPT_TLV( 0x1B, GSM_A_PDU_TYPE_GM, DE_RAI_2, " - Additional old routing area identification"); - ELEM_OPT_TLV(0x11, GSM_A_PDU_TYPE_COMMON, DE_MS_CM_2, NULL); + ELEM_OPT_TLV( 0x11, GSM_A_PDU_TYPE_COMMON, DE_MS_CM_2, NULL); - ELEM_OPT_TLV(0x20, GSM_A_PDU_TYPE_COMMON, DE_MS_CM_3, NULL); + ELEM_OPT_TLV( 0x20, GSM_A_PDU_TYPE_COMMON, DE_MS_CM_3, NULL); - ELEM_OPT_TLV(0x40, GSM_A_PDU_TYPE_DTAP, DE_SUP_CODEC_LIST, NULL); + ELEM_OPT_TLV( 0x40, GSM_A_PDU_TYPE_DTAP, DE_SUP_CODEC_LIST, NULL); - ELEM_OPT_TLV(0x5D, GSM_A_PDU_TYPE_GM, DE_VOICE_DOMAIN_PREF, NULL); + ELEM_OPT_TLV( 0x5D, GSM_A_PDU_TYPE_GM, DE_VOICE_DOMAIN_PREF, NULL); EXTRANEOUS_DATA_CHECK_EXPERT(curr_len, 0, pinfo); } @@ -5600,51 +5605,51 @@ dtap_gmm_rau_acc(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 of guint curr_len; curr_offset = offset; - curr_len = len; + curr_len = len; pinfo->p2p_dir = P2P_DIR_SENT; - ELEM_MAND_V(GSM_A_PDU_TYPE_GM, DE_UPD_RES, NULL); + ELEM_MAND_V( GSM_A_PDU_TYPE_GM, DE_UPD_RES, NULL); curr_offset--; curr_len++; - ELEM_MAND_V(GSM_A_PDU_TYPE_GM, DE_FORCE_TO_STAND, NULL); + ELEM_MAND_V( GSM_A_PDU_TYPE_GM, DE_FORCE_TO_STAND, NULL); - ELEM_MAND_V(GSM_A_PDU_TYPE_GM, DE_GPRS_TIMER, " - Periodic RA update timer"); + ELEM_MAND_V( GSM_A_PDU_TYPE_GM, DE_GPRS_TIMER, " - Periodic RA update timer"); - ELEM_MAND_V(GSM_A_PDU_TYPE_GM, DE_RAI, NULL); + ELEM_MAND_V( GSM_A_PDU_TYPE_GM, DE_RAI, NULL); - ELEM_OPT_TV( 0x19 , GSM_A_PDU_TYPE_GM, DE_P_TMSI_SIG , NULL); + ELEM_OPT_TV( 0x19, GSM_A_PDU_TYPE_GM, DE_P_TMSI_SIG, NULL); - ELEM_OPT_TLV( 0x18 , GSM_A_PDU_TYPE_COMMON, DE_MID , " - Allocated P-TMSI"); + ELEM_OPT_TLV( 0x18, GSM_A_PDU_TYPE_COMMON, DE_MID, " - Allocated P-TMSI"); - ELEM_OPT_TLV( 0x23 , GSM_A_PDU_TYPE_COMMON, DE_MID , " - MS identity"); + ELEM_OPT_TLV( 0x23, GSM_A_PDU_TYPE_COMMON, DE_MID, " - MS identity"); - ELEM_OPT_TLV( 0x26 , GSM_A_PDU_TYPE_GM, DE_REC_N_PDU_NUM_LIST , NULL); + ELEM_OPT_TLV( 0x26, GSM_A_PDU_TYPE_GM, DE_REC_N_PDU_NUM_LIST, NULL); - ELEM_OPT_TV( 0x17 , GSM_A_PDU_TYPE_GM, DE_GPRS_TIMER , " - Negotiated Ready Timer" ); + ELEM_OPT_TV( 0x17, GSM_A_PDU_TYPE_GM, DE_GPRS_TIMER, " - Negotiated Ready Timer" ); - ELEM_OPT_TV( 0x25 , GSM_A_PDU_TYPE_GM, DE_GMM_CAUSE , NULL); + ELEM_OPT_TV( 0x25, GSM_A_PDU_TYPE_GM, DE_GMM_CAUSE, NULL); - ELEM_OPT_TLV( 0x2A , GSM_A_PDU_TYPE_GM, DE_GPRS_TIMER_2 , " - T3302" ); + ELEM_OPT_TLV( 0x2A, GSM_A_PDU_TYPE_GM, DE_GPRS_TIMER_2, " - T3302" ); - ELEM_OPT_T( 0x8C , GSM_A_PDU_TYPE_GM, DE_CELL_NOT , NULL); + ELEM_OPT_T( 0x8C, GSM_A_PDU_TYPE_GM, DE_CELL_NOT, NULL); - ELEM_OPT_TLV( 0x4A , GSM_A_PDU_TYPE_COMMON, DE_PLMN_LIST , NULL); + ELEM_OPT_TLV( 0x4A, GSM_A_PDU_TYPE_COMMON, DE_PLMN_LIST, NULL); - ELEM_OPT_TLV( 0x32 , GSM_A_PDU_TYPE_GM, DE_PDP_CONTEXT_STAT , NULL); + ELEM_OPT_TLV( 0x32, GSM_A_PDU_TYPE_GM, DE_PDP_CONTEXT_STAT, NULL); - ELEM_OPT_TV_SHORT ( 0xB0 , GSM_A_PDU_TYPE_GM, DE_NET_FEAT_SUP , NULL); + ELEM_OPT_TV_SHORT( 0xB0, GSM_A_PDU_TYPE_GM, DE_NET_FEAT_SUP, NULL); - ELEM_OPT_TLV( 0x34 , GSM_A_PDU_TYPE_DTAP, DE_EMERGENCY_NUM_LIST , NULL); + ELEM_OPT_TLV( 0x34, GSM_A_PDU_TYPE_DTAP, DE_EMERGENCY_NUM_LIST, NULL); - ELEM_OPT_TLV(0x35 , GSM_A_PDU_TYPE_GM, DE_MBMS_CTX_STATUS , NULL); + ELEM_OPT_TLV( 0x35, GSM_A_PDU_TYPE_GM, DE_MBMS_CTX_STATUS, NULL); - ELEM_OPT_TV_SHORT(0xA0 , GSM_A_PDU_TYPE_GM , DE_REQ_MS_INFO , NULL); + ELEM_OPT_TV_SHORT( 0xA0, GSM_A_PDU_TYPE_GM, DE_REQ_MS_INFO, NULL); - ELEM_OPT_TLV(0x37 , GSM_A_PDU_TYPE_GM, DE_GPRS_TIMER_2 , " - T3319"); + ELEM_OPT_TLV( 0x37, GSM_A_PDU_TYPE_GM, DE_GPRS_TIMER_2, " - T3319"); - ELEM_OPT_TLV(0x38 , GSM_A_PDU_TYPE_GM, DE_GPRS_TIMER_2 , " - T3323"); + ELEM_OPT_TLV( 0x38, GSM_A_PDU_TYPE_GM, DE_GPRS_TIMER_2, " - T3323"); EXTRANEOUS_DATA_CHECK_EXPERT(curr_len, 0, pinfo); } @@ -5660,15 +5665,15 @@ dtap_gmm_rau_com(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 of guint curr_len; curr_offset = offset; - curr_len = len; + curr_len = len; pinfo->p2p_dir = P2P_DIR_RECV; /* [7] 10.5.5.11 */ - ELEM_OPT_TLV( 0x26 , GSM_A_PDU_TYPE_GM, DE_REC_N_PDU_NUM_LIST , NULL); + ELEM_OPT_TLV( 0x26, GSM_A_PDU_TYPE_GM, DE_REC_N_PDU_NUM_LIST, NULL); /* Inter RAT information container 10.5.5.24 TS 24.008 version 6.8.0 Release 6 */ - ELEM_OPT_TLV( 0x27 , GSM_A_PDU_TYPE_GM, DE_RAT_INFO_CONTAINER , " - Inter RAT handover information"); + ELEM_OPT_TLV( 0x27, GSM_A_PDU_TYPE_GM, DE_RAT_INFO_CONTAINER, " - Inter RAT handover information"); - ELEM_OPT_TLV(0x2B, GSM_A_PDU_TYPE_GM, DE_EUTRAN_IRAT_INFO_CONTAINER, " - E-UTRAN inter RAT handover information"); + ELEM_OPT_TLV( 0x2B, GSM_A_PDU_TYPE_GM, DE_EUTRAN_IRAT_INFO_CONTAINER, " - E-UTRAN inter RAT handover information"); EXTRANEOUS_DATA_CHECK_EXPERT(curr_len, 0, pinfo); } @@ -5684,19 +5689,19 @@ dtap_gmm_rau_rej(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 of guint curr_len; curr_offset = offset; - curr_len = len; + curr_len = len; pinfo->p2p_dir = P2P_DIR_SENT; - ELEM_MAND_V(GSM_A_PDU_TYPE_GM, DE_GMM_CAUSE, NULL); + ELEM_MAND_V( GSM_A_PDU_TYPE_GM, DE_GMM_CAUSE, NULL); - ELEM_MAND_V(GSM_A_PDU_TYPE_COMMON, DE_SPARE_NIBBLE, NULL); + ELEM_MAND_V( GSM_A_PDU_TYPE_COMMON, DE_SPARE_NIBBLE, NULL); curr_offset--; curr_len++; - ELEM_MAND_V(GSM_A_PDU_TYPE_GM, DE_FORCE_TO_STAND, NULL); + ELEM_MAND_V( GSM_A_PDU_TYPE_GM, DE_FORCE_TO_STAND, NULL); - ELEM_OPT_TLV( 0x26 , GSM_A_PDU_TYPE_GM, DE_GPRS_TIMER_2 , " - T3302" ); + ELEM_OPT_TLV( 0x26, GSM_A_PDU_TYPE_GM, DE_GPRS_TIMER_2, " - T3302" ); EXTRANEOUS_DATA_CHECK_EXPERT(curr_len, 0, pinfo); } @@ -5712,11 +5717,11 @@ dtap_gmm_status(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 off guint curr_len; curr_offset = offset; - curr_len = len; + curr_len = len; pinfo->p2p_dir = P2P_DIR_UNKNOWN; - ELEM_MAND_V(GSM_A_PDU_TYPE_GM, DE_GMM_CAUSE, NULL); + ELEM_MAND_V( GSM_A_PDU_TYPE_GM, DE_GMM_CAUSE, NULL); EXTRANEOUS_DATA_CHECK_EXPERT(curr_len, 0, pinfo); } @@ -5732,21 +5737,21 @@ dtap_gmm_information(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint3 guint curr_len; curr_offset = offset; - curr_len = len; + curr_len = len; pinfo->p2p_dir = P2P_DIR_SENT; - ELEM_OPT_TLV( 0x43 , GSM_A_PDU_TYPE_DTAP, DE_NETWORK_NAME , " - Full Name" ); + ELEM_OPT_TLV( 0x43, GSM_A_PDU_TYPE_DTAP, DE_NETWORK_NAME, " - Full Name" ); - ELEM_OPT_TLV( 0x45 , GSM_A_PDU_TYPE_DTAP, DE_NETWORK_NAME , " - Short Name" ); + ELEM_OPT_TLV( 0x45, GSM_A_PDU_TYPE_DTAP, DE_NETWORK_NAME, " - Short Name" ); - ELEM_OPT_TV( 0x46 , GSM_A_PDU_TYPE_DTAP, DE_TIME_ZONE , NULL); + ELEM_OPT_TV( 0x46, GSM_A_PDU_TYPE_DTAP, DE_TIME_ZONE, NULL); - ELEM_OPT_TV( 0x47 , GSM_A_PDU_TYPE_DTAP, DE_TIME_ZONE_TIME , NULL); + ELEM_OPT_TV( 0x47, GSM_A_PDU_TYPE_DTAP, DE_TIME_ZONE_TIME, NULL); - ELEM_OPT_TLV( 0x48 , GSM_A_PDU_TYPE_DTAP, DE_LSA_ID , NULL); + ELEM_OPT_TLV( 0x48, GSM_A_PDU_TYPE_DTAP, DE_LSA_ID, NULL); - ELEM_OPT_TLV( 0x49 , GSM_A_PDU_TYPE_DTAP, DE_DAY_SAVING_TIME , NULL); + ELEM_OPT_TLV( 0x49, GSM_A_PDU_TYPE_DTAP, DE_DAY_SAVING_TIME, NULL); EXTRANEOUS_DATA_CHECK_EXPERT(curr_len, 0, pinfo); } @@ -5762,27 +5767,27 @@ dtap_gmm_service_req(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint3 guint curr_len; curr_offset = offset; - curr_len = len; + curr_len = len; pinfo->p2p_dir = P2P_DIR_RECV; /* Is included in SRVC TYPE - ELEM_MAND_V(GSM_A_PDU_TYPE_COMMON, DE_CIPH_KEY_SEQ_NUM, NULL); + ELEM_MAND_V( GSM_A_PDU_TYPE_COMMON, DE_CIPH_KEY_SEQ_NUM, NULL); curr_offset--; curr_len++; */ - ELEM_MAND_V(GSM_A_PDU_TYPE_GM, DE_SRVC_TYPE, NULL); + ELEM_MAND_V( GSM_A_PDU_TYPE_GM, DE_SRVC_TYPE, NULL); /* P-TMSI Mobile station identity 10.5.1.4 M LV 6 */ - ELEM_MAND_LV(GSM_A_PDU_TYPE_COMMON, DE_MID, NULL); + ELEM_MAND_LV( GSM_A_PDU_TYPE_COMMON, DE_MID, NULL); - ELEM_OPT_TLV( 0x32 , GSM_A_PDU_TYPE_GM, DE_PDP_CONTEXT_STAT , NULL); + ELEM_OPT_TLV( 0x32, GSM_A_PDU_TYPE_GM, DE_PDP_CONTEXT_STAT, NULL); /* MBMS context status 10.5.7.6 TLV 2 - 18 */ - ELEM_OPT_TLV( 0x35 , GSM_A_PDU_TYPE_GM, DE_MBMS_CTX_STATUS , NULL); + ELEM_OPT_TLV( 0x35, GSM_A_PDU_TYPE_GM, DE_MBMS_CTX_STATUS, NULL); - ELEM_OPT_TLV(0x36, GSM_A_PDU_TYPE_GM, DE_UPLINK_DATA_STATUS, NULL); + ELEM_OPT_TLV( 0x36, GSM_A_PDU_TYPE_GM, DE_UPLINK_DATA_STATUS, NULL); EXTRANEOUS_DATA_CHECK_EXPERT(curr_len, 0, pinfo); } @@ -5798,14 +5803,14 @@ dtap_gmm_service_acc(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint3 guint curr_len; curr_offset = offset; - curr_len = len; + curr_len = len; pinfo->p2p_dir = P2P_DIR_SENT; - ELEM_OPT_TLV( 0x32 , GSM_A_PDU_TYPE_GM, DE_PDP_CONTEXT_STAT , NULL); + ELEM_OPT_TLV( 0x32, GSM_A_PDU_TYPE_GM, DE_PDP_CONTEXT_STAT, NULL); /* MBMS context status 10.5.7.6 TLV 2 - 18 */ - ELEM_OPT_TLV( 0x35 , GSM_A_PDU_TYPE_GM, DE_MBMS_CTX_STATUS , NULL); + ELEM_OPT_TLV( 0x35, GSM_A_PDU_TYPE_GM, DE_MBMS_CTX_STATUS, NULL); EXTRANEOUS_DATA_CHECK_EXPERT(curr_len, 0, pinfo); } @@ -5821,11 +5826,11 @@ dtap_gmm_service_rej(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint3 guint curr_len; curr_offset = offset; - curr_len = len; + curr_len = len; pinfo->p2p_dir = P2P_DIR_SENT; - ELEM_MAND_V(GSM_A_PDU_TYPE_GM, DE_GMM_CAUSE, NULL); + ELEM_MAND_V( GSM_A_PDU_TYPE_GM, DE_GMM_CAUSE, NULL); EXTRANEOUS_DATA_CHECK_EXPERT(curr_len, 0, pinfo); } @@ -5842,25 +5847,25 @@ dtap_sm_act_pdp_req(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 guint curr_len; curr_offset = offset; - curr_len = len; + curr_len = len; pinfo->p2p_dir = P2P_DIR_UNKNOWN; /* MS to network */ pinfo->link_dir = P2P_DIR_UL; - ELEM_MAND_V(GSM_A_PDU_TYPE_GM, DE_NET_SAPI, " - Requested NSAPI"); + ELEM_MAND_V( GSM_A_PDU_TYPE_GM, DE_NET_SAPI, " - Requested NSAPI"); - ELEM_MAND_V(GSM_A_PDU_TYPE_GM, DE_LLC_SAPI, " - Requested LLC SAPI"); + ELEM_MAND_V( GSM_A_PDU_TYPE_GM, DE_LLC_SAPI, " - Requested LLC SAPI"); - ELEM_MAND_LV(GSM_A_PDU_TYPE_GM, DE_QOS , " - Requested QoS" ); + ELEM_MAND_LV( GSM_A_PDU_TYPE_GM, DE_QOS, " - Requested QoS" ); - ELEM_MAND_LV(GSM_A_PDU_TYPE_GM, DE_PD_PRO_ADDR , " - Requested PDP address" ); + ELEM_MAND_LV( GSM_A_PDU_TYPE_GM, DE_PD_PRO_ADDR, " - Requested PDP address" ); - ELEM_OPT_TLV( 0x28 , GSM_A_PDU_TYPE_GM, DE_ACC_POINT_NAME , NULL); + ELEM_OPT_TLV( 0x28, GSM_A_PDU_TYPE_GM, DE_ACC_POINT_NAME, NULL); - ELEM_OPT_TLV( 0x27 , GSM_A_PDU_TYPE_GM, DE_PRO_CONF_OPT , NULL); + ELEM_OPT_TLV( 0x27, GSM_A_PDU_TYPE_GM, DE_PRO_CONF_OPT, NULL); - ELEM_OPT_TV_SHORT(0xA0, GSM_A_PDU_TYPE_GM, DE_REQ_TYPE, NULL); + ELEM_OPT_TV_SHORT( 0xA0, GSM_A_PDU_TYPE_GM, DE_REQ_TYPE, NULL); EXTRANEOUS_DATA_CHECK_EXPERT(curr_len, 0, pinfo); } @@ -5877,32 +5882,32 @@ dtap_sm_act_pdp_acc(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 guint curr_len; curr_offset = offset; - curr_len = len; + curr_len = len; pinfo->p2p_dir = P2P_DIR_UNKNOWN; /* Network to MS*/ pinfo->link_dir = P2P_DIR_DL; - ELEM_MAND_V(GSM_A_PDU_TYPE_GM, DE_LLC_SAPI, " - Negotiated LLC SAPI"); + ELEM_MAND_V( GSM_A_PDU_TYPE_GM, DE_LLC_SAPI, " - Negotiated LLC SAPI"); - ELEM_MAND_LV(GSM_A_PDU_TYPE_GM, DE_QOS , " - Negotiated QoS" ); + ELEM_MAND_LV( GSM_A_PDU_TYPE_GM, DE_QOS, " - Negotiated QoS" ); #if 0 /* This is done automatically */ - ELEM_MAND_V(GSM_A_PDU_TYPE_GM, DE_SPARE, NULL); + ELEM_MAND_V( GSM_A_PDU_TYPE_GM, DE_SPARE, NULL); curr_offset--; curr_len++; #endif - ELEM_MAND_V(GSM_A_PDU_TYPE_GM, DE_RAD_PRIO, NULL); + ELEM_MAND_V( GSM_A_PDU_TYPE_GM, DE_RAD_PRIO, NULL); - ELEM_OPT_TLV( 0x2B , GSM_A_PDU_TYPE_GM, DE_PD_PRO_ADDR , " - PDP address"); + ELEM_OPT_TLV( 0x2B, GSM_A_PDU_TYPE_GM, DE_PD_PRO_ADDR, " - PDP address"); - ELEM_OPT_TLV( 0x27 , GSM_A_PDU_TYPE_GM, DE_PRO_CONF_OPT , NULL); + ELEM_OPT_TLV( 0x27, GSM_A_PDU_TYPE_GM, DE_PRO_CONF_OPT, NULL); - ELEM_OPT_TLV( 0x34 , GSM_A_PDU_TYPE_GM, DE_PACKET_FLOW_ID , NULL); + ELEM_OPT_TLV( 0x34, GSM_A_PDU_TYPE_GM, DE_PACKET_FLOW_ID, NULL); - ELEM_OPT_TLV( 0x39 , GSM_A_PDU_TYPE_GM, DE_SM_CAUSE_2, " - SM cause"); + ELEM_OPT_TLV( 0x39, GSM_A_PDU_TYPE_GM, DE_SM_CAUSE_2, " - SM cause"); EXTRANEOUS_DATA_CHECK_EXPERT(curr_len, 0, pinfo); } @@ -5919,15 +5924,15 @@ dtap_sm_act_pdp_rej(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 guint curr_len; curr_offset = offset; - curr_len = len; + curr_len = len; pinfo->p2p_dir = P2P_DIR_UNKNOWN; /* Network to MS*/ pinfo->link_dir = P2P_DIR_DL; - ELEM_MAND_V(GSM_A_PDU_TYPE_GM, DE_SM_CAUSE, NULL); + ELEM_MAND_V( GSM_A_PDU_TYPE_GM, DE_SM_CAUSE, NULL); - ELEM_OPT_TLV( 0x27 , GSM_A_PDU_TYPE_GM, DE_PRO_CONF_OPT , NULL); + ELEM_OPT_TLV( 0x27, GSM_A_PDU_TYPE_GM, DE_PRO_CONF_OPT, NULL); EXTRANEOUS_DATA_CHECK_EXPERT(curr_len, 0, pinfo); } @@ -5944,24 +5949,24 @@ dtap_sm_act_sec_pdp_req(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, gui guint curr_len; curr_offset = offset; - curr_len = len; + curr_len = len; pinfo->p2p_dir = P2P_DIR_UNKNOWN; /* MS to Network */ pinfo->link_dir = P2P_DIR_UL; - ELEM_MAND_V(GSM_A_PDU_TYPE_GM, DE_NET_SAPI, " - Requested NSAPI"); + ELEM_MAND_V( GSM_A_PDU_TYPE_GM, DE_NET_SAPI, " - Requested NSAPI"); - ELEM_MAND_V(GSM_A_PDU_TYPE_GM, DE_LLC_SAPI, " - Requested LLC SAPI"); + ELEM_MAND_V( GSM_A_PDU_TYPE_GM, DE_LLC_SAPI, " - Requested LLC SAPI"); - ELEM_MAND_LV(GSM_A_PDU_TYPE_GM, DE_QOS , " - Requested QoS" ); + ELEM_MAND_LV( GSM_A_PDU_TYPE_GM, DE_QOS, " - Requested QoS" ); - ELEM_MAND_LV(GSM_A_PDU_TYPE_GM, DE_LINKED_TI , NULL); + ELEM_MAND_LV( GSM_A_PDU_TYPE_GM, DE_LINKED_TI, NULL); /* 3GPP TS 24.008 version 6.8.0 Release 6, 36 TFT Traffic Flow Template 10.5.6.12 O TLV 3-257 */ - ELEM_OPT_TLV( 0x36 , GSM_A_PDU_TYPE_GM, DE_TRAFFIC_FLOW_TEMPLATE , NULL); + ELEM_OPT_TLV( 0x36, GSM_A_PDU_TYPE_GM, DE_TRAFFIC_FLOW_TEMPLATE, NULL); - ELEM_OPT_TLV( 0x27 , GSM_A_PDU_TYPE_GM, DE_PRO_CONF_OPT , NULL); + ELEM_OPT_TLV( 0x27, GSM_A_PDU_TYPE_GM, DE_PRO_CONF_OPT, NULL); EXTRANEOUS_DATA_CHECK_EXPERT(curr_len, 0, pinfo); } @@ -5978,28 +5983,28 @@ dtap_sm_act_sec_pdp_acc(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, gui guint curr_len; curr_offset = offset; - curr_len = len; + curr_len = len; pinfo->p2p_dir = P2P_DIR_UNKNOWN; /* Network to MS*/ pinfo->link_dir = P2P_DIR_DL; - ELEM_MAND_V(GSM_A_PDU_TYPE_GM, DE_LLC_SAPI, " - Negotiated LLC SAPI"); + ELEM_MAND_V( GSM_A_PDU_TYPE_GM, DE_LLC_SAPI, " - Negotiated LLC SAPI"); - ELEM_MAND_LV(GSM_A_PDU_TYPE_GM, DE_QOS , " - Negotiated QoS" ); + ELEM_MAND_LV( GSM_A_PDU_TYPE_GM, DE_QOS, " - Negotiated QoS" ); - ELEM_MAND_V(GSM_A_PDU_TYPE_GM, DE_RAD_PRIO, NULL); + ELEM_MAND_V( GSM_A_PDU_TYPE_GM, DE_RAD_PRIO, NULL); #if 0 /* This is done automatically */ - ELEM_MAND_V(GSM_A_PDU_TYPE_GM, DE_SPARE, NULL); + ELEM_MAND_V( GSM_A_PDU_TYPE_GM, DE_SPARE, NULL); curr_offset--; curr_len++; #endif - ELEM_OPT_TLV( 0x34 , GSM_A_PDU_TYPE_GM, DE_PACKET_FLOW_ID , NULL); + ELEM_OPT_TLV( 0x34, GSM_A_PDU_TYPE_GM, DE_PACKET_FLOW_ID, NULL); - ELEM_OPT_TLV( 0x27 , GSM_A_PDU_TYPE_GM, DE_PRO_CONF_OPT , NULL); + ELEM_OPT_TLV( 0x27, GSM_A_PDU_TYPE_GM, DE_PRO_CONF_OPT, NULL); EXTRANEOUS_DATA_CHECK_EXPERT(curr_len, 0, pinfo); } @@ -6016,15 +6021,15 @@ dtap_sm_act_sec_pdp_rej(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, gui guint curr_len; curr_offset = offset; - curr_len = len; + curr_len = len; pinfo->p2p_dir = P2P_DIR_UNKNOWN; /* Network to MS*/ pinfo->link_dir = P2P_DIR_DL; - ELEM_MAND_V(GSM_A_PDU_TYPE_GM, DE_SM_CAUSE, NULL); + ELEM_MAND_V( GSM_A_PDU_TYPE_GM, DE_SM_CAUSE, NULL); - ELEM_OPT_TLV( 0x27 , GSM_A_PDU_TYPE_GM, DE_PRO_CONF_OPT , NULL); + ELEM_OPT_TLV( 0x27, GSM_A_PDU_TYPE_GM, DE_PRO_CONF_OPT, NULL); EXTRANEOUS_DATA_CHECK_EXPERT(curr_len, 0, pinfo); } @@ -6041,17 +6046,17 @@ dtap_sm_req_pdp_act(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 guint curr_len; curr_offset = offset; - curr_len = len; + curr_len = len; pinfo->p2p_dir = P2P_DIR_UNKNOWN; /* Network to MS*/ pinfo->link_dir = P2P_DIR_DL; - ELEM_MAND_LV(GSM_A_PDU_TYPE_GM, DE_PD_PRO_ADDR , " - Offered PDP address" ); + ELEM_MAND_LV( GSM_A_PDU_TYPE_GM, DE_PD_PRO_ADDR, " - Offered PDP address" ); - ELEM_OPT_TLV( 0x28 , GSM_A_PDU_TYPE_GM, DE_ACC_POINT_NAME , NULL); + ELEM_OPT_TLV( 0x28, GSM_A_PDU_TYPE_GM, DE_ACC_POINT_NAME, NULL); - ELEM_OPT_TLV( 0x27 , GSM_A_PDU_TYPE_GM, DE_PRO_CONF_OPT , NULL); + ELEM_OPT_TLV( 0x27, GSM_A_PDU_TYPE_GM, DE_PRO_CONF_OPT, NULL); EXTRANEOUS_DATA_CHECK_EXPERT(curr_len, 0, pinfo); } @@ -6068,15 +6073,15 @@ dtap_sm_req_pdp_act_rej(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, gui guint curr_len; curr_offset = offset; - curr_len = len; + curr_len = len; pinfo->p2p_dir = P2P_DIR_UNKNOWN; /* MS to Network */ pinfo->link_dir = P2P_DIR_UL; - ELEM_MAND_V(GSM_A_PDU_TYPE_GM, DE_SM_CAUSE, NULL); + ELEM_MAND_V( GSM_A_PDU_TYPE_GM, DE_SM_CAUSE, NULL); - ELEM_OPT_TLV( 0x27 , GSM_A_PDU_TYPE_GM, DE_PRO_CONF_OPT , NULL); + ELEM_OPT_TLV( 0x27, GSM_A_PDU_TYPE_GM, DE_PRO_CONF_OPT, NULL); EXTRANEOUS_DATA_CHECK_EXPERT(curr_len, 0, pinfo); } @@ -6093,31 +6098,31 @@ dtap_sm_mod_pdp_req_net(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, gui guint curr_len; curr_offset = offset; - curr_len = len; + curr_len = len; pinfo->p2p_dir = P2P_DIR_UNKNOWN; /* Network to MS */ pinfo->link_dir = P2P_DIR_DL; - ELEM_MAND_V(GSM_A_PDU_TYPE_GM,DE_RAD_PRIO, NULL); + ELEM_MAND_V( GSM_A_PDU_TYPE_GM, DE_RAD_PRIO, NULL); #if 0 /* This is done automatically */ - ELEM_MAND_V(GSM_A_PDU_TYPE_GM, DE_SPARE, NULL); + ELEM_MAND_V( GSM_A_PDU_TYPE_GM, DE_SPARE, NULL); curr_offset--; curr_len++; #endif - ELEM_MAND_V(GSM_A_PDU_TYPE_GM, DE_LLC_SAPI, " - Requested LLC SAPI"); + ELEM_MAND_V( GSM_A_PDU_TYPE_GM, DE_LLC_SAPI, " - Requested LLC SAPI"); - ELEM_MAND_LV(GSM_A_PDU_TYPE_GM, DE_QOS , " - New QoS" ); + ELEM_MAND_LV( GSM_A_PDU_TYPE_GM, DE_QOS, " - New QoS" ); - ELEM_OPT_TLV( 0x2B , GSM_A_PDU_TYPE_GM, DE_PD_PRO_ADDR , " - PDP address"); + ELEM_OPT_TLV( 0x2B, GSM_A_PDU_TYPE_GM, DE_PD_PRO_ADDR, " - PDP address"); - ELEM_OPT_TLV( 0x34 , GSM_A_PDU_TYPE_GM, DE_PACKET_FLOW_ID , NULL); + ELEM_OPT_TLV( 0x34, GSM_A_PDU_TYPE_GM, DE_PACKET_FLOW_ID, NULL); - ELEM_OPT_TLV( 0x27 , GSM_A_PDU_TYPE_GM, DE_PRO_CONF_OPT , NULL); + ELEM_OPT_TLV( 0x27, GSM_A_PDU_TYPE_GM, DE_PRO_CONF_OPT, NULL); - ELEM_OPT_TLV(0x36 , GSM_A_PDU_TYPE_GM, DE_TRAFFIC_FLOW_TEMPLATE , NULL); + ELEM_OPT_TLV( 0x36, GSM_A_PDU_TYPE_GM, DE_TRAFFIC_FLOW_TEMPLATE, NULL); EXTRANEOUS_DATA_CHECK_EXPERT(curr_len, 0, pinfo); } @@ -6134,19 +6139,19 @@ dtap_sm_mod_pdp_req_ms(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guin guint curr_len; curr_offset = offset; - curr_len = len; + curr_len = len; pinfo->p2p_dir = P2P_DIR_UNKNOWN; /* MS to Network */ pinfo->link_dir = P2P_DIR_UL; - ELEM_OPT_TV( 0x32 , GSM_A_PDU_TYPE_GM, DE_LLC_SAPI , " - Requested LLC SAPI" ); + ELEM_OPT_TV( 0x32, GSM_A_PDU_TYPE_GM, DE_LLC_SAPI, " - Requested LLC SAPI" ); - ELEM_OPT_TLV( 0x30 , GSM_A_PDU_TYPE_GM, DE_QOS , " - Requested new QoS" ); + ELEM_OPT_TLV( 0x30, GSM_A_PDU_TYPE_GM, DE_QOS, " - Requested new QoS" ); - ELEM_OPT_TLV( 0x31 , GSM_A_PDU_TYPE_GM, DE_TRAFFIC_FLOW_TEMPLATE , " - New TFT" ); + ELEM_OPT_TLV( 0x31, GSM_A_PDU_TYPE_GM, DE_TRAFFIC_FLOW_TEMPLATE, " - New TFT" ); - ELEM_OPT_TLV( 0x27 , GSM_A_PDU_TYPE_GM, DE_PRO_CONF_OPT , NULL); + ELEM_OPT_TLV( 0x27, GSM_A_PDU_TYPE_GM, DE_PRO_CONF_OPT, NULL); EXTRANEOUS_DATA_CHECK_EXPERT(curr_len, 0, pinfo); } @@ -6163,13 +6168,13 @@ dtap_sm_mod_pdp_acc_ms(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guin guint curr_len; curr_offset = offset; - curr_len = len; + curr_len = len; pinfo->p2p_dir = P2P_DIR_UNKNOWN; /* MS to Network */ pinfo->link_dir = P2P_DIR_UL; - ELEM_OPT_TLV( 0x27 , GSM_A_PDU_TYPE_GM, DE_PRO_CONF_OPT , NULL); + ELEM_OPT_TLV( 0x27, GSM_A_PDU_TYPE_GM, DE_PRO_CONF_OPT, NULL); EXTRANEOUS_DATA_CHECK_EXPERT(curr_len, 0, pinfo); } @@ -6186,21 +6191,21 @@ dtap_sm_mod_pdp_acc_net(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, gui guint curr_len; curr_offset = offset; - curr_len = len; + curr_len = len; pinfo->p2p_dir = P2P_DIR_UNKNOWN; /* Network to MS */ pinfo->link_dir = P2P_DIR_DL; - ELEM_OPT_TLV( 0x30 , GSM_A_PDU_TYPE_GM, DE_QOS , " - Negotiated QoS" ); + ELEM_OPT_TLV( 0x30, GSM_A_PDU_TYPE_GM, DE_QOS, " - Negotiated QoS" ); - ELEM_OPT_TV( 0x32 , GSM_A_PDU_TYPE_GM, DE_LLC_SAPI , " - Negotiated LLC SAPI" ); + ELEM_OPT_TV( 0x32, GSM_A_PDU_TYPE_GM, DE_LLC_SAPI, " - Negotiated LLC SAPI" ); - ELEM_OPT_TV_SHORT ( 0x80 , GSM_A_PDU_TYPE_GM , DE_RAD_PRIO , " - New radio priority" ); + ELEM_OPT_TV_SHORT ( 0x80, GSM_A_PDU_TYPE_GM, DE_RAD_PRIO, " - New radio priority" ); - ELEM_OPT_TLV( 0x34 , GSM_A_PDU_TYPE_GM, DE_PACKET_FLOW_ID , NULL); + ELEM_OPT_TLV( 0x34, GSM_A_PDU_TYPE_GM, DE_PACKET_FLOW_ID, NULL); - ELEM_OPT_TLV( 0x27 , GSM_A_PDU_TYPE_GM, DE_PRO_CONF_OPT , NULL); + ELEM_OPT_TLV( 0x27, GSM_A_PDU_TYPE_GM, DE_PRO_CONF_OPT, NULL); EXTRANEOUS_DATA_CHECK_EXPERT(curr_len, 0, pinfo); } @@ -6217,16 +6222,16 @@ dtap_sm_mod_pdp_rej(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 guint curr_len; curr_offset = offset; - curr_len = len; + curr_len = len; pinfo->p2p_dir = P2P_DIR_UNKNOWN; /* Network or the MS */ pinfo->link_dir = LINK_DIR_UNKNOWN; - ELEM_MAND_V(GSM_A_PDU_TYPE_GM, DE_SM_CAUSE, NULL); + ELEM_MAND_V( GSM_A_PDU_TYPE_GM, DE_SM_CAUSE, NULL); - ELEM_OPT_TLV( 0x27 , GSM_A_PDU_TYPE_GM, DE_PRO_CONF_OPT , NULL); + ELEM_OPT_TLV( 0x27, GSM_A_PDU_TYPE_GM, DE_PRO_CONF_OPT, NULL); EXTRANEOUS_DATA_CHECK_EXPERT(curr_len, 0, pinfo); } @@ -6243,19 +6248,19 @@ dtap_sm_deact_pdp_req(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint guint curr_len; curr_offset = offset; - curr_len = len; + curr_len = len; pinfo->p2p_dir = P2P_DIR_UNKNOWN; pinfo->link_dir = LINK_DIR_UNKNOWN; - ELEM_MAND_V(GSM_A_PDU_TYPE_GM, DE_SM_CAUSE, NULL); + ELEM_MAND_V( GSM_A_PDU_TYPE_GM, DE_SM_CAUSE, NULL); - ELEM_OPT_TV_SHORT( 0x90 , GSM_A_PDU_TYPE_GM , DE_TEAR_DOWN_IND , NULL); + ELEM_OPT_TV_SHORT( 0x90, GSM_A_PDU_TYPE_GM, DE_TEAR_DOWN_IND, NULL); - ELEM_OPT_TLV( 0x27 , GSM_A_PDU_TYPE_GM, DE_PRO_CONF_OPT , NULL); + ELEM_OPT_TLV( 0x27, GSM_A_PDU_TYPE_GM, DE_PRO_CONF_OPT, NULL); /* MBMS context status 10.5.7.6 TLV 2 - 18 */ - ELEM_OPT_TLV( 0x35 , GSM_A_PDU_TYPE_GM, DE_MBMS_CTX_STATUS , NULL); + ELEM_OPT_TLV( 0x35, GSM_A_PDU_TYPE_GM, DE_MBMS_CTX_STATUS, NULL); EXTRANEOUS_DATA_CHECK_EXPERT(curr_len, 0, pinfo); } @@ -6272,15 +6277,15 @@ dtap_sm_deact_pdp_acc(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint guint curr_len; curr_offset = offset; - curr_len = len; + curr_len = len; pinfo->p2p_dir = P2P_DIR_UNKNOWN; pinfo->link_dir = LINK_DIR_UNKNOWN; - ELEM_OPT_TLV( 0x27 , GSM_A_PDU_TYPE_GM, DE_PRO_CONF_OPT , NULL); + ELEM_OPT_TLV( 0x27, GSM_A_PDU_TYPE_GM, DE_PRO_CONF_OPT, NULL); /* MBMS context status 10.5.7.6 TLV 2 - 18 */ - ELEM_OPT_TLV( 0x35 , GSM_A_PDU_TYPE_GM, DE_MBMS_CTX_STATUS , NULL); + ELEM_OPT_TLV( 0x35, GSM_A_PDU_TYPE_GM, DE_MBMS_CTX_STATUS, NULL); EXTRANEOUS_DATA_CHECK_EXPERT(curr_len, 0, pinfo); } @@ -6297,22 +6302,22 @@ dtap_sm_req_sec_pdp_act(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, gui guint curr_len; curr_offset = offset; - curr_len = len; + curr_len = len; pinfo->p2p_dir = P2P_DIR_UNKNOWN; pinfo->link_dir = P2P_DIR_DL; /* Required QoS Quality of service 10.5.6.5 M LV 13-17 */ - ELEM_MAND_LV(GSM_A_PDU_TYPE_GM, DE_QOS , " - Required QoS"); + ELEM_MAND_LV( GSM_A_PDU_TYPE_GM, DE_QOS, " - Required QoS"); /* Linked TI Linked TI 10.5.6.7 M LV 2-3 */ - ELEM_MAND_LV(GSM_A_PDU_TYPE_GM, DE_LINKED_TI , NULL); + ELEM_MAND_LV( GSM_A_PDU_TYPE_GM, DE_LINKED_TI, NULL); /* 36 TFT Traffic Flow Template 10.5.6.12 O TLV 3-257 */ - ELEM_OPT_TLV(0x36, GSM_A_PDU_TYPE_GM, DE_TRAFFIC_FLOW_TEMPLATE, NULL); + ELEM_OPT_TLV( 0x36, GSM_A_PDU_TYPE_GM, DE_TRAFFIC_FLOW_TEMPLATE, NULL); /* 27 Protocol configuration options Protocol configuration options 10.5.6.3 O TLV 3 - 253 */ - ELEM_OPT_TLV(0x27, GSM_A_PDU_TYPE_GM, DE_PRO_CONF_OPT, NULL); + ELEM_OPT_TLV( 0x27, GSM_A_PDU_TYPE_GM, DE_PRO_CONF_OPT, NULL); EXTRANEOUS_DATA_CHECK_EXPERT(curr_len, 0, pinfo); } @@ -6329,16 +6334,16 @@ dtap_sm_req_sec_pdp_act_rej(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint curr_len; curr_offset = offset; - curr_len = len; + curr_len = len; pinfo->p2p_dir = P2P_DIR_UNKNOWN; pinfo->link_dir = P2P_DIR_UL; /* SM cause SM cause 10.5.6.6 M V 1 */ - ELEM_MAND_V(GSM_A_PDU_TYPE_GM, DE_SM_CAUSE, NULL); + ELEM_MAND_V( GSM_A_PDU_TYPE_GM, DE_SM_CAUSE, NULL); /* 27 Protocol configuration options Protocol configuration options 10.5.6.3 O TLV 3 - 253 */ - ELEM_OPT_TLV(0x27, GSM_A_PDU_TYPE_GM, DE_PRO_CONF_OPT, NULL); + ELEM_OPT_TLV( 0x27, GSM_A_PDU_TYPE_GM, DE_PRO_CONF_OPT, NULL); EXTRANEOUS_DATA_CHECK_EXPERT(curr_len, 0, pinfo); } @@ -6355,12 +6360,12 @@ dtap_sm_notif(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offse guint curr_len; curr_offset = offset; - curr_len = len; + curr_len = len; pinfo->p2p_dir = P2P_DIR_UNKNOWN; pinfo->link_dir = P2P_DIR_DL; - ELEM_MAND_LV(GSM_A_PDU_TYPE_GM, DE_SM_NOTIF_IND, NULL); + ELEM_MAND_LV( GSM_A_PDU_TYPE_GM, DE_SM_NOTIF_IND, NULL); EXTRANEOUS_DATA_CHECK_EXPERT(curr_len, 0, pinfo); } @@ -6377,12 +6382,12 @@ dtap_sm_status(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offs guint curr_len; curr_offset = offset; - curr_len = len; + curr_len = len; pinfo->p2p_dir = P2P_DIR_UNKNOWN; pinfo->link_dir = LINK_DIR_UNKNOWN; - ELEM_MAND_V(GSM_A_PDU_TYPE_GM, DE_SM_CAUSE, NULL); + ELEM_MAND_V( GSM_A_PDU_TYPE_GM, DE_SM_CAUSE, NULL); EXTRANEOUS_DATA_CHECK_EXPERT(curr_len, 0, pinfo); } @@ -6399,27 +6404,27 @@ dtap_sm_act_mbms_req(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint3 guint curr_len; curr_offset = offset; - curr_len = len; + curr_len = len; pinfo->p2p_dir = P2P_DIR_RECV; /* Requested MBMS NSAPI Enhanced Network service access point identifier 10.5.6.16 M V */ - ELEM_MAND_V(GSM_A_PDU_TYPE_GM, DE_ENH_NSAPI, " - Requested MBMS NSAPI"); + ELEM_MAND_V( GSM_A_PDU_TYPE_GM, DE_ENH_NSAPI, " - Requested MBMS NSAPI"); /* Requested LLC SAPI LLC service access point identifier 10.5.6.9 M V 1 */ - ELEM_MAND_V(GSM_A_PDU_TYPE_GM, DE_LLC_SAPI, " - Requested LLC SAPI"); + ELEM_MAND_V( GSM_A_PDU_TYPE_GM, DE_LLC_SAPI, " - Requested LLC SAPI"); /* Supported MBMS bearer capabilities MBMS bearer capabilities 10.5.6.14 M LV 2 - 3 */ - ELEM_MAND_LV(GSM_A_PDU_TYPE_GM, DE_MBMS_BEARER_CAP , NULL ); + ELEM_MAND_LV( GSM_A_PDU_TYPE_GM, DE_MBMS_BEARER_CAP, NULL ); /* Requested multicast address Packet data protocol address 10.5.6.4 M LV 3 - 19 */ - ELEM_MAND_LV(GSM_A_PDU_TYPE_GM, DE_PD_PRO_ADDR , " - Requested multicast address" ); + ELEM_MAND_LV( GSM_A_PDU_TYPE_GM, DE_PD_PRO_ADDR, " - Requested multicast address" ); /* Access point name Access point name 10.5.6.1 M LV 2 - 101 */ - ELEM_MAND_LV(GSM_A_PDU_TYPE_GM, DE_ACC_POINT_NAME , NULL ); + ELEM_MAND_LV( GSM_A_PDU_TYPE_GM, DE_ACC_POINT_NAME, NULL ); /* 35 MBMS protocol configuration options MBMS protocol configuration options 10.5.6.15 O TLV 3 - 253 */ - ELEM_OPT_TLV( 0x35 , GSM_A_PDU_TYPE_GM, DE_MBMS_PROT_CONF_OPT , NULL); + ELEM_OPT_TLV( 0x35, GSM_A_PDU_TYPE_GM, DE_MBMS_PROT_CONF_OPT, NULL); EXTRANEOUS_DATA_CHECK_EXPERT(curr_len, 0, pinfo); } @@ -6436,15 +6441,15 @@ dtap_sm_act_mbms_acc(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint3 guint curr_len; curr_offset = offset; - curr_len = len; + curr_len = len; pinfo->p2p_dir = P2P_DIR_SENT; - ELEM_MAND_LV(GSM_A_PDU_TYPE_GM, DE_TMGI, NULL); + ELEM_MAND_LV( GSM_A_PDU_TYPE_GM, DE_TMGI, NULL); - ELEM_MAND_V(GSM_A_PDU_TYPE_GM, DE_LLC_SAPI, " - Negotiated LLC SAPI"); + ELEM_MAND_V( GSM_A_PDU_TYPE_GM, DE_LLC_SAPI, " - Negotiated LLC SAPI"); - ELEM_OPT_TLV( 0x35 , GSM_A_PDU_TYPE_GM, DE_MBMS_PROT_CONF_OPT , NULL); + ELEM_OPT_TLV( 0x35, GSM_A_PDU_TYPE_GM, DE_MBMS_PROT_CONF_OPT, NULL); EXTRANEOUS_DATA_CHECK_EXPERT(curr_len, 0, pinfo); } @@ -6461,13 +6466,13 @@ dtap_sm_act_mbms_rej(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint3 guint curr_len; curr_offset = offset; - curr_len = len; + curr_len = len; pinfo->p2p_dir = P2P_DIR_SENT; - ELEM_MAND_V(GSM_A_PDU_TYPE_GM, DE_SM_CAUSE, NULL); + ELEM_MAND_V( GSM_A_PDU_TYPE_GM, DE_SM_CAUSE, NULL); - ELEM_OPT_TLV( 0x35 , GSM_A_PDU_TYPE_GM, DE_MBMS_PROT_CONF_OPT , NULL); + ELEM_OPT_TLV( 0x35, GSM_A_PDU_TYPE_GM, DE_MBMS_PROT_CONF_OPT, NULL); EXTRANEOUS_DATA_CHECK_EXPERT(curr_len, 0, pinfo); } @@ -6488,13 +6493,13 @@ dtap_sm_req_mbms_act(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint3 pinfo->p2p_dir = P2P_DIR_SENT; - ELEM_MAND_V(GSM_A_PDU_TYPE_GM, DE_NET_SAPI, " - Linked NSAPI"); + ELEM_MAND_V( GSM_A_PDU_TYPE_GM, DE_NET_SAPI, " - Linked NSAPI"); - ELEM_MAND_LV(GSM_A_PDU_TYPE_GM, DE_PD_PRO_ADDR , " - Offered multicast address" ); + ELEM_MAND_LV( GSM_A_PDU_TYPE_GM, DE_PD_PRO_ADDR, " - Offered multicast address" ); - ELEM_MAND_LV(GSM_A_PDU_TYPE_GM, DE_ACC_POINT_NAME , NULL ); + ELEM_MAND_LV( GSM_A_PDU_TYPE_GM, DE_ACC_POINT_NAME, NULL ); - ELEM_OPT_TLV( 0x35 , GSM_A_PDU_TYPE_GM, DE_MBMS_PROT_CONF_OPT , NULL); + ELEM_OPT_TLV( 0x35, GSM_A_PDU_TYPE_GM, DE_MBMS_PROT_CONF_OPT, NULL); EXTRANEOUS_DATA_CHECK_EXPERT(curr_len, 0, pinfo); } @@ -6515,9 +6520,9 @@ dtap_sm_req_mbms_rej(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint3 pinfo->p2p_dir = P2P_DIR_RECV; - ELEM_MAND_V(GSM_A_PDU_TYPE_GM, DE_SM_CAUSE, NULL); + ELEM_MAND_V( GSM_A_PDU_TYPE_GM, DE_SM_CAUSE, NULL); - ELEM_OPT_TLV( 0x35 , GSM_A_PDU_TYPE_GM, DE_MBMS_PROT_CONF_OPT , NULL); + ELEM_OPT_TLV( 0x35, GSM_A_PDU_TYPE_GM, DE_MBMS_PROT_CONF_OPT, NULL); EXTRANEOUS_DATA_CHECK_EXPERT(curr_len, 0, pinfo); } @@ -6531,10 +6536,10 @@ static void (*dtap_msg_gmm_fcn[])(tvbuff_t *tvb, proto_tree *tree, packet_info * dtap_gmm_attach_rej, /* Attach Reject */ dtap_gmm_detach_req, /* Detach Request */ dtap_gmm_detach_acc, /* Detach Accept */ - dtap_gmm_rau_req, /* Routing Area Update Request */ - dtap_gmm_rau_acc, /* Routing Area Update Accept */ - dtap_gmm_rau_com, /* Routing Area Update Complete */ - dtap_gmm_rau_rej, /* Routing Area Update Reject */ + dtap_gmm_rau_req, /* Routing Area Update Request */ + dtap_gmm_rau_acc, /* Routing Area Update Accept */ + dtap_gmm_rau_com, /* Routing Area Update Complete */ + dtap_gmm_rau_rej, /* Routing Area Update Reject */ dtap_gmm_service_req, /* Service Request */ dtap_gmm_service_acc, /* Service Accept */ dtap_gmm_service_rej, /* Service Reject */ @@ -6544,9 +6549,9 @@ static void (*dtap_msg_gmm_fcn[])(tvbuff_t *tvb, proto_tree *tree, packet_info * dtap_gmm_auth_ciph_resp, /* Authentication and Ciphering Resp */ dtap_gmm_auth_ciph_rej, /* Authentication and Ciphering Rej */ dtap_gmm_auth_ciph_fail, /* Authentication and Ciphering Failure */ - dtap_gmm_ident_req, /* Identity Request */ - dtap_gmm_ident_res, /* Identity Response */ - dtap_gmm_status, /* GMM Status */ + dtap_gmm_ident_req, /* Identity Request */ + dtap_gmm_ident_res, /* Identity Response */ + dtap_gmm_status, /* GMM Status */ dtap_gmm_information, /* GMM Information */ NULL, /* NONE */ }; @@ -6569,27 +6574,27 @@ static void (*dtap_msg_sm_fcn[])(tvbuff_t *tvb, proto_tree *tree, packet_info *p dtap_sm_act_sec_pdp_req, /* Activate Secondary PDP Context Request */ dtap_sm_act_sec_pdp_acc, /* Activate Secondary PDP Context Accept */ dtap_sm_act_sec_pdp_rej, /* Activate Secondary PDP Context Reject */ - NULL, /* Reserved: was allocated in earlier phases of the protocol */ - NULL, /* Reserved: was allocated in earlier phases of the protocol */ - NULL, /* Reserved: was allocated in earlier phases of the protocol */ - NULL, /* Reserved: was allocated in earlier phases of the protocol */ - NULL, /* Reserved: was allocated in earlier phases of the protocol */ - dtap_sm_status, /* SM Status */ + NULL, /* Reserved: was allocated in earlier phases of the protocol */ + NULL, /* Reserved: was allocated in earlier phases of the protocol */ + NULL, /* Reserved: was allocated in earlier phases of the protocol */ + NULL, /* Reserved: was allocated in earlier phases of the protocol */ + NULL, /* Reserved: was allocated in earlier phases of the protocol */ + dtap_sm_status, /* SM Status */ dtap_sm_act_mbms_req, /* Activate MBMS Context Request */ dtap_sm_act_mbms_acc, /* Activate MBMS Context Accept */ dtap_sm_act_mbms_rej, /* Activate MBMS Context Reject */ dtap_sm_req_mbms_act, /* Request MBMS Context Activation */ dtap_sm_req_mbms_rej, /* Request MBMS Context Activation Reject */ dtap_sm_req_sec_pdp_act, /* Request Secondary PDP Context Activation */ - dtap_sm_req_sec_pdp_act_rej,/* Request Secondary PDP Context Activation Reject */ - dtap_sm_notif, /* Notification */ + dtap_sm_req_sec_pdp_act_rej, /* Request Secondary PDP Context Activation Reject */ + dtap_sm_notif, /* Notification */ NULL, /* NONE */ }; void get_gmm_msg_params(guint8 oct, const gchar **msg_str, int *ett_tree, int *hf_idx, msg_fcn *dtap_msg_fcn) { - gint idx; + gint idx; *msg_str = match_strval_idx((guint32) (oct & DTAP_GMM_IEI_MASK), gsm_a_dtap_msg_gmm_strings, &idx); *ett_tree = ett_gsm_dtap_msg_gmm[idx]; @@ -6602,7 +6607,7 @@ get_gmm_msg_params(guint8 oct, const gchar **msg_str, int *ett_tree, int *hf_idx void get_sm_msg_params(guint8 oct, const gchar **msg_str, int *ett_tree, int *hf_idx, msg_fcn *dtap_msg_fcn) { - gint idx; + gint idx; *msg_str = match_strval_idx((guint32) (oct & DTAP_SM_IEI_MASK), gsm_a_dtap_msg_sm_strings, &idx); *ett_tree = ett_gsm_dtap_msg_sm[idx]; @@ -6616,924 +6621,923 @@ get_sm_msg_params(guint8 oct, const gchar **msg_str, int *ett_tree, int *hf_idx, void proto_register_gsm_a_gm(void) { - guint i; - guint last_offset; + guint i; + guint last_offset; /* Setup list of header fields */ - static hf_register_info hf[] = - { - { &hf_gsm_a_dtap_msg_gmm_type, - { "DTAP GPRS Mobility Management Message Type", "gsm_a.dtap_msg_gmm_type", - FT_UINT8, BASE_HEX, VALS(gsm_a_dtap_msg_gmm_strings), 0x0, - NULL, HFILL } - }, - { &hf_gsm_a_dtap_msg_sm_type, - { "DTAP GPRS Session Management Message Type", "gsm_a.dtap_msg_sm_type", - FT_UINT8, BASE_HEX, VALS(gsm_a_dtap_msg_sm_strings), 0x0, - NULL, HFILL } - }, - { &hf_gsm_a_gm_elem_id, - { "Element ID", "gsm_a_gm.elem_id", - FT_UINT8, BASE_DEC, NULL, 0, - NULL, HFILL } - }, - { &hf_gsm_a_qos_delay_cls, - { "Quality of Service Delay class", "gsm_a.qos.delay_cls", - FT_UINT8, BASE_DEC, VALS(gsm_a_qos_delay_cls_vals), 0x38, - NULL, HFILL } - }, - { &hf_gsm_a_qos_reliability_cls, - { "Reliability class", "gsm_a.qos.delay_cls", - FT_UINT8, BASE_DEC, VALS(gsm_a_qos_delay_cls_vals), 0x07, - NULL, HFILL } - }, - { &hf_gsm_a_qos_traffic_cls, - { "Traffic class", "gsm_a.qos.traffic_cls", - FT_UINT8, BASE_DEC, VALS(gsm_a_qos_traffic_cls_vals), 0xe0, - NULL, HFILL } - }, - { &hf_gsm_a_qos_del_order, - { "Delivery order", "gsm_a.qos.del_order", - FT_UINT8, BASE_DEC, VALS(gsm_a_qos_del_order_vals), 0x18, - NULL, HFILL } - }, - { &hf_gsm_a_qos_del_of_err_sdu, - { "Delivery of erroneous SDUs", "gsm_a.qos.del_of_err_sdu", - FT_UINT8, BASE_DEC, VALS(gsm_a_qos_del_of_err_sdu_vals), 0x07, - NULL, HFILL } - }, - { &hf_gsm_a_qos_ber, - { "Residual Bit Error Rate (BER)", "gsm_a.qos.ber", - FT_UINT8, BASE_DEC, VALS(gsm_a_qos_ber_vals), 0xf0, - NULL, HFILL } - }, - { &hf_gsm_a_qos_sdu_err_rat, - { "SDU error ratio", "gsm_a.qos.sdu_err_rat", - FT_UINT8, BASE_DEC, VALS(gsm_a_qos_sdu_err_rat_vals), 0x0f, - NULL, HFILL } - }, - { &hf_gsm_a_qos_traff_hdl_pri, - { "Traffic handling priority", "gsm_a.qos.traff_hdl_pri", - FT_UINT8, BASE_DEC, VALS(gsm_a_qos_traff_hdl_pri_vals), 0x03, - NULL, HFILL } - }, - { &hf_gsm_a_gmm_split_on_ccch, - { "SPLIT on CCCH","gsm_a.gmm.split_on_ccch", - FT_BOOLEAN, 8, TFS(&gsm_a_gmm_split_on_ccch_value), 0x08, - NULL, HFILL } - }, - { &hf_gsm_a_gmm_non_drx_timer, - { "Non-DRX timer","gsm_a.gmm.non_drx_timer", - FT_UINT8, BASE_DEC, VALS(gsm_a_gmm_non_drx_timer_strings), 0x07, - NULL, HFILL } - }, - { &hf_gsm_a_gmm_cn_spec_drs_cycle_len_coef, - { "CN Specific DRX cycle length coefficient","gsm_a.gmm.cn_spec_drs_cycle_len_coef", - FT_UINT8, BASE_DEC|BASE_RANGE_STRING, RVALS(gsm_a_gmm_cn_spec_drs_cycle_len_coef_strings), 0xf0, - NULL, HFILL } - }, - { &hf_gsm_a_tft_op_code, - { "TFT operation code", "gsm_a.tft.op_code", - FT_UINT8, BASE_DEC, VALS(gsm_a_tft_op_code_vals), 0xe0, - NULL, HFILL } - }, - { &hf_gsm_a_tft_e_bit, - { "E bit","gsm_a.tft.e_bit", - FT_BOOLEAN, 8, TFS(&gsm_a_tft_e_bit), 0x10, - NULL, HFILL } - }, - { &hf_gsm_a_tft_pkt_flt, - { "Number of packet filters", "gsm_a.tft.pkt_flt", - FT_UINT8, BASE_DEC, NULL, 0x0f, - NULL, HFILL } - }, - { &hf_gsm_a_tft_pkt_flt_dir, - { "Packet filter direction", "gsm_a.tft.pkt_flt_dir", - FT_UINT8, BASE_DEC, VALS(gsm_a_tft_pkt_flt_dir_vals), 0x30, - NULL, HFILL } - }, - { &hf_gsm_a_tft_pkt_flt_id, - { "Packet filter identifier", "gsm_a.tft.pkt_flt_id", - FT_UINT8, BASE_DEC, NULL, 0x0f, - NULL, HFILL } - }, - { &hf_gsm_a_sm_ip4_address, - { "IPv4 address", "gsm_a.sm.ip4_address", - FT_IPv4, BASE_NONE, NULL, 0x0, - NULL, HFILL } - }, - { &hf_gsm_a_sm_ip4_mask, - { "IPv4 address mask", "gsm_a.sm.ip4_mask", - FT_IPv4, BASE_NONE, NULL, 0x0, - NULL, HFILL } - }, - { &hf_gsm_a_sm_ip6_address, - { "IPv6 address", "gsm_a.sm.ip6_address", - FT_IPv6, BASE_NONE, NULL, 0x0, - NULL, HFILL } - }, - { &hf_gsm_a_sm_ip6_mask, - { "IPv6 address mask", "gsm_a.sm.ip6_mask", - FT_IPv6, BASE_NONE, NULL, 0x0, - NULL, HFILL } - }, - { &hf_gsm_a_tft_protocol_header, - { "Protocol/header", "gsm_a.tft.protocol_header", - FT_UINT8, BASE_HEX|BASE_EXT_STRING, (&ipproto_val_ext), 0x0, - NULL, HFILL } - }, - { &hf_gsm_a_tft_port, - { "Port", "gsm_a.tft.port", - FT_UINT16, BASE_DEC, NULL, 0x0, - NULL, HFILL } - }, - { &hf_gsm_a_tft_port_low, - { "Low limit port", "gsm_a.tft.port_low", - FT_UINT16, BASE_DEC, NULL, 0x0, - NULL, HFILL } - }, - { &hf_gsm_a_tft_port_high, - { "High limit port", "gsm_a.tft.port_high", - FT_UINT16, BASE_DEC, NULL, 0x0, - NULL, HFILL } - }, - { &hf_gsm_a_tft_security, - { "IPSec security parameter index", "gsm_a.tft.security", - FT_UINT32, BASE_HEX, NULL, 0x0, - NULL, HFILL } - }, - { &hf_gsm_a_tft_traffic_class, - { "Type of service/Traffic class field", "gsm_a.tft.traffic_class", - FT_UINT8, BASE_HEX, NULL, 0x0, - NULL, HFILL } - }, - { &hf_gsm_a_tft_traffic_mask, - { "Mask field", "gsm_a.tft.traffic_mask", - FT_UINT8, BASE_HEX, NULL, 0x0, - NULL, HFILL } - }, - { &hf_gsm_a_tft_flow_label_type, - { "Flow Label Type", "gsm_a.tft.flow_label_type", - FT_UINT24, BASE_HEX, NULL, 0x0FFFFF, - NULL, HFILL } - }, - { &hf_gsm_a_tft_param_id, - { "Parameter identifier", "gsm_a.tft.param_id", - FT_UINT8, BASE_DEC, VALS(gsm_a_tft_param_id_vals), 0x0, - NULL, HFILL } - }, - { &hf_gsm_a_ptmsi_sig, - { "P-TMSI Signature", "gsm_a.ptmsi_sig", - FT_UINT24, BASE_HEX, NULL, 0x0, - NULL, HFILL } - }, - { &hf_gsm_a_ptmsi_sig2, - { "P-TMSI Signature 2", "gsm_a.ptmsi_sig2", - FT_UINT24, BASE_HEX, NULL, 0x0, - NULL, HFILL } - }, - { &hf_gsm_a_gm_acc_tech_type, - { "Access Technology Type", "gsm_a.gm.acc_tech_type", - FT_UINT8, BASE_DEC, VALS(gsm_a_gm_acc_tech_type_vals), 0x0, - NULL, HFILL } - }, - { &hf_gsm_a_gm_acc_cap_struct_len, - { "Length in bits", "gsm_a.gm.acc_cap_struct_len", - FT_UINT8, BASE_HEX_DEC,NULL, 0x0, - NULL, HFILL } - }, - { &hf_gsm_a_gm_sms_value, - { "SMS_VALUE (Switch-Measure-Switch)", "gsm_a.gm.sms", - FT_UINT8, BASE_DEC, VALS(gsm_a_sms_vals), 0x0, - NULL, HFILL } - }, - { &hf_gsm_a_gm_sm_value, - { "(SM_VALUE) Switch-Measure", "gsm_a.gm.sm", - FT_UINT8, BASE_DEC, VALS(gsm_a_sms_vals), 0x0, - NULL, HFILL } - }, - { &hf_gsm_a_gm_sm_ext, - { "Ext", "gsm_a.gm.sm.ext", - FT_UINT8, BASE_HEX, NULL, 0x80, - NULL, HFILL } - }, - { &hf_gsm_a_gm_link_dir, - { "Link direction", "gsm_a.gm.link_dir", - FT_INT32, BASE_DEC, VALS(gsm_a_gm_link_dir_vals), 0x0, - NULL, HFILL } - }, - { &hf_gsm_a_gm_cause, - { "gmm Cause", "gsm_a.gm.cause", - FT_UINT8, BASE_DEC|BASE_RANGE_STRING, RVALS(gmm_cause_vals), 0x0, - NULL, HFILL } - }, - { &hf_gsm_a_gm_fop, - { "Follow-on proceed", "gsm_a.gm.fop", - FT_BOOLEAN, 8, NULL, 0x08, - NULL, HFILL } - }, - { &hf_gsm_a_gm_res_of_attach, - { "Result of attach", "gsm_a.gm.res_of_attach", - FT_UINT8, BASE_DEC, VALS(gsm_a_gm_res_of_attach_vals), 0x07, - NULL, HFILL } - }, - { &hf_gsm_a_gm_type_of_ciph_alg, - { "Type of ciphering algorithm", "gsm_a.gm.type_of_ciph_alg", - FT_UINT8, BASE_DEC, VALS(gsm_a_gm_type_of_ciph_alg_vals), 0x07, - NULL, HFILL } - }, - { &hf_gsm_a_gm_imeisv_req, - { "IMEISV request", "gsm_a.gm.imeisv_req", - FT_UINT8, BASE_DEC|BASE_RANGE_STRING, RVALS(gsm_a_gm_imeisv_req_vals), 0x00, - NULL, HFILL } - }, - { &hf_gsm_a_gm_ac_ref_nr, - { "A&C reference number", "gsm_a.gm.ac_ref_nr", - FT_UINT8, BASE_DEC, NULL, 0x0, - NULL, HFILL } - }, - { &hf_gsm_a_gm_force_to_standby, - { "Force to standby", "gsm_a.gm.force_to_standby", - FT_UINT8, BASE_DEC|BASE_RANGE_STRING, RVALS(gsm_a_gm_force_to_standby_vals), 0x00, - NULL, HFILL } - }, - { &hf_gsm_a_gm_ciph_key_seq_num, - { "Ciphering key sequence number", "gsm_a.gm.ciph_key_seq_num", - FT_UINT8, BASE_DEC, NULL, 0x00, - NULL, HFILL } - }, - { &hf_gsm_a_gm_serv_type, - { "Service type", "gsm_a.gm.serv_type", - FT_UINT8, BASE_DEC, VALS(gsm_a_gm_serv_type_vals), 0x00, - NULL, HFILL } - }, - { &hf_gsm_a_gm_for, - { "Follow-on request pending", "gsm_a.gm.for", - FT_BOOLEAN, 8, NULL, 0x08, - NULL, HFILL } - }, - { &hf_gsm_a_gm_type_of_attach, - { "Type of attach", "gsm_a.gm.type_of_attach", - FT_UINT8, BASE_DEC, VALS(gsm_a_gm_type_of_attach_vals), 0x07, - NULL, HFILL } - }, - { &hf_gsm_a_gm_tmsi_flag, - { "TMSI flag", "gsm_a.gm.tmsi_flag", - FT_BOOLEAN, 8, TFS(&gsm_a_gm_tmsi_flag_value), 0x01, - NULL, HFILL } - }, - { &hf_gsm_a_gm_update_type, - { "Update type", "gsm_a.gm.update_type", - FT_UINT8, BASE_DEC, VALS(gsm_a_gm_update_type_vals), 0x07, - NULL, HFILL } - }, - { &hf_gsm_a_gm_gprs_timer_unit, - { "Unit", "gsm_a.gm.gprs_timer_unit", - FT_UINT8, BASE_DEC, VALS(gsm_a_gm_gprs_timer_unit_vals), 0xe0, - NULL, HFILL } - }, - { &hf_gsm_a_gm_gprs_timer_value, - { "Timer value", "gsm_a.gm.gprs_timer_value", - FT_UINT8, BASE_DEC, NULL, 0x1f, - NULL, HFILL } - }, - { &hf_gsm_a_gm_nsapi_5_ul_stat, - { "NSAPI(5) uplink status", "gsm_a.gm.nsapi_5_ul_stat", - FT_BOOLEAN, BASE_NONE, TFS(&gsm_a_gm_nsapi_ul_stat_vals), 0x0, - NULL, HFILL } - }, - { &hf_gsm_a_gm_nsapi_6_ul_stat, - { "NSAPI(6) uplink status", "gsm_a.gm.nsapi_6_ul_stat", - FT_BOOLEAN, BASE_NONE, TFS(&gsm_a_gm_nsapi_ul_stat_vals), 0x0, - NULL, HFILL } - }, - { &hf_gsm_a_gm_nsapi_7_ul_stat, - { "NSAPI(7) uplink status", "gsm_a.gm.nsapi_7_ul_stat", - FT_BOOLEAN, BASE_NONE, TFS(&gsm_a_gm_nsapi_ul_stat_vals), 0x0, - NULL, HFILL } - }, - { &hf_gsm_a_gm_nsapi_8_ul_stat, - { "NSAPI(8) uplink status", "gsm_a.gm.nsapi_8_ul_stat", - FT_BOOLEAN, BASE_NONE, TFS(&gsm_a_gm_nsapi_ul_stat_vals), 0x0, - NULL, HFILL } - }, - { &hf_gsm_a_gm_nsapi_9_ul_stat, - { "NSAPI(9) uplink status", "gsm_a.gm.nsapi_9_ul_stat", - FT_BOOLEAN, BASE_NONE, TFS(&gsm_a_gm_nsapi_ul_stat_vals), 0x0, - NULL, HFILL } - }, - { &hf_gsm_a_gm_nsapi_10_ul_stat, - { "NSAPI(10) uplink status", "gsm_a.gm.nsapi_10_ul_stat", - FT_BOOLEAN, BASE_NONE, TFS(&gsm_a_gm_nsapi_ul_stat_vals), 0x0, - NULL, HFILL } - }, - { &hf_gsm_a_gm_nsapi_11_ul_stat, - { "NSAPI(11) uplink status", "gsm_a.gm.nsapi_11_ul_stat", - FT_BOOLEAN, BASE_NONE, TFS(&gsm_a_gm_nsapi_ul_stat_vals), 0x0, - NULL, HFILL } - }, - { &hf_gsm_a_gm_nsapi_12_ul_stat, - { "NSAPI(12) uplink status", "gsm_a.gm.nsapi_12_ul_stat", - FT_BOOLEAN, BASE_NONE, TFS(&gsm_a_gm_nsapi_ul_stat_vals), 0x0, - NULL, HFILL } - }, - { &hf_gsm_a_gm_nsapi_13_ul_stat, - { "NSAPI(13) uplink status", "gsm_a.gm.nsapi_13_ul_stat", - FT_BOOLEAN, BASE_NONE, TFS(&gsm_a_gm_nsapi_ul_stat_vals), 0x0, - NULL, HFILL } - }, - { &hf_gsm_a_gm_nsapi_14_ul_stat, - { "NSAPI(14) uplink status", "gsm_a.gm.nsapi_14_ul_stat", - FT_BOOLEAN, BASE_NONE, TFS(&gsm_a_gm_nsapi_ul_stat_vals), 0x0, - NULL, HFILL } - }, - { &hf_gsm_a_gm_nsapi_15_ul_stat, - { "NSAPI(15) uplink status", "gsm_a.gm.nsapi_15_ul_stat", - FT_BOOLEAN, BASE_NONE, TFS(&gsm_a_gm_nsapi_ul_stat_vals), 0x0, - NULL, HFILL } - }, - { &hf_gsm_a_gm_pco_pid, - { "Protocol or Container ID", "gsm_a.gm.pco_pid", - FT_UINT16, BASE_DEC, NULL, 0x0, - NULL, HFILL } - }, - { &hf_gsm_a_gm_type_of_identity, - { "Type of identity", "gsm_a.gm.type_of_identity", - FT_UINT8, BASE_DEC, VALS(gsm_a_gm_type_of_identity_vals), 0x07, - NULL, HFILL } - }, - { &hf_gsm_a_gm_rac, - { "Routing Area Code (RAC)","gsm_a.gm.rac", - FT_UINT8, BASE_HEX_DEC, NULL, 0x00, - NULL, HFILL } - }, - { &hf_gsm_a_gm_apc, - { "APC","gsm_a.gm.apc", - FT_BOOLEAN, 8, TFS(&gsm_a_gm_apc_vals), 0x20, - NULL, HFILL } - }, - { &hf_gsm_a_gm_otd_a, - { "OTD-A","gsm_a.gm.otd_a", - FT_BOOLEAN, 8, TFS(&gsm_a_gm_otd_a_vals), 0x10, - NULL, HFILL } - }, - { &hf_gsm_a_gm_otd_b, - { "OTD-B","gsm_a.gm.otd_b", - FT_BOOLEAN, 8, TFS(&gsm_a_gm_otd_b_vals), 0x08, - NULL, HFILL } - }, - { &hf_gsm_a_gm_gps_a, - { "GPS-A","gsm_a.gm.gps_a", - FT_BOOLEAN, 8, TFS(&gsm_a_gm_gps_a_vals), 0x04, - NULL, HFILL } - }, - { &hf_gsm_a_gm_gps_b, - { "GPS-B","gsm_a.gm.gps_b", - FT_BOOLEAN, 8, TFS(&gsm_a_gm_gps_b_vals), 0x02, - NULL, HFILL } - }, - { &hf_gsm_a_gm_gps_c, - { "GPS-C","gsm_a.gm.gps_c", - FT_BOOLEAN, 8, TFS(&gsm_a_gm_gps_c_vals), 0x01, - NULL, HFILL } - }, - { &hf_gsm_a_gm_req_ms_info_irat, - { "I-RAT","gsm_a.gm.req_ms_info_irat", - FT_BOOLEAN, BASE_NONE, TFS(&gsm_a_gm_req_ms_info_irat_vals), 0x0, - NULL, HFILL } - }, - { &hf_gsm_a_gm_req_ms_info_irat2, - { "I-RAT2","gsm_a.gm.req_ms_info_irat2", - FT_BOOLEAN, BASE_NONE, TFS(&gsm_a_gm_req_ms_info_irat2_vals), 0x0, - NULL, HFILL } - }, - { &hf_gsm_a_gm_ue_usage_setting, - { "UE's usage setting","gsm_a.gm.ue_usage_setting", - FT_BOOLEAN, BASE_NONE, TFS(&gsm_a_gm_ue_usage_setting_vals), 0x0, - NULL, HFILL } - }, - { &hf_gsm_a_gm_voice_domain_pref_for_eutran, - { "Voice domain preference for E-UTRAN","gsm_a.gm.voice_domain_pref_for_eutran", - FT_UINT8, BASE_DEC, VALS(gsm_a_gm_voice_domain_pref_for_eutran_vals), 0x0, - NULL, HFILL } - }, - { &hf_gsm_a_sm_pdp_type_org, - { "PDP type organization", "gsm_a.sm.pdp_type_org", - FT_UINT8, BASE_DEC, VALS(gsm_a_sm_pdp_type_org_vals), 0x0f, - NULL, HFILL } - }, - { &hf_gsm_a_qos_mean_thr, - { "Mean throughput", "gsm_a.qos.mean_throughput", - FT_UINT8, BASE_DEC|BASE_RANGE_STRING, RVALS(gsm_a_qos_mean_thr_vals), 0x1f, - NULL, HFILL } - }, - { &hf_gsm_a_qos_peak_thr, - { "Peak throughput", "gsm_a.qos.peak_throughput", - FT_UINT8, BASE_DEC|BASE_RANGE_STRING, RVALS(gsm_a_qos_peak_thr_vals), 0xf0, - NULL, HFILL } - }, - { &hf_gsm_a_qos_prec_class, - { "Precedence class", "gsm_a.qos.prec_class", - FT_UINT8, BASE_DEC|BASE_RANGE_STRING, RVALS(gsm_a_qos_prec_class_vals), 0x07, - NULL, HFILL } - }, - { &hf_gsm_a_qos_traf_handl_prio, - { "Traffic handling priority", "gsm_a.qos.traf_handl_prio", - FT_UINT8, BASE_DEC, NULL, 0x03, - NULL, HFILL } - }, - { &hf_gsm_a_qos_trans_delay, - { "Transfer delay", "gsm_a.qos.trans_delay", - FT_UINT8, BASE_DEC, NULL, 0xfc, - NULL, HFILL } - }, - { &hf_gsm_a_qos_signalling_ind, - { "Signalling indication", "gsm_a.qos.signalling_ind", - FT_BOOLEAN, 8, TFS(&gsm_a_qos_signalling_ind_value), 0x10, - NULL, HFILL } - }, - { &hf_gsm_a_qos_source_stat_desc, - { "Source statistics description", "gsm_a.qos.source_stat_desc", - FT_UINT8, BASE_DEC, NULL, 0x0f, - NULL, HFILL } - }, - { &hf_gsm_a_qos_max_bitrate_upl, - { "Maximum bitrate for uplink", "gsm_a.qos.max_bitrate_upl", - FT_UINT8, BASE_DEC, NULL, 0x0, - NULL, HFILL } - }, - { &hf_gsm_a_qos_max_bitrate_downl, - { "Maximum bitrate for downlink", "gsm_a.qos.max_bitrate_downl", - FT_UINT8, BASE_DEC, NULL, 0x0, - NULL, HFILL } - }, - { &hf_gsm_a_qos_guar_bitrate_upl, - { "Guaranteed bitrate for uplink", "gsm_a.qos.guar_bitrate_upl", - FT_UINT8, BASE_DEC, NULL, 0x0, - NULL, HFILL } - }, - { &hf_gsm_a_qos_guar_bitrate_downl, - { "Guaranteed bitrate for downlink", "gsm_a.qos.guar_bitrate_downl", - FT_UINT8, BASE_DEC, NULL, 0x0, - NULL, HFILL } - }, - { &hf_gsm_a_qos_max_bitrate_upl_ext, - { "Maximum bitrate for uplink (extended)", "gsm_a.qos.max_bitrate_upl_ext", - FT_UINT8, BASE_DEC, NULL, 0x0, - NULL, HFILL } - }, - { &hf_gsm_a_qos_max_bitrate_downl_ext, - { "Maximum bitrate for downlink (extended)", "gsm_a.qos.max_bitrate_downl_ext", - FT_UINT8, BASE_DEC, NULL, 0x0, - NULL, HFILL } - }, - { &hf_gsm_a_qos_guar_bitrate_upl_ext, - { "Guaranteed bitrate for uplink (extended)", "gsm_a.qos.guar_bitrate_upl_ext", - FT_UINT8, BASE_DEC, NULL, 0x0, - NULL, HFILL } - }, - { &hf_gsm_a_qos_guar_bitrate_downl_ext, - { "Guaranteed bitrate for downlink (extended)", "gsm_a.qos.guar_bitrate_downl_ext", - FT_UINT8, BASE_DEC, NULL, 0x0, - NULL, HFILL } - }, - { &hf_gsm_a_sm_cause, - { "SM Cause", "gsm_a.sm.cause", - FT_UINT8, BASE_DEC, NULL, 0x0, - NULL, HFILL } - }, - { &hf_gsm_a_sm_cause_2, - { "SM Cause 2", "gsm_a.sm.cause_2", - FT_UINT8, BASE_DEC, NULL, 0x0, - NULL, HFILL } - }, - { &hf_gsm_a_sm_llc_sapi, - { "LLC SAPI", "gsm_a.sm.llc_sapi", - FT_UINT8, BASE_DEC, VALS(gsm_a_sm_llc_sapi_vals), 0x0f, - NULL, HFILL } - }, - { &hf_gsm_a_sm_tdi, - { "Tear Down Indicator (TDI)", "gsm_a.sm.tdi", - FT_BOOLEAN, 8, TFS(&gsm_a_sm_tdi_value), 0x01, - NULL, HFILL } - }, - { &hf_gsm_a_sm_packet_flow_id, - { "Packet Flow Identifier (PFI)", "gsm_a.sm.packet_flow_id", - FT_UINT8, BASE_DEC|BASE_RANGE_STRING, RVALS(gsm_a_sm_packet_flow_id_vals), 0x7f, - NULL, HFILL } - }, - { &hf_gsm_a_gmm_net_cap_gea1, - { "GEA/1", "gsm_a.gmm.net_cap.gea1", - FT_BOOLEAN, 8, TFS(&gsm_a_gmm_net_cap_gea_vals), 0x80, - NULL, HFILL } - }, - { &hf_gsm_a_gmm_net_cap_smdch, - { "SM capabilities via dedicated channels", "gsm_a.gmm.net_cap.smdch", - FT_BOOLEAN, 8, TFS(&gsm_a_gmm_net_cap_smdch_vals), 0x40, - NULL, HFILL } - }, - { &hf_gsm_a_gmm_net_cap_smgprs, - { "SM capabilities via GPRS channels", "gsm_a.gmm.net_cap.smgprs", - FT_BOOLEAN, 8, TFS(&gsm_a_gmm_net_cap_smgprs_vals), 0x20, - NULL, HFILL } - }, - { &hf_gsm_a_gmm_net_cap_ucs2, - { "UCS2 support", "gsm_a.gmm.net_cap.ucs2", - FT_BOOLEAN, 8, TFS(&gsm_a_gmm_net_cap_smgprs_vals), 0x10, - NULL, HFILL } - }, - { &hf_gsm_a_gmm_net_cap_ss_scr_ind, - { "SS Screening Indicator", "gsm_a.gmm.net_cap.ss_scr_ind", - FT_UINT8, BASE_HEX, VALS(gsm_a_gmm_net_cap_ss_scr_ind_vals), 0x0c, - NULL, HFILL } - }, - { &hf_gsm_a_gmm_net_cap_solsa, - { "SoLSA Capability", "gsm_a.gmm.net_cap.solsa", - FT_BOOLEAN, 8, TFS(&gsm_a_gmm_net_cap_solsa_vals), 0x02, - NULL, HFILL } - }, - { &hf_gsm_a_gmm_net_cap_rev, - { "Revision level indicator", "gsm_a.gmm.net_cap.rev", - FT_BOOLEAN, 8, TFS(&gsm_a_gmm_net_cap_rev_vals), 0x01, - NULL, HFILL } - }, - { &hf_gsm_a_gmm_net_cap_pfc, - { "PFC feature mode", "gsm_a.gmm.net_cap.pfc", - FT_BOOLEAN, 8, TFS(&gsm_a_gmm_net_cap_pfc_vals), 0x80, - NULL, HFILL } - }, - { &hf_gsm_a_gmm_net_cap_ext_gea_bits, - { "Extended GEA bits", "gsm_a.gmm.net_cap.ext_gea_bits", - FT_UINT8, BASE_HEX, NULL, 0x7e, - NULL, HFILL } - }, - { &hf_gsm_a_gmm_net_cap_gea2, - { "GEA/2", "gsm_a.gmm.net_cap.gea2", - FT_BOOLEAN, 8, TFS(&gsm_a_gmm_net_cap_gea_vals), 0x40, - NULL, HFILL } - }, - { &hf_gsm_a_gmm_net_cap_gea3, - { "GEA/3", "gsm_a.gmm.net_cap.gea3", - FT_BOOLEAN, 8, TFS(&gsm_a_gmm_net_cap_gea_vals), 0x20, - NULL, HFILL } - }, - { &hf_gsm_a_gmm_net_cap_gea4, - { "GEA/4", "gsm_a.gmm.net_cap.gea4", - FT_BOOLEAN, 8, TFS(&gsm_a_gmm_net_cap_gea_vals), 0x10, - NULL, HFILL } - }, - { &hf_gsm_a_gmm_net_cap_gea5, - { "GEA/5", "gsm_a.gmm.net_cap.gea5", - FT_BOOLEAN, 8, TFS(&gsm_a_gmm_net_cap_gea_vals), 0x08, - NULL, HFILL } - }, - { &hf_gsm_a_gmm_net_cap_gea6, - { "GEA/6", "gsm_a.gmm.net_cap.gea6", - FT_BOOLEAN, 8, TFS(&gsm_a_gmm_net_cap_gea_vals), 0x04, - NULL, HFILL } - }, - { &hf_gsm_a_gmm_net_cap_gea7, - { "GEA/7", "gsm_a.gmm.net_cap.gea7", - FT_BOOLEAN, 8, TFS(&gsm_a_gmm_net_cap_gea_vals), 0x02, - NULL, HFILL } - }, - { &hf_gsm_a_gmm_net_cap_lcs, - { "LCS VA capability", "gsm_a.gmm.net_cap.lcs", - FT_BOOLEAN, 8, TFS(&gsm_a_gmm_net_cap_lcs_vals), 0x01, - NULL, HFILL } - }, - { &hf_gsm_a_gmm_net_cap_ps_irat_iu, - { "PS inter-RAT HO to UTRAN Iu mode capability", "gsm_a.gmm.net_cap.ps_irat_iu", - FT_BOOLEAN, 8, TFS(&gsm_a_gmm_net_cap_ps_irat_iu_vals), 0x80, - NULL, HFILL } - }, - { &hf_gsm_a_gmm_net_cap_ps_irat_s1, - { "PS inter-RAT HO to E-UTRAN S1 mode capability", "gsm_a.gmm.net_cap.ps_irat_s1", - FT_BOOLEAN, 8, TFS(&gsm_a_gmm_net_cap_ps_irat_s1_vals), 0x40, - NULL, HFILL } - }, - { &hf_gsm_a_gmm_net_cap_comb_proc, - { "EMM Combined procedures capability", "gsm_a.gmm.net_cap.comb_proc", - FT_BOOLEAN, 8, TFS(&gsm_a_gmm_net_cap_comb_proc_vals), 0x20, - NULL, HFILL } - }, - { &hf_gsm_a_gmm_net_cap_isr, - { "ISR support", "gsm_a.gmm.net_cap.isr", - FT_BOOLEAN, 8, TFS(&gsm_a_gmm_net_cap_isr_vals), 0x10, - NULL, HFILL } - }, - { &hf_gsm_a_gmm_net_cap_srvcc_to_geran, - { "SRVCC to GERAN/UTRAN capability", "gsm_a.gmm.net_cap.srvcc_to_geran", - FT_BOOLEAN, 8, TFS(&gsm_a_gmm_net_cap_srvcc_to_geran_vals), 0x08, - NULL, HFILL } - }, - { &hf_gsm_a_gmm_net_cap_epc, - { "EPC Capability", "gsm_a.gmm.net_cap.epc", - FT_BOOLEAN, 8, TFS(&gsm_a_gmm_net_cap_epc_vals), 0x04, - NULL, HFILL } - }, - { &hf_gsm_a_gmm_net_cap_nf, - { "NF Capability", "gsm_a.gmm.net_cap.nf", - FT_BOOLEAN, 8, TFS(&gsm_a_gmm_net_cap_nf_vals), 0x02, - NULL, HFILL } - }, - { &hf_gsm_a_sm_tmgi, - { "Temporary Mobile Group Identity (TMGI)", "gsm_a.sm.tmgi", - FT_UINT24, BASE_HEX, NULL, 0x0, - NULL, HFILL } - }, - { &hf_gsm_a_sm_enh_nsapi, - { "Enhanced NSAPI", "gsm_a.sm.enh_nsapi", - FT_UINT8, BASE_DEC, NULL, 0x0, - NULL, HFILL } - }, - { &hf_gsm_a_sm_req_type, - { "Request type", "gsm_a.sm.req_type", - FT_UINT8, BASE_DEC, VALS(gsm_a_sm_req_type_vals), 0x07, - NULL, HFILL } - }, - { &hf_gsm_a_sm_notif_ind, - { "Notification indicator value", "gsm_a.sm.notif_ind", - FT_UINT8, BASE_DEC, VALS(gsm_a_sm_notif_ind_vals), 0x0, - NULL, HFILL } - }, - { &hf_gsm_a_gm_rac_ctrled_early_cm_sending, - { "Controlled early Classmark Sending", "gsm_a.gm.rac.ctrled_early_cm_sending", - FT_BOOLEAN, BASE_NONE, TFS(&tfs_implemented_not_implemented), 0x0, - NULL, HFILL } - }, - { &hf_gsm_a_gm_rac_pseudo_sync, - { "Pseudo Synchronisation", "gsm_a.gm.rac.pseudo_sync", - FT_BOOLEAN, BASE_NONE, TFS(&tfs_present_not_present), 0x0, - NULL, HFILL } - }, - { &hf_gsm_a_gm_rac_vgcs, - { "Voice Group Call Service", "gsm_a.gm.rac.vgcs", - FT_BOOLEAN, BASE_NONE, TFS(&gsm_a_gm_vgcs), 0x0, - NULL, HFILL } - }, - { &hf_gsm_a_gm_rac_vbs, - { "Voice Broadcast Service", "gsm_a.gm.rac.vbs", - FT_BOOLEAN, BASE_NONE, TFS(&gsm_a_gm_vbs), 0x0, - NULL, HFILL } - }, - { &hf_gsm_a_gm_rac_multislot_capability, - { "Multislot capability struct", "gsm_a.gm.rac.multislot_capability", - FT_BOOLEAN, BASE_NONE, TFS(&tfs_present_not_present), 0x0, - NULL, HFILL } - }, - { &hf_gsm_a_gm_rac_hscsd_multi_slot_class, - { "HSCSD multislot class", "gsm_a.gm.rac.hscsd_multi_slot_class", - FT_UINT8, BASE_DEC, VALS(gsm_a_gm_multi_slot_vals), 0x0, - NULL, HFILL } - }, - { &hf_gsm_a_gm_rac_gprs_multi_slot_class, - { "GPRS multislot class", "gsm_a.gm.rac.gprs_multi_slot_class", - FT_UINT8, BASE_DEC, VALS(gsm_a_gm_multi_slot_vals), 0x0, - NULL, HFILL } - }, - { &hf_gsm_a_gm_rac_gprs_ext_dyn_alloc_cap, - { "GPRS Extended Dynamic Allocation Capability", "gsm_a.gm.rac.gprs_ext_dyn_alloc_cap", - FT_BOOLEAN, BASE_NONE, TFS(&tfs_implemented_not_implemented), 0x0, - NULL, HFILL } - }, - { &hf_gsm_a_gm_rac_ecsd_multi_slot_class, - { "ECSD multislot class", "gsm_a.gm.rac.ecsd_multi_slot_class", - FT_UINT8, BASE_DEC, VALS(gsm_a_gm_multi_slot_vals), 0x0, - NULL, HFILL } - }, - { &hf_gsm_a_gm_rac_egprs_multi_slot_class, - { "EGPRS multislot class", "gsm_a.gm.rac.egprs_multi_slot_class", - FT_UINT8, BASE_DEC, VALS(gsm_a_gm_multi_slot_vals), 0x0, - NULL, HFILL } - }, - { &hf_gsm_a_gm_rac_egprs_ext_dyn_alloc_cap, - { "EGPRS Extended Dynamic Allocation Capability", "gsm_a.gm.rac.egprs_ext_dyn_alloc_cap", - FT_BOOLEAN, BASE_NONE, TFS(&tfs_implemented_not_implemented), 0x0, - NULL, HFILL } - }, - { &hf_gsm_a_gm_rac_dtm_gprs_multi_slot_class, - { "DTM GPRS Multi Slot Class", "gsm_a.gm.rac.dtm_gprs_multi_slot_class", - FT_UINT8, BASE_DEC, VALS(gsm_a_gm_dtm_gprs_multi_slot_class_vals), 0x0, - NULL, HFILL } - }, - { &hf_gsm_a_gm_rac_single_slt_dtm, - { "Single Slot DTM", "gsm_a.gm.rac.single_slt_dtm", - FT_BOOLEAN, BASE_NONE, TFS(&tfs_supported_not_supported), 0x0, - NULL, HFILL } - }, - { &hf_gsm_a_gm_rac_dtm_egprs_multi_slot_cls_pres, - { "DTM EGPRS Multi Slot Class", "gsm_a.gm.rac.dtm_egprs_multi_slot_cls_pres", - FT_BOOLEAN, BASE_NONE, TFS(&tfs_present_not_present), 0x0, - NULL, HFILL } - }, - { &hf_gsm_a_gm_rac_dtm_egprs_multi_slot_class, - { "DTM EGPRS Multi Slot Class", "gsm_a.gm.rac.dtm_egprs_multi_slot_class", - FT_UINT8, BASE_DEC, VALS(gsm_a_gm_dtm_gprs_multi_slot_class_vals), 0x0, - NULL, HFILL } - }, - { &hf_gsm_a_gm_rac_8psk_pow_cap_pres, - { "8PSK Power Capability Bits", "gsm_a.gm.rac.8psk_pow_cap_pres", - FT_BOOLEAN, BASE_NONE, TFS(&tfs_present_not_present), 0x0, - NULL, HFILL } - }, - { &hf_gsm_a_gm_rac_comp_int_meas_cap, - { "COMPACT Interference Measurement Capability", "gsm_a.gm.rac.comp_int_meas_cap", - FT_BOOLEAN, BASE_NONE, TFS(&tfs_implemented_not_implemented), 0x0, - NULL, HFILL } - }, - { &hf_gsm_a_gm_rel_lev_ind, - { "Revision Level Indicator", "gsm_a.gm.rel_lev_ind", - FT_BOOLEAN, BASE_NONE, TFS(&gsm_a_gm_revision_level_indicator), 0x0, - NULL, HFILL } - }, - { &hf_gsm_a_gm_rac_umts_fdd_cap, - { "UMTS FDD Radio Access Technology Capability", "gsm_a.gm.rac.umts_fdd_cap", - FT_BOOLEAN, BASE_NONE, TFS(&tfs_supported_not_supported), 0x0, - NULL, HFILL } - }, - { &hf_gsm_a_gm_rac_umts_384_tdd_ra_cap, - { "UMTS 3.84 Mcps TDD Radio Access Technology Capability", "gsm_a.gm.rac.umts_384_tdd_ra_cap", - FT_BOOLEAN, BASE_NONE, TFS(&tfs_supported_not_supported), 0x0, - NULL, HFILL } - }, - { &hf_gsm_a_gm_rac_cdma2000_cap, - { "CDMA 2000 Radio Access Technology Capability", "gsm_a.gm.rac.cdma2000_cap", - FT_BOOLEAN, BASE_NONE, TFS(&tfs_supported_not_supported), 0x0, - NULL, HFILL } - }, - { &hf_gsm_a_gm_rac_umts_128_tdd_ra_cap, - { "UMTS 1.28 Mcps TDD Radio Access Technology Capability", "gsm_a.gm.rac.umts_128_tdd_ra_cap", - FT_BOOLEAN, BASE_NONE, TFS(&tfs_supported_not_supported), 0x0, - NULL, HFILL } - }, - { &hf_gsm_a_gm_rac_geran_feat_pkg, - { "GERAN Feature Package 1", "gsm_a.gm.rac.geran_feat_pkg", - FT_BOOLEAN, BASE_NONE, TFS(&tfs_supported_not_supported), 0x0, - NULL, HFILL } - }, - { &hf_gsm_a_gm_rac_mod_based_multi_slot_class_support, - { "Modulation based multislot class support", "gsm_a.gm.rac.mod_based_multi_slot_class_support", - FT_BOOLEAN, BASE_NONE, TFS(&tfs_supported_not_supported), 0x0, - NULL, HFILL } - }, - { &hf_gsm_a_gm_rac_geran_iu_mode_cap, - { "GERAN Iu mode", "gsm_a.gm.rac.geran_iu_mode_cap", - FT_BOOLEAN, BASE_NONE, TFS(&tfs_supported_not_supported), 0x0, - NULL, HFILL } - }, - { &hf_gsm_a_gm_rac_flo_iu_cap, - { "FLO Iu Capability", "gsm_a.gm.rac.flo_iu_cap", - FT_BOOLEAN, BASE_NONE, TFS(&tfs_supported_not_supported), 0x0, - NULL, HFILL } - }, - { &hf_gsm_a_gm_rac_mult_tbf_cap, - { "Multiple TBF Capability", "gsm_a.gm.rac.mult_tbf_cap", - FT_BOOLEAN, BASE_NONE, TFS(&tfs_supported_not_supported), 0x0, - NULL, HFILL } - }, - { &hf_gsm_a_gm_rac_down_adv_rec_perf, - { "Downlink Advanced Receiver Performance", "gsm_a.gm.rac.down_adv_rec_perf", - FT_UINT8, BASE_DEC, VALS(gsm_a_gm_down_adv_rec_perf_vals), 0x0, - NULL, HFILL } - }, - { &hf_gsm_a_gm_rac_ext_rlc_mac_ctrl_msg_seg_cap, - { "Extended RLC/MAC Control Message Segmentation Capability", "gsm_a.gm.rac.ext_rlc_mac_ctrl_msg_seg_cap", - FT_BOOLEAN, BASE_NONE, TFS(&tfs_supported_not_supported), 0x0, - NULL, HFILL } - }, - { &hf_gsm_a_gm_rac_dtm_enh_cap, - { "DTM Enhancements Capability", "gsm_a.gm.rac.dtm_enh_cap", - FT_BOOLEAN, BASE_NONE, TFS(&gsm_a_gm_dtm_enh_cap), 0x0, - NULL, HFILL } - }, - { &hf_gsm_a_gm_rac_dtm_gprs_high_multi_slot_class, - { "DTM GPRS High Multi Slot Class", "gsm_a.gm.rac.dtm_gprs_high_multi_slot_class", - FT_UINT8, BASE_DEC, VALS(gsm_a_gm_dtm_gprs_high_multi_slot_class_vals), 0x0, - NULL, HFILL } - }, - { &hf_gsm_a_gm_rac_dtm_egprs_high_multi_slot_class, - { "DTM EGPRS High Multi Slot Class", "gsm_a.gm.rac.dtm_egprs_high_multi_slot_class", - FT_UINT8, BASE_DEC, VALS(gsm_a_gm_dtm_gprs_high_multi_slot_class_vals), 0x0, - NULL, HFILL } - }, - { &hf_gsm_a_gm_rac_ps_ho_cap, - { "PS Handover Capability", "gsm_a.gm.rac.ps_ho_cap", - FT_BOOLEAN, BASE_NONE, TFS(&tfs_supported_not_supported), 0x0, - NULL, HFILL } - }, - { &hf_gsm_a_gm_rac_dtm_ho_cap, - { "DTM Handover Capability", "gsm_a.gm.rac.dtm_ho_cap", - FT_BOOLEAN, BASE_NONE, TFS(&tfs_supported_not_supported), 0x0, - NULL, HFILL } - }, - { &hf_gsm_a_gm_rac_multi_slot_cap_red_down_dual_carrier, - { "Multislot Capability Reduction for Downlink Dual Carrier", "gsm_a.gm.rac.multi_slot_cap_red_down_dual_carrier", - FT_UINT8, BASE_DEC, VALS(gsm_a_gm_multi_slot_cap_red_down_dual_carrier_vals), 0x0, - NULL, HFILL } - }, - { &hf_gsm_a_gm_rac_down_dual_carrier_dtm_cap, - { "Downlink Dual Carrier for DTM Capability", "gsm_a.gm.rac.down_dual_carrier_dtm_cap", - FT_BOOLEAN, BASE_NONE, TFS(&tfs_supported_not_supported), 0x0, - NULL, HFILL } - }, - { &hf_gsm_a_gm_rac_flex_ts_assign, - { "Flexible Timeslot Assignment", "gsm_a.gm.rac.flex_ts_assign", - FT_BOOLEAN, BASE_NONE, TFS(&tfs_supported_not_supported), 0x0, - NULL, HFILL } - }, - { &hf_gsm_a_gm_rac_gan_ps_ho_cap, - { "GAN PS Handover Capability", "gsm_a.gm.rac.gan_ps_ho_cap", - FT_BOOLEAN, BASE_NONE, TFS(&tfs_supported_not_supported), 0x0, - NULL, HFILL } - }, - { &hf_gsm_a_gm_rac_rlc_non_pers_mode, - { "RLC Non-persistent Mode", "gsm_a.gm.rac.rlc_non_pers_mode", - FT_BOOLEAN, BASE_NONE, TFS(&tfs_supported_not_supported), 0x0, - NULL, HFILL } - }, - { &hf_gsm_a_gm_rac_reduced_lat_cap, - { "Reduced Latency Capability", "gsm_a.gm.rac.reduced_lat_cap", - FT_BOOLEAN, BASE_NONE, TFS(&tfs_supported_not_supported), 0x0, - NULL, HFILL } - }, - { &hf_gsm_a_gm_rac_ul_egprs2, - { "Uplink EGPRS2", "gsm_a.gm.rac.ul_egprs2", - FT_UINT8, BASE_DEC, VALS(gsm_a_gm_ul_egprs2_vals), 0x0, - NULL, HFILL } - }, - { &hf_gsm_a_gm_rac_dl_egprs2, - { "Downlink EGPRS2", "gsm_a.gm.rac.dl_egprs2", - FT_UINT8, BASE_DEC, VALS(gsm_a_gm_dl_egprs2_vals), 0x0, - NULL, HFILL } - }, - { &hf_gsm_a_gm_rac_eutra_fdd_support, - { "E-UTRA FDD support", "gsm_a.gm.rac.eutra_fdd_support", - FT_BOOLEAN, BASE_NONE, TFS(&tfs_supported_not_supported), 0x0, - NULL, HFILL } - }, - { &hf_gsm_a_gm_rac_eutra_tdd_support, - { "E-UTRA TDD support", "gsm_a.gm.rac.eutra_tdd_support", - FT_BOOLEAN, BASE_NONE, TFS(&tfs_supported_not_supported), 0x0, - NULL, HFILL } - }, - { &hf_gsm_a_gm_rac_geran_to_eutra_support_in_geran_ptm, - { "GERAN to E-UTRA support in GERAN packet transfer mode", "gsm_a.gm.rac.geran_to_eutra_support_in_geran_ptm", - FT_UINT8, BASE_DEC, VALS(gsm_a_gm_geran_to_eutra_support_in_geran_ptm_vals), 0x0, - NULL, HFILL } - }, - { &hf_gsm_a_gm_rac_prio_based_resel_support, - { "Priority-based reselection support", "gsm_a.gm.rac.prio_based_resel_support", - FT_BOOLEAN, BASE_NONE, TFS(&tfs_supported_not_supported), 0x0, - NULL, HFILL } - }, - { &hf_gsm_a_gm_rac_alt_efta_multi_slot_class, - { "Alternative EFTA Multislot Class", "gsm_a.gm.rac.alt_efta_multi_slot_class", - FT_UINT8, BASE_DEC, VALS(gsm_a_gm_alt_efta_multi_slot_class_vals), 0x0, - NULL, HFILL } - }, - { &hf_gsm_a_gm_rac_efta_multi_slot_cap_red_down_dual_carrier, - { "EFTA Multislot Capability Reduction for Downlink Dual Carrier", "gsm_a.gm.rac.efta_multi_slot_cap_red_down_dual_carrier", - FT_UINT8, BASE_DEC, VALS(gsm_a_gm_multi_slot_cap_red_down_dual_carrier_vals), 0x0, - NULL, HFILL } - }, - { &hf_gsm_a_gm_rac_ind_up_layer_pdu_start_cap_for_rlc_um, - { "Indication of Upper Layer PDU Start Capability for RLC UM", "gsm_a.gm.rac.ind_up_layer_pdu_start_cap_for_rlc_um", - FT_BOOLEAN, BASE_NONE, TFS(&tfs_supported_not_supported), 0x0, - NULL, HFILL } - }, - { &hf_gsm_a_gm_rac_emst_cap, - { "Enhanced Multiplexing for Single TBF Capability", "gsm_a.gm.rac.emst_cap", - FT_BOOLEAN, BASE_NONE, TFS(&tfs_supported_not_supported), 0x0, - NULL, HFILL } - }, - { &hf_gsm_a_gm_rac_mtti_cap, - { "Multiple TTI Capability", "gsm_a.gm.rac.mtti_cap", - FT_BOOLEAN, BASE_NONE, TFS(&tfs_supported_not_supported), 0x0, - NULL, HFILL } - }, - { &hf_gsm_a_gm_rac_utra_csg_cell_report, - { "UTRA CSG Cells Reporting", "gsm_a.gm.rac.utra_csg_cell_report", - FT_BOOLEAN, BASE_NONE, TFS(&tfs_supported_not_supported), 0x0, - NULL, HFILL } - }, - { &hf_gsm_a_gm_rac_eutra_csg_cell_report, - { "E-UTRA CSG Cells Reporting", "gsm_a.gm.rac.mtti_cap", - FT_BOOLEAN, BASE_NONE, TFS(&tfs_supported_not_supported), 0x0, - NULL, HFILL } - }, - { &hf_gsm_a_sm_ti_flag, - { "TI Flag", "gsm_a.sm.ti_flag", - FT_BOOLEAN, 8, TFS(&gsm_a_sm_ti_flag_vals), 0x80, - NULL, HFILL } - }, - { &hf_gsm_a_sm_ext, - { "Extension", "gsm_a.sm.ext", - FT_BOOLEAN, 8, NULL, 0x80, - NULL, HFILL } - }, -}; + static hf_register_info hf[] = { + { &hf_gsm_a_dtap_msg_gmm_type, + { "DTAP GPRS Mobility Management Message Type", "gsm_a.dtap_msg_gmm_type", + FT_UINT8, BASE_HEX, VALS(gsm_a_dtap_msg_gmm_strings), 0x0, + NULL, HFILL } + }, + { &hf_gsm_a_dtap_msg_sm_type, + { "DTAP GPRS Session Management Message Type", "gsm_a.dtap_msg_sm_type", + FT_UINT8, BASE_HEX, VALS(gsm_a_dtap_msg_sm_strings), 0x0, + NULL, HFILL } + }, + { &hf_gsm_a_gm_elem_id, + { "Element ID", "gsm_a_gm.elem_id", + FT_UINT8, BASE_DEC, NULL, 0, + NULL, HFILL } + }, + { &hf_gsm_a_qos_delay_cls, + { "Quality of Service Delay class", "gsm_a.qos.delay_cls", + FT_UINT8, BASE_DEC, VALS(gsm_a_qos_delay_cls_vals), 0x38, + NULL, HFILL } + }, + { &hf_gsm_a_qos_reliability_cls, + { "Reliability class", "gsm_a.qos.delay_cls", + FT_UINT8, BASE_DEC, VALS(gsm_a_qos_delay_cls_vals), 0x07, + NULL, HFILL } + }, + { &hf_gsm_a_qos_traffic_cls, + { "Traffic class", "gsm_a.qos.traffic_cls", + FT_UINT8, BASE_DEC, VALS(gsm_a_qos_traffic_cls_vals), 0xe0, + NULL, HFILL } + }, + { &hf_gsm_a_qos_del_order, + { "Delivery order", "gsm_a.qos.del_order", + FT_UINT8, BASE_DEC, VALS(gsm_a_qos_del_order_vals), 0x18, + NULL, HFILL } + }, + { &hf_gsm_a_qos_del_of_err_sdu, + { "Delivery of erroneous SDUs", "gsm_a.qos.del_of_err_sdu", + FT_UINT8, BASE_DEC, VALS(gsm_a_qos_del_of_err_sdu_vals), 0x07, + NULL, HFILL } + }, + { &hf_gsm_a_qos_ber, + { "Residual Bit Error Rate (BER)", "gsm_a.qos.ber", + FT_UINT8, BASE_DEC, VALS(gsm_a_qos_ber_vals), 0xf0, + NULL, HFILL } + }, + { &hf_gsm_a_qos_sdu_err_rat, + { "SDU error ratio", "gsm_a.qos.sdu_err_rat", + FT_UINT8, BASE_DEC, VALS(gsm_a_qos_sdu_err_rat_vals), 0x0f, + NULL, HFILL } + }, + { &hf_gsm_a_qos_traff_hdl_pri, + { "Traffic handling priority", "gsm_a.qos.traff_hdl_pri", + FT_UINT8, BASE_DEC, VALS(gsm_a_qos_traff_hdl_pri_vals), 0x03, + NULL, HFILL } + }, + { &hf_gsm_a_gmm_split_on_ccch, + { "SPLIT on CCCH", "gsm_a.gmm.split_on_ccch", + FT_BOOLEAN, 8, TFS(&gsm_a_gmm_split_on_ccch_value), 0x08, + NULL, HFILL } + }, + { &hf_gsm_a_gmm_non_drx_timer, + { "Non-DRX timer", "gsm_a.gmm.non_drx_timer", + FT_UINT8, BASE_DEC, VALS(gsm_a_gmm_non_drx_timer_strings), 0x07, + NULL, HFILL } + }, + { &hf_gsm_a_gmm_cn_spec_drs_cycle_len_coef, + { "CN Specific DRX cycle length coefficient", "gsm_a.gmm.cn_spec_drs_cycle_len_coef", + FT_UINT8, BASE_DEC|BASE_RANGE_STRING, RVALS(gsm_a_gmm_cn_spec_drs_cycle_len_coef_strings), 0xf0, + NULL, HFILL } + }, + { &hf_gsm_a_tft_op_code, + { "TFT operation code", "gsm_a.tft.op_code", + FT_UINT8, BASE_DEC, VALS(gsm_a_tft_op_code_vals), 0xe0, + NULL, HFILL } + }, + { &hf_gsm_a_tft_e_bit, + { "E bit", "gsm_a.tft.e_bit", + FT_BOOLEAN, 8, TFS(&gsm_a_tft_e_bit), 0x10, + NULL, HFILL } + }, + { &hf_gsm_a_tft_pkt_flt, + { "Number of packet filters", "gsm_a.tft.pkt_flt", + FT_UINT8, BASE_DEC, NULL, 0x0f, + NULL, HFILL } + }, + { &hf_gsm_a_tft_pkt_flt_dir, + { "Packet filter direction", "gsm_a.tft.pkt_flt_dir", + FT_UINT8, BASE_DEC, VALS(gsm_a_tft_pkt_flt_dir_vals), 0x30, + NULL, HFILL } + }, + { &hf_gsm_a_tft_pkt_flt_id, + { "Packet filter identifier", "gsm_a.tft.pkt_flt_id", + FT_UINT8, BASE_DEC, NULL, 0x0f, + NULL, HFILL } + }, + { &hf_gsm_a_sm_ip4_address, + { "IPv4 address", "gsm_a.sm.ip4_address", + FT_IPv4, BASE_NONE, NULL, 0x0, + NULL, HFILL } + }, + { &hf_gsm_a_sm_ip4_mask, + { "IPv4 address mask", "gsm_a.sm.ip4_mask", + FT_IPv4, BASE_NONE, NULL, 0x0, + NULL, HFILL } + }, + { &hf_gsm_a_sm_ip6_address, + { "IPv6 address", "gsm_a.sm.ip6_address", + FT_IPv6, BASE_NONE, NULL, 0x0, + NULL, HFILL } + }, + { &hf_gsm_a_sm_ip6_mask, + { "IPv6 address mask", "gsm_a.sm.ip6_mask", + FT_IPv6, BASE_NONE, NULL, 0x0, + NULL, HFILL } + }, + { &hf_gsm_a_tft_protocol_header, + { "Protocol/header", "gsm_a.tft.protocol_header", + FT_UINT8, BASE_HEX|BASE_EXT_STRING, (&ipproto_val_ext), 0x0, + NULL, HFILL } + }, + { &hf_gsm_a_tft_port, + { "Port", "gsm_a.tft.port", + FT_UINT16, BASE_DEC, NULL, 0x0, + NULL, HFILL } + }, + { &hf_gsm_a_tft_port_low, + { "Low limit port", "gsm_a.tft.port_low", + FT_UINT16, BASE_DEC, NULL, 0x0, + NULL, HFILL } + }, + { &hf_gsm_a_tft_port_high, + { "High limit port", "gsm_a.tft.port_high", + FT_UINT16, BASE_DEC, NULL, 0x0, + NULL, HFILL } + }, + { &hf_gsm_a_tft_security, + { "IPSec security parameter index", "gsm_a.tft.security", + FT_UINT32, BASE_HEX, NULL, 0x0, + NULL, HFILL } + }, + { &hf_gsm_a_tft_traffic_class, + { "Type of service/Traffic class field", "gsm_a.tft.traffic_class", + FT_UINT8, BASE_HEX, NULL, 0x0, + NULL, HFILL } + }, + { &hf_gsm_a_tft_traffic_mask, + { "Mask field", "gsm_a.tft.traffic_mask", + FT_UINT8, BASE_HEX, NULL, 0x0, + NULL, HFILL } + }, + { &hf_gsm_a_tft_flow_label_type, + { "Flow Label Type", "gsm_a.tft.flow_label_type", + FT_UINT24, BASE_HEX, NULL, 0x0FFFFF, + NULL, HFILL } + }, + { &hf_gsm_a_tft_param_id, + { "Parameter identifier", "gsm_a.tft.param_id", + FT_UINT8, BASE_DEC, VALS(gsm_a_tft_param_id_vals), 0x0, + NULL, HFILL } + }, + { &hf_gsm_a_ptmsi_sig, + { "P-TMSI Signature", "gsm_a.ptmsi_sig", + FT_UINT24, BASE_HEX, NULL, 0x0, + NULL, HFILL } + }, + { &hf_gsm_a_ptmsi_sig2, + { "P-TMSI Signature 2", "gsm_a.ptmsi_sig2", + FT_UINT24, BASE_HEX, NULL, 0x0, + NULL, HFILL } + }, + { &hf_gsm_a_gm_acc_tech_type, + { "Access Technology Type", "gsm_a.gm.acc_tech_type", + FT_UINT8, BASE_DEC, VALS(gsm_a_gm_acc_tech_type_vals), 0x0, + NULL, HFILL } + }, + { &hf_gsm_a_gm_acc_cap_struct_len, + { "Length in bits", "gsm_a.gm.acc_cap_struct_len", + FT_UINT8, BASE_HEX_DEC, NULL, 0x0, + NULL, HFILL } + }, + { &hf_gsm_a_gm_sms_value, + { "SMS_VALUE (Switch-Measure-Switch)", "gsm_a.gm.sms", + FT_UINT8, BASE_DEC, VALS(gsm_a_sms_vals), 0x0, + NULL, HFILL } + }, + { &hf_gsm_a_gm_sm_value, + { "(SM_VALUE) Switch-Measure", "gsm_a.gm.sm", + FT_UINT8, BASE_DEC, VALS(gsm_a_sms_vals), 0x0, + NULL, HFILL } + }, + { &hf_gsm_a_gm_sm_ext, + { "Ext", "gsm_a.gm.sm.ext", + FT_UINT8, BASE_HEX, NULL, 0x80, + NULL, HFILL } + }, + { &hf_gsm_a_gm_link_dir, + { "Link direction", "gsm_a.gm.link_dir", + FT_INT32, BASE_DEC, VALS(gsm_a_gm_link_dir_vals), 0x0, + NULL, HFILL } + }, + { &hf_gsm_a_gm_cause, + { "gmm Cause", "gsm_a.gm.cause", + FT_UINT8, BASE_DEC|BASE_RANGE_STRING, RVALS(gmm_cause_vals), 0x0, + NULL, HFILL } + }, + { &hf_gsm_a_gm_fop, + { "Follow-on proceed", "gsm_a.gm.fop", + FT_BOOLEAN, 8, NULL, 0x08, + NULL, HFILL } + }, + { &hf_gsm_a_gm_res_of_attach, + { "Result of attach", "gsm_a.gm.res_of_attach", + FT_UINT8, BASE_DEC, VALS(gsm_a_gm_res_of_attach_vals), 0x07, + NULL, HFILL } + }, + { &hf_gsm_a_gm_type_of_ciph_alg, + { "Type of ciphering algorithm", "gsm_a.gm.type_of_ciph_alg", + FT_UINT8, BASE_DEC, VALS(gsm_a_gm_type_of_ciph_alg_vals), 0x07, + NULL, HFILL } + }, + { &hf_gsm_a_gm_imeisv_req, + { "IMEISV request", "gsm_a.gm.imeisv_req", + FT_UINT8, BASE_DEC|BASE_RANGE_STRING, RVALS(gsm_a_gm_imeisv_req_vals), 0x00, + NULL, HFILL } + }, + { &hf_gsm_a_gm_ac_ref_nr, + { "A&C reference number", "gsm_a.gm.ac_ref_nr", + FT_UINT8, BASE_DEC, NULL, 0x0, + NULL, HFILL } + }, + { &hf_gsm_a_gm_force_to_standby, + { "Force to standby", "gsm_a.gm.force_to_standby", + FT_UINT8, BASE_DEC|BASE_RANGE_STRING, RVALS(gsm_a_gm_force_to_standby_vals), 0x00, + NULL, HFILL } + }, + { &hf_gsm_a_gm_ciph_key_seq_num, + { "Ciphering key sequence number", "gsm_a.gm.ciph_key_seq_num", + FT_UINT8, BASE_DEC, NULL, 0x00, + NULL, HFILL } + }, + { &hf_gsm_a_gm_serv_type, + { "Service type", "gsm_a.gm.serv_type", + FT_UINT8, BASE_DEC, VALS(gsm_a_gm_serv_type_vals), 0x00, + NULL, HFILL } + }, + { &hf_gsm_a_gm_for, + { "Follow-on request pending", "gsm_a.gm.for", + FT_BOOLEAN, 8, NULL, 0x08, + NULL, HFILL } + }, + { &hf_gsm_a_gm_type_of_attach, + { "Type of attach", "gsm_a.gm.type_of_attach", + FT_UINT8, BASE_DEC, VALS(gsm_a_gm_type_of_attach_vals), 0x07, + NULL, HFILL } + }, + { &hf_gsm_a_gm_tmsi_flag, + { "TMSI flag", "gsm_a.gm.tmsi_flag", + FT_BOOLEAN, 8, TFS(&gsm_a_gm_tmsi_flag_value), 0x01, + NULL, HFILL } + }, + { &hf_gsm_a_gm_update_type, + { "Update type", "gsm_a.gm.update_type", + FT_UINT8, BASE_DEC, VALS(gsm_a_gm_update_type_vals), 0x07, + NULL, HFILL } + }, + { &hf_gsm_a_gm_gprs_timer_unit, + { "Unit", "gsm_a.gm.gprs_timer_unit", + FT_UINT8, BASE_DEC, VALS(gsm_a_gm_gprs_timer_unit_vals), 0xe0, + NULL, HFILL } + }, + { &hf_gsm_a_gm_gprs_timer_value, + { "Timer value", "gsm_a.gm.gprs_timer_value", + FT_UINT8, BASE_DEC, NULL, 0x1f, + NULL, HFILL } + }, + { &hf_gsm_a_gm_nsapi_5_ul_stat, + { "NSAPI(5) uplink status", "gsm_a.gm.nsapi_5_ul_stat", + FT_BOOLEAN, BASE_NONE, TFS(&gsm_a_gm_nsapi_ul_stat_vals), 0x0, + NULL, HFILL } + }, + { &hf_gsm_a_gm_nsapi_6_ul_stat, + { "NSAPI(6) uplink status", "gsm_a.gm.nsapi_6_ul_stat", + FT_BOOLEAN, BASE_NONE, TFS(&gsm_a_gm_nsapi_ul_stat_vals), 0x0, + NULL, HFILL } + }, + { &hf_gsm_a_gm_nsapi_7_ul_stat, + { "NSAPI(7) uplink status", "gsm_a.gm.nsapi_7_ul_stat", + FT_BOOLEAN, BASE_NONE, TFS(&gsm_a_gm_nsapi_ul_stat_vals), 0x0, + NULL, HFILL } + }, + { &hf_gsm_a_gm_nsapi_8_ul_stat, + { "NSAPI(8) uplink status", "gsm_a.gm.nsapi_8_ul_stat", + FT_BOOLEAN, BASE_NONE, TFS(&gsm_a_gm_nsapi_ul_stat_vals), 0x0, + NULL, HFILL } + }, + { &hf_gsm_a_gm_nsapi_9_ul_stat, + { "NSAPI(9) uplink status", "gsm_a.gm.nsapi_9_ul_stat", + FT_BOOLEAN, BASE_NONE, TFS(&gsm_a_gm_nsapi_ul_stat_vals), 0x0, + NULL, HFILL } + }, + { &hf_gsm_a_gm_nsapi_10_ul_stat, + { "NSAPI(10) uplink status", "gsm_a.gm.nsapi_10_ul_stat", + FT_BOOLEAN, BASE_NONE, TFS(&gsm_a_gm_nsapi_ul_stat_vals), 0x0, + NULL, HFILL } + }, + { &hf_gsm_a_gm_nsapi_11_ul_stat, + { "NSAPI(11) uplink status", "gsm_a.gm.nsapi_11_ul_stat", + FT_BOOLEAN, BASE_NONE, TFS(&gsm_a_gm_nsapi_ul_stat_vals), 0x0, + NULL, HFILL } + }, + { &hf_gsm_a_gm_nsapi_12_ul_stat, + { "NSAPI(12) uplink status", "gsm_a.gm.nsapi_12_ul_stat", + FT_BOOLEAN, BASE_NONE, TFS(&gsm_a_gm_nsapi_ul_stat_vals), 0x0, + NULL, HFILL } + }, + { &hf_gsm_a_gm_nsapi_13_ul_stat, + { "NSAPI(13) uplink status", "gsm_a.gm.nsapi_13_ul_stat", + FT_BOOLEAN, BASE_NONE, TFS(&gsm_a_gm_nsapi_ul_stat_vals), 0x0, + NULL, HFILL } + }, + { &hf_gsm_a_gm_nsapi_14_ul_stat, + { "NSAPI(14) uplink status", "gsm_a.gm.nsapi_14_ul_stat", + FT_BOOLEAN, BASE_NONE, TFS(&gsm_a_gm_nsapi_ul_stat_vals), 0x0, + NULL, HFILL } + }, + { &hf_gsm_a_gm_nsapi_15_ul_stat, + { "NSAPI(15) uplink status", "gsm_a.gm.nsapi_15_ul_stat", + FT_BOOLEAN, BASE_NONE, TFS(&gsm_a_gm_nsapi_ul_stat_vals), 0x0, + NULL, HFILL } + }, + { &hf_gsm_a_gm_pco_pid, + { "Protocol or Container ID", "gsm_a.gm.pco_pid", + FT_UINT16, BASE_DEC, NULL, 0x0, + NULL, HFILL } + }, + { &hf_gsm_a_gm_type_of_identity, + { "Type of identity", "gsm_a.gm.type_of_identity", + FT_UINT8, BASE_DEC, VALS(gsm_a_gm_type_of_identity_vals), 0x07, + NULL, HFILL } + }, + { &hf_gsm_a_gm_rac, + { "Routing Area Code (RAC)", "gsm_a.gm.rac", + FT_UINT8, BASE_HEX_DEC, NULL, 0x00, + NULL, HFILL } + }, + { &hf_gsm_a_gm_apc, + { "APC", "gsm_a.gm.apc", + FT_BOOLEAN, 8, TFS(&gsm_a_gm_apc_vals), 0x20, + NULL, HFILL } + }, + { &hf_gsm_a_gm_otd_a, + { "OTD-A", "gsm_a.gm.otd_a", + FT_BOOLEAN, 8, TFS(&gsm_a_gm_otd_a_vals), 0x10, + NULL, HFILL } + }, + { &hf_gsm_a_gm_otd_b, + { "OTD-B", "gsm_a.gm.otd_b", + FT_BOOLEAN, 8, TFS(&gsm_a_gm_otd_b_vals), 0x08, + NULL, HFILL } + }, + { &hf_gsm_a_gm_gps_a, + { "GPS-A", "gsm_a.gm.gps_a", + FT_BOOLEAN, 8, TFS(&gsm_a_gm_gps_a_vals), 0x04, + NULL, HFILL } + }, + { &hf_gsm_a_gm_gps_b, + { "GPS-B", "gsm_a.gm.gps_b", + FT_BOOLEAN, 8, TFS(&gsm_a_gm_gps_b_vals), 0x02, + NULL, HFILL } + }, + { &hf_gsm_a_gm_gps_c, + { "GPS-C", "gsm_a.gm.gps_c", + FT_BOOLEAN, 8, TFS(&gsm_a_gm_gps_c_vals), 0x01, + NULL, HFILL } + }, + { &hf_gsm_a_gm_req_ms_info_irat, + { "I-RAT", "gsm_a.gm.req_ms_info_irat", + FT_BOOLEAN, BASE_NONE, TFS(&gsm_a_gm_req_ms_info_irat_vals), 0x0, + NULL, HFILL } + }, + { &hf_gsm_a_gm_req_ms_info_irat2, + { "I-RAT2", "gsm_a.gm.req_ms_info_irat2", + FT_BOOLEAN, BASE_NONE, TFS(&gsm_a_gm_req_ms_info_irat2_vals), 0x0, + NULL, HFILL } + }, + { &hf_gsm_a_gm_ue_usage_setting, + { "UE's usage setting", "gsm_a.gm.ue_usage_setting", + FT_BOOLEAN, BASE_NONE, TFS(&gsm_a_gm_ue_usage_setting_vals), 0x0, + NULL, HFILL } + }, + { &hf_gsm_a_gm_voice_domain_pref_for_eutran, + { "Voice domain preference for E-UTRAN", "gsm_a.gm.voice_domain_pref_for_eutran", + FT_UINT8, BASE_DEC, VALS(gsm_a_gm_voice_domain_pref_for_eutran_vals), 0x0, + NULL, HFILL } + }, + { &hf_gsm_a_sm_pdp_type_org, + { "PDP type organization", "gsm_a.sm.pdp_type_org", + FT_UINT8, BASE_DEC, VALS(gsm_a_sm_pdp_type_org_vals), 0x0f, + NULL, HFILL } + }, + { &hf_gsm_a_qos_mean_thr, + { "Mean throughput", "gsm_a.qos.mean_throughput", + FT_UINT8, BASE_DEC|BASE_RANGE_STRING, RVALS(gsm_a_qos_mean_thr_vals), 0x1f, + NULL, HFILL } + }, + { &hf_gsm_a_qos_peak_thr, + { "Peak throughput", "gsm_a.qos.peak_throughput", + FT_UINT8, BASE_DEC|BASE_RANGE_STRING, RVALS(gsm_a_qos_peak_thr_vals), 0xf0, + NULL, HFILL } + }, + { &hf_gsm_a_qos_prec_class, + { "Precedence class", "gsm_a.qos.prec_class", + FT_UINT8, BASE_DEC|BASE_RANGE_STRING, RVALS(gsm_a_qos_prec_class_vals), 0x07, + NULL, HFILL } + }, + { &hf_gsm_a_qos_traf_handl_prio, + { "Traffic handling priority", "gsm_a.qos.traf_handl_prio", + FT_UINT8, BASE_DEC, NULL, 0x03, + NULL, HFILL } + }, + { &hf_gsm_a_qos_trans_delay, + { "Transfer delay", "gsm_a.qos.trans_delay", + FT_UINT8, BASE_DEC, NULL, 0xfc, + NULL, HFILL } + }, + { &hf_gsm_a_qos_signalling_ind, + { "Signalling indication", "gsm_a.qos.signalling_ind", + FT_BOOLEAN, 8, TFS(&gsm_a_qos_signalling_ind_value), 0x10, + NULL, HFILL } + }, + { &hf_gsm_a_qos_source_stat_desc, + { "Source statistics description", "gsm_a.qos.source_stat_desc", + FT_UINT8, BASE_DEC, NULL, 0x0f, + NULL, HFILL } + }, + { &hf_gsm_a_qos_max_bitrate_upl, + { "Maximum bitrate for uplink", "gsm_a.qos.max_bitrate_upl", + FT_UINT8, BASE_DEC, NULL, 0x0, + NULL, HFILL } + }, + { &hf_gsm_a_qos_max_bitrate_downl, + { "Maximum bitrate for downlink", "gsm_a.qos.max_bitrate_downl", + FT_UINT8, BASE_DEC, NULL, 0x0, + NULL, HFILL } + }, + { &hf_gsm_a_qos_guar_bitrate_upl, + { "Guaranteed bitrate for uplink", "gsm_a.qos.guar_bitrate_upl", + FT_UINT8, BASE_DEC, NULL, 0x0, + NULL, HFILL } + }, + { &hf_gsm_a_qos_guar_bitrate_downl, + { "Guaranteed bitrate for downlink", "gsm_a.qos.guar_bitrate_downl", + FT_UINT8, BASE_DEC, NULL, 0x0, + NULL, HFILL } + }, + { &hf_gsm_a_qos_max_bitrate_upl_ext, + { "Maximum bitrate for uplink (extended)", "gsm_a.qos.max_bitrate_upl_ext", + FT_UINT8, BASE_DEC, NULL, 0x0, + NULL, HFILL } + }, + { &hf_gsm_a_qos_max_bitrate_downl_ext, + { "Maximum bitrate for downlink (extended)", "gsm_a.qos.max_bitrate_downl_ext", + FT_UINT8, BASE_DEC, NULL, 0x0, + NULL, HFILL } + }, + { &hf_gsm_a_qos_guar_bitrate_upl_ext, + { "Guaranteed bitrate for uplink (extended)", "gsm_a.qos.guar_bitrate_upl_ext", + FT_UINT8, BASE_DEC, NULL, 0x0, + NULL, HFILL } + }, + { &hf_gsm_a_qos_guar_bitrate_downl_ext, + { "Guaranteed bitrate for downlink (extended)", "gsm_a.qos.guar_bitrate_downl_ext", + FT_UINT8, BASE_DEC, NULL, 0x0, + NULL, HFILL } + }, + { &hf_gsm_a_sm_cause, + { "SM Cause", "gsm_a.sm.cause", + FT_UINT8, BASE_DEC, NULL, 0x0, + NULL, HFILL } + }, + { &hf_gsm_a_sm_cause_2, + { "SM Cause 2", "gsm_a.sm.cause_2", + FT_UINT8, BASE_DEC, NULL, 0x0, + NULL, HFILL } + }, + { &hf_gsm_a_sm_llc_sapi, + { "LLC SAPI", "gsm_a.sm.llc_sapi", + FT_UINT8, BASE_DEC, VALS(gsm_a_sm_llc_sapi_vals), 0x0f, + NULL, HFILL } + }, + { &hf_gsm_a_sm_tdi, + { "Tear Down Indicator (TDI)", "gsm_a.sm.tdi", + FT_BOOLEAN, 8, TFS(&gsm_a_sm_tdi_value), 0x01, + NULL, HFILL } + }, + { &hf_gsm_a_sm_packet_flow_id, + { "Packet Flow Identifier (PFI)", "gsm_a.sm.packet_flow_id", + FT_UINT8, BASE_DEC|BASE_RANGE_STRING, RVALS(gsm_a_sm_packet_flow_id_vals), 0x7f, + NULL, HFILL } + }, + { &hf_gsm_a_gmm_net_cap_gea1, + { "GEA/1", "gsm_a.gmm.net_cap.gea1", + FT_BOOLEAN, 8, TFS(&gsm_a_gmm_net_cap_gea_vals), 0x80, + NULL, HFILL } + }, + { &hf_gsm_a_gmm_net_cap_smdch, + { "SM capabilities via dedicated channels", "gsm_a.gmm.net_cap.smdch", + FT_BOOLEAN, 8, TFS(&gsm_a_gmm_net_cap_smdch_vals), 0x40, + NULL, HFILL } + }, + { &hf_gsm_a_gmm_net_cap_smgprs, + { "SM capabilities via GPRS channels", "gsm_a.gmm.net_cap.smgprs", + FT_BOOLEAN, 8, TFS(&gsm_a_gmm_net_cap_smgprs_vals), 0x20, + NULL, HFILL } + }, + { &hf_gsm_a_gmm_net_cap_ucs2, + { "UCS2 support", "gsm_a.gmm.net_cap.ucs2", + FT_BOOLEAN, 8, TFS(&gsm_a_gmm_net_cap_smgprs_vals), 0x10, + NULL, HFILL } + }, + { &hf_gsm_a_gmm_net_cap_ss_scr_ind, + { "SS Screening Indicator", "gsm_a.gmm.net_cap.ss_scr_ind", + FT_UINT8, BASE_HEX, VALS(gsm_a_gmm_net_cap_ss_scr_ind_vals), 0x0c, + NULL, HFILL } + }, + { &hf_gsm_a_gmm_net_cap_solsa, + { "SoLSA Capability", "gsm_a.gmm.net_cap.solsa", + FT_BOOLEAN, 8, TFS(&gsm_a_gmm_net_cap_solsa_vals), 0x02, + NULL, HFILL } + }, + { &hf_gsm_a_gmm_net_cap_rev, + { "Revision level indicator", "gsm_a.gmm.net_cap.rev", + FT_BOOLEAN, 8, TFS(&gsm_a_gmm_net_cap_rev_vals), 0x01, + NULL, HFILL } + }, + { &hf_gsm_a_gmm_net_cap_pfc, + { "PFC feature mode", "gsm_a.gmm.net_cap.pfc", + FT_BOOLEAN, 8, TFS(&gsm_a_gmm_net_cap_pfc_vals), 0x80, + NULL, HFILL } + }, + { &hf_gsm_a_gmm_net_cap_ext_gea_bits, + { "Extended GEA bits", "gsm_a.gmm.net_cap.ext_gea_bits", + FT_UINT8, BASE_HEX, NULL, 0x7e, + NULL, HFILL } + }, + { &hf_gsm_a_gmm_net_cap_gea2, + { "GEA/2", "gsm_a.gmm.net_cap.gea2", + FT_BOOLEAN, 8, TFS(&gsm_a_gmm_net_cap_gea_vals), 0x40, + NULL, HFILL } + }, + { &hf_gsm_a_gmm_net_cap_gea3, + { "GEA/3", "gsm_a.gmm.net_cap.gea3", + FT_BOOLEAN, 8, TFS(&gsm_a_gmm_net_cap_gea_vals), 0x20, + NULL, HFILL } + }, + { &hf_gsm_a_gmm_net_cap_gea4, + { "GEA/4", "gsm_a.gmm.net_cap.gea4", + FT_BOOLEAN, 8, TFS(&gsm_a_gmm_net_cap_gea_vals), 0x10, + NULL, HFILL } + }, + { &hf_gsm_a_gmm_net_cap_gea5, + { "GEA/5", "gsm_a.gmm.net_cap.gea5", + FT_BOOLEAN, 8, TFS(&gsm_a_gmm_net_cap_gea_vals), 0x08, + NULL, HFILL } + }, + { &hf_gsm_a_gmm_net_cap_gea6, + { "GEA/6", "gsm_a.gmm.net_cap.gea6", + FT_BOOLEAN, 8, TFS(&gsm_a_gmm_net_cap_gea_vals), 0x04, + NULL, HFILL } + }, + { &hf_gsm_a_gmm_net_cap_gea7, + { "GEA/7", "gsm_a.gmm.net_cap.gea7", + FT_BOOLEAN, 8, TFS(&gsm_a_gmm_net_cap_gea_vals), 0x02, + NULL, HFILL } + }, + { &hf_gsm_a_gmm_net_cap_lcs, + { "LCS VA capability", "gsm_a.gmm.net_cap.lcs", + FT_BOOLEAN, 8, TFS(&gsm_a_gmm_net_cap_lcs_vals), 0x01, + NULL, HFILL } + }, + { &hf_gsm_a_gmm_net_cap_ps_irat_iu, + { "PS inter-RAT HO to UTRAN Iu mode capability", "gsm_a.gmm.net_cap.ps_irat_iu", + FT_BOOLEAN, 8, TFS(&gsm_a_gmm_net_cap_ps_irat_iu_vals), 0x80, + NULL, HFILL } + }, + { &hf_gsm_a_gmm_net_cap_ps_irat_s1, + { "PS inter-RAT HO to E-UTRAN S1 mode capability", "gsm_a.gmm.net_cap.ps_irat_s1", + FT_BOOLEAN, 8, TFS(&gsm_a_gmm_net_cap_ps_irat_s1_vals), 0x40, + NULL, HFILL } + }, + { &hf_gsm_a_gmm_net_cap_comb_proc, + { "EMM Combined procedures capability", "gsm_a.gmm.net_cap.comb_proc", + FT_BOOLEAN, 8, TFS(&gsm_a_gmm_net_cap_comb_proc_vals), 0x20, + NULL, HFILL } + }, + { &hf_gsm_a_gmm_net_cap_isr, + { "ISR support", "gsm_a.gmm.net_cap.isr", + FT_BOOLEAN, 8, TFS(&gsm_a_gmm_net_cap_isr_vals), 0x10, + NULL, HFILL } + }, + { &hf_gsm_a_gmm_net_cap_srvcc_to_geran, + { "SRVCC to GERAN/UTRAN capability", "gsm_a.gmm.net_cap.srvcc_to_geran", + FT_BOOLEAN, 8, TFS(&gsm_a_gmm_net_cap_srvcc_to_geran_vals), 0x08, + NULL, HFILL } + }, + { &hf_gsm_a_gmm_net_cap_epc, + { "EPC Capability", "gsm_a.gmm.net_cap.epc", + FT_BOOLEAN, 8, TFS(&gsm_a_gmm_net_cap_epc_vals), 0x04, + NULL, HFILL } + }, + { &hf_gsm_a_gmm_net_cap_nf, + { "NF Capability", "gsm_a.gmm.net_cap.nf", + FT_BOOLEAN, 8, TFS(&gsm_a_gmm_net_cap_nf_vals), 0x02, + NULL, HFILL } + }, + { &hf_gsm_a_sm_tmgi, + { "Temporary Mobile Group Identity (TMGI)", "gsm_a.sm.tmgi", + FT_UINT24, BASE_HEX, NULL, 0x0, + NULL, HFILL } + }, + { &hf_gsm_a_sm_enh_nsapi, + { "Enhanced NSAPI", "gsm_a.sm.enh_nsapi", + FT_UINT8, BASE_DEC, NULL, 0x0, + NULL, HFILL } + }, + { &hf_gsm_a_sm_req_type, + { "Request type", "gsm_a.sm.req_type", + FT_UINT8, BASE_DEC, VALS(gsm_a_sm_req_type_vals), 0x07, + NULL, HFILL } + }, + { &hf_gsm_a_sm_notif_ind, + { "Notification indicator value", "gsm_a.sm.notif_ind", + FT_UINT8, BASE_DEC, VALS(gsm_a_sm_notif_ind_vals), 0x0, + NULL, HFILL } + }, + { &hf_gsm_a_gm_rac_ctrled_early_cm_sending, + { "Controlled early Classmark Sending", "gsm_a.gm.rac.ctrled_early_cm_sending", + FT_BOOLEAN, BASE_NONE, TFS(&tfs_implemented_not_implemented), 0x0, + NULL, HFILL } + }, + { &hf_gsm_a_gm_rac_pseudo_sync, + { "Pseudo Synchronisation", "gsm_a.gm.rac.pseudo_sync", + FT_BOOLEAN, BASE_NONE, TFS(&tfs_present_not_present), 0x0, + NULL, HFILL } + }, + { &hf_gsm_a_gm_rac_vgcs, + { "Voice Group Call Service", "gsm_a.gm.rac.vgcs", + FT_BOOLEAN, BASE_NONE, TFS(&gsm_a_gm_vgcs), 0x0, + NULL, HFILL } + }, + { &hf_gsm_a_gm_rac_vbs, + { "Voice Broadcast Service", "gsm_a.gm.rac.vbs", + FT_BOOLEAN, BASE_NONE, TFS(&gsm_a_gm_vbs), 0x0, + NULL, HFILL } + }, + { &hf_gsm_a_gm_rac_multislot_capability, + { "Multislot capability struct", "gsm_a.gm.rac.multislot_capability", + FT_BOOLEAN, BASE_NONE, TFS(&tfs_present_not_present), 0x0, + NULL, HFILL } + }, + { &hf_gsm_a_gm_rac_hscsd_multi_slot_class, + { "HSCSD multislot class", "gsm_a.gm.rac.hscsd_multi_slot_class", + FT_UINT8, BASE_DEC, VALS(gsm_a_gm_multi_slot_vals), 0x0, + NULL, HFILL } + }, + { &hf_gsm_a_gm_rac_gprs_multi_slot_class, + { "GPRS multislot class", "gsm_a.gm.rac.gprs_multi_slot_class", + FT_UINT8, BASE_DEC, VALS(gsm_a_gm_multi_slot_vals), 0x0, + NULL, HFILL } + }, + { &hf_gsm_a_gm_rac_gprs_ext_dyn_alloc_cap, + { "GPRS Extended Dynamic Allocation Capability", "gsm_a.gm.rac.gprs_ext_dyn_alloc_cap", + FT_BOOLEAN, BASE_NONE, TFS(&tfs_implemented_not_implemented), 0x0, + NULL, HFILL } + }, + { &hf_gsm_a_gm_rac_ecsd_multi_slot_class, + { "ECSD multislot class", "gsm_a.gm.rac.ecsd_multi_slot_class", + FT_UINT8, BASE_DEC, VALS(gsm_a_gm_multi_slot_vals), 0x0, + NULL, HFILL } + }, + { &hf_gsm_a_gm_rac_egprs_multi_slot_class, + { "EGPRS multislot class", "gsm_a.gm.rac.egprs_multi_slot_class", + FT_UINT8, BASE_DEC, VALS(gsm_a_gm_multi_slot_vals), 0x0, + NULL, HFILL } + }, + { &hf_gsm_a_gm_rac_egprs_ext_dyn_alloc_cap, + { "EGPRS Extended Dynamic Allocation Capability", "gsm_a.gm.rac.egprs_ext_dyn_alloc_cap", + FT_BOOLEAN, BASE_NONE, TFS(&tfs_implemented_not_implemented), 0x0, + NULL, HFILL } + }, + { &hf_gsm_a_gm_rac_dtm_gprs_multi_slot_class, + { "DTM GPRS Multi Slot Class", "gsm_a.gm.rac.dtm_gprs_multi_slot_class", + FT_UINT8, BASE_DEC, VALS(gsm_a_gm_dtm_gprs_multi_slot_class_vals), 0x0, + NULL, HFILL } + }, + { &hf_gsm_a_gm_rac_single_slt_dtm, + { "Single Slot DTM", "gsm_a.gm.rac.single_slt_dtm", + FT_BOOLEAN, BASE_NONE, TFS(&tfs_supported_not_supported), 0x0, + NULL, HFILL } + }, + { &hf_gsm_a_gm_rac_dtm_egprs_multi_slot_cls_pres, + { "DTM EGPRS Multi Slot Class", "gsm_a.gm.rac.dtm_egprs_multi_slot_cls_pres", + FT_BOOLEAN, BASE_NONE, TFS(&tfs_present_not_present), 0x0, + NULL, HFILL } + }, + { &hf_gsm_a_gm_rac_dtm_egprs_multi_slot_class, + { "DTM EGPRS Multi Slot Class", "gsm_a.gm.rac.dtm_egprs_multi_slot_class", + FT_UINT8, BASE_DEC, VALS(gsm_a_gm_dtm_gprs_multi_slot_class_vals), 0x0, + NULL, HFILL } + }, + { &hf_gsm_a_gm_rac_8psk_pow_cap_pres, + { "8PSK Power Capability Bits", "gsm_a.gm.rac.8psk_pow_cap_pres", + FT_BOOLEAN, BASE_NONE, TFS(&tfs_present_not_present), 0x0, + NULL, HFILL } + }, + { &hf_gsm_a_gm_rac_comp_int_meas_cap, + { "COMPACT Interference Measurement Capability", "gsm_a.gm.rac.comp_int_meas_cap", + FT_BOOLEAN, BASE_NONE, TFS(&tfs_implemented_not_implemented), 0x0, + NULL, HFILL } + }, + { &hf_gsm_a_gm_rel_lev_ind, + { "Revision Level Indicator", "gsm_a.gm.rel_lev_ind", + FT_BOOLEAN, BASE_NONE, TFS(&gsm_a_gm_revision_level_indicator), 0x0, + NULL, HFILL } + }, + { &hf_gsm_a_gm_rac_umts_fdd_cap, + { "UMTS FDD Radio Access Technology Capability", "gsm_a.gm.rac.umts_fdd_cap", + FT_BOOLEAN, BASE_NONE, TFS(&tfs_supported_not_supported), 0x0, + NULL, HFILL } + }, + { &hf_gsm_a_gm_rac_umts_384_tdd_ra_cap, + { "UMTS 3.84 Mcps TDD Radio Access Technology Capability", "gsm_a.gm.rac.umts_384_tdd_ra_cap", + FT_BOOLEAN, BASE_NONE, TFS(&tfs_supported_not_supported), 0x0, + NULL, HFILL } + }, + { &hf_gsm_a_gm_rac_cdma2000_cap, + { "CDMA 2000 Radio Access Technology Capability", "gsm_a.gm.rac.cdma2000_cap", + FT_BOOLEAN, BASE_NONE, TFS(&tfs_supported_not_supported), 0x0, + NULL, HFILL } + }, + { &hf_gsm_a_gm_rac_umts_128_tdd_ra_cap, + { "UMTS 1.28 Mcps TDD Radio Access Technology Capability", "gsm_a.gm.rac.umts_128_tdd_ra_cap", + FT_BOOLEAN, BASE_NONE, TFS(&tfs_supported_not_supported), 0x0, + NULL, HFILL } + }, + { &hf_gsm_a_gm_rac_geran_feat_pkg, + { "GERAN Feature Package 1", "gsm_a.gm.rac.geran_feat_pkg", + FT_BOOLEAN, BASE_NONE, TFS(&tfs_supported_not_supported), 0x0, + NULL, HFILL } + }, + { &hf_gsm_a_gm_rac_mod_based_multi_slot_class_support, + { "Modulation based multislot class support", "gsm_a.gm.rac.mod_based_multi_slot_class_support", + FT_BOOLEAN, BASE_NONE, TFS(&tfs_supported_not_supported), 0x0, + NULL, HFILL } + }, + { &hf_gsm_a_gm_rac_geran_iu_mode_cap, + { "GERAN Iu mode", "gsm_a.gm.rac.geran_iu_mode_cap", + FT_BOOLEAN, BASE_NONE, TFS(&tfs_supported_not_supported), 0x0, + NULL, HFILL } + }, + { &hf_gsm_a_gm_rac_flo_iu_cap, + { "FLO Iu Capability", "gsm_a.gm.rac.flo_iu_cap", + FT_BOOLEAN, BASE_NONE, TFS(&tfs_supported_not_supported), 0x0, + NULL, HFILL } + }, + { &hf_gsm_a_gm_rac_mult_tbf_cap, + { "Multiple TBF Capability", "gsm_a.gm.rac.mult_tbf_cap", + FT_BOOLEAN, BASE_NONE, TFS(&tfs_supported_not_supported), 0x0, + NULL, HFILL } + }, + { &hf_gsm_a_gm_rac_down_adv_rec_perf, + { "Downlink Advanced Receiver Performance", "gsm_a.gm.rac.down_adv_rec_perf", + FT_UINT8, BASE_DEC, VALS(gsm_a_gm_down_adv_rec_perf_vals), 0x0, + NULL, HFILL } + }, + { &hf_gsm_a_gm_rac_ext_rlc_mac_ctrl_msg_seg_cap, + { "Extended RLC/MAC Control Message Segmentation Capability", "gsm_a.gm.rac.ext_rlc_mac_ctrl_msg_seg_cap", + FT_BOOLEAN, BASE_NONE, TFS(&tfs_supported_not_supported), 0x0, + NULL, HFILL } + }, + { &hf_gsm_a_gm_rac_dtm_enh_cap, + { "DTM Enhancements Capability", "gsm_a.gm.rac.dtm_enh_cap", + FT_BOOLEAN, BASE_NONE, TFS(&gsm_a_gm_dtm_enh_cap), 0x0, + NULL, HFILL } + }, + { &hf_gsm_a_gm_rac_dtm_gprs_high_multi_slot_class, + { "DTM GPRS High Multi Slot Class", "gsm_a.gm.rac.dtm_gprs_high_multi_slot_class", + FT_UINT8, BASE_DEC, VALS(gsm_a_gm_dtm_gprs_high_multi_slot_class_vals), 0x0, + NULL, HFILL } + }, + { &hf_gsm_a_gm_rac_dtm_egprs_high_multi_slot_class, + { "DTM EGPRS High Multi Slot Class", "gsm_a.gm.rac.dtm_egprs_high_multi_slot_class", + FT_UINT8, BASE_DEC, VALS(gsm_a_gm_dtm_gprs_high_multi_slot_class_vals), 0x0, + NULL, HFILL } + }, + { &hf_gsm_a_gm_rac_ps_ho_cap, + { "PS Handover Capability", "gsm_a.gm.rac.ps_ho_cap", + FT_BOOLEAN, BASE_NONE, TFS(&tfs_supported_not_supported), 0x0, + NULL, HFILL } + }, + { &hf_gsm_a_gm_rac_dtm_ho_cap, + { "DTM Handover Capability", "gsm_a.gm.rac.dtm_ho_cap", + FT_BOOLEAN, BASE_NONE, TFS(&tfs_supported_not_supported), 0x0, + NULL, HFILL } + }, + { &hf_gsm_a_gm_rac_multi_slot_cap_red_down_dual_carrier, + { "Multislot Capability Reduction for Downlink Dual Carrier", "gsm_a.gm.rac.multi_slot_cap_red_down_dual_carrier", + FT_UINT8, BASE_DEC, VALS(gsm_a_gm_multi_slot_cap_red_down_dual_carrier_vals), 0x0, + NULL, HFILL } + }, + { &hf_gsm_a_gm_rac_down_dual_carrier_dtm_cap, + { "Downlink Dual Carrier for DTM Capability", "gsm_a.gm.rac.down_dual_carrier_dtm_cap", + FT_BOOLEAN, BASE_NONE, TFS(&tfs_supported_not_supported), 0x0, + NULL, HFILL } + }, + { &hf_gsm_a_gm_rac_flex_ts_assign, + { "Flexible Timeslot Assignment", "gsm_a.gm.rac.flex_ts_assign", + FT_BOOLEAN, BASE_NONE, TFS(&tfs_supported_not_supported), 0x0, + NULL, HFILL } + }, + { &hf_gsm_a_gm_rac_gan_ps_ho_cap, + { "GAN PS Handover Capability", "gsm_a.gm.rac.gan_ps_ho_cap", + FT_BOOLEAN, BASE_NONE, TFS(&tfs_supported_not_supported), 0x0, + NULL, HFILL } + }, + { &hf_gsm_a_gm_rac_rlc_non_pers_mode, + { "RLC Non-persistent Mode", "gsm_a.gm.rac.rlc_non_pers_mode", + FT_BOOLEAN, BASE_NONE, TFS(&tfs_supported_not_supported), 0x0, + NULL, HFILL } + }, + { &hf_gsm_a_gm_rac_reduced_lat_cap, + { "Reduced Latency Capability", "gsm_a.gm.rac.reduced_lat_cap", + FT_BOOLEAN, BASE_NONE, TFS(&tfs_supported_not_supported), 0x0, + NULL, HFILL } + }, + { &hf_gsm_a_gm_rac_ul_egprs2, + { "Uplink EGPRS2", "gsm_a.gm.rac.ul_egprs2", + FT_UINT8, BASE_DEC, VALS(gsm_a_gm_ul_egprs2_vals), 0x0, + NULL, HFILL } + }, + { &hf_gsm_a_gm_rac_dl_egprs2, + { "Downlink EGPRS2", "gsm_a.gm.rac.dl_egprs2", + FT_UINT8, BASE_DEC, VALS(gsm_a_gm_dl_egprs2_vals), 0x0, + NULL, HFILL } + }, + { &hf_gsm_a_gm_rac_eutra_fdd_support, + { "E-UTRA FDD support", "gsm_a.gm.rac.eutra_fdd_support", + FT_BOOLEAN, BASE_NONE, TFS(&tfs_supported_not_supported), 0x0, + NULL, HFILL } + }, + { &hf_gsm_a_gm_rac_eutra_tdd_support, + { "E-UTRA TDD support", "gsm_a.gm.rac.eutra_tdd_support", + FT_BOOLEAN, BASE_NONE, TFS(&tfs_supported_not_supported), 0x0, + NULL, HFILL } + }, + { &hf_gsm_a_gm_rac_geran_to_eutra_support_in_geran_ptm, + { "GERAN to E-UTRA support in GERAN packet transfer mode", "gsm_a.gm.rac.geran_to_eutra_support_in_geran_ptm", + FT_UINT8, BASE_DEC, VALS(gsm_a_gm_geran_to_eutra_support_in_geran_ptm_vals), 0x0, + NULL, HFILL } + }, + { &hf_gsm_a_gm_rac_prio_based_resel_support, + { "Priority-based reselection support", "gsm_a.gm.rac.prio_based_resel_support", + FT_BOOLEAN, BASE_NONE, TFS(&tfs_supported_not_supported), 0x0, + NULL, HFILL } + }, + { &hf_gsm_a_gm_rac_alt_efta_multi_slot_class, + { "Alternative EFTA Multislot Class", "gsm_a.gm.rac.alt_efta_multi_slot_class", + FT_UINT8, BASE_DEC, VALS(gsm_a_gm_alt_efta_multi_slot_class_vals), 0x0, + NULL, HFILL } + }, + { &hf_gsm_a_gm_rac_efta_multi_slot_cap_red_down_dual_carrier, + { "EFTA Multislot Capability Reduction for Downlink Dual Carrier", "gsm_a.gm.rac.efta_multi_slot_cap_red_down_dual_carrier", + FT_UINT8, BASE_DEC, VALS(gsm_a_gm_multi_slot_cap_red_down_dual_carrier_vals), 0x0, + NULL, HFILL } + }, + { &hf_gsm_a_gm_rac_ind_up_layer_pdu_start_cap_for_rlc_um, + { "Indication of Upper Layer PDU Start Capability for RLC UM", "gsm_a.gm.rac.ind_up_layer_pdu_start_cap_for_rlc_um", + FT_BOOLEAN, BASE_NONE, TFS(&tfs_supported_not_supported), 0x0, + NULL, HFILL } + }, + { &hf_gsm_a_gm_rac_emst_cap, + { "Enhanced Multiplexing for Single TBF Capability", "gsm_a.gm.rac.emst_cap", + FT_BOOLEAN, BASE_NONE, TFS(&tfs_supported_not_supported), 0x0, + NULL, HFILL } + }, + { &hf_gsm_a_gm_rac_mtti_cap, + { "Multiple TTI Capability", "gsm_a.gm.rac.mtti_cap", + FT_BOOLEAN, BASE_NONE, TFS(&tfs_supported_not_supported), 0x0, + NULL, HFILL } + }, + { &hf_gsm_a_gm_rac_utra_csg_cell_report, + { "UTRA CSG Cells Reporting", "gsm_a.gm.rac.utra_csg_cell_report", + FT_BOOLEAN, BASE_NONE, TFS(&tfs_supported_not_supported), 0x0, + NULL, HFILL } + }, + { &hf_gsm_a_gm_rac_eutra_csg_cell_report, + { "E-UTRA CSG Cells Reporting", "gsm_a.gm.rac.mtti_cap", + FT_BOOLEAN, BASE_NONE, TFS(&tfs_supported_not_supported), 0x0, + NULL, HFILL } + }, + { &hf_gsm_a_sm_ti_flag, + { "TI Flag", "gsm_a.sm.ti_flag", + FT_BOOLEAN, 8, TFS(&gsm_a_sm_ti_flag_vals), 0x80, + NULL, HFILL } + }, + { &hf_gsm_a_sm_ext, + { "Extension", "gsm_a.sm.ext", + FT_BOOLEAN, 8, NULL, 0x80, + NULL, HFILL } + }, + }; /* Setup protocol subtree array */ #define NUM_INDIVIDUAL_ELEMS 18 @@ -7562,19 +7566,19 @@ proto_register_gsm_a_gm(void) last_offset = NUM_INDIVIDUAL_ELEMS; - for (i=0; i < NUM_GSM_DTAP_MSG_GMM; i++, last_offset++) + for (i=0; i<NUM_GSM_DTAP_MSG_GMM; i++, last_offset++) { ett_gsm_dtap_msg_gmm[i] = -1; ett[last_offset] = &ett_gsm_dtap_msg_gmm[i]; } - for (i=0; i < NUM_GSM_DTAP_MSG_SM; i++, last_offset++) + for (i=0; i<NUM_GSM_DTAP_MSG_SM; i++, last_offset++) { ett_gsm_dtap_msg_sm[i] = -1; ett[last_offset] = &ett_gsm_dtap_msg_sm[i]; } - for (i=0; i < NUM_GSM_GM_ELEM; i++, last_offset++) + for (i=0; i<NUM_GSM_GM_ELEM; i++, last_offset++) { ett_gsm_gm_elem[i] = -1; ett[last_offset] = &ett_gsm_gm_elem[i]; diff --git a/epan/dissectors/packet-gsm_sms_ud.c b/epan/dissectors/packet-gsm_sms_ud.c index b3965c2071..34fb791849 100644 --- a/epan/dissectors/packet-gsm_sms_ud.c +++ b/epan/dissectors/packet-gsm_sms_ud.c @@ -60,9 +60,6 @@ # include "config.h" #endif -#include <stdlib.h> -#include <time.h> - #include <glib.h> #include <epan/packet.h> @@ -110,45 +107,47 @@ static gint ett_gsm_sms_ud_fragments = -1; static dissector_table_t gsm_sms_dissector_table; /* Short Message reassembly */ -static GHashTable *sm_fragment_table = NULL; +static GHashTable *sm_fragment_table = NULL; static GHashTable *sm_reassembled_table = NULL; static const fragment_items sm_frag_items = { - /* Fragment subtrees */ - &ett_gsm_sms_ud_fragment, - &ett_gsm_sms_ud_fragments, - /* Fragment fields */ - &hf_gsm_sms_ud_fragments, - &hf_gsm_sms_ud_fragment, - &hf_gsm_sms_ud_fragment_overlap, - &hf_gsm_sms_ud_fragment_overlap_conflicts, - &hf_gsm_sms_ud_fragment_multiple_tails, - &hf_gsm_sms_ud_fragment_too_long_fragment, - &hf_gsm_sms_ud_fragment_error, - &hf_gsm_sms_ud_fragment_count, - /* Reassembled in field */ - &hf_gsm_sms_ud_reassembled_in, - /* Reassembled length field */ - &hf_gsm_sms_ud_reassembled_length, - /* Tag */ - "Short Message fragments" + /* Fragment subtrees */ + &ett_gsm_sms_ud_fragment, + &ett_gsm_sms_ud_fragments, + /* Fragment fields */ + &hf_gsm_sms_ud_fragments, + &hf_gsm_sms_ud_fragment, + &hf_gsm_sms_ud_fragment_overlap, + &hf_gsm_sms_ud_fragment_overlap_conflicts, + &hf_gsm_sms_ud_fragment_multiple_tails, + &hf_gsm_sms_ud_fragment_too_long_fragment, + &hf_gsm_sms_ud_fragment_error, + &hf_gsm_sms_ud_fragment_count, + /* Reassembled in field */ + &hf_gsm_sms_ud_reassembled_in, + /* Reassembled length field */ + &hf_gsm_sms_ud_reassembled_length, + /* Tag */ + "Short Message fragments" }; /* Dissect all SM data as WSP if the UDH contains a Port Number IE */ static gboolean port_number_udh_means_wsp = FALSE; + /* Always try dissecting the 1st fragment of a SM, * even if it is not reassembled */ static gboolean try_dissect_1st_frag = FALSE; + /* Prevent subdissectors changing column data */ static gboolean prevent_subdissectors_changing_columns = FALSE; static dissector_handle_t wsp_handle; static void -gsm_sms_ud_defragment_init (void) +gsm_sms_ud_defragment_init(void) { - fragment_table_init (&sm_fragment_table); - reassembled_table_init(&sm_reassembled_table); + fragment_table_init(&sm_fragment_table); + reassembled_table_init(&sm_reassembled_table); } /* @@ -156,37 +155,37 @@ gsm_sms_ud_defragment_init (void) */ /* 3GPP TS 23.040 V6.1.0 (2003-06) */ static const value_string vals_udh_iei[] = { - { 0x00, "SMS - Concatenated short messages, 8-bit reference number" }, - { 0x01, "SMS - Special SMS Message Indication" }, - { 0x02, "Reserved" }, - { 0x03, "Value not used to avoid misinterpretation as <LF> character" }, - { 0x04, "SMS - Application port addressing scheme, 8 bit address" }, - { 0x05, "SMS - Application port addressing scheme, 16 bit address" }, - { 0x06, "SMS - SMSC Control Parameters" }, - { 0x07, "SMS - UDH Source Indicator" }, - { 0x08, "SMS - Concatenated short message, 16-bit reference number" }, - { 0x09, "SMS - Wireless Control Message Protocol" }, - { 0x0A, "EMS - Text Formatting" }, - { 0x0B, "EMS - Predefined Sound" }, - { 0x0C, "EMS - User Defined Sound (iMelody max 128 bytes)" }, - { 0x0D, "EMS - Predefined Animation" }, - { 0x0E, "EMS - Large Animation (16*16 times 4 = 32*4 =128 bytes)" }, - { 0x0F, "EMS - Small Animation (8*8 times 4 = 8*4 =32 bytes)" }, - { 0x10, "EMS - Large Picture (32*32 = 128 bytes)" }, - { 0x11, "EMS - Small Picture (16*16 = 32 bytes)" }, - { 0x12, "EMS - Variable Picture" }, - { 0x13, "EMS - User prompt indicator" }, - { 0x14, "EMS - Extended Object" }, - { 0x15, "EMS - Reused Extended Object" }, - { 0x16, "EMS - Compression Control" }, - { 0x17, "EMS - Object Distribution Indicator" }, - { 0x18, "EMS - Standard WVG object" }, - { 0x19, "EMS - Character Size WVG object" }, - { 0x1A, "EMS - Extended Object Data Request Command" }, - { 0x20, "SMS - RFC 822 E-Mail Header" }, - { 0x21, "SMS - Hyperlink format element" }, - { 0x22, "SMS - Reply Address Element" }, - { 0x00, NULL } + { 0x00, "SMS - Concatenated short messages, 8-bit reference number" }, + { 0x01, "SMS - Special SMS Message Indication" }, + { 0x02, "Reserved" }, + { 0x03, "Value not used to avoid misinterpretation as <LF> character" }, + { 0x04, "SMS - Application port addressing scheme, 8 bit address" }, + { 0x05, "SMS - Application port addressing scheme, 16 bit address" }, + { 0x06, "SMS - SMSC Control Parameters" }, + { 0x07, "SMS - UDH Source Indicator" }, + { 0x08, "SMS - Concatenated short message, 16-bit reference number" }, + { 0x09, "SMS - Wireless Control Message Protocol" }, + { 0x0A, "EMS - Text Formatting" }, + { 0x0B, "EMS - Predefined Sound" }, + { 0x0C, "EMS - User Defined Sound (iMelody max 128 bytes)" }, + { 0x0D, "EMS - Predefined Animation" }, + { 0x0E, "EMS - Large Animation (16*16 times 4 = 32*4 =128 bytes)" }, + { 0x0F, "EMS - Small Animation (8*8 times 4 = 8*4 =32 bytes)" }, + { 0x10, "EMS - Large Picture (32*32 = 128 bytes)" }, + { 0x11, "EMS - Small Picture (16*16 = 32 bytes)" }, + { 0x12, "EMS - Variable Picture" }, + { 0x13, "EMS - User prompt indicator" }, + { 0x14, "EMS - Extended Object" }, + { 0x15, "EMS - Reused Extended Object" }, + { 0x16, "EMS - Compression Control" }, + { 0x17, "EMS - Object Distribution Indicator" }, + { 0x18, "EMS - Standard WVG object" }, + { 0x19, "EMS - Character Size WVG object" }, + { 0x1A, "EMS - Extended Object Data Request Command" }, + { 0x20, "SMS - RFC 822 E-Mail Header" }, + { 0x21, "SMS - Hyperlink format element" }, + { 0x22, "SMS - Reply Address Element" }, + { 0x00, NULL } }; @@ -196,411 +195,420 @@ static const value_string vals_udh_iei[] = { */ static void parse_gsm_sms_ud_message(proto_tree *sm_tree, tvbuff_t *tvb, packet_info *pinfo, - proto_tree *top_tree) + proto_tree *top_tree) { - tvbuff_t *sm_tvb = NULL; - proto_item *subtree, *tree; - guint8 udh_len, udh, len; - guint sm_len = tvb_reported_length (tvb); - guint sm_data_len; - guint32 i = 0; - /* Multiple Messages UDH */ - gboolean is_fragmented = FALSE; - fragment_data *fd_sm = NULL; - guint16 sm_id = 0, frags = 0, frag = 0; - gboolean save_fragmented = FALSE, try_gsm_sms_ud_reassemble = FALSE; - /* SMS Message reassembly */ - gboolean reassembled = FALSE; - guint32 reassembled_in = 0; - /* Port Number UDH */ - guint16 p_src = 0, p_dst = 0; - gboolean ports_available = FALSE; - - udh_len = tvb_get_guint8(tvb, i++); - tree = proto_tree_add_uint(sm_tree, hf_gsm_sms_udh_length, tvb, 0, 1, udh_len); - tree = proto_item_add_subtree(tree, ett_udh); - while (i < udh_len) { - udh = tvb_get_guint8(tvb, i++); - len = tvb_get_guint8(tvb, i++); - subtree = proto_tree_add_uint(tree, hf_gsm_sms_udh_iei, - tvb, i-2, 2+len, udh); - switch (udh) { - case 0x00: /* Multiple messages - 8-bit message ID */ - if (len == 3) { - sm_id = tvb_get_guint8(tvb, i++); - frags = tvb_get_guint8(tvb, i++); - frag = tvb_get_guint8(tvb, i++); - if (frags > 1) - is_fragmented = TRUE; - proto_item_append_text(subtree, - ": message %u, part %u of %u", sm_id, frag, frags); - subtree = proto_item_add_subtree(subtree, - ett_udh_ie); - proto_tree_add_uint (subtree, - hf_gsm_sms_udh_multiple_messages_msg_id, - tvb, i-3, 1, sm_id); - proto_tree_add_uint (subtree, - hf_gsm_sms_udh_multiple_messages_msg_parts, - tvb, i-2, 1, frags); - proto_tree_add_uint (subtree, - hf_gsm_sms_udh_multiple_messages_msg_part, - tvb, i-1, 1, frag); - } else { - proto_item_append_text(subtree, " - Invalid format!"); - i += len; - } - break; - - case 0x08: /* Multiple messages - 16-bit message ID */ - if (len == 4) { - sm_id = tvb_get_ntohs(tvb, i); i += 2; - frags = tvb_get_guint8(tvb, i++); - frag = tvb_get_guint8(tvb, i++); - if (frags > 1) - is_fragmented = TRUE; - proto_item_append_text(subtree, - ": message %u, part %u of %u", sm_id, frag, frags); - subtree = proto_item_add_subtree(subtree, - ett_udh_ie); - proto_tree_add_uint (subtree, - hf_gsm_sms_udh_multiple_messages_msg_id, - tvb, i-4, 2, sm_id); - proto_tree_add_uint (subtree, - hf_gsm_sms_udh_multiple_messages_msg_parts, - tvb, i-2, 1, frags); - proto_tree_add_uint (subtree, - hf_gsm_sms_udh_multiple_messages_msg_part, - tvb, i-1, 1, frag); - } else { - proto_item_append_text(subtree, " - Invalid format!"); - i += len; - } - break; - - case 0x04: /* Port Number UDH - 8-bit address */ - if (len == 2) { /* Port fields */ - p_dst = tvb_get_guint8(tvb, i++); - p_src = tvb_get_guint8(tvb, i++); - proto_item_append_text(subtree, - ": source port %u, destination port %u", - p_src, p_dst); - subtree = proto_item_add_subtree(subtree, ett_udh_ie); - proto_tree_add_uint (subtree, hf_gsm_sms_udh_ports_dst, - tvb, i-2, 1, p_dst); - proto_tree_add_uint (subtree, hf_gsm_sms_udh_ports_src, - tvb, i-1, 1, p_src); - ports_available = TRUE; - } else { - proto_item_append_text(subtree, " - Invalid format!"); - i += len; - } - break; - - case 0x05: /* Port Number UDH - 16-bit address */ - if (len == 4) { /* Port fields */ - p_dst = tvb_get_ntohs(tvb, i); i += 2; - p_src = tvb_get_ntohs(tvb, i); i += 2; - proto_item_append_text(subtree, - ": source port %u, destination port %u", - p_src, p_dst); - subtree = proto_item_add_subtree(subtree, ett_udh_ie); - proto_tree_add_uint (subtree, hf_gsm_sms_udh_ports_dst, - tvb, i-4, 2, p_dst); - proto_tree_add_uint (subtree, hf_gsm_sms_udh_ports_src, - tvb, i-2, 2, p_src); - ports_available = TRUE; - } else { - proto_item_append_text(subtree, " - Invalid format!"); - i += len; - } - break; - - default: - i += len; - break; - } - } - if (tvb_reported_length_remaining(tvb, i) <= 0) - return; /* No more data */ - - /* - * XXX - where does the "1" come from? If it weren't there, - * "sm_data_len" would, I think, be the same as - * "tvb_reported_length_remaining(tvb, i)". - * - * I think that the above check ensures that "sm_len" won't - * be less than or equal to "udh_len", so it ensures that - * "sm_len" won't be less than "1 + udh_len", so we don't - * have to worry about "sm_data_len" being negative. - */ - sm_data_len = sm_len - (1 + udh_len); - if (sm_data_len == 0) - return; /* no more data */ - - /* - * Try reassembling the packets. - * XXX - fragment numbers are 1-origin, but the fragment number - * field could be 0. - * Should we flag a fragmented message with a fragment number field - * of 0? - * What if the fragment count is 0? Should we flag that as well? - */ - if ( is_fragmented && frag != 0 && frags != 0 && - tvb_bytes_exist (tvb, i, sm_data_len) ) { - try_gsm_sms_ud_reassemble = TRUE; - save_fragmented = pinfo->fragmented; - pinfo->fragmented = TRUE; - fd_sm = fragment_add_seq_check (tvb, i, pinfo, - sm_id, /* guint32 ID for fragments belonging together */ - sm_fragment_table, /* list of message fragments */ - sm_reassembled_table, /* list of reassembled messages */ - frag-1, /* guint32 fragment sequence number */ - sm_data_len, /* guint32 fragment length */ - (frag != frags)); /* More fragments? */ - if (fd_sm) { - reassembled = TRUE; - reassembled_in = fd_sm->reassembled_in; - } - sm_tvb = process_reassembled_data(tvb, i, pinfo, - "Reassembled Short Message", fd_sm, &sm_frag_items, - NULL, sm_tree); - if (reassembled) { /* Reassembled */ - col_append_str (pinfo->cinfo, COL_INFO, - " (Short Message Reassembled)"); - } else { - /* Not last packet of reassembled Short Message */ - col_append_fstr (pinfo->cinfo, COL_INFO, - " (Short Message fragment %u of %u)", frag, frags); - } - } /* Else: not fragmented */ - - if (! sm_tvb) /* One single Short Message, or not reassembled */ - sm_tvb = tvb_new_subset_remaining (tvb, i); - /* Try calling a subdissector */ - if (sm_tvb) { - if ((reassembled && pinfo->fd->num == reassembled_in) - || frag==0 || (frag==1 && try_dissect_1st_frag)) { - /* Try calling a subdissector only if: - * - the Short Message is reassembled in this very packet, - * - the Short Message consists of only one "fragment", - * - the preference "Always Try Dissection for 1st SM fragment" - * is switched on, and this is the SM's 1st fragment. */ - if ( ports_available ) { - gboolean disallow_write = FALSE; /* TRUE if we changed writability - of the columns of the summary */ - if ( prevent_subdissectors_changing_columns && col_get_writable(pinfo->cinfo) ) { - disallow_write = TRUE; - col_set_writable(pinfo->cinfo, FALSE); - } - - if ( port_number_udh_means_wsp ) { - call_dissector (wsp_handle, sm_tvb, pinfo, top_tree); - } else { - if (! dissector_try_uint(gsm_sms_dissector_table, p_src, - sm_tvb, pinfo, top_tree)) { - if (! dissector_try_uint(gsm_sms_dissector_table, p_dst, - sm_tvb, pinfo, top_tree)) { - if (sm_tree) { /* Only display if needed */ - proto_tree_add_text (sm_tree, sm_tvb, 0, -1, - "Short Message body"); - } - } - } - } - - if ( disallow_write ) - col_set_writable(pinfo->cinfo, TRUE); - } else { /* No ports IE */ - proto_tree_add_text (sm_tree, sm_tvb, 0, -1, - "Short Message body"); - } - } else { - /* The packet is not reassembled, - * or it is reassembled in another packet */ - proto_tree_add_text (sm_tree, sm_tvb, 0, -1, - "Unreassembled Short Message fragment %u of %u", - frag, frags); - } - } - - if (try_gsm_sms_ud_reassemble) /* Clean up defragmentation */ - pinfo->fragmented = save_fragmented; - return; + tvbuff_t *sm_tvb = NULL; + proto_item *ti; + proto_tree *subtree, *tree; + guint8 udh_len, udh, len; + guint sm_len = tvb_reported_length(tvb); + guint sm_data_len; + guint32 i = 0; + /* Multiple Messages UDH */ + gboolean is_fragmented = FALSE; + fragment_data *fd_sm = NULL; + guint16 sm_id = 0; + guint16 frags = 0; + guint16 frag = 0; + gboolean save_fragmented = FALSE; + gboolean try_gsm_sms_ud_reassemble = FALSE; + /* SMS Message reassembly */ + gboolean reassembled = FALSE; + guint32 reassembled_in = 0; + /* Port Number UDH */ + guint16 p_src = 0; + guint16 p_dst = 0; + gboolean ports_available = FALSE; + + udh_len = tvb_get_guint8(tvb, i++); + ti = proto_tree_add_uint(sm_tree, hf_gsm_sms_udh_length, tvb, 0, 1, udh_len); + tree = proto_item_add_subtree(ti, ett_udh); + while (i < udh_len) { + udh = tvb_get_guint8(tvb, i++); + len = tvb_get_guint8(tvb, i++); + subtree = proto_tree_add_uint(tree, hf_gsm_sms_udh_iei, + tvb, i-2, 2+len, udh); + switch (udh) { + case 0x00: /* Multiple messages - 8-bit message ID */ + if (len == 3) { + sm_id = tvb_get_guint8(tvb, i++); + frags = tvb_get_guint8(tvb, i++); + frag = tvb_get_guint8(tvb, i++); + if (frags > 1) + is_fragmented = TRUE; + proto_item_append_text(subtree, + ": message %u, part %u of %u", sm_id, frag, frags); + subtree = proto_item_add_subtree(subtree, + ett_udh_ie); + proto_tree_add_uint(subtree, + hf_gsm_sms_udh_multiple_messages_msg_id, + tvb, i-3, 1, sm_id); + proto_tree_add_uint(subtree, + hf_gsm_sms_udh_multiple_messages_msg_parts, + tvb, i-2, 1, frags); + proto_tree_add_uint(subtree, + hf_gsm_sms_udh_multiple_messages_msg_part, + tvb, i-1, 1, frag); + } else { + proto_item_append_text(subtree, " - Invalid format!"); + i += len; + } + break; + + case 0x08: /* Multiple messages - 16-bit message ID */ + if (len == 4) { + sm_id = tvb_get_ntohs(tvb, i); i += 2; + frags = tvb_get_guint8(tvb, i++); + frag = tvb_get_guint8(tvb, i++); + if (frags > 1) + is_fragmented = TRUE; + proto_item_append_text(subtree, + ": message %u, part %u of %u", sm_id, frag, frags); + subtree = proto_item_add_subtree(subtree, + ett_udh_ie); + proto_tree_add_uint(subtree, + hf_gsm_sms_udh_multiple_messages_msg_id, + tvb, i-4, 2, sm_id); + proto_tree_add_uint(subtree, + hf_gsm_sms_udh_multiple_messages_msg_parts, + tvb, i-2, 1, frags); + proto_tree_add_uint(subtree, + hf_gsm_sms_udh_multiple_messages_msg_part, + tvb, i-1, 1, frag); + } else { + proto_item_append_text(subtree, " - Invalid format!"); + i += len; + } + break; + + case 0x04: /* Port Number UDH - 8-bit address */ + if (len == 2) { /* Port fields */ + p_dst = tvb_get_guint8(tvb, i++); + p_src = tvb_get_guint8(tvb, i++); + proto_item_append_text(subtree, + ": source port %u, destination port %u", + p_src, p_dst); + subtree = proto_item_add_subtree(subtree, ett_udh_ie); + proto_tree_add_uint(subtree, hf_gsm_sms_udh_ports_dst, + tvb, i-2, 1, p_dst); + proto_tree_add_uint(subtree, hf_gsm_sms_udh_ports_src, + tvb, i-1, 1, p_src); + ports_available = TRUE; + } else { + proto_item_append_text(subtree, " - Invalid format!"); + i += len; + } + break; + + case 0x05: /* Port Number UDH - 16-bit address */ + if (len == 4) { /* Port fields */ + p_dst = tvb_get_ntohs(tvb, i); i += 2; + p_src = tvb_get_ntohs(tvb, i); i += 2; + proto_item_append_text(subtree, + ": source port %u, destination port %u", + p_src, p_dst); + subtree = proto_item_add_subtree(subtree, ett_udh_ie); + proto_tree_add_uint(subtree, hf_gsm_sms_udh_ports_dst, + tvb, i-4, 2, p_dst); + proto_tree_add_uint(subtree, hf_gsm_sms_udh_ports_src, + tvb, i-2, 2, p_src); + ports_available = TRUE; + } else { + proto_item_append_text(subtree, " - Invalid format!"); + i += len; + } + break; + + default: + i += len; + break; + } + } + if (tvb_reported_length_remaining(tvb, i) <= 0) + return; /* No more data */ + + /* + * XXX - where does the "1" come from? If it weren't there, + * "sm_data_len" would, I think, be the same as + * "tvb_reported_length_remaining(tvb, i)". + * + * I think that the above check ensures that "sm_len" won't + * be less than or equal to "udh_len", so it ensures that + * "sm_len" won't be less than "1 + udh_len", so we don't + * have to worry about "sm_data_len" being negative. + */ + sm_data_len = sm_len - (1 + udh_len); + if (sm_data_len == 0) + return; /* no more data */ + + /* + * Try reassembling the packets. + * XXX - fragment numbers are 1-origin, but the fragment number + * field could be 0. + * Should we flag a fragmented message with a fragment number field + * of 0? + * What if the fragment count is 0? Should we flag that as well? + */ + if (is_fragmented && frag != 0 && frags != 0 && + tvb_bytes_exist(tvb, i, sm_data_len)) { + try_gsm_sms_ud_reassemble = TRUE; + save_fragmented = pinfo->fragmented; + pinfo->fragmented = TRUE; + fd_sm = fragment_add_seq_check(tvb, i, pinfo, + sm_id, /* guint32 ID for fragments belonging together */ + sm_fragment_table, /* list of message fragments */ + sm_reassembled_table, /* list of reassembled messages */ + frag-1, /* guint32 fragment sequence number */ + sm_data_len, /* guint32 fragment length */ + (frag != frags)); /* More fragments? */ + if (fd_sm) { + reassembled = TRUE; + reassembled_in = fd_sm->reassembled_in; + } + sm_tvb = process_reassembled_data(tvb, i, pinfo, + "Reassembled Short Message", fd_sm, &sm_frag_items, + NULL, sm_tree); + if (reassembled) { /* Reassembled */ + col_append_str(pinfo->cinfo, COL_INFO, + " (Short Message Reassembled)"); + } else { + /* Not last packet of reassembled Short Message */ + col_append_fstr(pinfo->cinfo, COL_INFO, + " (Short Message fragment %u of %u)", frag, frags); + } + } /* Else: not fragmented */ + + if (! sm_tvb) /* One single Short Message, or not reassembled */ + sm_tvb = tvb_new_subset_remaining(tvb, i); + /* Try calling a subdissector */ + if (sm_tvb) { + if ((reassembled && pinfo->fd->num == reassembled_in) + || frag==0 || (frag==1 && try_dissect_1st_frag)) { + /* Try calling a subdissector only if: + * - the Short Message is reassembled in this very packet, + * - the Short Message consists of only one "fragment", + * - the preference "Always Try Dissection for 1st SM fragment" + * is switched on, and this is the SM's 1st fragment. */ + if (ports_available) { + gboolean disallow_write = FALSE; /* TRUE if we changed writability + of the columns of the summary */ + if (prevent_subdissectors_changing_columns && col_get_writable(pinfo->cinfo)) { + disallow_write = TRUE; + col_set_writable(pinfo->cinfo, FALSE); + } + + if (port_number_udh_means_wsp) { + call_dissector(wsp_handle, sm_tvb, pinfo, top_tree); + } else { + if (! dissector_try_uint(gsm_sms_dissector_table, p_src, + sm_tvb, pinfo, top_tree)) { + if (! dissector_try_uint(gsm_sms_dissector_table, p_dst, + sm_tvb, pinfo, top_tree)) { + if (sm_tree) { /* Only display if needed */ + proto_tree_add_text(sm_tree, sm_tvb, 0, -1, + "Short Message body"); + } + } + } + } + + if (disallow_write) + col_set_writable(pinfo->cinfo, TRUE); + } else { /* No ports IE */ + proto_tree_add_text(sm_tree, sm_tvb, 0, -1, + "Short Message body"); + } + } else { + /* The packet is not reassembled, + * or it is reassembled in another packet */ + proto_tree_add_text(sm_tree, sm_tvb, 0, -1, + "Unreassembled Short Message fragment %u of %u", + frag, frags); + } + } + + if (try_gsm_sms_ud_reassemble) /* Clean up defragmentation */ + pinfo->fragmented = save_fragmented; + return; } static void dissect_gsm_sms_ud(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) { - proto_item *ti; - proto_tree *subtree; - ti = proto_tree_add_item(tree, proto_gsm_sms_ud, tvb, 0, -1, ENC_NA); - subtree = proto_item_add_subtree(ti, ett_gsm_sms); - parse_gsm_sms_ud_message(subtree, tvb, pinfo, tree); + proto_item *ti; + proto_tree *subtree; + + ti = proto_tree_add_item(tree, proto_gsm_sms_ud, tvb, 0, -1, ENC_NA); + subtree = proto_item_add_subtree(ti, ett_gsm_sms); + parse_gsm_sms_ud_message(subtree, tvb, pinfo, tree); } /* Register the protocol with Wireshark */ void proto_register_gsm_sms_ud(void) { - module_t *gsm_sms_ud_module; /* Preferences for GSM SMS UD */ + module_t *gsm_sms_ud_module; /* Preferences for GSM SMS UD */ - /* Setup list of header fields */ + /* Setup list of header fields */ static hf_register_info hf[] = { - /* - * User Data Header - */ - { &hf_gsm_sms_udh_iei, - { "IE Id", "gsm-sms-ud.udh.iei", - FT_UINT8, BASE_HEX, VALS(vals_udh_iei), 0x00, - "Name of the User Data Header Information Element.", - HFILL - } - }, - { &hf_gsm_sms_udh_length, - { "UDH Length", "gsm-sms-ud.udh.len", - FT_UINT8, BASE_DEC, NULL, 0x00, - "Length of the User Data Header (bytes)", - HFILL - } - }, - { &hf_gsm_sms_udh_multiple_messages, - { "Multiple messages UDH", "gsm-sms-ud.udh.mm", - FT_NONE, BASE_NONE, NULL, 0x00, - "Multiple messages User Data Header", - HFILL - } - }, - { &hf_gsm_sms_udh_multiple_messages_msg_id, - { "Message identifier", "gsm-sms-ud.udh.mm.msg_id", - FT_UINT16, BASE_DEC, NULL, 0x00, - "Identification of the message", - HFILL - } - }, - { &hf_gsm_sms_udh_multiple_messages_msg_parts, - { "Message parts", "gsm-sms-ud.udh.mm.msg_parts", - FT_UINT8, BASE_DEC, NULL, 0x00, - "Total number of message parts (fragments)", - HFILL - } - }, - { &hf_gsm_sms_udh_multiple_messages_msg_part, - { "Message part number", "gsm-sms-ud.udh.mm.msg_part", - FT_UINT8, BASE_DEC, NULL, 0x00, - "Message part (fragment) sequence number", - HFILL - } - }, - { &hf_gsm_sms_udh_ports, - { "Port number UDH", "gsm-sms-ud.udh.ports", - FT_NONE, BASE_NONE, NULL, 0x00, - "Port number User Data Header", - HFILL - } - }, - { &hf_gsm_sms_udh_ports_src, - { "Source port", "gsm-sms-ud.udh.ports.src", - FT_UINT8, BASE_DEC, NULL, 0x00, - NULL, - HFILL - } - }, - { &hf_gsm_sms_udh_ports_dst, - { "Destination port", "gsm-sms-ud.udh.ports.dst", - FT_UINT8, BASE_DEC, NULL, 0x00, - NULL, - HFILL - } - }, - /* - * Short Message fragment reassembly - */ - { &hf_gsm_sms_ud_fragments, - { "Short Message fragments", "gsm-sms-ud.fragments", - FT_NONE, BASE_NONE, NULL, 0x00, - "GSM Short Message fragments", - HFILL - } - }, - { &hf_gsm_sms_ud_fragment, - { "Short Message fragment", "gsm-sms-ud.fragment", - FT_FRAMENUM, BASE_NONE, NULL, 0x00, - "GSM Short Message fragment", - HFILL - } - }, - { &hf_gsm_sms_ud_fragment_overlap, - { "Short Message fragment overlap", "gsm-sms-ud.fragment.overlap", - FT_BOOLEAN, BASE_NONE, NULL, 0x0, - "GSM Short Message fragment overlaps with other fragment(s)", - HFILL - } - }, - { &hf_gsm_sms_ud_fragment_overlap_conflicts, - { "Short Message fragment overlapping with conflicting data", - "gsm-sms-ud.fragment.overlap.conflicts", - FT_BOOLEAN, BASE_NONE, NULL, 0x0, - "GSM Short Message fragment overlaps with conflicting data", - HFILL - } - }, - { &hf_gsm_sms_ud_fragment_multiple_tails, - { "Short Message has multiple tail fragments", - "gsm-sms-ud.fragment.multiple_tails", - FT_BOOLEAN, BASE_NONE, NULL, 0x0, - "GSM Short Message fragment has multiple tail fragments", - HFILL - } - }, - { &hf_gsm_sms_ud_fragment_too_long_fragment, - { "Short Message fragment too long", - "gsm-sms-ud.fragment.too_long_fragment", - FT_BOOLEAN, BASE_NONE, NULL, 0x0, - "GSM Short Message fragment data goes beyond the packet end", - HFILL - } - }, - { &hf_gsm_sms_ud_fragment_error, - { "Short Message defragmentation error", "gsm-sms-ud.fragment.error", - FT_FRAMENUM, BASE_NONE, NULL, 0x00, - "GSM Short Message defragmentation error due to illegal fragments", - HFILL - } - }, - { &hf_gsm_sms_ud_fragment_count, - { "Short Message fragment count", "gsm-sms-ud.fragment.count", - FT_UINT32, BASE_DEC, NULL, 0x00, - NULL, HFILL - } - }, - { &hf_gsm_sms_ud_reassembled_in, - { "Reassembled in", - "gsm-sms-ud.reassembled.in", - FT_FRAMENUM, BASE_NONE, NULL, 0x00, - "GSM Short Message has been reassembled in this packet.", HFILL - } - }, - { &hf_gsm_sms_ud_reassembled_length, - { "Reassembled Short Message length", - "gsm-sms-ud.reassembled.length", - FT_UINT32, BASE_DEC, NULL, 0x00, - "The total length of the reassembled payload", HFILL - } - }, - }; + /* + * User Data Header + */ + { &hf_gsm_sms_udh_iei, + { "IE Id", "gsm-sms-ud.udh.iei", + FT_UINT8, BASE_HEX, VALS(vals_udh_iei), 0x00, + "Name of the User Data Header Information Element.", + HFILL + } + }, + { &hf_gsm_sms_udh_length, + { "UDH Length", "gsm-sms-ud.udh.len", + FT_UINT8, BASE_DEC, NULL, 0x00, + "Length of the User Data Header (bytes)", + HFILL + } + }, + { &hf_gsm_sms_udh_multiple_messages, + { "Multiple messages UDH", "gsm-sms-ud.udh.mm", + FT_NONE, BASE_NONE, NULL, 0x00, + "Multiple messages User Data Header", + HFILL + } + }, + { &hf_gsm_sms_udh_multiple_messages_msg_id, + { "Message identifier", "gsm-sms-ud.udh.mm.msg_id", + FT_UINT16, BASE_DEC, NULL, 0x00, + "Identification of the message", + HFILL + } + }, + { &hf_gsm_sms_udh_multiple_messages_msg_parts, + { "Message parts", "gsm-sms-ud.udh.mm.msg_parts", + FT_UINT8, BASE_DEC, NULL, 0x00, + "Total number of message parts (fragments)", + HFILL + } + }, + { &hf_gsm_sms_udh_multiple_messages_msg_part, + { "Message part number", "gsm-sms-ud.udh.mm.msg_part", + FT_UINT8, BASE_DEC, NULL, 0x00, + "Message part (fragment) sequence number", + HFILL + } + }, + { &hf_gsm_sms_udh_ports, + { "Port number UDH", "gsm-sms-ud.udh.ports", + FT_NONE, BASE_NONE, NULL, 0x00, + "Port number User Data Header", + HFILL + } + }, + { &hf_gsm_sms_udh_ports_src, + { "Source port", "gsm-sms-ud.udh.ports.src", + FT_UINT8, BASE_DEC, NULL, 0x00, + NULL, + HFILL + } + }, + { &hf_gsm_sms_udh_ports_dst, + { "Destination port", "gsm-sms-ud.udh.ports.dst", + FT_UINT8, BASE_DEC, NULL, 0x00, + NULL, + HFILL + } + }, + /* + * Short Message fragment reassembly + */ + { &hf_gsm_sms_ud_fragments, + { "Short Message fragments", "gsm-sms-ud.fragments", + FT_NONE, BASE_NONE, NULL, 0x00, + "GSM Short Message fragments", + HFILL + } + }, + { &hf_gsm_sms_ud_fragment, + { "Short Message fragment", "gsm-sms-ud.fragment", + FT_FRAMENUM, BASE_NONE, NULL, 0x00, + "GSM Short Message fragment", + HFILL + } + }, + { &hf_gsm_sms_ud_fragment_overlap, + { "Short Message fragment overlap", "gsm-sms-ud.fragment.overlap", + FT_BOOLEAN, BASE_NONE, NULL, 0x0, + "GSM Short Message fragment overlaps with other fragment(s)", + HFILL + } + }, + { &hf_gsm_sms_ud_fragment_overlap_conflicts, + { "Short Message fragment overlapping with conflicting data", + "gsm-sms-ud.fragment.overlap.conflicts", + FT_BOOLEAN, BASE_NONE, NULL, 0x0, + "GSM Short Message fragment overlaps with conflicting data", + HFILL + } + }, + { &hf_gsm_sms_ud_fragment_multiple_tails, + { "Short Message has multiple tail fragments", + "gsm-sms-ud.fragment.multiple_tails", + FT_BOOLEAN, BASE_NONE, NULL, 0x0, + "GSM Short Message fragment has multiple tail fragments", + HFILL + } + }, + { &hf_gsm_sms_ud_fragment_too_long_fragment, + { "Short Message fragment too long", + "gsm-sms-ud.fragment.too_long_fragment", + FT_BOOLEAN, BASE_NONE, NULL, 0x0, + "GSM Short Message fragment data goes beyond the packet end", + HFILL + } + }, + { &hf_gsm_sms_ud_fragment_error, + { "Short Message defragmentation error", "gsm-sms-ud.fragment.error", + FT_FRAMENUM, BASE_NONE, NULL, 0x00, + "GSM Short Message defragmentation error due to illegal fragments", + HFILL + } + }, + { &hf_gsm_sms_ud_fragment_count, + { "Short Message fragment count", "gsm-sms-ud.fragment.count", + FT_UINT32, BASE_DEC, NULL, 0x00, + NULL, + HFILL + } + }, + { &hf_gsm_sms_ud_reassembled_in, + { "Reassembled in", + "gsm-sms-ud.reassembled.in", + FT_FRAMENUM, BASE_NONE, NULL, 0x00, + "GSM Short Message has been reassembled in this packet.", + HFILL + } + }, + { &hf_gsm_sms_ud_reassembled_length, + { "Reassembled Short Message length", + "gsm-sms-ud.reassembled.length", + FT_UINT32, BASE_DEC, NULL, 0x00, + "The total length of the reassembled payload", + HFILL + } + }, + }; static gint *ett[] = { - &ett_gsm_sms, - &ett_udh, - &ett_udh_ie, - &ett_gsm_sms_ud_fragment, - &ett_gsm_sms_ud_fragments, + &ett_gsm_sms, + &ett_udh, + &ett_udh_ie, + &ett_gsm_sms_ud_fragment, + &ett_gsm_sms_ud_fragments, }; /* Register the protocol name and description */ proto_gsm_sms_ud = proto_register_protocol( - "GSM Short Message Service User Data", /* Name */ - "GSM SMS UD", /* Short name */ - "gsm-sms-ud"); /* Filter name */ + "GSM Short Message Service User Data", /* Name */ + "GSM SMS UD", /* Short name */ + "gsm-sms-ud"); /* Filter name */ /* Required function calls to register header fields and subtrees used */ proto_register_field_array(proto_gsm_sms_ud, hf, array_length(hf)); @@ -608,39 +616,39 @@ proto_register_gsm_sms_ud(void) /* Subdissector code */ gsm_sms_dissector_table = register_dissector_table("gsm-sms-ud.udh.port", - "GSM SMS port IE in UDH", FT_UINT16, BASE_DEC); + "GSM SMS port IE in UDH", FT_UINT16, BASE_DEC); /* Preferences for GSM SMS UD */ - gsm_sms_ud_module = prefs_register_protocol (proto_gsm_sms_ud, NULL); - prefs_register_bool_preference (gsm_sms_ud_module, - "port_number_udh_means_wsp", - "Port Number IE in UDH always triggers CL-WSP dissection", - "Always decode a GSM Short Message as Connectionless WSP " - "if a Port Number Information Element is present " - "in the SMS User Data Header.", - &port_number_udh_means_wsp); - prefs_register_bool_preference (gsm_sms_ud_module, "try_dissect_1st_fragment", - "Always try subdissection of 1st Short Message fragment", - "Always try subdissection of the 1st fragment of a fragmented " - "GSM Short Message. If reassembly is possible, the Short Message " - "may be dissected twice (once as a short frame, once in its " - "entirety).", - &try_dissect_1st_frag); - prefs_register_bool_preference (gsm_sms_ud_module, "prevent_dissectors_chg_cols", - "Prevent sub-dissectors from changing column data", - "Prevent sub-dissectors from replacing column data with their " - "own. Eg. Prevent WSP dissector overwriting SMPP information.", - &prevent_subdissectors_changing_columns); + gsm_sms_ud_module = prefs_register_protocol(proto_gsm_sms_ud, NULL); + prefs_register_bool_preference(gsm_sms_ud_module, + "port_number_udh_means_wsp", + "Port Number IE in UDH always triggers CL-WSP dissection", + "Always decode a GSM Short Message as Connectionless WSP " + "if a Port Number Information Element is present " + "in the SMS User Data Header.", + &port_number_udh_means_wsp); + prefs_register_bool_preference(gsm_sms_ud_module, "try_dissect_1st_fragment", + "Always try subdissection of 1st Short Message fragment", + "Always try subdissection of the 1st fragment of a fragmented " + "GSM Short Message. If reassembly is possible, the Short Message " + "may be dissected twice (once as a short frame, once in its " + "entirety).", + &try_dissect_1st_frag); + prefs_register_bool_preference(gsm_sms_ud_module, "prevent_dissectors_chg_cols", + "Prevent sub-dissectors from changing column data", + "Prevent sub-dissectors from replacing column data with their " + "own. Eg. Prevent WSP dissector overwriting SMPP information.", + &prevent_subdissectors_changing_columns); register_dissector("gsm-sms-ud", dissect_gsm_sms_ud, proto_gsm_sms_ud); /* GSM SMS UD dissector initialization routines */ - register_init_routine (gsm_sms_ud_defragment_init); + register_init_routine(gsm_sms_ud_defragment_init); } void proto_reg_handoff_gsm_sms_ud(void) { - wsp_handle = find_dissector("wsp-cl"); - DISSECTOR_ASSERT(wsp_handle); + wsp_handle = find_dissector("wsp-cl"); + DISSECTOR_ASSERT(wsp_handle); } diff --git a/epan/dissectors/packet-gvrp.c b/epan/dissectors/packet-gvrp.c index c2b0495f09..a61e9316e5 100644 --- a/epan/dissectors/packet-gvrp.c +++ b/epan/dissectors/packet-gvrp.c @@ -27,8 +27,6 @@ # include "config.h" #endif -#include <stdlib.h> - #include <glib.h> #include <epan/packet.h> @@ -52,55 +50,58 @@ static gint ett_gvrp_attribute = -1;*/ static dissector_handle_t data_handle; /* Constant definitions */ -#define GARP_DEFAULT_PROTOCOL_ID 0x0001 -#define GARP_END_OF_MARK 0x00 +#define GARP_DEFAULT_PROTOCOL_ID 0x0001 +#define GARP_END_OF_MARK 0x00 -#define GVRP_ATTRIBUTE_TYPE 0x01 +#define GVRP_ATTRIBUTE_TYPE 0x01 static const value_string attribute_type_vals[] = { - { GVRP_ATTRIBUTE_TYPE, "VID" }, - { 0, NULL } + { GVRP_ATTRIBUTE_TYPE, "VID" }, + { 0, NULL } }; /* The length of GVRP LeaveAll attribute should be 2 octets (one for length * and the other for event) */ -#define GVRP_LENGTH_LEAVEALL (sizeof(guint8)+sizeof(guint8)) +#define GVRP_LENGTH_LEAVEALL (sizeof(guint8)+sizeof(guint8)) /* The length of GVRP attribute other than LeaveAll should be 4 octets (one * for length, one for event, and the last two for VID value). */ -#define GVRP_LENGTH_NON_LEAVEALL (sizeof(guint8)+sizeof(guint8)+sizeof(guint16)) +#define GVRP_LENGTH_NON_LEAVEALL (sizeof(guint8)+sizeof(guint8)+sizeof(guint16)) /* Packet offset definitions */ -#define GARP_PROTOCOL_ID 0 +#define GARP_PROTOCOL_ID 0 /* Event definitions */ -#define GVRP_EVENT_LEAVEALL 0 -#define GVRP_EVENT_JOINEMPTY 1 -#define GVRP_EVENT_JOININ 2 -#define GVRP_EVENT_LEAVEEMPTY 3 -#define GVRP_EVENT_LEAVEIN 4 -#define GVRP_EVENT_EMPTY 5 +#define GVRP_EVENT_LEAVEALL 0 +#define GVRP_EVENT_JOINEMPTY 1 +#define GVRP_EVENT_JOININ 2 +#define GVRP_EVENT_LEAVEEMPTY 3 +#define GVRP_EVENT_LEAVEIN 4 +#define GVRP_EVENT_EMPTY 5 static const value_string event_vals[] = { - { GVRP_EVENT_LEAVEALL, "Leave All" }, - { GVRP_EVENT_JOINEMPTY, "Join Empty" }, - { GVRP_EVENT_JOININ, "Join In" }, - { GVRP_EVENT_LEAVEEMPTY, "Leave Empty" }, - { GVRP_EVENT_LEAVEIN, "Leave In" }, - { GVRP_EVENT_EMPTY, "Empty" }, - { 0, NULL } + { GVRP_EVENT_LEAVEALL, "Leave All" }, + { GVRP_EVENT_JOINEMPTY, "Join Empty" }, + { GVRP_EVENT_JOININ, "Join In" }, + { GVRP_EVENT_LEAVEEMPTY, "Leave Empty" }, + { GVRP_EVENT_LEAVEIN, "Leave In" }, + { GVRP_EVENT_EMPTY, "Empty" }, + { 0, NULL } }; /* Code to actually dissect the packets */ static void dissect_gvrp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) { - proto_item *ti; - proto_tree *gvrp_tree; - guint16 protocol_id; - guint8 octet; - int msg_index, attr_index, offset = 0, length = tvb_reported_length(tvb); + proto_item *ti; + proto_tree *gvrp_tree; + guint16 protocol_id; + guint8 octet; + int msg_index; + int attr_index; + int offset = 0; + int length = tvb_reported_length(tvb); col_set_str(pinfo->cinfo, COL_PROTOCOL, "GVRP"); @@ -108,185 +109,185 @@ dissect_gvrp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) if (tree) { - ti = proto_tree_add_item(tree, proto_gvrp, tvb, 0, length, ENC_NA); - - gvrp_tree = proto_item_add_subtree(ti, ett_gvrp); - - /* Read in GARP protocol ID */ - protocol_id = tvb_get_ntohs(tvb, GARP_PROTOCOL_ID); - - proto_tree_add_uint_format(gvrp_tree, hf_gvrp_proto_id, tvb, - GARP_PROTOCOL_ID, sizeof(guint16), - protocol_id, - "Protocol Identifier: 0x%04x (%s)", - protocol_id, - protocol_id == GARP_DEFAULT_PROTOCOL_ID ? - "GARP VLAN Registration Protocol" : - "Unknown Protocol"); - - /* Currently only one protocol ID is supported */ - if (protocol_id != GARP_DEFAULT_PROTOCOL_ID) - { - proto_tree_add_text(gvrp_tree, tvb, GARP_PROTOCOL_ID, sizeof(guint16), - " (Warning: this version of Wireshark only knows about protocol id = 1)"); - call_dissector(data_handle, - tvb_new_subset(tvb, GARP_PROTOCOL_ID + sizeof(guint16), -1, -1), - pinfo, tree); - return; - } - - offset += sizeof(guint16); - length -= sizeof(guint16); - - msg_index = 0; - - /* Begin to parse GARP messages */ - while (length) - { - proto_item *msg_item; - int msg_start = offset; - - /* Read in attribute type. */ - octet = tvb_get_guint8(tvb, offset); - - /* Check for end of mark */ - if (octet == GARP_END_OF_MARK) - { - /* End of GARP PDU */ - if (msg_index) - { - proto_tree_add_text(gvrp_tree, tvb, offset, sizeof(guint8), - "End of mark"); - break; - } - else - { - call_dissector(data_handle, - tvb_new_subset_remaining(tvb, offset), pinfo, tree); - return; - } - } - - offset += sizeof(guint8); - length -= sizeof(guint8); - - msg_item = proto_tree_add_text(gvrp_tree, tvb, msg_start, -1, - "Message %d", msg_index + 1); - - proto_tree_add_uint(gvrp_tree, hf_gvrp_attribute_type, tvb, - msg_start, sizeof(guint8), octet); - - /* GVRP only supports one attribute type. */ - if (octet != GVRP_ATTRIBUTE_TYPE) - { - call_dissector(data_handle, tvb_new_subset_remaining(tvb, offset), - pinfo, tree); - return; - } - - attr_index = 0; - - while (length) - { - int attr_start = offset; - proto_item *attr_item; - - /* Read in attribute length. */ - octet = tvb_get_guint8(tvb, offset); - - /* Check for end of mark */ - if (octet == GARP_END_OF_MARK) - { - /* If at least one message has been already read, - * check for another end of mark. - */ - if (attr_index) - { - proto_tree_add_text(gvrp_tree, tvb, offset, - sizeof(guint8), " End of mark"); - - offset += sizeof(guint8); - length -= sizeof(guint8); - - proto_item_set_len(msg_item, offset - msg_start); - break; - } - else - { - call_dissector(data_handle, - tvb_new_subset_remaining(tvb, offset), pinfo, tree); - return; - } - } - else - { - guint8 event; - - offset += sizeof(guint8); - length -= sizeof(guint8); - - attr_item = proto_tree_add_text(gvrp_tree, tvb, - attr_start, -1, " Attribute %d", attr_index + 1); - - proto_tree_add_uint(gvrp_tree, hf_gvrp_attribute_length, - tvb, attr_start, sizeof(guint8), octet); - - /* Read in attribute event */ - event = tvb_get_guint8(tvb, offset); - - proto_tree_add_uint(gvrp_tree, hf_gvrp_attribute_event, - tvb, offset, sizeof(guint8), event); - - offset += sizeof(guint8); - length -= sizeof(guint8); - - switch (event) { - - case GVRP_EVENT_LEAVEALL: - if (octet != GVRP_LENGTH_LEAVEALL) - { - call_dissector(data_handle, - tvb_new_subset_remaining(tvb, offset), pinfo, - tree); - return; - } - break; - - case GVRP_EVENT_JOINEMPTY: - case GVRP_EVENT_JOININ: - case GVRP_EVENT_LEAVEEMPTY: - case GVRP_EVENT_LEAVEIN: - case GVRP_EVENT_EMPTY: - if (octet != GVRP_LENGTH_NON_LEAVEALL) - { - call_dissector(data_handle, - tvb_new_subset_remaining(tvb, offset),pinfo, - tree); - return; - } - - /* Show attribute value */ - proto_tree_add_item(gvrp_tree, hf_gvrp_attribute_value, - tvb, offset, sizeof(guint16), ENC_BIG_ENDIAN); - - offset += sizeof(guint16); - length -= sizeof(guint16); - break; - - default: - call_dissector(data_handle, - tvb_new_subset_remaining(tvb, offset), pinfo, tree); - return; - } - } - - proto_item_set_len(attr_item, offset - attr_start); - - attr_index++; - } - - msg_index++; - } + ti = proto_tree_add_item(tree, proto_gvrp, tvb, 0, length, ENC_NA); + + gvrp_tree = proto_item_add_subtree(ti, ett_gvrp); + + /* Read in GARP protocol ID */ + protocol_id = tvb_get_ntohs(tvb, GARP_PROTOCOL_ID); + + proto_tree_add_uint_format(gvrp_tree, hf_gvrp_proto_id, tvb, + GARP_PROTOCOL_ID, sizeof(guint16), + protocol_id, + "Protocol Identifier: 0x%04x (%s)", + protocol_id, + protocol_id == GARP_DEFAULT_PROTOCOL_ID ? + "GARP VLAN Registration Protocol" : + "Unknown Protocol"); + + /* Currently only one protocol ID is supported */ + if (protocol_id != GARP_DEFAULT_PROTOCOL_ID) + { + proto_tree_add_text(gvrp_tree, tvb, GARP_PROTOCOL_ID, sizeof(guint16), + " (Warning: this version of Wireshark only knows about protocol id = 1)"); + call_dissector(data_handle, + tvb_new_subset(tvb, GARP_PROTOCOL_ID + sizeof(guint16), -1, -1), + pinfo, tree); + return; + } + + offset += sizeof(guint16); + length -= sizeof(guint16); + + msg_index = 0; + + /* Begin to parse GARP messages */ + while (length) + { + proto_item *msg_item; + int msg_start = offset; + + /* Read in attribute type. */ + octet = tvb_get_guint8(tvb, offset); + + /* Check for end of mark */ + if (octet == GARP_END_OF_MARK) + { + /* End of GARP PDU */ + if (msg_index) + { + proto_tree_add_text(gvrp_tree, tvb, offset, sizeof(guint8), + "End of mark"); + break; + } + else + { + call_dissector(data_handle, + tvb_new_subset_remaining(tvb, offset), pinfo, tree); + return; + } + } + + offset += sizeof(guint8); + length -= sizeof(guint8); + + msg_item = proto_tree_add_text(gvrp_tree, tvb, msg_start, -1, + "Message %d", msg_index + 1); + + proto_tree_add_uint(gvrp_tree, hf_gvrp_attribute_type, tvb, + msg_start, sizeof(guint8), octet); + + /* GVRP only supports one attribute type. */ + if (octet != GVRP_ATTRIBUTE_TYPE) + { + call_dissector(data_handle, tvb_new_subset_remaining(tvb, offset), + pinfo, tree); + return; + } + + attr_index = 0; + + while (length) + { + int attr_start = offset; + proto_item *attr_item; + + /* Read in attribute length. */ + octet = tvb_get_guint8(tvb, offset); + + /* Check for end of mark */ + if (octet == GARP_END_OF_MARK) + { + /* If at least one message has been already read, + * check for another end of mark. + */ + if (attr_index) + { + proto_tree_add_text(gvrp_tree, tvb, offset, + sizeof(guint8), " End of mark"); + + offset += sizeof(guint8); + length -= sizeof(guint8); + + proto_item_set_len(msg_item, offset - msg_start); + break; + } + else + { + call_dissector(data_handle, + tvb_new_subset_remaining(tvb, offset), pinfo, tree); + return; + } + } + else + { + guint8 event; + + offset += sizeof(guint8); + length -= sizeof(guint8); + + attr_item = proto_tree_add_text(gvrp_tree, tvb, + attr_start, -1, " Attribute %d", attr_index + 1); + + proto_tree_add_uint(gvrp_tree, hf_gvrp_attribute_length, + tvb, attr_start, sizeof(guint8), octet); + + /* Read in attribute event */ + event = tvb_get_guint8(tvb, offset); + + proto_tree_add_uint(gvrp_tree, hf_gvrp_attribute_event, + tvb, offset, sizeof(guint8), event); + + offset += sizeof(guint8); + length -= sizeof(guint8); + + switch (event) { + + case GVRP_EVENT_LEAVEALL: + if (octet != GVRP_LENGTH_LEAVEALL) + { + call_dissector(data_handle, + tvb_new_subset_remaining(tvb, offset), pinfo, + tree); + return; + } + break; + + case GVRP_EVENT_JOINEMPTY: + case GVRP_EVENT_JOININ: + case GVRP_EVENT_LEAVEEMPTY: + case GVRP_EVENT_LEAVEIN: + case GVRP_EVENT_EMPTY: + if (octet != GVRP_LENGTH_NON_LEAVEALL) + { + call_dissector(data_handle, + tvb_new_subset_remaining(tvb, offset),pinfo, + tree); + return; + } + + /* Show attribute value */ + proto_tree_add_item(gvrp_tree, hf_gvrp_attribute_value, + tvb, offset, sizeof(guint16), ENC_BIG_ENDIAN); + + offset += sizeof(guint16); + length -= sizeof(guint16); + break; + + default: + call_dissector(data_handle, + tvb_new_subset_remaining(tvb, offset), pinfo, tree); + return; + } + } + + proto_item_set_len(attr_item, offset - attr_start); + + attr_index++; + } + + msg_index++; + } } } @@ -296,40 +297,40 @@ void proto_register_gvrp(void) { static hf_register_info hf[] = { - { &hf_gvrp_proto_id, - { "Protocol ID", "gvrp.protocol_id", - FT_UINT16, BASE_HEX, NULL, 0x0, - NULL, HFILL } - }, - { &hf_gvrp_attribute_type, - { "Type", "gvrp.attribute_type", - FT_UINT8, BASE_HEX, VALS(attribute_type_vals), 0x0, - NULL, HFILL } - }, - { &hf_gvrp_attribute_length, - { "Length", "gvrp.attribute_length", - FT_UINT8, BASE_DEC, NULL, 0x0, - NULL, HFILL } - }, - { &hf_gvrp_attribute_event, - { "Event", "gvrp.attribute_event", - FT_UINT8, BASE_DEC, VALS(event_vals), 0x0, - NULL, HFILL } - }, - { &hf_gvrp_attribute_value, - { "Value", "gvrp.attribute_value", - FT_UINT16, BASE_DEC, NULL, 0x0, - NULL, HFILL } - } + { &hf_gvrp_proto_id, + { "Protocol ID", "gvrp.protocol_id", + FT_UINT16, BASE_HEX, NULL, 0x0, + NULL, HFILL } + }, + { &hf_gvrp_attribute_type, + { "Type", "gvrp.attribute_type", + FT_UINT8, BASE_HEX, VALS(attribute_type_vals), 0x0, + NULL, HFILL } + }, + { &hf_gvrp_attribute_length, + { "Length", "gvrp.attribute_length", + FT_UINT8, BASE_DEC, NULL, 0x0, + NULL, HFILL } + }, + { &hf_gvrp_attribute_event, + { "Event", "gvrp.attribute_event", + FT_UINT8, BASE_DEC, VALS(event_vals), 0x0, + NULL, HFILL } + }, + { &hf_gvrp_attribute_value, + { "Value", "gvrp.attribute_value", + FT_UINT16, BASE_DEC, NULL, 0x0, + NULL, HFILL } + } }; static gint *ett[] = { - &ett_gvrp + &ett_gvrp }; /* Register the protocol name and description for GVRP */ proto_gvrp = proto_register_protocol("GARP VLAN Registration Protocol", - "GVRP", "gvrp"); + "GVRP", "gvrp"); /* Required function calls to register the header fields and subtrees * used by GVRP */ @@ -341,5 +342,5 @@ proto_register_gvrp(void) void proto_reg_handoff_gvrp(void){ - data_handle = find_dissector("data"); + data_handle = find_dissector("data"); } diff --git a/epan/dissectors/packet-pdcp-lte.c b/epan/dissectors/packet-pdcp-lte.c index 48c41d9dbf..7f9d9ba167 100644 --- a/epan/dissectors/packet-pdcp-lte.c +++ b/epan/dissectors/packet-pdcp-lte.c @@ -237,23 +237,23 @@ static const value_string rohc_mode_vals[] = { /* Values taken from: http://www.iana.org/assignments/rohc-pro-ids/rohc-pro-ids.txt */ static const value_string rohc_profile_vals[] = { - { 0x0000, "ROHC uncompressed" }, /* [RFC5795] */ - { 0x0001, "ROHC RTP" }, /* [RFC3095] */ - { 0x0101, "ROHCv2 RTP" }, /* [RFC5225] */ - { 0x0002, "ROHC UDP" }, /* [RFC3095] */ - { 0x0102, "ROHCv2 UDP" }, /* [RFC5225] */ - { 0x0003, "ROHC ESP" }, /* [RFC3095] */ - { 0x0103, "ROHCv2 ESP" }, /* [RFC5225] */ - { 0x0004, "ROHC IP" }, /* [RFC3843] */ - { 0x0104, "ROHCv2 IP" }, /* [RFC5225] */ - { 0x0005, "ROHC LLA" }, /* [RFC4362] */ - { 0x0105, "ROHC LLA with R-mode" }, /* [RFC3408] */ - { 0x0006, "ROHC TCP" }, /* [RFC4996] */ - { 0x0007, "ROHC RTP/UDP-Lite" }, /* [RFC4019] */ - { 0x0107, "ROHCv2 RTP/UDP-Lite" }, /* [RFC5225] */ - { 0x0008, "ROHC UDP-Lite" }, /* [RFC4019] */ - { 0x0108, "ROHCv2 UDP-Lite" }, /* [RFC5225] */ - { 0, NULL } + { 0x0000, "ROHC uncompressed" }, /* [RFC5795] */ + { 0x0001, "ROHC RTP" }, /* [RFC3095] */ + { 0x0101, "ROHCv2 RTP" }, /* [RFC5225] */ + { 0x0002, "ROHC UDP" }, /* [RFC3095] */ + { 0x0102, "ROHCv2 UDP" }, /* [RFC5225] */ + { 0x0003, "ROHC ESP" }, /* [RFC3095] */ + { 0x0103, "ROHCv2 ESP" }, /* [RFC5225] */ + { 0x0004, "ROHC IP" }, /* [RFC3843] */ + { 0x0104, "ROHCv2 IP" }, /* [RFC5225] */ + { 0x0005, "ROHC LLA" }, /* [RFC4362] */ + { 0x0105, "ROHC LLA with R-mode" }, /* [RFC3408] */ + { 0x0006, "ROHC TCP" }, /* [RFC4996] */ + { 0x0007, "ROHC RTP/UDP-Lite" }, /* [RFC4019] */ + { 0x0107, "ROHCv2 RTP/UDP-Lite" }, /* [RFC5225] */ + { 0x0008, "ROHC UDP-Lite" }, /* [RFC4019] */ + { 0x0108, "ROHCv2 UDP-Lite" }, /* [RFC5225] */ + { 0, NULL } }; static const value_string pdu_type_vals[] = { @@ -402,8 +402,8 @@ static gpointer get_report_hash_key(guint16 SN, guint32 frameNumber, pdcp_lte_info *p_pdcp_lte_info, gboolean do_persist) { - static pdcp_result_hash_key key; - pdcp_result_hash_key *p_key; + static pdcp_result_hash_key key; + pdcp_result_hash_key *p_key; /* Only allocate a struct when will be adding entry */ if (do_persist) { @@ -428,13 +428,13 @@ static gpointer get_report_hash_key(guint16 SN, guint32 frameNumber, /* Info to attach to frame when first read, recording what to show about sequence */ typedef struct { - gboolean sequenceExpectedCorrect; - guint16 sequenceExpected; - guint32 previousFrameNum; - guint32 nextFrameNum; + gboolean sequenceExpectedCorrect; + guint16 sequenceExpected; + guint32 previousFrameNum; + guint32 nextFrameNum; - guint16 firstSN; - guint16 lastSN; + guint16 firstSN; + guint16 lastSN; enum { SN_OK, SN_Repeated, SN_MAC_Retx, SN_Retx, SN_Missing} state; } pdcp_sequence_report_in_frame; @@ -563,12 +563,12 @@ static void checkChannelSequenceInfo(packet_info *pinfo, tvbuff_t *tvb, proto_tree *tree) { pdcp_channel_hash_key channel_key; - pdcp_channel_hash_key *p_channel_key; - pdcp_channel_status *p_channel_status; - pdcp_sequence_report_in_frame *p_report_in_frame = NULL; - gboolean createdChannel = FALSE; - guint16 expectedSequenceNumber = 0; - guint16 snLimit = 0; + pdcp_channel_hash_key *p_channel_key; + pdcp_channel_status *p_channel_status; + pdcp_sequence_report_in_frame *p_report_in_frame = NULL; + gboolean createdChannel = FALSE; + guint16 expectedSequenceNumber = 0; + guint16 snLimit = 0; /* If find stat_report_in_frame already, use that and get out */ if (pinfo->fd->flags.visited) { @@ -768,9 +768,9 @@ static int dissect_pdcp_dynamic_chain(proto_tree *tree, if (p_pdcp_info->rohc_ip_version == 4) { proto_tree *dynamic_ipv4_tree; proto_item *root_ti; - int tree_start_offset = offset; - guint8 tos, ttl, rnd, nbo; - guint16 id; + int tree_start_offset = offset; + guint8 tos, ttl, rnd, nbo; + guint16 id; /* Create dynamic IPv4 subtree */ root_ti = proto_tree_add_item(tree, hf_pdcp_lte_rohc_dynamic_ipv4, tvb, offset, -1, ENC_NA); @@ -975,8 +975,8 @@ static int dissect_pdcp_ir_packet(proto_tree *tree, struct pdcp_lte_info *p_pdcp_info, packet_info *pinfo) { - unsigned char dynamic_chain_present; - rohc_info *p_rohc_info; + unsigned char dynamic_chain_present; + rohc_info *p_rohc_info; col_append_str(pinfo->cinfo, COL_INFO, " IR"); proto_item_append_text(root_item, " (IR)"); @@ -1135,12 +1135,12 @@ static int dissect_pdcp_feedback_feedback2(proto_tree *tree, packet_info *pinfo) { proto_item *ti; - guint8 ack_type; - guint8 mode; - guint8 first_octet; - guint16 sn; - const char * full_mode_name; - int size_remaining; + guint8 ack_type; + guint8 mode; + guint8 first_octet; + guint16 sn; + const char *full_mode_name; + int size_remaining; proto_item_append_text(item, " (type 2)"); @@ -1250,8 +1250,8 @@ static int dissect_pdcp_feedback_packet(proto_tree *tree, struct pdcp_lte_info *p_pdcp_info, packet_info *pinfo) { - guint8 code; - guint8 size; + guint8 code; + guint8 size; proto_item *ti; proto_item *feedback_ti; proto_tree *feedback_tree; @@ -1863,12 +1863,12 @@ static gboolean global_pdcp_lte_heur = FALSE; static gboolean dissect_pdcp_lte_heur(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) { - gint offset = 0; + gint offset = 0; struct pdcp_lte_info *p_pdcp_lte_info; tvbuff_t *pdcp_tvb; - guint8 tag = 0; - gboolean infoAlreadySet = FALSE; - gboolean seqnumLengthTagPresent = FALSE; + guint8 tag = 0; + gboolean infoAlreadySet = FALSE; + gboolean seqnumLengthTagPresent = FALSE; /* This is a heuristic dissector, which means we get all the UDP * traffic not sent to a known dissector and not claimed by @@ -1999,20 +1999,20 @@ static gboolean dissect_pdcp_lte_heur(tvbuff_t *tvb, packet_info *pinfo, /* Main dissection function. */ static void dissect_pdcp_lte(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) { - const char *mode; - proto_tree *pdcp_tree = NULL; - proto_item *root_ti = NULL; - gint offset = 0; - gint rohc_offset; - struct pdcp_lte_info *p_pdcp_info; - rohc_info *p_rohc_info = NULL; - tvbuff_t *rohc_tvb = NULL; + const char *mode; + proto_tree *pdcp_tree = NULL; + proto_item *root_ti = NULL; + gint offset = 0; + gint rohc_offset; + struct pdcp_lte_info *p_pdcp_info; + rohc_info *p_rohc_info = NULL; + tvbuff_t *rohc_tvb = NULL; #if 0 - proto_tree *rohc_tree = NULL;*/ - proto_item *rohc_ti = NULL; - guint8 base_header_byte; - gboolean udp_checksum_needed = TRUE; - gboolean ip_id_needed = TRUE; + proto_tree *rohc_tree = NULL; + proto_item *rohc_ti = NULL; + guint8 base_header_byte; + gboolean udp_checksum_needed = TRUE; + gboolean ip_id_needed = TRUE; #endif @@ -2269,7 +2269,7 @@ static void dissect_pdcp_lte(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree } break; } - + if (do_analysis) { checkChannelSequenceInfo(pinfo, tvb, p_pdcp_info, (guint16)seqnum, pdcp_tree); @@ -2590,8 +2590,7 @@ static void dissect_pdcp_lte(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree /* Initializes the hash tables each time a new * file is loaded or re-loaded in wireshark */ -static void -pdcp_lte_init_protocol(void) +static void pdcp_lte_init_protocol(void) { /* Destroy any existing hashes. */ if (pdcp_sequence_analysis_channel_hash) { @@ -3322,7 +3321,6 @@ void proto_register_pdcp(void) "Can show RLC, PDCP or Traffic layer info in Info column", &global_pdcp_lte_layer_to_show, show_info_col_vals, FALSE); - register_init_routine(&pdcp_lte_init_protocol); } @@ -3331,7 +3329,7 @@ void proto_reg_handoff_pdcp_lte(void) /* Add as a heuristic UDP dissector */ heur_dissector_add("udp", dissect_pdcp_lte_heur, proto_pdcp_lte); - ip_handle = find_dissector("ip"); + ip_handle = find_dissector("ip"); ipv6_handle = find_dissector("ipv6"); rohc_handle = find_dissector("rohc"); data_handle = find_dissector("data"); diff --git a/epan/dissectors/packet-skinny.c b/epan/dissectors/packet-skinny.c index 612df41411..2753abe206 100644 --- a/epan/dissectors/packet-skinny.c +++ b/epan/dissectors/packet-skinny.c @@ -93,8 +93,8 @@ static const value_string header_version[] = { * infrastructure for now * * typedef struct { - * guint32 id; - * char * name; + * guint32 id; + * char *name; * } message_id_t; */ @@ -242,7 +242,7 @@ static const value_string message_id[] = { {0x0152, "DialedPhoneBookAckMessage"}, {0x015A, "XMLAlarmMessage"}, - {0 , NULL} /* terminator */ + {0 , NULL} /* terminator */ }; static value_string_ext message_id_ext = VALUE_STRING_EXT_INIT(message_id); @@ -384,8 +384,8 @@ static const value_string mediaPayloads[] = { {10 , "G.728"}, {11 , "G.729"}, {12 , "G.729 Annex A"}, - {13 , "IS11172 AudioCap"}, /* IS11172 is an ISO MPEG standard */ - {14 , "IS13818 AudioCap"}, /* IS13818 is an ISO MPEG standard */ + {13 , "IS11172 AudioCap"}, /* IS11172 is an ISO MPEG standard */ + {14 , "IS13818 AudioCap"}, /* IS13818 is an ISO MPEG standard */ {15 , "G.729 Annex B"}, {16 , "G.729 Annex A+Annex B"}, {18 , "GSM Full Rate"}, @@ -966,7 +966,7 @@ static const value_string cast_callSecurityStatusTypes[] = { #define MAX_LEVEL_PREFERENCE 4 #define MaxAnnouncementList 32 #define StationMaxMonitorParties 16 /* Max Monitor Bridge whisper matrix parties, rm, M&R in Parche */ -#define StationMaxServiceURLSize 256 /* max number of service URLs length */ +#define StationMaxServiceURLSize 256 /* max number of service URLs length */ #define MAX_PICTURE_FORMAT 5 #define MAX_REFERENCE_PICTURE 4 @@ -1239,7 +1239,8 @@ static int pi_current = 0; static skinny_info_t *si; /* Get the length of a single SCCP PDU */ -static guint get_skinny_pdu_len(packet_info *pinfo _U_, tvbuff_t *tvb, int offset) +static guint +get_skinny_pdu_len(packet_info *pinfo _U_, tvbuff_t *tvb, int offset) { guint32 hdr_data_length; @@ -1258,10 +1259,10 @@ static guint get_skinny_pdu_len(packet_info *pinfo _U_, tvbuff_t *tvb, int offse static void dissect_skinny_xml(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, const gint start, gint length) { - proto_item *item = NULL; - proto_tree *subtree = NULL; - tvbuff_t *next_tvb; - dissector_handle_t handle; + proto_item *item = NULL; + proto_tree *subtree = NULL; + tvbuff_t *next_tvb; + dissector_handle_t handle; item = proto_tree_add_item(tree, hf_skinny_xmlData, tvb, start, length, ENC_ASCII|ENC_NA); subtree = proto_item_add_subtree(item, 0); @@ -1276,21 +1277,21 @@ dissect_skinny_xml(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, const gi static void dissect_skinny_pdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) { - int offset = 0; - gboolean is_video = FALSE; /* FIX ME: need to indicate video or not */ + int offset = 0; + gboolean is_video = FALSE; /* FIX ME: need to indicate video or not */ /* Header fields */ - guint32 hdr_data_length; - guint32 hdr_version; - guint32 data_messageid; + guint32 hdr_data_length; + guint32 hdr_version; + guint32 data_messageid; /* guint32 data_size; */ - guint i = 0; - guint t = 0; - int j = 0; - guint count; - int val; - guint32 ipversion; + guint i = 0; + guint t = 0; + int j = 0; + guint count; + int val; + guint32 ipversion; guint32 capCount; guint32 softKeyCount; @@ -1316,8 +1317,8 @@ dissect_skinny_pdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) pi_current++; if (pi_current == MAX_SKINNY_MESSAGES_IN_PACKET) { - /* Overwrite info in first struct if run out of space... */ - pi_current = 0; + /* Overwrite info in first struct if run out of space... */ + pi_current = 0; } si = &pi_arr[pi_current]; si->messId = data_messageid; @@ -1342,7 +1343,7 @@ dissect_skinny_pdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) if (check_col(pinfo->cinfo, COL_INFO)) { col_add_fstr(pinfo->cinfo, COL_INFO,"%s ", si->messageName); - col_set_fence(pinfo->cinfo, COL_INFO); + col_set_fence(pinfo->cinfo, COL_INFO); } if (tree) { @@ -1372,9 +1373,9 @@ dissect_skinny_pdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) proto_tree_add_item(skinny_tree, hf_skinny_stationKeypadButton, tvb, offset+12, 4, ENC_LITTLE_ENDIAN); if (hdr_data_length > 8) { proto_tree_add_item(skinny_tree, hf_skinny_lineInstance, tvb, offset+16, 4, ENC_LITTLE_ENDIAN); - proto_tree_add_item(skinny_tree, hf_skinny_callIdentifier, tvb, offset+20, 4, ENC_LITTLE_ENDIAN); - si->lineId = tvb_get_letohl(tvb, offset+16); - si->callId = tvb_get_letohl(tvb, offset+20); + proto_tree_add_item(skinny_tree, hf_skinny_callIdentifier, tvb, offset+20, 4, ENC_LITTLE_ENDIAN); + si->lineId = tvb_get_letohl(tvb, offset+16); + si->callId = tvb_get_letohl(tvb, offset+20); } break; @@ -1386,26 +1387,26 @@ dissect_skinny_pdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) proto_tree_add_item(skinny_tree, hf_skinny_stimulus, tvb, offset+12, 4, ENC_LITTLE_ENDIAN); proto_tree_add_item(skinny_tree, hf_skinny_stimulusInstance, tvb, offset+16, 4, ENC_LITTLE_ENDIAN); if (hdr_data_length > 12) { - proto_tree_add_item(skinny_tree, hf_skinny_callIdentifier, tvb, offset+20, 4, ENC_LITTLE_ENDIAN); - si->callId = tvb_get_letohl(tvb, offset+20); + proto_tree_add_item(skinny_tree, hf_skinny_callIdentifier, tvb, offset+20, 4, ENC_LITTLE_ENDIAN); + si->callId = tvb_get_letohl(tvb, offset+20); } break; case 0x0006: /* OffHookMessage */ if (hdr_data_length > 4) { - proto_tree_add_item(skinny_tree, hf_skinny_lineInstance, tvb, offset+12, 4, ENC_LITTLE_ENDIAN); - proto_tree_add_item(skinny_tree, hf_skinny_callIdentifier, tvb, offset+16, 4, ENC_LITTLE_ENDIAN); - si->lineId = tvb_get_letohl(tvb, offset+12); - si->callId = tvb_get_letohl(tvb, offset+16); + proto_tree_add_item(skinny_tree, hf_skinny_lineInstance, tvb, offset+12, 4, ENC_LITTLE_ENDIAN); + proto_tree_add_item(skinny_tree, hf_skinny_callIdentifier, tvb, offset+16, 4, ENC_LITTLE_ENDIAN); + si->lineId = tvb_get_letohl(tvb, offset+12); + si->callId = tvb_get_letohl(tvb, offset+16); } break; case 0x0007: /* OnHookMessage */ if (hdr_data_length > 4) { - proto_tree_add_item(skinny_tree, hf_skinny_lineInstance, tvb, offset+12, 4, ENC_LITTLE_ENDIAN); - proto_tree_add_item(skinny_tree, hf_skinny_callIdentifier, tvb, offset+16, 4, ENC_LITTLE_ENDIAN); - si->lineId = tvb_get_letohl(tvb, offset+12); - si->callId = tvb_get_letohl(tvb, offset+16); + proto_tree_add_item(skinny_tree, hf_skinny_lineInstance, tvb, offset+12, 4, ENC_LITTLE_ENDIAN); + proto_tree_add_item(skinny_tree, hf_skinny_callIdentifier, tvb, offset+16, 4, ENC_LITTLE_ENDIAN); + si->lineId = tvb_get_letohl(tvb, offset+12); + si->callId = tvb_get_letohl(tvb, offset+16); } break; @@ -1447,9 +1448,9 @@ dissect_skinny_pdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) capCount = tvb_get_letohl(tvb, offset+12); proto_tree_add_uint(skinny_tree, hf_skinny_capCount, tvb, offset+12, 4, capCount); for (i = 0; i < capCount; i++) { - proto_tree_add_item(skinny_tree, hf_skinny_payloadCapability, tvb, offset+(i*16)+16, 4, ENC_LITTLE_ENDIAN); - proto_tree_add_item(skinny_tree, hf_skinny_maxFramesPerPacket, tvb, offset+(i*16)+20, 2, ENC_LITTLE_ENDIAN); - /* FIXME -- decode the union under here as required, is always 0 on my equipment */ + proto_tree_add_item(skinny_tree, hf_skinny_payloadCapability, tvb, offset+(i*16)+16, 4, ENC_LITTLE_ENDIAN); + proto_tree_add_item(skinny_tree, hf_skinny_maxFramesPerPacket, tvb, offset+(i*16)+20, 2, ENC_LITTLE_ENDIAN); + /* FIXME -- decode the union under here as required, is always 0 on my equipment */ } break; @@ -1491,15 +1492,15 @@ dissect_skinny_pdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) si->passThruId = tvb_get_letohl(tvb, offset+24); } else if (hdr_version == CM7_MSG_TYPE_A || hdr_version == CM7_MSG_TYPE_B || hdr_version == CM7_MSG_TYPE_C) { proto_tree_add_item(skinny_tree, hf_skinny_ORCStatus, tvb, offset+12, 4, ENC_LITTLE_ENDIAN); - /*Assume the field of next 4 bytes is IP Version*/ - ipversion = tvb_get_ntohl(tvb, offset+16); - proto_tree_add_item(skinny_tree, hf_skinny_IPVersion, tvb, offset+16, 4, ENC_LITTLE_ENDIAN); - /*Here we take "0" as IPv4, "others" as IPv6, maybe we need to fix it later*/ - if (ipversion == 0) { - proto_tree_add_item(skinny_tree, hf_skinny_ipAddress, tvb, offset+20, 4, ENC_BIG_ENDIAN); - } else { + /*Assume the field of next 4 bytes is IP Version*/ + ipversion = tvb_get_ntohl(tvb, offset+16); + proto_tree_add_item(skinny_tree, hf_skinny_IPVersion, tvb, offset+16, 4, ENC_LITTLE_ENDIAN); + /*Here we take "0" as IPv4, "others" as IPv6, maybe we need to fix it later*/ + if (ipversion == 0) { + proto_tree_add_item(skinny_tree, hf_skinny_ipAddress, tvb, offset+20, 4, ENC_BIG_ENDIAN); + } else { proto_tree_add_item(skinny_tree, hf_skinny_ipV6Address, tvb, offset+20, 16, ENC_NA); - } + } proto_tree_add_item(skinny_tree, hf_skinny_portNumber, tvb, offset+36, 4, ENC_LITTLE_ENDIAN); proto_tree_add_item(skinny_tree, hf_skinny_passThruPartyID, tvb, offset+40, 4, ENC_LITTLE_ENDIAN); if (rtp_handle) { @@ -1882,19 +1883,19 @@ dissect_skinny_pdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) proto_tree_add_item(skinny_tree, hf_skinny_deviceTone, tvb, offset+12, 4, ENC_LITTLE_ENDIAN); /* offset 16 to 19: reserved */ if (hdr_data_length > 12) { - proto_tree_add_item(skinny_tree, hf_skinny_lineInstance, tvb, offset+20, 4, ENC_LITTLE_ENDIAN); - proto_tree_add_item(skinny_tree, hf_skinny_callIdentifier, tvb, offset+24, 4, ENC_LITTLE_ENDIAN); - si->lineId = tvb_get_letohl(tvb, offset+20); - si->callId = tvb_get_letohl(tvb, offset+24); + proto_tree_add_item(skinny_tree, hf_skinny_lineInstance, tvb, offset+20, 4, ENC_LITTLE_ENDIAN); + proto_tree_add_item(skinny_tree, hf_skinny_callIdentifier, tvb, offset+24, 4, ENC_LITTLE_ENDIAN); + si->lineId = tvb_get_letohl(tvb, offset+20); + si->callId = tvb_get_letohl(tvb, offset+24); } break; case 0x0083: /* StopToneMessage */ if (hdr_data_length > 4) { - proto_tree_add_item(skinny_tree, hf_skinny_lineInstance, tvb, offset+12, 4, ENC_LITTLE_ENDIAN); - proto_tree_add_item(skinny_tree, hf_skinny_callIdentifier, tvb, offset+16, 4, ENC_LITTLE_ENDIAN); - si->lineId = tvb_get_letohl(tvb, offset+12); - si->callId = tvb_get_letohl(tvb, offset+16); + proto_tree_add_item(skinny_tree, hf_skinny_lineInstance, tvb, offset+12, 4, ENC_LITTLE_ENDIAN); + proto_tree_add_item(skinny_tree, hf_skinny_callIdentifier, tvb, offset+16, 4, ENC_LITTLE_ENDIAN); + si->lineId = tvb_get_letohl(tvb, offset+12); + si->callId = tvb_get_letohl(tvb, offset+16); } break; @@ -1902,10 +1903,10 @@ dissect_skinny_pdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) proto_tree_add_item(skinny_tree, hf_skinny_ringType, tvb, offset+12, 4, ENC_LITTLE_ENDIAN); proto_tree_add_item(skinny_tree, hf_skinny_ringMode, tvb, offset+16, 4, ENC_LITTLE_ENDIAN); if (hdr_data_length > 12) { - proto_tree_add_item(skinny_tree, hf_skinny_lineInstance, tvb, offset+20, 4, ENC_LITTLE_ENDIAN); - proto_tree_add_item(skinny_tree, hf_skinny_callIdentifier, tvb, offset+24, 4, ENC_LITTLE_ENDIAN); - si->lineId = tvb_get_letohl(tvb, offset+20); - si->callId = tvb_get_letohl(tvb, offset+24); + proto_tree_add_item(skinny_tree, hf_skinny_lineInstance, tvb, offset+20, 4, ENC_LITTLE_ENDIAN); + proto_tree_add_item(skinny_tree, hf_skinny_callIdentifier, tvb, offset+24, 4, ENC_LITTLE_ENDIAN); + si->lineId = tvb_get_letohl(tvb, offset+20); + si->callId = tvb_get_letohl(tvb, offset+24); } break; @@ -1957,15 +1958,15 @@ dissect_skinny_pdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) { proto_tree_add_item(skinny_tree, hf_skinny_conferenceID, tvb, offset+12, 4, ENC_LITTLE_ENDIAN); proto_tree_add_item(skinny_tree, hf_skinny_passThruPartyID, tvb, offset+16, 4, ENC_LITTLE_ENDIAN); - /*Assume the field of next 4 bytes is IP Version*/ - ipversion = tvb_get_ntohl(tvb, offset+20); + /*Assume the field of next 4 bytes is IP Version*/ + ipversion = tvb_get_ntohl(tvb, offset+20); proto_tree_add_item(skinny_tree, hf_skinny_IPVersion, tvb, offset+20, 4, ENC_LITTLE_ENDIAN); - /*Here we take "0" as IPv4, "others" as IPv6, maybe we need to fix it later*/ - if (ipversion ==0) { + /*Here we take "0" as IPv4, "others" as IPv6, maybe we need to fix it later*/ + if (ipversion ==0) { proto_tree_add_item(skinny_tree, hf_skinny_remoteIpAddr, tvb, offset+24, 4, ENC_BIG_ENDIAN); - } else { + } else { proto_tree_add_item(skinny_tree, hf_skinny_ipV6Address, tvb, offset+24, 16, ENC_NA); - } + } proto_tree_add_item(skinny_tree, hf_skinny_remotePortNumber, tvb, offset+40, 4, ENC_LITTLE_ENDIAN); proto_tree_add_item(skinny_tree, hf_skinny_millisecondPacketSize, tvb, offset+44, 4, ENC_LITTLE_ENDIAN); proto_tree_add_item(skinny_tree, hf_skinny_payloadCapability, tvb, offset+48, 4, ENC_LITTLE_ENDIAN); @@ -2048,21 +2049,21 @@ dissect_skinny_pdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) ti_sub = proto_tree_add_text(skinny_tree, tvb, i, 8, "partyPIRestrictionBits"); skinny_sub_tree = proto_item_add_subtree(ti_sub, ett_skinny_tree); proto_tree_add_text(skinny_sub_tree, tvb, i, 4, "%s", - decode_boolean_bitfield( val, 0x01, 4*8, "Does RestrictCallingPartyName", "Doesn't RestrictCallingPartyName")); + decode_boolean_bitfield( val, 0x01, 4*8, "Does RestrictCallingPartyName", "Doesn't RestrictCallingPartyName")); proto_tree_add_text(skinny_sub_tree, tvb, i, 4, "%s", - decode_boolean_bitfield( val, 0x02, 4*8, "Does RestrictCallingPartyNumber", "Doesn't RestrictCallingPartyNumber")); + decode_boolean_bitfield( val, 0x02, 4*8, "Does RestrictCallingPartyNumber", "Doesn't RestrictCallingPartyNumber")); proto_tree_add_text(skinny_sub_tree, tvb, i, 4, "%s", - decode_boolean_bitfield( val, 0x04, 4*8, "Does RestrictCalledPartyName", "Doesn't RestrictCalledPartyName")); + decode_boolean_bitfield( val, 0x04, 4*8, "Does RestrictCalledPartyName", "Doesn't RestrictCalledPartyName")); proto_tree_add_text(skinny_sub_tree, tvb, i, 4, "%s", - decode_boolean_bitfield( val, 0x08, 4*8, "Does RestrictCalledPartyNumber", "Doesn't RestrictCalledPartyNumber")); + decode_boolean_bitfield( val, 0x08, 4*8, "Does RestrictCalledPartyNumber", "Doesn't RestrictCalledPartyNumber")); proto_tree_add_text(skinny_sub_tree, tvb, i, 4, "%s", - decode_boolean_bitfield( val, 0x10, 4*8, "Does RestrictOriginalCalledPartyName", "Doesn't RestrictOriginalCalledPartyName")); + decode_boolean_bitfield( val, 0x10, 4*8, "Does RestrictOriginalCalledPartyName", "Doesn't RestrictOriginalCalledPartyName")); proto_tree_add_text(skinny_sub_tree, tvb, i, 4, "%s", - decode_boolean_bitfield( val, 0x20, 4*8, "Does RestrictOriginalCalledPartyNumber", "Doesn't RestrictOriginalCalledPartyNumber")); + decode_boolean_bitfield( val, 0x20, 4*8, "Does RestrictOriginalCalledPartyNumber", "Doesn't RestrictOriginalCalledPartyNumber")); proto_tree_add_text(skinny_sub_tree, tvb, i, 4, "%s", - decode_boolean_bitfield( val, 0x40, 4*8, "Does RestrictLastRedirectPartyName", "Doesn't RestrictLastRedirectPartyName")); + decode_boolean_bitfield( val, 0x40, 4*8, "Does RestrictLastRedirectPartyName", "Doesn't RestrictLastRedirectPartyName")); proto_tree_add_text(skinny_sub_tree, tvb, i, 4, "%s", - decode_boolean_bitfield( val, 0x80, 4*8, "Does RestrictLastRedirectPartyNumber", "Doesn't RestrictLastRedirectPartyNumber")); + decode_boolean_bitfield( val, 0x80, 4*8, "Does RestrictLastRedirectPartyNumber", "Doesn't RestrictLastRedirectPartyNumber")); break; case 0x0090: /* ForwardStatMessage */ @@ -2141,8 +2142,8 @@ dissect_skinny_pdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) proto_tree_add_item(skinny_tree, hf_skinny_buttonCount, tvb, offset+16, 4, ENC_LITTLE_ENDIAN); proto_tree_add_item(skinny_tree, hf_skinny_totalButtonCount, tvb, offset+20, 4, ENC_LITTLE_ENDIAN); for (i = 0; i < StationMaxButtonTemplateSize; i++) { - proto_tree_add_item(skinny_tree, hf_skinny_buttonInstanceNumber, tvb, offset+(i*2)+24, 1, ENC_LITTLE_ENDIAN); - proto_tree_add_item(skinny_tree, hf_skinny_buttonDefinition, tvb, offset+(i*2)+25, 1, ENC_LITTLE_ENDIAN); + proto_tree_add_item(skinny_tree, hf_skinny_buttonInstanceNumber, tvb, offset+(i*2)+24, 1, ENC_LITTLE_ENDIAN); + proto_tree_add_item(skinny_tree, hf_skinny_buttonDefinition, tvb, offset+(i*2)+25, 1, ENC_LITTLE_ENDIAN); } break; @@ -2163,7 +2164,7 @@ dissect_skinny_pdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) case 0x009c: /* EnunciatorCommandMessage */ proto_tree_add_item(skinny_tree, hf_skinny_mediaEnunciationType, tvb, offset+12, 4, ENC_LITTLE_ENDIAN); for (i = 0; i < StationMaxDirnumSize; i++) { - proto_tree_add_item(skinny_tree, hf_skinny_unknown, tvb, offset+16+(i*4), 4, ENC_LITTLE_ENDIAN); + proto_tree_add_item(skinny_tree, hf_skinny_unknown, tvb, offset+16+(i*4), 4, ENC_LITTLE_ENDIAN); } i = offset+16+StationMaxDirnumSize; proto_tree_add_item(skinny_tree, hf_skinny_mediaEnunciationType, tvb, i, 4, ENC_LITTLE_ENDIAN); @@ -2175,15 +2176,16 @@ dissect_skinny_pdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) case 0x009e: /* ServerResMessage */ for (i = 0; i < StationMaxServers; i++) { - proto_tree_add_item(skinny_tree, hf_skinny_serverIdentifier, tvb, offset+12+(i*StationMaxServers), StationMaxServerNameSize, ENC_ASCII|ENC_NA); + proto_tree_add_item(skinny_tree, hf_skinny_serverIdentifier, + tvb, offset+12+(i*StationMaxServers), StationMaxServerNameSize, ENC_ASCII|ENC_NA); } j = offset+12+(i*StationMaxServers); for (i = 0; i < StationMaxServers; i++) { - proto_tree_add_item(skinny_tree, hf_skinny_serverListenPort, tvb, j+(i*4), 4, ENC_LITTLE_ENDIAN); + proto_tree_add_item(skinny_tree, hf_skinny_serverListenPort, tvb, j+(i*4), 4, ENC_LITTLE_ENDIAN); } j = j+(i*4); for (i = 0; i < StationMaxServers; i++) { - proto_tree_add_item(skinny_tree, hf_skinny_serverIpAddress, tvb, j+(i*4), 4, ENC_BIG_ENDIAN); + proto_tree_add_item(skinny_tree, hf_skinny_serverIpAddress, tvb, j+(i*4), 4, ENC_BIG_ENDIAN); } break; @@ -2265,8 +2267,9 @@ dissect_skinny_pdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) proto_tree_add_uint(skinny_tree, hf_skinny_softKeyCount, tvb, offset+16, 4, softKeyCount); proto_tree_add_item(skinny_tree, hf_skinny_totalSoftKeyCount, tvb, offset+20, 4, ENC_LITTLE_ENDIAN); for (i = 0; ((i < StationMaxSoftKeyDefinition) && (i < softKeyCount)); i++){ - proto_tree_add_item(skinny_tree, hf_skinny_softKeyLabel, tvb, offset+(i*20)+24, StationMaxSoftKeyLabelSize, ENC_ASCII|ENC_NA); - proto_tree_add_item(skinny_tree, hf_skinny_softKeyEvent, tvb, offset+(i*20)+40, 4, ENC_LITTLE_ENDIAN); + proto_tree_add_item(skinny_tree, hf_skinny_softKeyLabel, + tvb, offset+(i*20)+24, StationMaxSoftKeyLabelSize, ENC_ASCII|ENC_NA); + proto_tree_add_item(skinny_tree, hf_skinny_softKeyEvent, tvb, offset+(i*20)+40, 4, ENC_LITTLE_ENDIAN); } /* there is more data here, but it doesn't make a whole lot of sense, I imagine * it's just some not zero'd out stuff in the packet or... @@ -2279,13 +2282,14 @@ dissect_skinny_pdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) proto_tree_add_uint(skinny_tree, hf_skinny_softKeySetCount, tvb, offset+16, 4, softKeySetCount); proto_tree_add_item(skinny_tree, hf_skinny_totalSoftKeySetCount, tvb, offset+20, 4, ENC_LITTLE_ENDIAN); for (i = 0; ((i < StationMaxSoftKeySetDefinition) && (i < softKeySetCount)); i++) { - proto_tree_add_uint(skinny_tree, hf_skinny_softKeySetDescription, tvb, offset+24+(i*48) , 1, i); - for (j = 0; j < StationMaxSoftKeyIndex; j++) { - proto_tree_add_item(skinny_tree, hf_skinny_softKeyTemplateIndex, tvb, offset+24+(i*48)+j, 1, ENC_LITTLE_ENDIAN); - } - for (j = 0; j < StationMaxSoftKeyIndex; j++) { - proto_tree_add_item(skinny_tree, hf_skinny_softKeyInfoIndex, tvb, offset+24+(i*48)+StationMaxSoftKeyIndex+(j*2), 2, ENC_LITTLE_ENDIAN); - } + proto_tree_add_uint(skinny_tree, hf_skinny_softKeySetDescription, tvb, offset+24+(i*48) , 1, i); + for (j = 0; j < StationMaxSoftKeyIndex; j++) { + proto_tree_add_item(skinny_tree, hf_skinny_softKeyTemplateIndex, tvb, offset+24+(i*48)+j, 1, ENC_LITTLE_ENDIAN); + } + for (j = 0; j < StationMaxSoftKeyIndex; j++) { + proto_tree_add_item(skinny_tree, hf_skinny_softKeyInfoIndex, + tvb, offset+24+(i*48)+StationMaxSoftKeyIndex+(j*2), 2, ENC_LITTLE_ENDIAN); + } } break; @@ -2541,22 +2545,22 @@ dissect_skinny_pdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) si->callId = tvb_get_letohl(tvb, offset+28); /* add audio part of union */ - ti_sub = proto_tree_add_text(skinny_tree, tvb, offset, 12, "audioParameters"); - skinny_sub_tree = proto_item_add_subtree(ti_sub, ett_skinny_tree); + ti_sub = proto_tree_add_text(skinny_tree, tvb, offset, 12, "audioParameters"); + skinny_sub_tree = proto_item_add_subtree(ti_sub, ett_skinny_tree); proto_tree_add_item(skinny_sub_tree, hf_skinny_millisecondPacketSize, tvb, offset+44, 4, ENC_LITTLE_ENDIAN); proto_tree_add_item(skinny_sub_tree, hf_skinny_echoCancelType, tvb, offset+48, 4, ENC_LITTLE_ENDIAN); proto_tree_add_item(skinny_sub_tree, hf_skinny_g723BitRate, tvb, offset+52, 4, ENC_LITTLE_ENDIAN); /* add video part of union */ - ti_sub = proto_tree_add_text(skinny_tree, tvb, offset, 30, "vidParameters"); - skinny_sub_tree = proto_item_add_subtree(ti_sub, ett_skinny_tree); + ti_sub = proto_tree_add_text(skinny_tree, tvb, offset, 30, "vidParameters"); + skinny_sub_tree = proto_item_add_subtree(ti_sub, ett_skinny_tree); proto_tree_add_item(skinny_sub_tree, hf_skinny_bitRate, tvb, offset+44, 4, ENC_LITTLE_ENDIAN); proto_tree_add_item(skinny_sub_tree, hf_skinny_pictureFormatCount, tvb, offset+48, 4, ENC_LITTLE_ENDIAN); skinny_sub_tree_sav = skinny_sub_tree; count = offset+52; for ( i = 0; i < MAX_PICTURE_FORMAT; i++ ) { - ti_sub = proto_tree_add_text(skinny_sub_tree_sav, tvb, offset, 8 * MAX_PICTURE_FORMAT, "pictureFormat[%d]", i); - skinny_sub_tree = proto_item_add_subtree(ti_sub, ett_skinny_tree); + ti_sub = proto_tree_add_text(skinny_sub_tree_sav, tvb, offset, 8 * MAX_PICTURE_FORMAT, "pictureFormat[%d]", i); + skinny_sub_tree = proto_item_add_subtree(ti_sub, ett_skinny_tree); proto_tree_add_item(skinny_sub_tree, hf_skinny_format, tvb, count, 4, ENC_LITTLE_ENDIAN); count += 4; proto_tree_add_item(skinny_sub_tree, hf_skinny_MPI, tvb, count, 4, ENC_LITTLE_ENDIAN); @@ -2568,33 +2572,33 @@ dissect_skinny_pdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) val = count; /* add H261 part of union */ - ti_sub = proto_tree_add_text(skinny_sub_tree_sav, tvb, offset, 8, "h261VideoCapability"); - skinny_sub_tree = proto_item_add_subtree(ti_sub, ett_skinny_tree); - proto_tree_add_item(skinny_sub_tree, hf_skinny_temporalSpatialTradeOffCapability, tvb, count, 4, ENC_LITTLE_ENDIAN); + ti_sub = proto_tree_add_text(skinny_sub_tree_sav, tvb, offset, 8, "h261VideoCapability"); + skinny_sub_tree = proto_item_add_subtree(ti_sub, ett_skinny_tree); + proto_tree_add_item(skinny_sub_tree, hf_skinny_temporalSpatialTradeOffCapability, tvb, count, 4, ENC_LITTLE_ENDIAN); count += 4; - proto_tree_add_item(skinny_sub_tree, hf_skinny_stillImageTransmission, tvb, count, 4, ENC_LITTLE_ENDIAN); + proto_tree_add_item(skinny_sub_tree, hf_skinny_stillImageTransmission, tvb, count, 4, ENC_LITTLE_ENDIAN); /* add H263 part of union */ count = val; - ti_sub = proto_tree_add_text(skinny_sub_tree_sav, tvb, offset, 8, "h263VideoCapability"); - skinny_sub_tree = proto_item_add_subtree(ti_sub, ett_skinny_tree); - proto_tree_add_item(skinny_sub_tree, hf_skinny_h263_capability_bitfield, tvb, count, 4, ENC_LITTLE_ENDIAN); + ti_sub = proto_tree_add_text(skinny_sub_tree_sav, tvb, offset, 8, "h263VideoCapability"); + skinny_sub_tree = proto_item_add_subtree(ti_sub, ett_skinny_tree); + proto_tree_add_item(skinny_sub_tree, hf_skinny_h263_capability_bitfield, tvb, count, 4, ENC_LITTLE_ENDIAN); count += 4; - proto_tree_add_item(skinny_sub_tree, hf_skinny_annexNandWFutureUse, tvb, count, 4, ENC_LITTLE_ENDIAN); + proto_tree_add_item(skinny_sub_tree, hf_skinny_annexNandWFutureUse, tvb, count, 4, ENC_LITTLE_ENDIAN); /* add Vieo part of union */ count = val; - ti_sub = proto_tree_add_text(skinny_sub_tree_sav, tvb, offset, 8, "vieoVideoCapability"); - skinny_sub_tree = proto_item_add_subtree(ti_sub, ett_skinny_tree); - proto_tree_add_item(skinny_sub_tree, hf_skinny_modelNumber, tvb, count, 4, ENC_LITTLE_ENDIAN); + ti_sub = proto_tree_add_text(skinny_sub_tree_sav, tvb, offset, 8, "vieoVideoCapability"); + skinny_sub_tree = proto_item_add_subtree(ti_sub, ett_skinny_tree); + proto_tree_add_item(skinny_sub_tree, hf_skinny_modelNumber, tvb, count, 4, ENC_LITTLE_ENDIAN); count += 4; - proto_tree_add_item(skinny_sub_tree, hf_skinny_bandwidth, tvb, count, 4, ENC_LITTLE_ENDIAN); + proto_tree_add_item(skinny_sub_tree, hf_skinny_bandwidth, tvb, count, 4, ENC_LITTLE_ENDIAN); /* add data part of union */ - ti_sub = proto_tree_add_text(skinny_tree, tvb, offset, 8, "dataParameters"); - skinny_sub_tree = proto_item_add_subtree(ti_sub, ett_skinny_tree); - proto_tree_add_item(skinny_sub_tree, hf_skinny_protocolDependentData, tvb, offset+44, 4, ENC_LITTLE_ENDIAN); - proto_tree_add_item(skinny_sub_tree, hf_skinny_maxBitRate, tvb, offset+48, 4, ENC_LITTLE_ENDIAN); + ti_sub = proto_tree_add_text(skinny_tree, tvb, offset, 8, "dataParameters"); + skinny_sub_tree = proto_item_add_subtree(ti_sub, ett_skinny_tree); + proto_tree_add_item(skinny_sub_tree, hf_skinny_protocolDependentData, tvb, offset+44, 4, ENC_LITTLE_ENDIAN); + proto_tree_add_item(skinny_sub_tree, hf_skinny_maxBitRate, tvb, offset+48, 4, ENC_LITTLE_ENDIAN); break; case 0x0132: /* StartMultiMediaTransmission */ @@ -2611,22 +2615,22 @@ dissect_skinny_pdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) si->callId = tvb_get_letohl(tvb, offset+32); /* add audio part of union */ - ti_sub = proto_tree_add_text(skinny_tree, tvb, offset, 12, "audioParameters"); - skinny_sub_tree = proto_item_add_subtree(ti_sub, ett_skinny_tree); + ti_sub = proto_tree_add_text(skinny_tree, tvb, offset, 12, "audioParameters"); + skinny_sub_tree = proto_item_add_subtree(ti_sub, ett_skinny_tree); proto_tree_add_item(skinny_sub_tree, hf_skinny_millisecondPacketSize, tvb, offset+48, 4, ENC_LITTLE_ENDIAN); proto_tree_add_item(skinny_sub_tree, hf_skinny_echoCancelType, tvb, offset+52, 4, ENC_LITTLE_ENDIAN); proto_tree_add_item(skinny_sub_tree, hf_skinny_g723BitRate, tvb, offset+56, 4, ENC_LITTLE_ENDIAN); /* add video part of union */ - ti_sub = proto_tree_add_text(skinny_tree, tvb, offset, 30, "vidParameters"); - skinny_sub_tree = proto_item_add_subtree(ti_sub, ett_skinny_tree); + ti_sub = proto_tree_add_text(skinny_tree, tvb, offset, 30, "vidParameters"); + skinny_sub_tree = proto_item_add_subtree(ti_sub, ett_skinny_tree); proto_tree_add_item(skinny_sub_tree, hf_skinny_bitRate, tvb, offset+48, 4, ENC_LITTLE_ENDIAN); proto_tree_add_item(skinny_sub_tree, hf_skinny_pictureFormatCount, tvb, offset+52, 4, ENC_LITTLE_ENDIAN); skinny_sub_tree_sav = skinny_sub_tree; count = offset+56; for ( i = 0; i < MAX_PICTURE_FORMAT; i++ ) { - ti_sub = proto_tree_add_text(skinny_sub_tree_sav, tvb, offset, 8 * MAX_PICTURE_FORMAT, "pictureFormat[%d]", i); - skinny_sub_tree = proto_item_add_subtree(ti_sub, ett_skinny_tree); + ti_sub = proto_tree_add_text(skinny_sub_tree_sav, tvb, offset, 8 * MAX_PICTURE_FORMAT, "pictureFormat[%d]", i); + skinny_sub_tree = proto_item_add_subtree(ti_sub, ett_skinny_tree); proto_tree_add_item(skinny_sub_tree, hf_skinny_format, tvb, count, 4, ENC_LITTLE_ENDIAN); count += 4; proto_tree_add_item(skinny_sub_tree, hf_skinny_MPI, tvb, count, 4, ENC_LITTLE_ENDIAN); @@ -2638,33 +2642,33 @@ dissect_skinny_pdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) val = count; /* add H261 part of union */ - ti_sub = proto_tree_add_text(skinny_sub_tree_sav, tvb, offset, 8, "h261VideoCapability"); - skinny_sub_tree = proto_item_add_subtree(ti_sub, ett_skinny_tree); - proto_tree_add_item(skinny_sub_tree, hf_skinny_temporalSpatialTradeOffCapability, tvb, count, 4, ENC_LITTLE_ENDIAN); + ti_sub = proto_tree_add_text(skinny_sub_tree_sav, tvb, offset, 8, "h261VideoCapability"); + skinny_sub_tree = proto_item_add_subtree(ti_sub, ett_skinny_tree); + proto_tree_add_item(skinny_sub_tree, hf_skinny_temporalSpatialTradeOffCapability, tvb, count, 4, ENC_LITTLE_ENDIAN); count += 4; - proto_tree_add_item(skinny_sub_tree, hf_skinny_stillImageTransmission, tvb, count, 4, ENC_LITTLE_ENDIAN); + proto_tree_add_item(skinny_sub_tree, hf_skinny_stillImageTransmission, tvb, count, 4, ENC_LITTLE_ENDIAN); /* add H263 part of union */ count = val; - ti_sub = proto_tree_add_text(skinny_sub_tree_sav, tvb, offset, 8, "h263VideoCapability"); - skinny_sub_tree = proto_item_add_subtree(ti_sub, ett_skinny_tree); - proto_tree_add_item(skinny_sub_tree, hf_skinny_h263_capability_bitfield, tvb, count, 4, ENC_LITTLE_ENDIAN); + ti_sub = proto_tree_add_text(skinny_sub_tree_sav, tvb, offset, 8, "h263VideoCapability"); + skinny_sub_tree = proto_item_add_subtree(ti_sub, ett_skinny_tree); + proto_tree_add_item(skinny_sub_tree, hf_skinny_h263_capability_bitfield, tvb, count, 4, ENC_LITTLE_ENDIAN); count += 4; - proto_tree_add_item(skinny_sub_tree, hf_skinny_annexNandWFutureUse, tvb, count, 4, ENC_LITTLE_ENDIAN); + proto_tree_add_item(skinny_sub_tree, hf_skinny_annexNandWFutureUse, tvb, count, 4, ENC_LITTLE_ENDIAN); /* add Vieo part of union */ count = val; - ti_sub = proto_tree_add_text(skinny_sub_tree_sav, tvb, offset, 8, "vieoVideoCapability"); - skinny_sub_tree = proto_item_add_subtree(ti_sub, ett_skinny_tree); - proto_tree_add_item(skinny_sub_tree, hf_skinny_modelNumber, tvb, count, 4, ENC_LITTLE_ENDIAN); + ti_sub = proto_tree_add_text(skinny_sub_tree_sav, tvb, offset, 8, "vieoVideoCapability"); + skinny_sub_tree = proto_item_add_subtree(ti_sub, ett_skinny_tree); + proto_tree_add_item(skinny_sub_tree, hf_skinny_modelNumber, tvb, count, 4, ENC_LITTLE_ENDIAN); count += 4; - proto_tree_add_item(skinny_sub_tree, hf_skinny_bandwidth, tvb, count, 4, ENC_LITTLE_ENDIAN); + proto_tree_add_item(skinny_sub_tree, hf_skinny_bandwidth, tvb, count, 4, ENC_LITTLE_ENDIAN); /* add data part of union */ - ti_sub = proto_tree_add_text(skinny_tree, tvb, offset, 8, "dataParameters"); - skinny_sub_tree = proto_item_add_subtree(ti_sub, ett_skinny_tree); - proto_tree_add_item(skinny_sub_tree, hf_skinny_protocolDependentData, tvb, offset+48, 4, ENC_LITTLE_ENDIAN); - proto_tree_add_item(skinny_sub_tree, hf_skinny_maxBitRate, tvb, offset+52, 4, ENC_LITTLE_ENDIAN); + ti_sub = proto_tree_add_text(skinny_tree, tvb, offset, 8, "dataParameters"); + skinny_sub_tree = proto_item_add_subtree(ti_sub, ett_skinny_tree); + proto_tree_add_item(skinny_sub_tree, hf_skinny_protocolDependentData, tvb, offset+48, 4, ENC_LITTLE_ENDIAN); + proto_tree_add_item(skinny_sub_tree, hf_skinny_maxBitRate, tvb, offset+52, 4, ENC_LITTLE_ENDIAN); break; case 0x0133: /* StopMultiMediaTransmission */ @@ -2690,47 +2694,47 @@ dissect_skinny_pdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) /* not sure of format */ /* show videoFastUpdateGOB */ - ti_sub = proto_tree_add_text(skinny_tree, tvb, offset, 8, "videoFastUpdateGOB"); - skinny_sub_tree = proto_item_add_subtree(ti_sub, ett_skinny_tree); + ti_sub = proto_tree_add_text(skinny_tree, tvb, offset, 8, "videoFastUpdateGOB"); + skinny_sub_tree = proto_item_add_subtree(ti_sub, ett_skinny_tree); proto_tree_add_item(skinny_sub_tree, hf_skinny_firstGOB, tvb, offset+28, 4, ENC_LITTLE_ENDIAN); proto_tree_add_item(skinny_sub_tree, hf_skinny_numberOfGOBs, tvb, offset+32, 4, ENC_LITTLE_ENDIAN); /* show videoFastUpdateMB */ - ti_sub = proto_tree_add_text(skinny_tree, tvb, offset, 8, "videoFastUpdateGOB"); - skinny_sub_tree = proto_item_add_subtree(ti_sub, ett_skinny_tree); + ti_sub = proto_tree_add_text(skinny_tree, tvb, offset, 8, "videoFastUpdateGOB"); + skinny_sub_tree = proto_item_add_subtree(ti_sub, ett_skinny_tree); proto_tree_add_item(skinny_sub_tree, hf_skinny_firstGOB, tvb, offset+28, 4, ENC_LITTLE_ENDIAN); proto_tree_add_item(skinny_sub_tree, hf_skinny_firstMB, tvb, offset+32, 4, ENC_LITTLE_ENDIAN); proto_tree_add_item(skinny_sub_tree, hf_skinny_numberOfMBs, tvb, offset+36, 4, ENC_LITTLE_ENDIAN); /* show lostPicture */ - ti_sub = proto_tree_add_text(skinny_tree, tvb, offset, 8, "lostPicture"); - skinny_sub_tree = proto_item_add_subtree(ti_sub, ett_skinny_tree); + ti_sub = proto_tree_add_text(skinny_tree, tvb, offset, 8, "lostPicture"); + skinny_sub_tree = proto_item_add_subtree(ti_sub, ett_skinny_tree); proto_tree_add_item(skinny_sub_tree, hf_skinny_pictureNumber, tvb, offset+28, 4, ENC_LITTLE_ENDIAN); proto_tree_add_item(skinny_sub_tree, hf_skinny_longTermPictureIndex, tvb, offset+32, 4, ENC_LITTLE_ENDIAN); /* show lostPartialPicture */ - ti_sub = proto_tree_add_text(skinny_tree, tvb, offset, 8, "lostPartialPicture"); - skinny_sub_tree = proto_item_add_subtree(ti_sub, ett_skinny_tree); + ti_sub = proto_tree_add_text(skinny_tree, tvb, offset, 8, "lostPartialPicture"); + skinny_sub_tree = proto_item_add_subtree(ti_sub, ett_skinny_tree); proto_tree_add_item(skinny_sub_tree, hf_skinny_pictureNumber, tvb, offset+28, 4, ENC_LITTLE_ENDIAN); proto_tree_add_item(skinny_sub_tree, hf_skinny_longTermPictureIndex, tvb, offset+32, 4, ENC_LITTLE_ENDIAN); proto_tree_add_item(skinny_sub_tree, hf_skinny_firstMB, tvb, offset+36, 4, ENC_LITTLE_ENDIAN); proto_tree_add_item(skinny_sub_tree, hf_skinny_numberOfMBs, tvb, offset+40, 4, ENC_LITTLE_ENDIAN); /* show recoveryReferencePicture */ - ti_sub = proto_tree_add_text(skinny_tree, tvb, offset, 8, "recoveryReferencePicture"); - skinny_sub_tree = proto_item_add_subtree(ti_sub, ett_skinny_tree); + ti_sub = proto_tree_add_text(skinny_tree, tvb, offset, 8, "recoveryReferencePicture"); + skinny_sub_tree = proto_item_add_subtree(ti_sub, ett_skinny_tree); proto_tree_add_item(skinny_sub_tree, hf_skinny_recoveryReferencePictureCount, tvb, offset+28, 4, ENC_LITTLE_ENDIAN); skinny_sub_tree_sav = skinny_sub_tree; for ( i = 0; i < MAX_REFERENCE_PICTURE; i++ ) { - ti_sub = proto_tree_add_text(skinny_sub_tree_sav, tvb, offset, 8, "recoveryReferencePicture[%d]", i); - skinny_sub_tree = proto_item_add_subtree(ti_sub, ett_skinny_tree); + ti_sub = proto_tree_add_text(skinny_sub_tree_sav, tvb, offset, 8, "recoveryReferencePicture[%d]", i); + skinny_sub_tree = proto_item_add_subtree(ti_sub, ett_skinny_tree); proto_tree_add_item(skinny_sub_tree, hf_skinny_pictureNumber, tvb, offset+32+(i*8), 4, ENC_LITTLE_ENDIAN); proto_tree_add_item(skinny_sub_tree, hf_skinny_longTermPictureIndex, tvb, offset+36+(i*8), 4, ENC_LITTLE_ENDIAN); } /* show temporalSpatialTradeOff */ - ti_sub = proto_tree_add_text(skinny_tree, tvb, offset, 4, "temporalSpatialTradeOff"); - skinny_sub_tree = proto_item_add_subtree(ti_sub, ett_skinny_tree); + ti_sub = proto_tree_add_text(skinny_tree, tvb, offset, 4, "temporalSpatialTradeOff"); + skinny_sub_tree = proto_item_add_subtree(ti_sub, ett_skinny_tree); proto_tree_add_item(skinny_sub_tree, hf_skinny_temporalSpatialTradeOff, tvb, offset+28, 4, ENC_LITTLE_ENDIAN); break; @@ -2974,7 +2978,7 @@ dissect_skinny(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) col_set_str(pinfo->cinfo, COL_INFO, "Skinny Client Control Protocol"); tcp_dissect_pdus(tvb, pinfo, tree, skinny_desegment, 4, - get_skinny_pdu_len, dissect_skinny_pdu); + get_skinny_pdu_len, dissect_skinny_pdu); return TRUE; } @@ -2988,1687 +2992,1687 @@ proto_register_skinny(void) static hf_register_info hf[] = { { &hf_skinny_data_length, { "Data length", "skinny.data_length", - FT_UINT32, BASE_DEC, NULL, 0x0, - "Number of bytes in the data portion.", - HFILL } + FT_UINT32, BASE_DEC, NULL, 0x0, + "Number of bytes in the data portion.", + HFILL } }, { &hf_skinny_hdr_version, { "Header version", "skinny.hdr_version", - FT_UINT32, BASE_HEX, VALS(header_version), 0x0, - NULL, - HFILL } + FT_UINT32, BASE_HEX, VALS(header_version), 0x0, + NULL, + HFILL } }, /* FIXME: Enable use of message name ??? */ { &hf_skinny_messageid, { "Message ID", "skinny.messageid", - FT_UINT32, BASE_HEX|BASE_EXT_STRING, &message_id_ext, 0x0, - "The function requested/done with this message.", - HFILL } + FT_UINT32, BASE_HEX|BASE_EXT_STRING, &message_id_ext, 0x0, + "The function requested/done with this message.", + HFILL } }, { &hf_skinny_deviceName, { "Device name", "skinny.deviceName", - FT_STRING, BASE_NONE, NULL, 0x0, - "The device name of the phone.", - HFILL } + FT_STRING, BASE_NONE, NULL, 0x0, + "The device name of the phone.", + HFILL } }, { &hf_skinny_stationUserId, { "Station user ID", "skinny.stationUserId", - FT_UINT32, BASE_DEC, NULL, 0x0, - NULL, - HFILL } + FT_UINT32, BASE_DEC, NULL, 0x0, + NULL, + HFILL } }, { &hf_skinny_stationInstance, { "Station instance", "skinny.stationInstance", - FT_UINT32, BASE_DEC, NULL, 0x0, - NULL, - HFILL } + FT_UINT32, BASE_DEC, NULL, 0x0, + NULL, + HFILL } }, { &hf_skinny_deviceType, { "Device type", "skinny.deviceType", - FT_UINT32, BASE_DEC|BASE_EXT_STRING, &deviceTypes_ext, 0x0, - "DeviceType of the station.", - HFILL } + FT_UINT32, BASE_DEC|BASE_EXT_STRING, &deviceTypes_ext, 0x0, + "DeviceType of the station.", + HFILL } }, { &hf_skinny_maxStreams, { "Max streams", "skinny.maxStreams", - FT_UINT32, BASE_DEC, NULL, 0x0, - "32 bit unsigned integer indicating the maximum number of simultansous RTP duplex streams that the client can handle.", - HFILL } + FT_UINT32, BASE_DEC, NULL, 0x0, + "32 bit unsigned integer indicating the maximum number of simultansous RTP duplex streams that the client can handle.", + HFILL } }, { &hf_skinny_stationIpPort, { "Station ip port", "skinny.stationIpPort", - FT_UINT16, BASE_DEC, NULL, 0x0, - NULL, - HFILL } + FT_UINT16, BASE_DEC, NULL, 0x0, + NULL, + HFILL } }, { &hf_skinny_stationKeypadButton, { "Keypad button", "skinny.stationKeypadButton", - FT_UINT32, BASE_HEX|BASE_EXT_STRING, &keypadButtons_ext, 0x0, - "The button pressed on the phone.", - HFILL } + FT_UINT32, BASE_HEX|BASE_EXT_STRING, &keypadButtons_ext, 0x0, + "The button pressed on the phone.", + HFILL } }, { &hf_skinny_calledPartyNumber, { "Called party number", "skinny.calledParty", - FT_STRING, BASE_NONE, NULL, 0x0, - "The number called.", - HFILL } + FT_STRING, BASE_NONE, NULL, 0x0, + "The number called.", + HFILL } }, { &hf_skinny_stimulus, { "Stimulus", "skinny.stimulus", - FT_UINT32, BASE_HEX|BASE_EXT_STRING, &deviceStimuli_ext, 0x0, - "Reason for the device stimulus message.", - HFILL } + FT_UINT32, BASE_HEX|BASE_EXT_STRING, &deviceStimuli_ext, 0x0, + "Reason for the device stimulus message.", + HFILL } }, { &hf_skinny_stimulusInstance, { "Stimulus instance", "skinny.stimulusInstance", - FT_UINT32, BASE_DEC, NULL, 0x0, - NULL, - HFILL } + FT_UINT32, BASE_DEC, NULL, 0x0, + NULL, + HFILL } }, { &hf_skinny_lineNumber, { "Line number", "skinny.lineNumber", - FT_UINT32, BASE_DEC, NULL, 0x0, - NULL, - HFILL } + FT_UINT32, BASE_DEC, NULL, 0x0, + NULL, + HFILL } }, { &hf_skinny_speedDialNumber, { "Speed-dial number", "skinny.speedDialNumber", - FT_UINT32, BASE_DEC, NULL, 0x0, - "Which speed dial number", - HFILL } + FT_UINT32, BASE_DEC, NULL, 0x0, + "Which speed dial number", + HFILL } }, { &hf_skinny_capCount, { "Capabilities count", "skinny.capCount", - FT_UINT32, BASE_DEC, NULL, 0x0, - "How many capabilities", - HFILL } + FT_UINT32, BASE_DEC, NULL, 0x0, + "How many capabilities", + HFILL } }, { &hf_skinny_payloadCapability, { "Payload capability", "skinny.payloadCapability", - FT_UINT32, BASE_DEC|BASE_EXT_STRING, &mediaPayloads_ext, 0x0, - "The payload capability for this media capability structure.", - HFILL } + FT_UINT32, BASE_DEC|BASE_EXT_STRING, &mediaPayloads_ext, 0x0, + "The payload capability for this media capability structure.", + HFILL } }, { &hf_skinny_maxFramesPerPacket, { "Max frames per packet", "skinny.maxFramesPerPacket", - FT_UINT16, BASE_DEC, NULL, 0x0, - NULL, - HFILL } + FT_UINT16, BASE_DEC, NULL, 0x0, + NULL, + HFILL } }, { &hf_skinny_alarmSeverity, { "Alarm severity", "skinny.alarmSeverity", - FT_UINT32, BASE_DEC|BASE_EXT_STRING, &alarmSeverities_ext, 0x0, - "The severity of the reported alarm.", - HFILL } + FT_UINT32, BASE_DEC|BASE_EXT_STRING, &alarmSeverities_ext, 0x0, + "The severity of the reported alarm.", + HFILL } }, { &hf_skinny_alarmParam1, { "Alarm param 1", "skinny.alarmParam1", - FT_UINT32, BASE_HEX, NULL, 0x0, - "An as yet undecoded param1 value from the alarm message", - HFILL } + FT_UINT32, BASE_HEX, NULL, 0x0, + "An as yet undecoded param1 value from the alarm message", + HFILL } }, { &hf_skinny_alarmParam2, { "Alarm param 2", "skinny.alarmParam2", - FT_IPv4, BASE_NONE, NULL, 0x0, - "This is the second alarm parameter i think it's an ip address", - HFILL } + FT_IPv4, BASE_NONE, NULL, 0x0, + "This is the second alarm parameter i think it's an ip address", + HFILL } }, { &hf_skinny_receptionStatus, { "Reception status", "skinny.receptionStatus", - FT_UINT32, BASE_DEC, VALS(multicastMediaReceptionStatus), 0x0, - "The current status of the multicast media.", - HFILL } + FT_UINT32, BASE_DEC, VALS(multicastMediaReceptionStatus), 0x0, + "The current status of the multicast media.", + HFILL } }, { &hf_skinny_passThruPartyID, { "Pass-thru party ID", "skinny.passThruPartyID", - FT_UINT32, BASE_DEC, NULL, 0x0, - NULL, - HFILL } + FT_UINT32, BASE_DEC, NULL, 0x0, + NULL, + HFILL } }, { &hf_skinny_ORCStatus, { "Opened receive-channel status", "skinny.openReceiveChannelStatus", - FT_UINT32, BASE_DEC, VALS(openReceiveChanStatus), 0x0, - NULL, - HFILL } + FT_UINT32, BASE_DEC, VALS(openReceiveChanStatus), 0x0, + NULL, + HFILL } }, { &hf_skinny_IPVersion, { "IP Version", "skinny.ipversion", - FT_UINT32, BASE_DEC, VALS(ipVersion), 0x0, - NULL, - HFILL } + FT_UINT32, BASE_DEC, VALS(ipVersion), 0x0, + NULL, + HFILL } }, { &hf_skinny_ipAddress, { "IP address", "skinny.ipAddress", - FT_IPv4, BASE_NONE, NULL, 0x0, - NULL, - HFILL } + FT_IPv4, BASE_NONE, NULL, 0x0, + NULL, + HFILL } }, { &hf_skinny_ipV6Address, { "IPv6 address", "skinny.ipv6Address", - FT_IPv6, BASE_NONE, NULL, 0x0, - NULL, - HFILL } + FT_IPv6, BASE_NONE, NULL, 0x0, + NULL, + HFILL } }, { &hf_skinny_portNumber, { "Port number", "skinny.portNumber", - FT_UINT32, BASE_DEC, NULL, 0x0, - NULL, - HFILL } + FT_UINT32, BASE_DEC, NULL, 0x0, + NULL, + HFILL } }, { &hf_skinny_statsProcessingType, { "Stats processing type", "skinny.statsProcessingType", - FT_UINT32, BASE_DEC, VALS(statsProcessingTypes), 0x0, - "What do do after you send the stats.", - HFILL } + FT_UINT32, BASE_DEC, VALS(statsProcessingTypes), 0x0, + "What do do after you send the stats.", + HFILL } }, { &hf_skinny_callIdentifier, { "Call identifier", "skinny.callIdentifier", - FT_UINT32, BASE_DEC, NULL, 0x0, - NULL, - HFILL } + FT_UINT32, BASE_DEC, NULL, 0x0, + NULL, + HFILL } }, { &hf_skinny_packetsSent, { "Packets sent", "skinny.packetsSent", - FT_UINT32, BASE_DEC, NULL, 0x0, - NULL, - HFILL } + FT_UINT32, BASE_DEC, NULL, 0x0, + NULL, + HFILL } }, { &hf_skinny_octetsSent, { "Octets sent", "skinny.octetsSent", - FT_UINT32, BASE_DEC, NULL, 0x0, - NULL, - HFILL } + FT_UINT32, BASE_DEC, NULL, 0x0, + NULL, + HFILL } }, { &hf_skinny_packetsRecv, { "Packets Received", "skinny.packetsRecv", - FT_UINT32, BASE_DEC, NULL, 0x0, - NULL, - HFILL } + FT_UINT32, BASE_DEC, NULL, 0x0, + NULL, + HFILL } }, { &hf_skinny_octetsRecv, { "Octets received", "skinny.octetsRecv", - FT_UINT32, BASE_DEC, NULL, 0x0, - NULL, - HFILL } + FT_UINT32, BASE_DEC, NULL, 0x0, + NULL, + HFILL } }, { &hf_skinny_packetsLost, { "Packets lost", "skinny.packetsLost", - FT_UINT32, BASE_DEC, NULL, 0x0, - NULL, - HFILL } + FT_UINT32, BASE_DEC, NULL, 0x0, + NULL, + HFILL } }, { &hf_skinny_latency, { "Latency(ms)", "skinny.latency", - FT_UINT32, BASE_DEC, NULL, 0x0, - "Average packet latency during the call.", - HFILL } + FT_UINT32, BASE_DEC, NULL, 0x0, + "Average packet latency during the call.", + HFILL } }, { &hf_skinny_jitter, { "Jitter", "skinny.jitter", - FT_UINT32, BASE_DEC, NULL, 0x0, - "Average jitter during the call.", - HFILL } + FT_UINT32, BASE_DEC, NULL, 0x0, + "Average jitter during the call.", + HFILL } }, { &hf_skinny_directoryNumber, { "Directory number", "skinny.directoryNumber", - FT_STRING, BASE_NONE, NULL, 0x0, - "The number we are reporting statistics for.", - HFILL } + FT_STRING, BASE_NONE, NULL, 0x0, + "The number we are reporting statistics for.", + HFILL } }, { &hf_skinny_lineInstance, { "Line instance", "skinny.lineInstance", - FT_UINT32, BASE_DEC, NULL, 0x0, - "The display call plane associated with this call.", - HFILL } + FT_UINT32, BASE_DEC, NULL, 0x0, + "The display call plane associated with this call.", + HFILL } }, { &hf_skinny_softKeyEvent, { "Soft-key event", "skinny.softKeyEvent", - FT_UINT32, BASE_DEC|BASE_EXT_STRING, &softKeyEvents_ext, 0x0, - "Which softkey event is being reported.", - HFILL } + FT_UINT32, BASE_DEC|BASE_EXT_STRING, &softKeyEvents_ext, 0x0, + "Which softkey event is being reported.", + HFILL } }, { &hf_skinny_keepAliveInterval, { "Keep-alive interval", "skinny.keepAliveInterval", - FT_UINT32, BASE_DEC, NULL, 0x0, - "How often are keep alives exchanges between the client and the call manager.", - HFILL } + FT_UINT32, BASE_DEC, NULL, 0x0, + "How often are keep alives exchanges between the client and the call manager.", + HFILL } }, { &hf_skinny_secondaryKeepAliveInterval, { "Secondary keep-alive interval", "skinny.secondaryKeepAliveInterval", - FT_UINT32, BASE_DEC, NULL, 0x0, - "How often are keep alives exchanges between the client and the secondary call manager.", - HFILL } + FT_UINT32, BASE_DEC, NULL, 0x0, + "How often are keep alives exchanges between the client and the secondary call manager.", + HFILL } }, { &hf_skinny_dateTemplate, { "Date template", "skinny.dateTemplate", - FT_STRING, BASE_NONE, NULL, 0x0, - "The display format for the date/time on the phone.", - HFILL } + FT_STRING, BASE_NONE, NULL, 0x0, + "The display format for the date/time on the phone.", + HFILL } }, { &hf_skinny_buttonOffset, { "Button offset", "skinny.buttonOffset", - FT_UINT32, BASE_DEC, NULL, 0x0, - "Offset is the number of the first button referenced by this message.", - HFILL } + FT_UINT32, BASE_DEC, NULL, 0x0, + "Offset is the number of the first button referenced by this message.", + HFILL } }, { &hf_skinny_buttonCount, { "Buttons count", "skinny.buttonCount", - FT_UINT32, BASE_DEC, NULL, 0x0, - "Number of (VALID) button definitions in this message.", - HFILL } + FT_UINT32, BASE_DEC, NULL, 0x0, + "Number of (VALID) button definitions in this message.", + HFILL } }, { &hf_skinny_totalButtonCount, { "Total buttons count", "skinny.totalButtonCount", - FT_UINT32, BASE_DEC, NULL, 0x0, - "The total number of buttons defined for this phone.", - HFILL } + FT_UINT32, BASE_DEC, NULL, 0x0, + "The total number of buttons defined for this phone.", + HFILL } }, { &hf_skinny_buttonInstanceNumber, { "Instance number", "skinny.buttonInstanceNumber", - FT_UINT8, BASE_HEX|BASE_EXT_STRING, &keypadButtons_ext, 0x0, - "The button instance number for a button or the StationKeyPad value, repeats allowed.", - HFILL } + FT_UINT8, BASE_HEX|BASE_EXT_STRING, &keypadButtons_ext, 0x0, + "The button instance number for a button or the StationKeyPad value, repeats allowed.", + HFILL } }, { &hf_skinny_buttonDefinition, { "Button definition", "skinny.buttonDefinition", - FT_UINT8, BASE_HEX|BASE_EXT_STRING, &buttonDefinitions_ext, 0x0, - "The button type for this instance (ie line, speed dial, ....", - HFILL } + FT_UINT8, BASE_HEX|BASE_EXT_STRING, &buttonDefinitions_ext, 0x0, + "The button type for this instance (ie line, speed dial, ....", + HFILL } }, { &hf_skinny_softKeyOffset, { "Soft-Key offset", "skinny.softKeyOffset", - FT_UINT32, BASE_DEC, NULL, 0x0, - "The offset for the first soft key in this message.", - HFILL } + FT_UINT32, BASE_DEC, NULL, 0x0, + "The offset for the first soft key in this message.", + HFILL } }, { &hf_skinny_softKeyCount, { "Soft-keys count", "skinny.softKeyCount", - FT_UINT32, BASE_DEC, NULL, 0x0, - "The number of valid softkeys in this message.", - HFILL } + FT_UINT32, BASE_DEC, NULL, 0x0, + "The number of valid softkeys in this message.", + HFILL } }, { &hf_skinny_totalSoftKeyCount, { "Total soft-keys count", "skinny.totalSoftKeyCount", - FT_UINT32, BASE_DEC, NULL, 0x0, - "The total number of softkeys for this device.", - HFILL } + FT_UINT32, BASE_DEC, NULL, 0x0, + "The total number of softkeys for this device.", + HFILL } }, { &hf_skinny_softKeyLabel, { "Soft-key label", "skinny.softKeyLabel", - FT_STRING, BASE_NONE, NULL, 0x0, - "The text label for this soft key.", - HFILL } + FT_STRING, BASE_NONE, NULL, 0x0, + "The text label for this soft key.", + HFILL } }, { &hf_skinny_softKeySetOffset, { "Soft-key-set offset", "skinny.softKeySetOffset", - FT_UINT32, BASE_DEC, NULL, 0x0, - "The offset for the first soft key set in this message.", - HFILL } + FT_UINT32, BASE_DEC, NULL, 0x0, + "The offset for the first soft key set in this message.", + HFILL } }, { &hf_skinny_softKeySetCount, { "Soft-key-sets count", "skinny.softKeySetCount", - FT_UINT32, BASE_DEC, NULL, 0x0, - "The number of valid softkey sets in this message.", - HFILL } + FT_UINT32, BASE_DEC, NULL, 0x0, + "The number of valid softkey sets in this message.", + HFILL } }, { &hf_skinny_totalSoftKeySetCount, { "Total soft-key-sets count", "skinny.totalSoftKeySetCount", - FT_UINT32, BASE_DEC, NULL, 0x0, - "The total number of softkey sets for this device.", - HFILL } + FT_UINT32, BASE_DEC, NULL, 0x0, + "The total number of softkey sets for this device.", + HFILL } }, { &hf_skinny_softKeyTemplateIndex, { "Soft-key template index", "skinny.softKeyTemplateIndex", - FT_UINT8, BASE_DEC|BASE_EXT_STRING, &softKeyEvents_ext, 0x0, - "Array of size 16 8-bit unsigned ints containing an index into the softKeyTemplate.", - HFILL } + FT_UINT8, BASE_DEC|BASE_EXT_STRING, &softKeyEvents_ext, 0x0, + "Array of size 16 8-bit unsigned ints containing an index into the softKeyTemplate.", + HFILL } }, { &hf_skinny_softKeyInfoIndex, { "Soft-key info index", "skinny.softKeyInfoIndex", - FT_UINT16, BASE_DEC|BASE_EXT_STRING, &softKeyIndexes_ext, 0x0, - "Array of size 16 16-bit unsigned integers containing an index into the soft key description information.", - HFILL } + FT_UINT16, BASE_DEC|BASE_EXT_STRING, &softKeyIndexes_ext, 0x0, + "Array of size 16 16-bit unsigned integers containing an index into the soft key description information.", + HFILL } }, { &hf_skinny_softKeySetDescription, { "Soft-key set description", "skinny.softKeySetDescription", - FT_UINT8, BASE_DEC|BASE_EXT_STRING, &keySetNames_ext, 0x0, - "A text description of what this softkey when this softkey set is displayed", - HFILL } + FT_UINT8, BASE_DEC|BASE_EXT_STRING, &keySetNames_ext, 0x0, + "A text description of what this softkey when this softkey set is displayed", + HFILL } }, { &hf_skinny_softKeyMap, { "Soft-key map","skinny.softKeyMap", - FT_UINT16, BASE_HEX, NULL, 0x0, - NULL, - HFILL } + FT_UINT16, BASE_HEX, NULL, 0x0, + NULL, + HFILL } }, { &hf_skinny_softKey0, { "SoftKey0", "skinny.softKeyMap.0", - FT_BOOLEAN, 16, TFS(&softKeyMapValues), SKINNY_SOFTKEY0, - NULL, - HFILL } + FT_BOOLEAN, 16, TFS(&softKeyMapValues), SKINNY_SOFTKEY0, + NULL, + HFILL } }, { &hf_skinny_softKey1, { "SoftKey1", "skinny.softKeyMap.1", - FT_BOOLEAN, 16, TFS(&softKeyMapValues), SKINNY_SOFTKEY1, - NULL, - HFILL } + FT_BOOLEAN, 16, TFS(&softKeyMapValues), SKINNY_SOFTKEY1, + NULL, + HFILL } }, { &hf_skinny_softKey2, { "SoftKey2", "skinny.softKeyMap.2", - FT_BOOLEAN, 16, TFS(&softKeyMapValues), SKINNY_SOFTKEY2, - NULL, - HFILL } + FT_BOOLEAN, 16, TFS(&softKeyMapValues), SKINNY_SOFTKEY2, + NULL, + HFILL } }, { &hf_skinny_softKey3, { "SoftKey3", "skinny.softKeyMap.3", - FT_BOOLEAN, 16, TFS(&softKeyMapValues), SKINNY_SOFTKEY3, - NULL, - HFILL } + FT_BOOLEAN, 16, TFS(&softKeyMapValues), SKINNY_SOFTKEY3, + NULL, + HFILL } }, { &hf_skinny_softKey4, { "SoftKey4", "skinny.softKeyMap.4", - FT_BOOLEAN, 16, TFS(&softKeyMapValues), SKINNY_SOFTKEY4, - NULL, - HFILL } + FT_BOOLEAN, 16, TFS(&softKeyMapValues), SKINNY_SOFTKEY4, + NULL, + HFILL } }, { &hf_skinny_softKey5, { "SoftKey5", "skinny.softKeyMap.5", - FT_BOOLEAN, 16, TFS(&softKeyMapValues), SKINNY_SOFTKEY5, - NULL, - HFILL } + FT_BOOLEAN, 16, TFS(&softKeyMapValues), SKINNY_SOFTKEY5, + NULL, + HFILL } }, { &hf_skinny_softKey6, { "SoftKey6", "skinny.softKeyMap.6", - FT_BOOLEAN, 16, TFS(&softKeyMapValues), SKINNY_SOFTKEY6, - NULL, - HFILL } + FT_BOOLEAN, 16, TFS(&softKeyMapValues), SKINNY_SOFTKEY6, + NULL, + HFILL } }, { &hf_skinny_softKey7, { "SoftKey7", "skinny.softKeyMap.7", - FT_BOOLEAN, 16, TFS(&softKeyMapValues), SKINNY_SOFTKEY7, - NULL, - HFILL } + FT_BOOLEAN, 16, TFS(&softKeyMapValues), SKINNY_SOFTKEY7, + NULL, + HFILL } }, { &hf_skinny_softKey8, { "SoftKey8", "skinny.softKeyMap.8", - FT_BOOLEAN, 16, TFS(&softKeyMapValues), SKINNY_SOFTKEY8, - NULL, - HFILL } + FT_BOOLEAN, 16, TFS(&softKeyMapValues), SKINNY_SOFTKEY8, + NULL, + HFILL } }, { &hf_skinny_softKey9, { "SoftKey9", "skinny.softKeyMap.9", - FT_BOOLEAN, 16, TFS(&softKeyMapValues), SKINNY_SOFTKEY9, - NULL, - HFILL } + FT_BOOLEAN, 16, TFS(&softKeyMapValues), SKINNY_SOFTKEY9, + NULL, + HFILL } }, { &hf_skinny_softKey10, { "SoftKey10", "skinny.softKeyMap.10", - FT_BOOLEAN, 16, TFS(&softKeyMapValues), SKINNY_SOFTKEY10, - NULL, - HFILL } + FT_BOOLEAN, 16, TFS(&softKeyMapValues), SKINNY_SOFTKEY10, + NULL, + HFILL } }, { &hf_skinny_softKey11, { "SoftKey11", "skinny.softKeyMap.11", - FT_BOOLEAN, 16, TFS(&softKeyMapValues), SKINNY_SOFTKEY11, - NULL, - HFILL } + FT_BOOLEAN, 16, TFS(&softKeyMapValues), SKINNY_SOFTKEY11, + NULL, + HFILL } }, { &hf_skinny_softKey12, { "SoftKey12", "skinny.softKeyMap.12", - FT_BOOLEAN, 16, TFS(&softKeyMapValues), SKINNY_SOFTKEY12, - NULL, - HFILL } + FT_BOOLEAN, 16, TFS(&softKeyMapValues), SKINNY_SOFTKEY12, + NULL, + HFILL } }, { &hf_skinny_softKey13, { "SoftKey13", "skinny.softKeyMap.13", - FT_BOOLEAN, 16, TFS(&softKeyMapValues), SKINNY_SOFTKEY13, - NULL, - HFILL } + FT_BOOLEAN, 16, TFS(&softKeyMapValues), SKINNY_SOFTKEY13, + NULL, + HFILL } }, { &hf_skinny_softKey14, { "SoftKey14", "skinny.softKeyMap.14", - FT_BOOLEAN, 16, TFS(&softKeyMapValues), SKINNY_SOFTKEY14, - NULL, - HFILL } + FT_BOOLEAN, 16, TFS(&softKeyMapValues), SKINNY_SOFTKEY14, + NULL, + HFILL } }, { &hf_skinny_softKey15, { "SoftKey15", "skinny.softKeyMap.15", - FT_BOOLEAN, 16, TFS(&softKeyMapValues), SKINNY_SOFTKEY15, - NULL, - HFILL } + FT_BOOLEAN, 16, TFS(&softKeyMapValues), SKINNY_SOFTKEY15, + NULL, + HFILL } }, { &hf_skinny_lampMode, { "Lamp mode", "skinny.lampMode", - FT_UINT32, BASE_DEC|BASE_EXT_STRING, &stationLampModes_ext, 0x0, - NULL, - HFILL } + FT_UINT32, BASE_DEC|BASE_EXT_STRING, &stationLampModes_ext, 0x0, + NULL, + HFILL } }, { &hf_skinny_messageTimeOutValue, { "Message time-out", "skinny.messageTimeOutValue", - FT_UINT32, BASE_DEC, NULL, 0x0, - "The timeout in seconds for this message", - HFILL } + FT_UINT32, BASE_DEC, NULL, 0x0, + "The timeout in seconds for this message", + HFILL } }, { &hf_skinny_displayMessage, { "Display message", "skinny.displayMessage", - FT_STRING, BASE_NONE, NULL, 0x0, - "The message displayed on the phone.", - HFILL } + FT_STRING, BASE_NONE, NULL, 0x0, + "The message displayed on the phone.", + HFILL } }, { &hf_skinny_lineDirNumber, { "Line directory number", "skinny.lineDirNumber", - FT_STRING, BASE_NONE, NULL, 0x0, - "The directory number for this line.", - HFILL } + FT_STRING, BASE_NONE, NULL, 0x0, + "The directory number for this line.", + HFILL } }, { &hf_skinny_lineFullyQualifiedDisplayName, { "Fully qualified display name", "skinny.fqdn", - FT_STRING, BASE_NONE, NULL, 0x0, - "The full display name for this line.", - HFILL } + FT_STRING, BASE_NONE, NULL, 0x0, + "The full display name for this line.", + HFILL } }, { &hf_skinny_lineDisplayName, { "Display name", "skinny.displayName", - FT_STRING, BASE_NONE, NULL, 0x0, - "The display name for this line.", - HFILL } + FT_STRING, BASE_NONE, NULL, 0x0, + "The display name for this line.", + HFILL } }, { &hf_skinny_speedDialDirNumber, { "Speed-dial number", "skinny.speedDialDirNum", - FT_STRING, BASE_NONE, NULL, 0x0, - "the number to dial for this speed dial.", - HFILL } + FT_STRING, BASE_NONE, NULL, 0x0, + "the number to dial for this speed dial.", + HFILL } }, { &hf_skinny_speedDialDisplayName, { "Speed-dial display", "skinny.speedDialDisplay", - FT_STRING, BASE_NONE, NULL, 0x0, - "The text to display for this speed dial.", - HFILL } + FT_STRING, BASE_NONE, NULL, 0x0, + "The text to display for this speed dial.", + HFILL } }, { &hf_skinny_dateYear, { "Year", "skinny.year", - FT_UINT32, BASE_DEC, NULL, 0x0, - "The current year", - HFILL } + FT_UINT32, BASE_DEC, NULL, 0x0, + "The current year", + HFILL } }, { &hf_skinny_dateMonth, { "Month", "skinny.month", - FT_UINT32, BASE_DEC, NULL, 0x0, - "The current month", - HFILL } + FT_UINT32, BASE_DEC, NULL, 0x0, + "The current month", + HFILL } }, { &hf_skinny_dayOfWeek, { "Day of week", "skinny.dayOfWeek", - FT_UINT32, BASE_DEC, NULL, 0x0, - "The day of the week", - HFILL } + FT_UINT32, BASE_DEC, NULL, 0x0, + "The day of the week", + HFILL } }, { &hf_skinny_dateDay, { "Day", "skinny.day", - FT_UINT32, BASE_DEC, NULL, 0x0, - "The day of the current month", - HFILL } + FT_UINT32, BASE_DEC, NULL, 0x0, + "The day of the current month", + HFILL } }, { &hf_skinny_dateHour, { "Hour", "skinny.hour", - FT_UINT32, BASE_DEC, NULL, 0x0, - "Hour of the day", - HFILL } + FT_UINT32, BASE_DEC, NULL, 0x0, + "Hour of the day", + HFILL } }, { &hf_skinny_dateMinute, { "Minute", "skinny.minute", - FT_UINT32, BASE_DEC, NULL, 0x0, - NULL, - HFILL } + FT_UINT32, BASE_DEC, NULL, 0x0, + NULL, + HFILL } }, { &hf_skinny_dateSeconds, { "Seconds", "skinny.dateSeconds", - FT_UINT32, BASE_DEC, NULL, 0x0, - NULL, - HFILL } + FT_UINT32, BASE_DEC, NULL, 0x0, + NULL, + HFILL } }, { &hf_skinny_dateMilliseconds, { "Milliseconds", "skinny.dateMilliseconds", - FT_UINT32, BASE_DEC, NULL, 0x0, - NULL, - HFILL } + FT_UINT32, BASE_DEC, NULL, 0x0, + NULL, + HFILL } }, { &hf_skinny_timeStamp, { "Timestamp", "skinny.timeStamp", - FT_UINT32, BASE_DEC, NULL, 0x0, - "Time stamp for the call reference", - HFILL } + FT_UINT32, BASE_DEC, NULL, 0x0, + "Time stamp for the call reference", + HFILL } }, { &hf_skinny_callState, { "Call state", "skinny.callState", - FT_UINT32, BASE_DEC|BASE_EXT_STRING, &skinny_stationCallStates_ext, 0x0, - "The D channel call state of the call", - HFILL } + FT_UINT32, BASE_DEC|BASE_EXT_STRING, &skinny_stationCallStates_ext, 0x0, + "The D channel call state of the call", + HFILL } }, { &hf_skinny_deviceTone, { "Tone", "skinny.deviceTone", - FT_UINT32, BASE_HEX|BASE_EXT_STRING, &skinny_deviceTones_ext, 0x0, - "Which tone to play", - HFILL } + FT_UINT32, BASE_HEX|BASE_EXT_STRING, &skinny_deviceTones_ext, 0x0, + "Which tone to play", + HFILL } }, { &hf_skinny_callingPartyName, { "Calling party name", "skinny.callingPartyName", - FT_STRING, BASE_NONE, NULL, 0x0, - "The passed name of the calling party.", - HFILL } + FT_STRING, BASE_NONE, NULL, 0x0, + "The passed name of the calling party.", + HFILL } }, { &hf_skinny_callingPartyNumber, { "Calling party number", "skinny.callingParty", - FT_STRING, BASE_NONE, NULL, 0x0, - "The passed number of the calling party.", - HFILL } + FT_STRING, BASE_NONE, NULL, 0x0, + "The passed number of the calling party.", + HFILL } }, { &hf_skinny_calledPartyName, { "Called party name", "skinny.calledPartyName", - FT_STRING, BASE_NONE, NULL, 0x0, - "The name of the party we are calling.", - HFILL } + FT_STRING, BASE_NONE, NULL, 0x0, + "The name of the party we are calling.", + HFILL } }, { &hf_skinny_callType, { "Call type", "skinny.callType", - FT_UINT32, BASE_DEC, VALS(skinny_callTypes), 0x0, - "What type of call, in/out/etc", - HFILL } + FT_UINT32, BASE_DEC, VALS(skinny_callTypes), 0x0, + "What type of call, in/out/etc", + HFILL } }, { &hf_skinny_originalCalledPartyName, { "Original called party name", "skinny.originalCalledPartyName", - FT_STRING, BASE_NONE, NULL, 0x0, - NULL, - HFILL } + FT_STRING, BASE_NONE, NULL, 0x0, + NULL, + HFILL } }, { &hf_skinny_originalCalledParty, { "Original called party number", "skinny.originalCalledParty", - FT_STRING, BASE_NONE, NULL, 0x0, - NULL, - HFILL } + FT_STRING, BASE_NONE, NULL, 0x0, + NULL, + HFILL } }, { &hf_skinny_ringType, { "Ring type", "skinny.ringType", - FT_UINT32, BASE_HEX|BASE_EXT_STRING, &skinny_ringTypes_ext, 0x0, - "What type of ring to play", - HFILL } + FT_UINT32, BASE_HEX|BASE_EXT_STRING, &skinny_ringTypes_ext, 0x0, + "What type of ring to play", + HFILL } }, { &hf_skinny_ringMode, { "Ring mode", "skinny.ringMode", - FT_UINT32, BASE_HEX, VALS(skinny_ringModes), 0x0, - "What mode of ring to play", - HFILL } + FT_UINT32, BASE_HEX, VALS(skinny_ringModes), 0x0, + "What mode of ring to play", + HFILL } }, { &hf_skinny_speakerMode, { "Speaker", "skinny.speakerMode", - FT_UINT32, BASE_HEX, VALS(skinny_speakerModes), 0x0, - "This message sets the speaker mode on/off", - HFILL } + FT_UINT32, BASE_HEX, VALS(skinny_speakerModes), 0x0, + "This message sets the speaker mode on/off", + HFILL } }, { &hf_skinny_remoteIpAddr, { "Remote IP address", "skinny.remoteIpAddr", - FT_IPv4, BASE_NONE, NULL, 0x0, - "The remote end ip address for this stream", - HFILL } + FT_IPv4, BASE_NONE, NULL, 0x0, + "The remote end ip address for this stream", + HFILL } }, { &hf_skinny_remotePortNumber, { "Remote port", "skinny.remotePortNumber", - FT_UINT32, BASE_DEC, NULL, 0x0, - "The remote port number listening for this stream", - HFILL } + FT_UINT32, BASE_DEC, NULL, 0x0, + "The remote port number listening for this stream", + HFILL } }, { &hf_skinny_millisecondPacketSize, { "MS/packet", "skinny.millisecondPacketSize", - FT_UINT32, BASE_DEC, NULL, 0x0, - "The number of milliseconds of conversation in each packet", - HFILL } + FT_UINT32, BASE_DEC, NULL, 0x0, + "The number of milliseconds of conversation in each packet", + HFILL } }, { &hf_skinny_precedenceValue, { "Precedence", "skinny.precedenceValue", - FT_UINT32, BASE_DEC, NULL, 0x0, - NULL, - HFILL } + FT_UINT32, BASE_DEC, NULL, 0x0, + NULL, + HFILL } }, { &hf_skinny_silenceSuppression, { "Silence suppression", "skinny.silenceSuppression", - FT_UINT32, BASE_HEX, VALS(skinny_silenceSuppressionModes), 0x0, - "Mode for silence suppression", - HFILL } + FT_UINT32, BASE_HEX, VALS(skinny_silenceSuppressionModes), 0x0, + "Mode for silence suppression", + HFILL } }, { &hf_skinny_g723BitRate, { "G723 bitrate", "skinny.g723BitRate", - FT_UINT32, BASE_DEC, VALS(skinny_g723BitRates), 0x0, - "The G723 bit rate for this stream/JUNK if not g723 stream", - HFILL } + FT_UINT32, BASE_DEC, VALS(skinny_g723BitRates), 0x0, + "The G723 bit rate for this stream/JUNK if not g723 stream", + HFILL } }, { &hf_skinny_conferenceID, { "Conference ID", "skinny.conferenceID", - FT_UINT32, BASE_DEC, NULL, 0x0, - NULL, - HFILL } + FT_UINT32, BASE_DEC, NULL, 0x0, + NULL, + HFILL } }, { &hf_skinny_deviceResetType, { "Reset type", "skinny.deviceResetType", - FT_UINT32, BASE_DEC, VALS(skinny_deviceResetTypes), 0x0, - "How the devices it to be reset (reset/restart)", - HFILL } + FT_UINT32, BASE_DEC, VALS(skinny_deviceResetTypes), 0x0, + "How the devices it to be reset (reset/restart)", + HFILL } }, { &hf_skinny_echoCancelType, { "Echo-cancel type", "skinny.echoCancelType", - FT_UINT32, BASE_DEC, VALS(skinny_echoCancelTypes), 0x0, - "Is echo cancelling enabled or not", - HFILL } + FT_UINT32, BASE_DEC, VALS(skinny_echoCancelTypes), 0x0, + "Is echo cancelling enabled or not", + HFILL } }, { &hf_skinny_deviceUnregisterStatus, { "Unregister status", "skinny.deviceUnregisterStatus", - FT_UINT32, BASE_DEC, VALS(skinny_deviceUnregisterStatusTypes), 0x0, - "The status of the device unregister request (*CAN* be refused)", - HFILL } + FT_UINT32, BASE_DEC, VALS(skinny_deviceUnregisterStatusTypes), 0x0, + "The status of the device unregister request (*CAN* be refused)", + HFILL } }, { &hf_skinny_hookFlashDetectMode, { "Hook flash mode", "skinny.hookFlashDetectMode", - FT_UINT32, BASE_DEC, VALS(skinny_hookFlashDetectModes), 0x0, - "Which method to use to detect that a hook flash has occured", - HFILL } + FT_UINT32, BASE_DEC, VALS(skinny_hookFlashDetectModes), 0x0, + "Which method to use to detect that a hook flash has occured", + HFILL } }, { &hf_skinny_detectInterval, { "HF Detect Interval", "skinny.detectInterval", - FT_UINT32, BASE_DEC, NULL, 0x0, - "The number of milliseconds that determines a hook flash has occured", - HFILL } + FT_UINT32, BASE_DEC, NULL, 0x0, + "The number of milliseconds that determines a hook flash has occured", + HFILL } }, { &hf_skinny_headsetMode, { "Headset mode", "skinny.headsetMode", - FT_UINT32, BASE_DEC, VALS(skinny_headsetModes), 0x0, - "Turns on and off the headset on the set", - HFILL } + FT_UINT32, BASE_DEC, VALS(skinny_headsetModes), 0x0, + "Turns on and off the headset on the set", + HFILL } }, { &hf_skinny_microphoneMode, { "Microphone mode", "skinny.microphoneMode", - FT_UINT32, BASE_DEC, VALS(skinny_microphoneModes), 0x0, - "Turns on and off the microphone on the set", - HFILL } + FT_UINT32, BASE_DEC, VALS(skinny_microphoneModes), 0x0, + "Turns on and off the microphone on the set", + HFILL } }, { &hf_skinny_activeForward, { "Active forward", "skinny.activeForward", - FT_UINT32, BASE_DEC, NULL, 0x0, - "This is non zero to indicate that a forward is active on the line", - HFILL } + FT_UINT32, BASE_DEC, NULL, 0x0, + "This is non zero to indicate that a forward is active on the line", + HFILL } }, { &hf_skinny_forwardAllActive, { "Forward all", "skinny.forwardAllActive", - FT_UINT32, BASE_DEC, NULL, 0x0, - "Forward all calls", - HFILL } + FT_UINT32, BASE_DEC, NULL, 0x0, + "Forward all calls", + HFILL } }, { &hf_skinny_forwardBusyActive, { "Forward busy", "skinny.forwardBusyActive", - FT_UINT32, BASE_DEC, NULL, 0x0, - "Forward calls when busy", - HFILL } + FT_UINT32, BASE_DEC, NULL, 0x0, + "Forward calls when busy", + HFILL } }, { &hf_skinny_forwardNoAnswerActive, { "Forward no answer", "skinny.forwardNoAnswerActive", - FT_UINT32, BASE_DEC, NULL, 0x0, - "Forward only when no answer", - HFILL } + FT_UINT32, BASE_DEC, NULL, 0x0, + "Forward only when no answer", + HFILL } }, { &hf_skinny_forwardNumber, { "Forward number", "skinny.forwardNumber", - FT_STRING, BASE_NONE, NULL, 0x0, - "The number to forward calls to.", - HFILL } + FT_STRING, BASE_NONE, NULL, 0x0, + "The number to forward calls to.", + HFILL } }, { &hf_skinny_userName, { "Username", "skinny.userName", - FT_STRING, BASE_NONE, NULL, 0x0, - "Username for this device.", - HFILL } + FT_STRING, BASE_NONE, NULL, 0x0, + "Username for this device.", + HFILL } }, { &hf_skinny_serverName, { "Server name", "skinny.serverName", - FT_STRING, BASE_NONE, NULL, 0x0, - "The server name for this device.", - HFILL } + FT_STRING, BASE_NONE, NULL, 0x0, + "The server name for this device.", + HFILL } }, { &hf_skinny_numberLines, { "Number of lines", "skinny.numberLines", - FT_UINT32, BASE_DEC, NULL, 0x0, - "How many lines this device has", - HFILL } + FT_UINT32, BASE_DEC, NULL, 0x0, + "How many lines this device has", + HFILL } }, { &hf_skinny_numberSpeedDials, { "Number of speed-dials", "skinny.numberSpeedDials", - FT_UINT32, BASE_DEC, NULL, 0x0, - "The number of speed dials this device has", - HFILL } + FT_UINT32, BASE_DEC, NULL, 0x0, + "The number of speed dials this device has", + HFILL } }, { &hf_skinny_sessionType, { "Session type", "skinny.sessionType", - FT_UINT32, BASE_DEC|BASE_EXT_STRING, &skinny_sessionTypes_ext, 0x0, - "The type of this session.", - HFILL } + FT_UINT32, BASE_DEC|BASE_EXT_STRING, &skinny_sessionTypes_ext, 0x0, + "The type of this session.", + HFILL } }, { &hf_skinny_version, { "Version", "skinny.version", - FT_STRING, BASE_NONE, NULL, 0x0, - NULL, - HFILL } + FT_STRING, BASE_NONE, NULL, 0x0, + NULL, + HFILL } }, { &hf_skinny_mediaEnunciationType, { "Enunciation type", "skinny.mediaEnunciationType", - FT_UINT32, BASE_DEC, VALS(skinny_mediaEnunciationTypes), 0x0, - NULL, - HFILL } + FT_UINT32, BASE_DEC, VALS(skinny_mediaEnunciationTypes), 0x0, + NULL, + HFILL } }, { &hf_skinny_serverIdentifier, { "Server identifier", "skinny.serverIdentifier", - FT_STRING, BASE_NONE, NULL, 0x0, - NULL, - HFILL } + FT_STRING, BASE_NONE, NULL, 0x0, + NULL, + HFILL } }, { &hf_skinny_serverListenPort, { "Server port", "skinny.serverListenPort", - FT_UINT32, BASE_DEC, NULL, 0x0, - NULL, - HFILL } + FT_UINT32, BASE_DEC, NULL, 0x0, + NULL, + HFILL } }, { &hf_skinny_serverIpAddress, { "Server IP address", "skinny.serverIpAddress", - FT_IPv4, BASE_NONE, NULL, 0x0, - NULL, - HFILL } + FT_IPv4, BASE_NONE, NULL, 0x0, + NULL, + HFILL } }, { &hf_skinny_multicastPort, { "Multicast port", "skinny.multicastPort", - FT_UINT32, BASE_DEC, NULL, 0x0, - NULL, - HFILL } + FT_UINT32, BASE_DEC, NULL, 0x0, + NULL, + HFILL } }, { &hf_skinny_multicastIpAddress, { "Multicast IP address", "skinny.multicastIpAddress", - FT_IPv4, BASE_NONE, NULL, 0x0, - NULL, - HFILL } + FT_IPv4, BASE_NONE, NULL, 0x0, + NULL, + HFILL } }, { &hf_skinny_tokenRejWaitTime, { "Retry wait time", "skinny.tokenRejWaitTime", - FT_UINT32, BASE_DEC, NULL, 0x0, - NULL, - HFILL } + FT_UINT32, BASE_DEC, NULL, 0x0, + NULL, + HFILL } }, { &hf_skinny_unknown, { "Unknown data", "skinny.unknown", - FT_UINT32, BASE_HEX, NULL, 0x0, - "Place holder for unknown data.", - HFILL } + FT_UINT32, BASE_HEX, NULL, 0x0, + "Place holder for unknown data.", + HFILL } }, { &hf_skinny_rawData, { "Unknown raw data", "skinny.rawData", - FT_BYTES, BASE_NONE, NULL, 0x0, - "Place holder for unknown raw data.", - HFILL } + FT_BYTES, BASE_NONE, NULL, 0x0, + "Place holder for unknown raw data.", + HFILL } }, { &hf_skinny_xmlData, { "XML data", "skinny.xmlData", - FT_STRING, BASE_NONE, NULL, 0x0, - NULL, - HFILL } + FT_STRING, BASE_NONE, NULL, 0x0, + NULL, + HFILL } }, { &hf_skinny_numberOfInServiceStreams, { "Number of in-service streams", "skinny.numberOfInServiceStreams", - FT_UINT32, BASE_DEC, NULL, 0x0, - NULL, - HFILL } + FT_UINT32, BASE_DEC, NULL, 0x0, + NULL, + HFILL } }, { &hf_skinny_maxStreamsPerConf, { "Max streams per conf", "skinny.maxStreamsPerConf", - FT_UINT32, BASE_DEC, NULL, 0x0, - NULL, - HFILL } + FT_UINT32, BASE_DEC, NULL, 0x0, + NULL, + HFILL } }, { &hf_skinny_numberOfOutOfServiceStreams, { "Number of out-of-service streams", "skinny.numberOfOutOfServiceStreams", - FT_UINT32, BASE_DEC, NULL, 0x0, - NULL, - HFILL } + FT_UINT32, BASE_DEC, NULL, 0x0, + NULL, + HFILL } }, { &hf_skinny_applicationID, { "Application ID", "skinny.applicationID", - FT_UINT32, BASE_DEC, NULL, 0x0, - "Application ID.", - HFILL } + FT_UINT32, BASE_DEC, NULL, 0x0, + "Application ID.", + HFILL } }, { &hf_skinny_transactionID, { "Transaction ID", "skinny.transactionID", - FT_UINT32, BASE_DEC, NULL, 0x0, - NULL, - HFILL } + FT_UINT32, BASE_DEC, NULL, 0x0, + NULL, + HFILL } }, { &hf_skinny_serviceNum, { "Service number", "skinny.serviceNum", - FT_UINT32, BASE_DEC, NULL, 0x0, - NULL, - HFILL } + FT_UINT32, BASE_DEC, NULL, 0x0, + NULL, + HFILL } }, { &hf_skinny_serviceURLIndex, { "Service URL index", "skinny.serviceURLIndex", - FT_UINT32, BASE_DEC, NULL, 0x0, - NULL, - HFILL } + FT_UINT32, BASE_DEC, NULL, 0x0, + NULL, + HFILL } }, { &hf_skinny_featureIndex, { "Feature index", "skinny.featureIndex", - FT_UINT32, BASE_DEC, NULL, 0x0, - NULL, - HFILL } + FT_UINT32, BASE_DEC, NULL, 0x0, + NULL, + HFILL } }, { &hf_skinny_createConfResults, { "Create conf results", "skinny.createConfResults", - FT_UINT32, BASE_DEC, VALS(skinny_createConfResults), 0x0, - NULL, - HFILL } + FT_UINT32, BASE_DEC, VALS(skinny_createConfResults), 0x0, + NULL, + HFILL } }, { &hf_skinny_modifyConfResults, { "Modify conf results", "skinny.modifyConfResults", - FT_UINT32, BASE_DEC|BASE_EXT_STRING, &skinny_modifyConfResults_ext, 0x0, - NULL, - HFILL } + FT_UINT32, BASE_DEC|BASE_EXT_STRING, &skinny_modifyConfResults_ext, 0x0, + NULL, + HFILL } }, { &hf_skinny_deleteConfResults, { "Delete conf results", "skinny.deleteConfResults", - FT_UINT32, BASE_DEC, VALS(skinny_deleteConfResults), 0x0, - NULL, - HFILL } + FT_UINT32, BASE_DEC, VALS(skinny_deleteConfResults), 0x0, + NULL, + HFILL } }, { &hf_skinny_addParticipantResults, { "Add participant results", "skinny.addParticipantResults", - FT_UINT32, BASE_DEC|BASE_EXT_STRING, &skinny_addParticipantResults_ext, 0x0, - NULL, - HFILL } + FT_UINT32, BASE_DEC|BASE_EXT_STRING, &skinny_addParticipantResults_ext, 0x0, + NULL, + HFILL } }, { &hf_skinny_passThruData, { "Pass-thru data", "skinny.passThruData", - FT_UINT8, BASE_HEX, NULL, 0x0, - NULL, - HFILL } + FT_UINT8, BASE_HEX, NULL, 0x0, + NULL, + HFILL } }, { &hf_skinny_auditParticipantResults, { "Audit participant results", "skinny.auditParticipantResults", - FT_UINT32, BASE_DEC, VALS(skinny_auditParticipantResults), 0x0, - NULL, - HFILL } + FT_UINT32, BASE_DEC, VALS(skinny_auditParticipantResults), 0x0, + NULL, + HFILL } }, { &hf_skinny_last, { "Last", "skinny.last", - FT_UINT32, BASE_DEC, NULL, 0x0, - NULL, - HFILL } + FT_UINT32, BASE_DEC, NULL, 0x0, + NULL, + HFILL } }, { &hf_skinny_numberOfEntries, { "Number of entries", "skinny.numberOfEntries", - FT_UINT32, BASE_DEC, NULL, 0x0, - NULL, - HFILL } + FT_UINT32, BASE_DEC, NULL, 0x0, + NULL, + HFILL } }, { &hf_skinny_participantEntry, { "Participant entry", "skinny.participantEntry", - FT_UINT32, BASE_DEC, NULL, 0x0, - NULL, - HFILL } + FT_UINT32, BASE_DEC, NULL, 0x0, + NULL, + HFILL } }, { &hf_skinny_resourceTypes, { "ResourceType", "skinny.resourceTypes", - FT_UINT32, BASE_DEC, VALS(skinny_resourceTypes), 0x0, - NULL, - HFILL } + FT_UINT32, BASE_DEC, VALS(skinny_resourceTypes), 0x0, + NULL, + HFILL } }, { &hf_skinny_numberOfReservedParticipants, { "Number of reserved participants", "skinny.numberOfReservedParticipants", - FT_UINT32, BASE_DEC, NULL, 0x0, - NULL, - HFILL } + FT_UINT32, BASE_DEC, NULL, 0x0, + NULL, + HFILL } }, { &hf_skinny_numberOfActiveParticipants, { "Number of active participants", "skinny.numberOfActiveParticipants", - FT_UINT32, BASE_DEC, NULL, 0x0, - NULL, - HFILL } + FT_UINT32, BASE_DEC, NULL, 0x0, + NULL, + HFILL } }, { &hf_skinny_appID, { "Application ID", "skinny.appID", - FT_UINT32, BASE_DEC, NULL, 0x0, - NULL, - HFILL } + FT_UINT32, BASE_DEC, NULL, 0x0, + NULL, + HFILL } }, { &hf_skinny_appData, { "Application data", "skinny.appData", - FT_UINT8, BASE_HEX, NULL, 0x0, - NULL, - HFILL } + FT_UINT8, BASE_HEX, NULL, 0x0, + NULL, + HFILL } }, { &hf_skinny_appConfID, { "Application conf ID", "skinny.appConfID", - FT_UINT8, BASE_HEX, NULL, 0x0, - NULL, - HFILL } + FT_UINT8, BASE_HEX, NULL, 0x0, + NULL, + HFILL } }, { &hf_skinny_sequenceFlag, { "Sequence flag", "skinny.sequenceFlag", - FT_UINT32, BASE_DEC, VALS(skinny_sequenceFlags), 0x0, - NULL, - HFILL } + FT_UINT32, BASE_DEC, VALS(skinny_sequenceFlags), 0x0, + NULL, + HFILL } }, { &hf_skinny_displayPriority, { "Display priority", "skinny.displayPriority", - FT_UINT32, BASE_DEC, NULL, 0x0, - NULL, - HFILL } + FT_UINT32, BASE_DEC, NULL, 0x0, + NULL, + HFILL } }, { &hf_skinny_appInstanceID, { "Application instance ID", "skinny.appInstanceID", - FT_UINT32, BASE_DEC, NULL, 0x0, - NULL, - HFILL } + FT_UINT32, BASE_DEC, NULL, 0x0, + NULL, + HFILL } }, { &hf_skinny_routingID, { "Routing ID", "skinny.routingID", - FT_UINT32, BASE_DEC, NULL, 0x0, - NULL, - HFILL } + FT_UINT32, BASE_DEC, NULL, 0x0, + NULL, + HFILL } }, { &hf_skinny_audioCapCount, { "Audio cap count", "skinny.audioCapCount", - FT_UINT32, BASE_DEC, NULL, 0x0, - NULL, - HFILL } + FT_UINT32, BASE_DEC, NULL, 0x0, + NULL, + HFILL } }, { &hf_skinny_videoCapCount, { "Video cap count", "skinny.videoCapCount", - FT_UINT32, BASE_DEC, NULL, 0x0, - NULL, - HFILL } + FT_UINT32, BASE_DEC, NULL, 0x0, + NULL, + HFILL } }, { &hf_skinny_dataCapCount, { "Data cap count", "skinny.dataCapCount", - FT_UINT32, BASE_DEC, NULL, 0x0, - NULL, - HFILL } + FT_UINT32, BASE_DEC, NULL, 0x0, + NULL, + HFILL } }, { &hf_skinny_RTPPayloadFormat, { "RTP payload format", "skinny.RTPPayloadFormat", - FT_UINT32, BASE_DEC, NULL, 0x0, - NULL, - HFILL } + FT_UINT32, BASE_DEC, NULL, 0x0, + NULL, + HFILL } }, { &hf_skinny_customPictureFormatCount, { "Custom picture format count", "skinny.customPictureFormatCount", - FT_UINT32, BASE_DEC, NULL, 0x0, - NULL, - HFILL } + FT_UINT32, BASE_DEC, NULL, 0x0, + NULL, + HFILL } }, { &hf_skinny_pictureWidth, { "Picture width", "skinny.pictureWidth", - FT_UINT32, BASE_DEC, NULL, 0x0, - NULL, - HFILL } + FT_UINT32, BASE_DEC, NULL, 0x0, + NULL, + HFILL } }, { &hf_skinny_pictureHeight, { "Picture height", "skinny.pictureHeight", - FT_UINT32, BASE_DEC, NULL, 0x0, - NULL, - HFILL } + FT_UINT32, BASE_DEC, NULL, 0x0, + NULL, + HFILL } }, { &hf_skinny_pixelAspectRatio, { "Pixel aspect ratio", "skinny.pixelAspectRatio", - FT_UINT32, BASE_DEC, NULL, 0x0, - NULL, - HFILL } + FT_UINT32, BASE_DEC, NULL, 0x0, + NULL, + HFILL } }, { &hf_skinny_clockConversionCode, { "Clock conversion code", "skinny.clockConversionCode", - FT_UINT32, BASE_DEC, NULL, 0x0, - NULL, - HFILL } + FT_UINT32, BASE_DEC, NULL, 0x0, + NULL, + HFILL } }, { &hf_skinny_clockDivisor, { "Clock divisor", "skinny.clockDivisor", - FT_UINT32, BASE_DEC, NULL, 0x0, - NULL, - HFILL } + FT_UINT32, BASE_DEC, NULL, 0x0, + NULL, + HFILL } }, { &hf_skinny_activeStreamsOnRegistration, { "Active streams on registration", "skinny.activeStreamsOnRegistration", - FT_UINT32, BASE_DEC, NULL, 0x0, - NULL, - HFILL } + FT_UINT32, BASE_DEC, NULL, 0x0, + NULL, + HFILL } }, { &hf_skinny_maxBW, { "Max BW", "skinny.maxBW", - FT_UINT32, BASE_DEC, NULL, 0x0, - NULL, - HFILL } + FT_UINT32, BASE_DEC, NULL, 0x0, + NULL, + HFILL } }, { &hf_skinny_serviceResourceCount, { "Service resource count", "skinny.serviceResourceCount", - FT_UINT32, BASE_DEC, NULL, 0x0, - NULL, - HFILL } + FT_UINT32, BASE_DEC, NULL, 0x0, + NULL, + HFILL } }, { &hf_skinny_layoutCount, { "Layout count", "skinny.layoutCount", - FT_UINT32, BASE_DEC, NULL, 0x0, - NULL, - HFILL } + FT_UINT32, BASE_DEC, NULL, 0x0, + NULL, + HFILL } }, { &hf_skinny_layout, { "Layout", "skinny.layout", - FT_UINT32, BASE_DEC|BASE_EXT_STRING, &skinny_Layouts_ext, 0x0, - NULL, - HFILL } + FT_UINT32, BASE_DEC|BASE_EXT_STRING, &skinny_Layouts_ext, 0x0, + NULL, + HFILL } }, { &hf_skinny_maxConferences, { "Max conferences", "skinny.maxConferences", - FT_UINT32, BASE_DEC, NULL, 0x0, - NULL, - HFILL } + FT_UINT32, BASE_DEC, NULL, 0x0, + NULL, + HFILL } }, { &hf_skinny_activeConferenceOnRegistration, { "Active conference on registration", "skinny.activeConferenceOnRegistration", - FT_UINT32, BASE_DEC, NULL, 0x0, - NULL, - HFILL } + FT_UINT32, BASE_DEC, NULL, 0x0, + NULL, + HFILL } }, { &hf_skinny_transmitOrReceive, { "Transmit or receive", "skinny.transmitOrReceive", - FT_UINT32, BASE_DEC, VALS(skinny_transmitOrReceive), 0x0, - NULL, - HFILL } + FT_UINT32, BASE_DEC, VALS(skinny_transmitOrReceive), 0x0, + NULL, + HFILL } }, { &hf_skinny_levelPreferenceCount, { "Level preference count", "skinny.levelPreferenceCount", - FT_UINT32, BASE_DEC, NULL, 0x0, - NULL, - HFILL } + FT_UINT32, BASE_DEC, NULL, 0x0, + NULL, + HFILL } }, { &hf_skinny_transmitPreference, { "Transmit preference", "skinny.transmitPreference", - FT_UINT32, BASE_DEC, NULL, 0x0, - NULL, - HFILL } + FT_UINT32, BASE_DEC, NULL, 0x0, + NULL, + HFILL } }, { &hf_skinny_format, { "Format", "skinny.format", - FT_UINT32, BASE_DEC|BASE_EXT_STRING, &skinny_formatTypes_ext, 0x0, - NULL, - HFILL } + FT_UINT32, BASE_DEC|BASE_EXT_STRING, &skinny_formatTypes_ext, 0x0, + NULL, + HFILL } }, { &hf_skinny_maxBitRate, { "Max bitrate", "skinny.maxBitRate", - FT_UINT32, BASE_DEC, NULL, 0x0, - NULL, - HFILL } + FT_UINT32, BASE_DEC, NULL, 0x0, + NULL, + HFILL } }, { &hf_skinny_minBitRate, { "Min bitrate", "skinny.minBitRate", - FT_UINT32, BASE_DEC, NULL, 0x0, - NULL, - HFILL } + FT_UINT32, BASE_DEC, NULL, 0x0, + NULL, + HFILL } }, { &hf_skinny_MPI, { "MPI", "skinny.MPI", - FT_UINT32, BASE_DEC, NULL, 0x0, - NULL, - HFILL } + FT_UINT32, BASE_DEC, NULL, 0x0, + NULL, + HFILL } }, { &hf_skinny_serviceNumber, { "Service number", "skinny.serviceNumber", - FT_UINT32, BASE_DEC, NULL, 0x0, - NULL, - HFILL } + FT_UINT32, BASE_DEC, NULL, 0x0, + NULL, + HFILL } }, { &hf_skinny_temporalSpatialTradeOffCapability, { "Temporal spatial trade off capability", "skinny.temporalSpatialTradeOffCapability", - FT_UINT32, BASE_DEC, NULL, 0x0, - NULL, - HFILL } + FT_UINT32, BASE_DEC, NULL, 0x0, + NULL, + HFILL } }, { &hf_skinny_stillImageTransmission, { "Still image transmission", "skinny.stillImageTransmission", - FT_UINT32, BASE_DEC, NULL, 0x0, - NULL, - HFILL } + FT_UINT32, BASE_DEC, NULL, 0x0, + NULL, + HFILL } }, { &hf_skinny_h263_capability_bitfield, { "H263 capability bitfield", "skinny.h263_capability_bitfield", - FT_UINT32, BASE_DEC, NULL, 0x0, - NULL, - HFILL } + FT_UINT32, BASE_DEC, NULL, 0x0, + NULL, + HFILL } }, { &hf_skinny_annexNandWFutureUse, { "Annex N and W future use", "skinny.annexNandWFutureUse", - FT_UINT32, BASE_DEC, NULL, 0x0, - NULL, - HFILL } + FT_UINT32, BASE_DEC, NULL, 0x0, + NULL, + HFILL } }, { &hf_skinny_modelNumber, { "Model number", "skinny.modelNumber", - FT_UINT32, BASE_DEC, NULL, 0x0, - NULL, - HFILL } + FT_UINT32, BASE_DEC, NULL, 0x0, + NULL, + HFILL } }, { &hf_skinny_bandwidth, { "Bandwidth", "skinny.bandwidth", - FT_UINT32, BASE_DEC, NULL, 0x0, - NULL, - HFILL } + FT_UINT32, BASE_DEC, NULL, 0x0, + NULL, + HFILL } }, { &hf_skinny_protocolDependentData, { "Protocol dependent data", "skinny.protocolDependentData", - FT_UINT32, BASE_DEC, NULL, 0x0, - NULL, - HFILL } + FT_UINT32, BASE_DEC, NULL, 0x0, + NULL, + HFILL } }, { &hf_skinny_priority, { "Priority", "skinny.priority", - FT_UINT32, BASE_DEC, NULL, 0x0, - NULL, - HFILL } + FT_UINT32, BASE_DEC, NULL, 0x0, + NULL, + HFILL } }, { &hf_skinny_payloadDtmf, { "Payload DTMF", "skinny.payloadDtmf", - FT_UINT32, BASE_DEC, NULL, 0x0, - "RTP payload type.", - HFILL } + FT_UINT32, BASE_DEC, NULL, 0x0, + "RTP payload type.", + HFILL } }, { &hf_skinny_featureID, { "Feature ID", "skinny.featureID", - FT_UINT32, BASE_DEC, NULL, 0x0, - NULL, - HFILL } + FT_UINT32, BASE_DEC, NULL, 0x0, + NULL, + HFILL } }, { &hf_skinny_featureTextLabel, { "Feature text label", "skinny.featureTextLabel", - FT_STRING, BASE_NONE, NULL, 0x0, - "The feature label text that is displayed on the phone.", - HFILL } + FT_STRING, BASE_NONE, NULL, 0x0, + "The feature label text that is displayed on the phone.", + HFILL } }, { &hf_skinny_featureStatus, { "Feature status", "skinny.featureStatus", - FT_UINT32, BASE_DEC, NULL, 0x0, - NULL, - HFILL } + FT_UINT32, BASE_DEC, NULL, 0x0, + NULL, + HFILL } }, { &hf_skinny_notify, { "Notify", "skinny.notify", - FT_STRING, BASE_NONE, NULL, 0x0, - "The message notify text that is displayed on the phone.", - HFILL } + FT_STRING, BASE_NONE, NULL, 0x0, + "The message notify text that is displayed on the phone.", + HFILL } }, { &hf_skinny_endOfAnnAck, { "End of ann. ack", "skinny.endOfAnnAck", - FT_UINT32, BASE_DEC, VALS(skinny_endOfAnnAck), 0x0, - "End of announcement ack.", - HFILL } + FT_UINT32, BASE_DEC, VALS(skinny_endOfAnnAck), 0x0, + "End of announcement ack.", + HFILL } }, { &hf_skinny_annPlayMode, { "Ann. play mode", "skinny.annPlayMode", - FT_UINT32, BASE_DEC, VALS(skinny_annPlayMode), 0x0, - "Announcement play mode.", - HFILL } + FT_UINT32, BASE_DEC, VALS(skinny_annPlayMode), 0x0, + "Announcement play mode.", + HFILL } }, { &hf_skinny_annPlayStatus, { "Ann. play status", "skinny.annPlayStatus", - FT_UINT32, BASE_DEC, VALS(skinny_annPlayStatus), 0x0, - "Announcement play status.", - HFILL } + FT_UINT32, BASE_DEC, VALS(skinny_annPlayStatus), 0x0, + "Announcement play status.", + HFILL } }, { &hf_skinny_locale, { "Locale", "skinny.locale", - FT_UINT32, BASE_DEC, NULL, 0x0, - "User locale ID.", - HFILL } + FT_UINT32, BASE_DEC, NULL, 0x0, + "User locale ID.", + HFILL } }, { &hf_skinny_country, { "Country", "skinny.country", - FT_UINT32, BASE_DEC, NULL, 0x0, - "Country ID (Network locale).", - HFILL } + FT_UINT32, BASE_DEC, NULL, 0x0, + "Country ID (Network locale).", + HFILL } }, { &hf_skinny_matrixConfPartyID, { "Matrix conf party ID", "skinny.matrixConfPartyID", - FT_UINT32, BASE_DEC, NULL, 0x0, - "Existing conference parties.", - HFILL } + FT_UINT32, BASE_DEC, NULL, 0x0, + "Existing conference parties.", + HFILL } }, { &hf_skinny_hearingConfPartyMask, { "Hearing conf party mask", "skinny.hearingConfPartyMask", - FT_UINT32, BASE_DEC, NULL, 0x0, - "Bit mask of conference parties to hear media received on this stream. Bit0 = matrixConfPartyID[0], Bit1 = matrixConfPartiID[1].", - HFILL } + FT_UINT32, BASE_DEC, NULL, 0x0, + "Bit mask of conference parties to hear media received on this stream. Bit0 = matrixConfPartyID[0], Bit1 = matrixConfPartiID[1].", + HFILL } }, { &hf_skinny_serviceURL, { "Service URL value", "skinny.serviceURL", - FT_STRING, BASE_NONE, NULL, 0x0, - NULL, - HFILL } + FT_STRING, BASE_NONE, NULL, 0x0, + NULL, + HFILL } }, { &hf_skinny_serviceURLDisplayName, { "Service URL display name", "skinny.serviceURLDisplayName", - FT_STRING, BASE_NONE, NULL, 0x0, - NULL, - HFILL } + FT_STRING, BASE_NONE, NULL, 0x0, + NULL, + HFILL } }, { &hf_skinny_callSelectStat, { "Call select stat", "skinny.callSelectStat", - FT_UINT32, BASE_DEC, NULL, 0x0, - NULL, - HFILL } + FT_UINT32, BASE_DEC, NULL, 0x0, + NULL, + HFILL } }, { &hf_skinny_isConferenceCreator, { "Is conference creator", "skinny.isConferenceCreator", - FT_UINT32, BASE_DEC, NULL, 0x0, - NULL, - HFILL } + FT_UINT32, BASE_DEC, NULL, 0x0, + NULL, + HFILL } }, { &hf_skinny_payload_rfc_number, { "Payload RFC number", "skinny.payload_rfc_number", - FT_UINT32, BASE_DEC, NULL, 0x0, - NULL, - HFILL } + FT_UINT32, BASE_DEC, NULL, 0x0, + NULL, + HFILL } }, { &hf_skinny_payloadType, { "Payload type", "skinny.payloadType", - FT_UINT32, BASE_DEC, NULL, 0x0, - NULL, - HFILL } + FT_UINT32, BASE_DEC, NULL, 0x0, + NULL, + HFILL } }, { &hf_skinny_bitRate, { "Bitrate", "skinny.bitRate", - FT_UINT32, BASE_DEC, NULL, 0x0, - NULL, - HFILL } + FT_UINT32, BASE_DEC, NULL, 0x0, + NULL, + HFILL } }, { &hf_skinny_pictureFormatCount, { "Picture format count", "skinny.pictureFormatCount", - FT_UINT32, BASE_DEC, NULL, 0x0, - NULL, - HFILL } + FT_UINT32, BASE_DEC, NULL, 0x0, + NULL, + HFILL } }, { &hf_skinny_confServiceNum, { "Conf service number", "skinny.confServiceNum", - FT_UINT32, BASE_DEC, NULL, 0x0, - "Conference service number.", - HFILL } + FT_UINT32, BASE_DEC, NULL, 0x0, + "Conference service number.", + HFILL } }, { &hf_skinny_DSCPValue, { "DSCP value", "skinny.DSCPValue", - FT_UINT32, BASE_DEC, NULL, 0x0, - NULL, - HFILL } + FT_UINT32, BASE_DEC, NULL, 0x0, + NULL, + HFILL } }, { &hf_skinny_miscCommandType, { "Misc command type", "skinny.miscCommandType", - FT_UINT32, BASE_DEC|BASE_EXT_STRING, &skinny_miscCommandType_ext, 0x0, - NULL, - HFILL } + FT_UINT32, BASE_DEC|BASE_EXT_STRING, &skinny_miscCommandType_ext, 0x0, + NULL, + HFILL } }, { &hf_skinny_temporalSpatialTradeOff, { "Temporal spatial trade-off", "skinny.temporalSpatialTradeOff", - FT_UINT32, BASE_DEC, NULL, 0x0, - NULL, - HFILL } + FT_UINT32, BASE_DEC, NULL, 0x0, + NULL, + HFILL } }, { &hf_skinny_firstGOB, { "First GOB", "skinny.firstGOB", - FT_UINT32, BASE_DEC, NULL, 0x0, - NULL, - HFILL } + FT_UINT32, BASE_DEC, NULL, 0x0, + NULL, + HFILL } }, { &hf_skinny_numberOfGOBs, { "Number of GOBs", "skinny.numberOfGOBs", - FT_UINT32, BASE_DEC, NULL, 0x0, - NULL, - HFILL } + FT_UINT32, BASE_DEC, NULL, 0x0, + NULL, + HFILL } }, { &hf_skinny_firstMB, { "First MB", "skinny.firstMB", - FT_UINT32, BASE_DEC, NULL, 0x0, - NULL, - HFILL } + FT_UINT32, BASE_DEC, NULL, 0x0, + NULL, + HFILL } }, { &hf_skinny_numberOfMBs, { "Number of MBs", "skinny.numberOfMBs", - FT_UINT32, BASE_DEC, NULL, 0x0, - NULL, - HFILL } + FT_UINT32, BASE_DEC, NULL, 0x0, + NULL, + HFILL } }, { &hf_skinny_pictureNumber, { "Picture number", "skinny.pictureNumber", - FT_UINT32, BASE_DEC, NULL, 0x0, - NULL, - HFILL } + FT_UINT32, BASE_DEC, NULL, 0x0, + NULL, + HFILL } }, { &hf_skinny_longTermPictureIndex, { "Long-term picture index", "skinny.longTermPictureIndex", - FT_UINT32, BASE_DEC, NULL, 0x0, - NULL, - HFILL } + FT_UINT32, BASE_DEC, NULL, 0x0, + NULL, + HFILL } }, { &hf_skinny_recoveryReferencePictureCount, { "Recovery-reference picture count", "skinny.recoveryReferencePictureCount", - FT_UINT32, BASE_DEC, NULL, 0x0, - NULL, - HFILL } + FT_UINT32, BASE_DEC, NULL, 0x0, + NULL, + HFILL } }, { &hf_cast_lastRedirectingPartyName, { "Last redirecting party name", "cast.lastRedirectingPartyName", - FT_STRING, BASE_NONE, NULL, 0x0, - NULL, - HFILL } + FT_STRING, BASE_NONE, NULL, 0x0, + NULL, + HFILL } }, { &hf_cast_lastRedirectingParty, { "Last redirecting party", "cast.lastRedirectingParty", - FT_STRING, BASE_NONE, NULL, 0x0, - NULL, - HFILL } + FT_STRING, BASE_NONE, NULL, 0x0, + NULL, + HFILL } }, { &hf_cast_cgpnVoiceMailbox, { "Calling party voice mailbox", "cast.cgpnVoiceMailbox", - FT_STRING, BASE_NONE, NULL, 0x0, - NULL, - HFILL } + FT_STRING, BASE_NONE, NULL, 0x0, + NULL, + HFILL } }, { &hf_cast_cdpnVoiceMailbox, { "Called party voice mailbox", "cast.cdpnVoiceMailbox", - FT_STRING, BASE_NONE, NULL, 0x0, - NULL, - HFILL } + FT_STRING, BASE_NONE, NULL, 0x0, + NULL, + HFILL } }, { &hf_cast_originalCdpnVoiceMailbox, { "Original called party voice mailbox", "cast.originalCdpnVoiceMailbox", - FT_STRING, BASE_NONE, NULL, 0x0, - NULL, - HFILL } + FT_STRING, BASE_NONE, NULL, 0x0, + NULL, + HFILL } }, { &hf_cast_lastRedirectingVoiceMailbox, { "Last redirecting voice mailbox", "cast.lastRedirectingVoiceMailbox", - FT_STRING, BASE_NONE, NULL, 0x0, - NULL, - HFILL } + FT_STRING, BASE_NONE, NULL, 0x0, + NULL, + HFILL } }, { &hf_cast_originalCdpnRedirectReason, { "Original called party redirect reason", "cast.originalCdpnRedirectReason", - FT_UINT32, BASE_DEC, NULL, 0x0, - NULL, - HFILL } + FT_UINT32, BASE_DEC, NULL, 0x0, + NULL, + HFILL } }, { &hf_cast_lastRedirectingReason, { "Last redirecting reason", "cast.lastRedirectingReason", - FT_UINT32, BASE_DEC, NULL, 0x0, - NULL, - HFILL } + FT_UINT32, BASE_DEC, NULL, 0x0, + NULL, + HFILL } }, { &hf_cast_callInstance, { "Call instance", "cast.callInstance", - FT_UINT32, BASE_DEC, NULL, 0x0, - NULL, - HFILL } + FT_UINT32, BASE_DEC, NULL, 0x0, + NULL, + HFILL } }, { &hf_cast_callSecurityStatus, { "Call security status", "cast.callSecurityStatus", - FT_UINT32, BASE_DEC, VALS(cast_callSecurityStatusTypes), 0x0, - NULL, - HFILL } + FT_UINT32, BASE_DEC, VALS(cast_callSecurityStatusTypes), 0x0, + NULL, + HFILL } }, { &hf_skinny_directoryIndex, { "Directory index", "skinny.directoryIndex", - FT_UINT32, BASE_DEC, NULL, 0x0, - NULL, - HFILL } + FT_UINT32, BASE_DEC, NULL, 0x0, + NULL, + HFILL } }, { &hf_skinny_directoryPhoneNumber, { "Directory phone number", "skinny.directoryPhoneNumber", - FT_STRING, BASE_NONE, NULL, 0x0, - NULL, - HFILL } + FT_STRING, BASE_NONE, NULL, 0x0, + NULL, + HFILL } }, }; @@ -4684,7 +4688,7 @@ proto_register_skinny(void) /* Register the protocol name and description */ proto_skinny = proto_register_protocol("Skinny Client Control Protocol", - "SKINNY", "skinny"); + "SKINNY", "skinny"); /* Required function calls to register the header fields and subtrees used */ proto_register_field_array(proto_skinny, hf, array_length(hf)); @@ -4694,7 +4698,8 @@ proto_register_skinny(void) prefs_register_bool_preference(skinny_module, "desegment", "Reassemble SCCP messages spanning multiple TCP segments", "Whether the SCCP dissector should reassemble messages spanning multiple TCP segments." - " To use this option, you must also enable \"Allow subdissectors to reassemble TCP streams\" in the TCP protocol settings.", + " To use this option, you must also enable" + " \"Allow subdissectors to reassemble TCP streams\" in the TCP protocol settings.", &skinny_desegment); skinny_tap = register_tap("skinny"); @@ -4703,7 +4708,7 @@ proto_register_skinny(void) void proto_reg_handoff_skinny(void) { - static gboolean skinny_prefs_initialized = FALSE; + static gboolean skinny_prefs_initialized = FALSE; dissector_handle_t skinny_handle; if (!skinny_prefs_initialized) { @@ -4716,4 +4721,3 @@ proto_reg_handoff_skinny(void) skinny_prefs_initialized = TRUE; } } - diff --git a/epan/dissectors/packet-usb.c b/epan/dissectors/packet-usb.c index 12e399e545..74d60a318e 100644 --- a/epan/dissectors/packet-usb.c +++ b/epan/dissectors/packet-usb.c @@ -166,6 +166,7 @@ static dissector_table_t usb_bulk_dissector_table; static dissector_table_t usb_control_dissector_table; static dissector_table_t usb_interrupt_dissector_table; static dissector_table_t usb_descriptor_dissector_table; + static heur_dissector_list_t heur_bulk_subdissector_list; static heur_dissector_list_t heur_control_subdissector_list; static heur_dissector_list_t heur_interrupt_subdissector_list; @@ -350,22 +351,22 @@ static const value_string usb_class_vals[] = { static const value_string usb_transfer_type_vals[] = { - {URB_CONTROL, "URB_CONTROL"}, - {URB_ISOCHRONOUS,"URB_ISOCHRONOUS"}, - {URB_INTERRUPT,"URB_INTERRUPT"}, - {URB_BULK,"URB_BULK"}, + {URB_CONTROL, "URB_CONTROL"}, + {URB_ISOCHRONOUS, "URB_ISOCHRONOUS"}, + {URB_INTERRUPT, "URB_INTERRUPT"}, + {URB_BULK, "URB_BULK"}, {0, NULL} }; static const value_string usb_transfer_type_and_direction_vals[] = { - {URB_CONTROL, "URB_CONTROL out"}, - {URB_ISOCHRONOUS,"URB_ISOCHRONOUS out"}, - {URB_INTERRUPT,"URB_INTERRUPT out"}, - {URB_BULK,"URB_BULK out"}, - {URB_CONTROL | URB_TRANSFER_IN, "URB_CONTROL in"}, - {URB_ISOCHRONOUS | URB_TRANSFER_IN,"URB_ISOCHRONOUS in"}, - {URB_INTERRUPT | URB_TRANSFER_IN,"URB_INTERRUPT in"}, - {URB_BULK | URB_TRANSFER_IN,"URB_BULK in"}, + {URB_CONTROL, "URB_CONTROL out"}, + {URB_ISOCHRONOUS, "URB_ISOCHRONOUS out"}, + {URB_INTERRUPT, "URB_INTERRUPT out"}, + {URB_BULK, "URB_BULK out"}, + {URB_CONTROL | URB_TRANSFER_IN, "URB_CONTROL in"}, + {URB_ISOCHRONOUS | URB_TRANSFER_IN, "URB_ISOCHRONOUS in"}, + {URB_INTERRUPT | URB_TRANSFER_IN, "URB_INTERRUPT in"}, + {URB_BULK | URB_TRANSFER_IN, "URB_BULK in"}, {0, NULL} }; @@ -385,16 +386,16 @@ static const value_string usb_urb_type_vals[] = { /* * Descriptor types. */ -#define USB_DT_DEVICE 1 -#define USB_DT_CONFIG 2 -#define USB_DT_STRING 3 -#define USB_DT_INTERFACE 4 -#define USB_DT_ENDPOINT 5 -#define USB_DT_DEVICE_QUALIFIER 6 -#define USB_DT_OTHER_SPEED_CONFIG 7 -#define USB_DT_INTERFACE_POWER 8 +#define USB_DT_DEVICE 1 +#define USB_DT_CONFIG 2 +#define USB_DT_STRING 3 +#define USB_DT_INTERFACE 4 +#define USB_DT_ENDPOINT 5 +#define USB_DT_DEVICE_QUALIFIER 6 +#define USB_DT_OTHER_SPEED_CONFIG 7 +#define USB_DT_INTERFACE_POWER 8 /* these are from a minor usb 2.0 revision (ECN) */ -#define USB_DT_OTG 9 +#define USB_DT_OTG 9 #define USB_DT_DEBUG 10 #define USB_DT_INTERFACE_ASSOCIATION 11 /* these are from the Wireless USB spec */ @@ -763,9 +764,9 @@ get_usb_conv_info(conversation_t *conversation) if(!usb_conv_info){ /* no not yet so create some */ usb_conv_info = se_alloc0(sizeof(usb_conv_info_t)); - usb_conv_info->interfaceClass=IF_CLASS_UNKNOWN; + usb_conv_info->interfaceClass = IF_CLASS_UNKNOWN; usb_conv_info->interfaceSubclass = IF_SUBCLASS_UNKNOWN; - usb_conv_info->transactions=se_tree_create_non_persistent(EMEM_TREE_TYPE_RED_BLACK, "usb transactions"); + usb_conv_info->transactions = se_tree_create_non_persistent(EMEM_TREE_TYPE_RED_BLACK, "usb transactions"); conversation_add_proto_data(conversation, proto_usb, usb_conv_info); } @@ -846,7 +847,7 @@ static int dissect_usb_setup_get_configuration_response(packet_info *pinfo _U_, proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset, usb_trans_info_t *usb_trans_info _U_, usb_conv_info_t *usb_conv_info _U_) { proto_tree_add_item(tree, hf_usb_bConfigurationValue, tvb, offset, 1, ENC_LITTLE_ENDIAN); - offset++; + offset += 1; return offset; } @@ -870,13 +871,13 @@ void dissect_usb_descriptor_header(proto_tree *tree, tvbuff_t *tvb, int offset) static int dissect_usb_device_qualifier_descriptor(packet_info *pinfo _U_, proto_tree *parent_tree, tvbuff_t *tvb, int offset, usb_trans_info_t *usb_trans_info _U_, usb_conv_info_t *usb_conv_info _U_) { - proto_item *item=NULL; - proto_tree *tree=NULL; - int old_offset=offset; + proto_item *item = NULL; + proto_tree *tree = NULL; + int old_offset = offset; if(parent_tree){ - item=proto_tree_add_text(parent_tree, tvb, offset, -1, "DEVICE QUALIFIER DESCRIPTOR"); - tree=proto_item_add_subtree(item, ett_descriptor_device); + item = proto_tree_add_text(parent_tree, tvb, offset, -1, "DEVICE QUALIFIER DESCRIPTOR"); + tree = proto_item_add_subtree(item, ett_descriptor_device); } dissect_usb_descriptor_header(tree, tvb, offset); @@ -888,26 +889,26 @@ dissect_usb_device_qualifier_descriptor(packet_info *pinfo _U_, proto_tree *pare /* bDeviceClass */ proto_tree_add_item(tree, hf_usb_bDeviceClass, tvb, offset, 1, ENC_LITTLE_ENDIAN); - offset++; + offset += 1; /* bDeviceSubClass */ proto_tree_add_item(tree, hf_usb_bDeviceSubClass, tvb, offset, 1, ENC_LITTLE_ENDIAN); - offset++; + offset += 1; /* bDeviceProtocol */ proto_tree_add_item(tree, hf_usb_bDeviceProtocol, tvb, offset, 1, ENC_LITTLE_ENDIAN); - offset++; + offset += 1; /* bMaxPacketSize0 */ proto_tree_add_item(tree, hf_usb_bMaxPacketSize0, tvb, offset, 1, ENC_LITTLE_ENDIAN); - offset++; + offset += 1; /* bNumConfigurations */ proto_tree_add_item(tree, hf_usb_bNumConfigurations, tvb, offset, 1, ENC_LITTLE_ENDIAN); - offset++; + offset += 1; /* one reserved byte */ - offset++; + offset += 1; if(item){ proto_item_set_len(item, offset-old_offset); @@ -920,13 +921,13 @@ dissect_usb_device_qualifier_descriptor(packet_info *pinfo _U_, proto_tree *pare static int dissect_usb_device_descriptor(packet_info *pinfo _U_, proto_tree *parent_tree, tvbuff_t *tvb, int offset, usb_trans_info_t *usb_trans_info _U_, usb_conv_info_t *usb_conv_info _U_) { - proto_item *item=NULL; - proto_tree *tree=NULL; - int old_offset=offset; + proto_item *item = NULL; + proto_tree *tree = NULL; + int old_offset = offset; if(parent_tree){ - item=proto_tree_add_text(parent_tree, tvb, offset, -1, "DEVICE DESCRIPTOR"); - tree=proto_item_add_subtree(item, ett_descriptor_device); + item = proto_tree_add_text(parent_tree, tvb, offset, -1, "DEVICE DESCRIPTOR"); + tree = proto_item_add_subtree(item, ett_descriptor_device); } dissect_usb_descriptor_header(tree, tvb, offset); @@ -938,19 +939,19 @@ dissect_usb_device_descriptor(packet_info *pinfo _U_, proto_tree *parent_tree, t /* bDeviceClass */ proto_tree_add_item(tree, hf_usb_bDeviceClass, tvb, offset, 1, ENC_LITTLE_ENDIAN); - offset++; + offset += 1; /* bDeviceSubClass */ proto_tree_add_item(tree, hf_usb_bDeviceSubClass, tvb, offset, 1, ENC_LITTLE_ENDIAN); - offset++; + offset += 1; /* bDeviceProtocol */ proto_tree_add_item(tree, hf_usb_bDeviceProtocol, tvb, offset, 1, ENC_LITTLE_ENDIAN); - offset++; + offset += 1; /* bMaxPacketSize0 */ proto_tree_add_item(tree, hf_usb_bMaxPacketSize0, tvb, offset, 1, ENC_LITTLE_ENDIAN); - offset++; + offset += 1; /* idVendor */ proto_tree_add_item(tree, hf_usb_idVendor, tvb, offset, 2, ENC_LITTLE_ENDIAN); @@ -966,19 +967,19 @@ dissect_usb_device_descriptor(packet_info *pinfo _U_, proto_tree *parent_tree, t /* iManufacturer */ proto_tree_add_item(tree, hf_usb_iManufacturer, tvb, offset, 1, ENC_LITTLE_ENDIAN); - offset++; + offset += 1; /* iProduct */ proto_tree_add_item(tree, hf_usb_iProduct, tvb, offset, 1, ENC_LITTLE_ENDIAN); - offset++; + offset += 1; /* iSerialNumber */ proto_tree_add_item(tree, hf_usb_iSerialNumber, tvb, offset, 1, ENC_LITTLE_ENDIAN); - offset++; + offset += 1; /* bNumConfigurations */ proto_tree_add_item(tree, hf_usb_bNumConfigurations, tvb, offset, 1, ENC_LITTLE_ENDIAN); - offset++; + offset += 1; if(item){ proto_item_set_len(item, offset-old_offset); @@ -991,17 +992,17 @@ dissect_usb_device_descriptor(packet_info *pinfo _U_, proto_tree *parent_tree, t static int dissect_usb_string_descriptor(packet_info *pinfo _U_, proto_tree *parent_tree, tvbuff_t *tvb, int offset, usb_trans_info_t *usb_trans_info, usb_conv_info_t *usb_conv_info _U_) { - proto_item *item=NULL; - proto_tree *tree=NULL; - int old_offset=offset; - guint8 len; + proto_item *item = NULL; + proto_tree *tree = NULL; + int old_offset = offset; + guint8 len; if(parent_tree){ - item=proto_tree_add_text(parent_tree, tvb, offset, -1, "STRING DESCRIPTOR"); - tree=proto_item_add_subtree(item, ett_descriptor_device); + item = proto_tree_add_text(parent_tree, tvb, offset, -1, "STRING DESCRIPTOR"); + tree = proto_item_add_subtree(item, ett_descriptor_device); } - len=tvb_get_guint8(tvb, offset); + len = tvb_get_guint8(tvb, offset); dissect_usb_descriptor_header(tree, tvb, offset); offset += 2; @@ -1016,7 +1017,7 @@ dissect_usb_string_descriptor(packet_info *pinfo _U_, proto_tree *parent_tree, t char *str; /* unicode string */ - str=tvb_get_ephemeral_unicode_string(tvb, offset, len-2, ENC_LITTLE_ENDIAN); + str = tvb_get_ephemeral_unicode_string(tvb, offset, len-2, ENC_LITTLE_ENDIAN); proto_tree_add_string(tree, hf_usb_bString, tvb, offset, len-2, str); offset += len-2; } @@ -1034,16 +1035,16 @@ dissect_usb_string_descriptor(packet_info *pinfo _U_, proto_tree *parent_tree, t static int dissect_usb_interface_descriptor(packet_info *pinfo, proto_tree *parent_tree, tvbuff_t *tvb, int offset, usb_trans_info_t *usb_trans_info, usb_conv_info_t *usb_conv_info) { - proto_item *item=NULL; - proto_tree *tree=NULL; - int old_offset=offset; - guint8 len; - guint8 interface_num; - guint8 alt_setting; + proto_item *item = NULL; + proto_tree *tree = NULL; + int old_offset = offset; + guint8 len; + guint8 interface_num; + guint8 alt_setting; if(parent_tree){ - item=proto_tree_add_text(parent_tree, tvb, offset, -1, "INTERFACE DESCRIPTOR"); - tree=proto_item_add_subtree(item, ett_descriptor_device); + item = proto_tree_add_text(parent_tree, tvb, offset, -1, "INTERFACE DESCRIPTOR"); + tree = proto_item_add_subtree(item, ett_descriptor_device); } len = tvb_get_guint8(tvb, offset); @@ -1053,51 +1054,51 @@ dissect_usb_interface_descriptor(packet_info *pinfo, proto_tree *parent_tree, tv /* bInterfaceNumber */ interface_num = tvb_get_guint8(tvb, offset); proto_tree_add_item(tree, hf_usb_bInterfaceNumber, tvb, offset, 1, ENC_LITTLE_ENDIAN); - offset++; + offset += 1; /* bAlternateSetting */ alt_setting = tvb_get_guint8(tvb, offset); proto_tree_add_item(tree, hf_usb_bAlternateSetting, tvb, offset, 1, ENC_LITTLE_ENDIAN); - offset++; + offset += 1; /* bNumEndpoints */ proto_tree_add_item(tree, hf_usb_bNumEndpoints, tvb, offset, 1, ENC_LITTLE_ENDIAN); - offset++; + offset += 1; /* bInterfaceClass */ proto_tree_add_item(tree, hf_usb_bInterfaceClass, tvb, offset, 1, ENC_LITTLE_ENDIAN); /* save the class so we can access it later in the endpoint descriptor */ - usb_conv_info->interfaceClass=tvb_get_guint8(tvb, offset); + usb_conv_info->interfaceClass = tvb_get_guint8(tvb, offset); if (!pinfo->fd->flags.visited && (alt_setting == 0)) { conversation_t *conversation; guint32 if_port; - usb_trans_info->interface_info=se_alloc0(sizeof(usb_conv_info_t)); - usb_trans_info->interface_info->interfaceClass=tvb_get_guint8(tvb, offset); + usb_trans_info->interface_info = se_alloc0(sizeof(usb_conv_info_t)); + usb_trans_info->interface_info->interfaceClass = tvb_get_guint8(tvb, offset); /* save the subclass so we can access it later in class-specific descriptors */ usb_trans_info->interface_info->interfaceSubclass = tvb_get_guint8(tvb, offset+1); - usb_trans_info->interface_info->transactions=se_tree_create_non_persistent(EMEM_TREE_TYPE_RED_BLACK, "usb transactions"); + usb_trans_info->interface_info->transactions = se_tree_create_non_persistent(EMEM_TREE_TYPE_RED_BLACK, "usb transactions"); /* Register conversation for this interface in case CONTROL messages are sent to it */ if_port = htolel(INTERFACE_PORT | interface_num); conversation = get_usb_conversation(pinfo, &pinfo->src, &pinfo->dst, if_port, pinfo->destport); conversation_add_proto_data(conversation, proto_usb, usb_trans_info->interface_info); } - offset++; + offset += 1; /* bInterfaceSubClass */ proto_tree_add_item(tree, hf_usb_bInterfaceSubClass, tvb, offset, 1, ENC_LITTLE_ENDIAN); /* save the subclass so we can access it later in class-specific descriptors */ usb_conv_info->interfaceSubclass = tvb_get_guint8(tvb, offset); - offset++; + offset += 1; /* bInterfaceProtocol */ proto_tree_add_item(tree, hf_usb_bInterfaceProtocol, tvb, offset, 1, ENC_LITTLE_ENDIAN); - offset++; + offset += 1; /* iInterface */ proto_tree_add_item(tree, hf_usb_iInterface, tvb, offset, 1, ENC_LITTLE_ENDIAN); - offset++; + offset += 1; if(item){ proto_item_set_len(item, len); @@ -1118,15 +1119,15 @@ static const true_false_string tfs_endpoint_direction = { void dissect_usb_endpoint_address(proto_tree *tree, tvbuff_t *tvb, int offset) { - proto_item *endpoint_item=NULL; - proto_tree *endpoint_tree=NULL; - guint8 endpoint; + proto_item *endpoint_item = NULL; + proto_tree *endpoint_tree = NULL; + guint8 endpoint; if(tree){ - endpoint_item=proto_tree_add_item(tree, hf_usb_bEndpointAddress, tvb, offset, 1, ENC_LITTLE_ENDIAN); - endpoint_tree=proto_item_add_subtree(endpoint_item, ett_configuration_bEndpointAddress); + endpoint_item = proto_tree_add_item(tree, hf_usb_bEndpointAddress, tvb, offset, 1, ENC_LITTLE_ENDIAN); + endpoint_tree = proto_item_add_subtree(endpoint_item, ett_configuration_bEndpointAddress); } - endpoint=tvb_get_guint8(tvb, offset)&0x0f; + endpoint = tvb_get_guint8(tvb, offset)&0x0f; proto_tree_add_item(endpoint_tree, hf_usb_bEndpointAddress_direction, tvb, offset, 1, ENC_LITTLE_ENDIAN); proto_item_append_text(endpoint_item, " %s", (tvb_get_guint8(tvb, offset)&0x80)?"IN":"OUT"); proto_tree_add_item(endpoint_tree, hf_usb_bEndpointAddress_number, tvb, offset, 1, ENC_LITTLE_ENDIAN); @@ -1136,29 +1137,29 @@ void dissect_usb_endpoint_address(proto_tree *tree, tvbuff_t *tvb, int offset) static int dissect_usb_endpoint_descriptor(packet_info *pinfo, proto_tree *parent_tree, tvbuff_t *tvb, int offset, usb_trans_info_t *usb_trans_info _U_, usb_conv_info_t *usb_conv_info _U_) { - proto_item *item=NULL; - proto_tree *tree=NULL; - proto_item *ep_attrib_item=NULL; - proto_tree *ep_attrib_tree=NULL; + proto_item *item = NULL; + proto_tree *tree = NULL; + proto_item *ep_attrib_item = NULL; + proto_tree *ep_attrib_tree = NULL; proto_item *ep_pktsize_item; proto_tree *ep_pktsize_tree; - int old_offset=offset; - guint8 endpoint; - guint8 ep_type; - guint8 len; + int old_offset = offset; + guint8 endpoint; + guint8 ep_type; + guint8 len; if(parent_tree){ - item=proto_tree_add_text(parent_tree, tvb, offset, -1, "ENDPOINT DESCRIPTOR"); - tree=proto_item_add_subtree(item, ett_descriptor_device); + item = proto_tree_add_text(parent_tree, tvb, offset, -1, "ENDPOINT DESCRIPTOR"); + tree = proto_item_add_subtree(item, ett_descriptor_device); } len = tvb_get_guint8(tvb, offset); dissect_usb_descriptor_header(tree, tvb, offset); offset += 2; - endpoint=tvb_get_guint8(tvb, offset)&0x0f; + endpoint = tvb_get_guint8(tvb, offset)&0x0f; dissect_usb_endpoint_address(tree, tvb, offset); - offset++; + offset += 1; /* Together with class from the interface descriptor we know what kind * of class the device at endpoint is. @@ -1178,10 +1179,10 @@ dissect_usb_endpoint_descriptor(packet_info *pinfo, proto_tree *parent_tree, tvb /* Create a new address structure that points to the same device * but the new endpoint. */ - usb_addr.device=((usb_address_t *)(pinfo->src.data))->device; + usb_addr.device = ((usb_address_t *)(pinfo->src.data))->device; usb_addr.endpoint = htolel(endpoint); SET_ADDRESS(&tmp_addr, AT_USB, USB_ADDR_LEN, (char *)&usb_addr); - conversation=get_usb_conversation(pinfo, &tmp_addr, &pinfo->dst, usb_addr.endpoint, pinfo->destport); + conversation = get_usb_conversation(pinfo, &tmp_addr, &pinfo->dst, usb_addr.endpoint, pinfo->destport); } else { static address tmp_addr; static usb_address_t usb_addr; @@ -1189,10 +1190,10 @@ dissect_usb_endpoint_descriptor(packet_info *pinfo, proto_tree *parent_tree, tvb /* Create a new address structure that points to the same device * but the new endpoint. */ - usb_addr.device=((usb_address_t *)(pinfo->dst.data))->device; + usb_addr.device = ((usb_address_t *)(pinfo->dst.data))->device; usb_addr.endpoint = htolel(endpoint); SET_ADDRESS(&tmp_addr, AT_USB, USB_ADDR_LEN, (char *)&usb_addr); - conversation=get_usb_conversation(pinfo, &pinfo->src, &tmp_addr, pinfo->srcport, usb_addr.endpoint); + conversation = get_usb_conversation(pinfo, &pinfo->src, &tmp_addr, pinfo->srcport, usb_addr.endpoint); } conversation_add_proto_data(conversation, proto_usb, usb_trans_info->interface_info); @@ -1201,20 +1202,20 @@ dissect_usb_endpoint_descriptor(packet_info *pinfo, proto_tree *parent_tree, tvb /* bmAttributes */ ep_type = ENDPOINT_TYPE(tvb_get_guint8(tvb, offset)); if (tree) { - ep_attrib_item=proto_tree_add_item(tree, hf_usb_bmAttributes, tvb, offset, 1, ENC_LITTLE_ENDIAN); - ep_attrib_tree=proto_item_add_subtree(ep_attrib_item, ett_endpoint_bmAttributes); + ep_attrib_item = proto_tree_add_item(tree, hf_usb_bmAttributes, tvb, offset, 1, ENC_LITTLE_ENDIAN); + ep_attrib_tree = proto_item_add_subtree(ep_attrib_item, ett_endpoint_bmAttributes); } proto_tree_add_item(ep_attrib_tree, hf_usb_bEndpointAttributeTransfer, tvb, offset, 1, ENC_LITTLE_ENDIAN); /* isochronous only */ proto_tree_add_item(ep_attrib_tree, hf_usb_bEndpointAttributeSynchonisation, tvb, offset, 1, ENC_LITTLE_ENDIAN); /* isochronous only */ proto_tree_add_item(ep_attrib_tree, hf_usb_bEndpointAttributeBehaviour, tvb, offset, 1, ENC_LITTLE_ENDIAN); - offset++; + offset += 1; /* wMaxPacketSize */ ep_pktsize_item = proto_tree_add_item(tree, hf_usb_wMaxPacketSize, tvb, offset, 2, ENC_LITTLE_ENDIAN); ep_pktsize_tree = proto_item_add_subtree(ep_pktsize_item, ett_endpoint_wMaxPacketSize); - if ((ep_type == ENDPOINT_TYPE_INTERRUPT) || (ep_type == ENDPOINT_TYPE_ISOCHRONOUS)) { + if ((ep_type == ENDPOINT_TYPE_INTERRUPT) || (ep_type == ENDPOINT_TYPE_ISOCHRONOUS)) { proto_tree_add_item(ep_pktsize_tree, hf_usb_wMaxPacketSize_slots, tvb, offset, 2, ENC_LITTLE_ENDIAN); } proto_tree_add_item(ep_pktsize_tree, hf_usb_wMaxPacketSize_size, tvb, offset, 2, ENC_LITTLE_ENDIAN); @@ -1222,7 +1223,7 @@ dissect_usb_endpoint_descriptor(packet_info *pinfo, proto_tree *parent_tree, tvb /* bInterval */ proto_tree_add_item(tree, hf_usb_bInterval, tvb, offset, 1, ENC_LITTLE_ENDIAN); - offset++; + offset += 1; if(item){ proto_item_set_len(item, len); @@ -1241,13 +1242,13 @@ dissect_usb_interface_assn_descriptor(packet_info *pinfo _U_, proto_tree *parent tvbuff_t *tvb, int offset, usb_trans_info_t *usb_trans_info _U_, usb_conv_info_t *usb_conv_info _U_) { - proto_item *item=NULL; - proto_tree *tree=NULL; - int old_offset=offset; + proto_item *item = NULL; + proto_tree *tree = NULL; + int old_offset = offset; if(parent_tree){ - item=proto_tree_add_text(parent_tree, tvb, offset, -1, "INTERFACE ASSOCIATION DESCRIPTOR"); - tree=proto_item_add_subtree(item, ett_descriptor_device); + item = proto_tree_add_text(parent_tree, tvb, offset, -1, "INTERFACE ASSOCIATION DESCRIPTOR"); + tree = proto_item_add_subtree(item, ett_descriptor_device); } dissect_usb_descriptor_header(tree, tvb, offset); @@ -1255,27 +1256,27 @@ dissect_usb_interface_assn_descriptor(packet_info *pinfo _U_, proto_tree *parent /* bFirstInterface */ proto_tree_add_item(tree, hf_usb_bFirstInterface, tvb, offset, 1, ENC_LITTLE_ENDIAN); - offset++; + offset += 1; /* bInterfaceCount */ proto_tree_add_item(tree, hf_usb_bInterfaceCount, tvb, offset, 1, ENC_LITTLE_ENDIAN); - offset++; + offset += 1; /* bFunctionClass */ proto_tree_add_item(tree, hf_usb_bFunctionClass, tvb, offset, 1, ENC_LITTLE_ENDIAN); - offset++; + offset += 1; /* bFunctionSubclass */ proto_tree_add_item(tree, hf_usb_bFunctionSubClass, tvb, offset, 1, ENC_LITTLE_ENDIAN); - offset++; + offset += 1; /* bFunctionProtocol */ proto_tree_add_item(tree, hf_usb_bFunctionProtocol, tvb, offset, 1, ENC_LITTLE_ENDIAN); - offset++; + offset += 1; /* iFunction */ proto_tree_add_item(tree, hf_usb_iFunction, tvb, offset, 1, ENC_LITTLE_ENDIAN); - offset++; + offset += 1; if(item){ proto_item_set_len(item, offset-old_offset); @@ -1287,20 +1288,20 @@ dissect_usb_interface_assn_descriptor(packet_info *pinfo _U_, proto_tree *parent static int dissect_usb_unknown_descriptor(packet_info *pinfo _U_, proto_tree *parent_tree, tvbuff_t *tvb, int offset, usb_trans_info_t *usb_trans_info _U_, usb_conv_info_t *usb_conv_info _U_) { - proto_item *item=NULL; - proto_tree *tree=NULL; - int old_offset=offset; - guint8 bLength; + proto_item *item = NULL; + proto_tree *tree = NULL; + int old_offset = offset; + guint8 bLength; if(parent_tree){ - item=proto_tree_add_text(parent_tree, tvb, offset, -1, "UNKNOWN DESCRIPTOR"); - tree=proto_item_add_subtree(item, ett_descriptor_device); + item = proto_tree_add_text(parent_tree, tvb, offset, -1, "UNKNOWN DESCRIPTOR"); + tree = proto_item_add_subtree(item, ett_descriptor_device); } /* bLength */ proto_tree_add_item(tree, hf_usb_bLength, tvb, offset, 1, ENC_LITTLE_ENDIAN); bLength = tvb_get_guint8(tvb, offset); - offset++; + offset += 1; if (bLength < 3) { if(item){ proto_item_set_len(item, offset-old_offset); @@ -1316,7 +1317,7 @@ dissect_usb_unknown_descriptor(packet_info *pinfo _U_, proto_tree *parent_tree, /* bDescriptorType */ proto_tree_add_item(tree, hf_usb_bDescriptorType, tvb, offset, 1, ENC_LITTLE_ENDIAN); - offset++; + offset += 1; offset += bLength - 2; @@ -1343,22 +1344,22 @@ static const true_false_string tfs_remotewakeup = { static int dissect_usb_configuration_descriptor(packet_info *pinfo _U_, proto_tree *parent_tree, tvbuff_t *tvb, int offset, usb_trans_info_t *usb_trans_info, usb_conv_info_t *usb_conv_info) { - proto_item *item=NULL; - proto_tree *tree=NULL; - int old_offset=offset; - guint16 len; - proto_item *flags_item=NULL; - proto_tree *flags_tree=NULL; - guint8 flags; - proto_item *power_item=NULL; - guint8 power; + proto_item *item = NULL; + proto_tree *tree = NULL; + int old_offset = offset; + guint16 len; + proto_item *flags_item = NULL; + proto_tree *flags_tree = NULL; + guint8 flags; + proto_item *power_item; + guint8 power; usb_conv_info->interfaceClass = IF_CLASS_UNKNOWN; usb_conv_info->interfaceSubclass = IF_SUBCLASS_UNKNOWN; if(parent_tree){ - item=proto_tree_add_text(parent_tree, tvb, offset, -1, "CONFIGURATION DESCRIPTOR"); - tree=proto_item_add_subtree(item, ett_descriptor_device); + item = proto_tree_add_text(parent_tree, tvb, offset, -1, "CONFIGURATION DESCRIPTOR"); + tree = proto_item_add_subtree(item, ett_descriptor_device); } dissect_usb_descriptor_header(tree, tvb, offset); @@ -1366,42 +1367,42 @@ dissect_usb_configuration_descriptor(packet_info *pinfo _U_, proto_tree *parent_ /* wTotalLength */ proto_tree_add_item(tree, hf_usb_wTotalLength, tvb, offset, 2, ENC_LITTLE_ENDIAN); - len=tvb_get_letohs(tvb, offset); + len = tvb_get_letohs(tvb, offset); offset+=2; /* bNumInterfaces */ proto_tree_add_item(tree, hf_usb_bNumInterfaces, tvb, offset, 1, ENC_LITTLE_ENDIAN); - offset++; + offset += 1; /* bConfigurationValue */ proto_tree_add_item(tree, hf_usb_bConfigurationValue, tvb, offset, 1, ENC_LITTLE_ENDIAN); - offset++; + offset += 1; /* iConfiguration */ proto_tree_add_item(tree, hf_usb_iConfiguration, tvb, offset, 1, ENC_LITTLE_ENDIAN); - offset++; + offset += 1; /* bmAttributes */ if(tree){ - flags_item=proto_tree_add_item(tree, hf_usb_configuration_bmAttributes, tvb, offset, 1, ENC_LITTLE_ENDIAN); - flags_tree=proto_item_add_subtree(flags_item, ett_configuration_bmAttributes); + flags_item = proto_tree_add_item(tree, hf_usb_configuration_bmAttributes, tvb, offset, 1, ENC_LITTLE_ENDIAN); + flags_tree = proto_item_add_subtree(flags_item, ett_configuration_bmAttributes); } - flags=tvb_get_guint8(tvb, offset); + flags = tvb_get_guint8(tvb, offset); proto_tree_add_item(flags_tree, hf_usb_configuration_legacy10buspowered, tvb, offset, 1, ENC_LITTLE_ENDIAN); proto_tree_add_item(flags_tree, hf_usb_configuration_selfpowered, tvb, offset, 1, ENC_LITTLE_ENDIAN); proto_item_append_text(flags_item, " %sSELF-POWERED", (flags&0x40)?"":"NOT "); proto_tree_add_item(flags_tree, hf_usb_configuration_remotewakeup, tvb, offset, 1, ENC_LITTLE_ENDIAN); proto_item_append_text(flags_item, " %sREMOTE-WAKEUP", (flags&0x20)?"":"NO "); - offset++; + offset += 1; /* bMaxPower */ - power_item=proto_tree_add_item(tree, hf_usb_bMaxPower, tvb, offset, 1, ENC_LITTLE_ENDIAN); - power=tvb_get_guint8(tvb, offset); + power_item = proto_tree_add_item(tree, hf_usb_bMaxPower, tvb, offset, 1, ENC_LITTLE_ENDIAN); + power = tvb_get_guint8(tvb, offset); proto_item_append_text(power_item, " (%dmA)", power*2); - offset++; + offset += 1; /* initialize interface_info to NULL */ - usb_trans_info->interface_info=NULL; + usb_trans_info->interface_info = NULL; /* decode any additional interface and endpoint descriptors */ while(len>(old_offset-offset)){ @@ -1411,23 +1412,23 @@ dissect_usb_configuration_descriptor(packet_info *pinfo _U_, proto_tree *parent_ if(tvb_length_remaining(tvb, offset)<2){ break; } - next_type=tvb_get_guint8(tvb, offset+1); + next_type = tvb_get_guint8(tvb, offset+1); switch(next_type){ case USB_DT_INTERFACE: - offset=dissect_usb_interface_descriptor(pinfo, parent_tree, tvb, offset, usb_trans_info, usb_conv_info); + offset = dissect_usb_interface_descriptor(pinfo, parent_tree, tvb, offset, usb_trans_info, usb_conv_info); break; case USB_DT_ENDPOINT: - offset=dissect_usb_endpoint_descriptor(pinfo, parent_tree, tvb, offset, usb_trans_info, usb_conv_info); + offset = dissect_usb_endpoint_descriptor(pinfo, parent_tree, tvb, offset, usb_trans_info, usb_conv_info); break; case USB_DT_INTERFACE_ASSOCIATION: - offset=dissect_usb_interface_assn_descriptor(pinfo, parent_tree, tvb, offset, usb_trans_info, usb_conv_info); + offset = dissect_usb_interface_assn_descriptor(pinfo, parent_tree, tvb, offset, usb_trans_info, usb_conv_info); break; default: next_tvb = tvb_new_subset_remaining(tvb, offset); if (dissector_try_uint(usb_descriptor_dissector_table, usb_conv_info->interfaceClass, next_tvb, pinfo, parent_tree)){ offset += tvb_get_guint8(next_tvb, 0); } else { - offset=dissect_usb_unknown_descriptor(pinfo, parent_tree, tvb, offset, usb_trans_info, usb_conv_info); + offset = dissect_usb_unknown_descriptor(pinfo, parent_tree, tvb, offset, usb_trans_info, usb_conv_info); } break; /* was: return offset; */ @@ -1458,13 +1459,13 @@ dissect_usb_setup_get_descriptor_request(packet_info *pinfo, proto_tree *tree, t { /* descriptor index */ proto_tree_add_item(tree, hf_usb_descriptor_index, tvb, offset, 1, ENC_LITTLE_ENDIAN); - usb_trans_info->u.get_descriptor.index=tvb_get_guint8(tvb, offset); - offset++; + usb_trans_info->u.get_descriptor.index = tvb_get_guint8(tvb, offset); + offset += 1; /* descriptor type */ proto_tree_add_item(tree, hf_usb_bDescriptorType, tvb, offset, 1, ENC_LITTLE_ENDIAN); - usb_trans_info->u.get_descriptor.type=tvb_get_guint8(tvb, offset); - offset++; + usb_trans_info->u.get_descriptor.type = tvb_get_guint8(tvb, offset); + offset += 1; if (check_col(pinfo->cinfo, COL_INFO)) { col_append_fstr(pinfo->cinfo, COL_INFO, " %s", val_to_str(usb_trans_info->u.get_descriptor.type, descriptor_type_vals, "Unknown type %u")); @@ -1491,26 +1492,26 @@ dissect_usb_setup_get_descriptor_response(packet_info *pinfo, proto_tree *tree, } switch(usb_trans_info->u.get_descriptor.type){ case USB_DT_DEVICE: - offset=dissect_usb_device_descriptor(pinfo, tree, tvb, offset, usb_trans_info, usb_conv_info); + offset = dissect_usb_device_descriptor(pinfo, tree, tvb, offset, usb_trans_info, usb_conv_info); break; case USB_DT_CONFIG: - offset=dissect_usb_configuration_descriptor(pinfo, tree, tvb, offset, usb_trans_info, usb_conv_info); + offset = dissect_usb_configuration_descriptor(pinfo, tree, tvb, offset, usb_trans_info, usb_conv_info); break; case USB_DT_STRING: - offset=dissect_usb_string_descriptor(pinfo, tree, tvb, offset, usb_trans_info, usb_conv_info); + offset = dissect_usb_string_descriptor(pinfo, tree, tvb, offset, usb_trans_info, usb_conv_info); break; case USB_DT_INTERFACE: - offset=dissect_usb_interface_descriptor(pinfo, tree, tvb, offset, usb_trans_info, usb_conv_info); + offset = dissect_usb_interface_descriptor(pinfo, tree, tvb, offset, usb_trans_info, usb_conv_info); break; case USB_DT_ENDPOINT: - offset=dissect_usb_endpoint_descriptor(pinfo, tree, tvb, offset, usb_trans_info, usb_conv_info); + offset = dissect_usb_endpoint_descriptor(pinfo, tree, tvb, offset, usb_trans_info, usb_conv_info); break; case USB_DT_DEVICE_QUALIFIER: - offset=dissect_usb_device_qualifier_descriptor(pinfo, tree, tvb, offset, usb_trans_info, usb_conv_info); + offset = dissect_usb_device_qualifier_descriptor(pinfo, tree, tvb, offset, usb_trans_info, usb_conv_info); break; case USB_DT_RPIPE: if (usb_conv_info->interfaceClass == IF_CLASS_HID) { - offset=dissect_usb_hid_get_report_descriptor(pinfo, tree, tvb, offset, usb_trans_info, usb_conv_info); + offset = dissect_usb_hid_get_report_descriptor(pinfo, tree, tvb, offset, usb_trans_info, usb_conv_info); break; } /* else fall through as default/unknown */ @@ -1555,7 +1556,7 @@ dissect_usb_setup_get_interface_response(packet_info *pinfo _U_, proto_tree *tre { /* alternate setting */ proto_tree_add_item(tree, hf_usb_bAlternateSetting, tvb, offset, 1, ENC_LITTLE_ENDIAN); - offset++; + offset += 1; return offset; } @@ -1771,42 +1772,42 @@ typedef struct _usb_setup_dissector_table_t { guint8 request; usb_setup_dissector dissector; } usb_setup_dissector_table_t; -#define USB_SETUP_GET_STATUS 0 -#define USB_SETUP_CLEAR_FEATURE 1 -#define USB_SETUP_SET_FEATURE 3 -#define USB_SETUP_SET_ADDRESS 5 -#define USB_SETUP_GET_DESCRIPTOR 6 -#define USB_SETUP_SET_DESCRIPTOR 7 -#define USB_SETUP_GET_CONFIGURATION 8 -#define USB_SETUP_SET_CONFIGURATION 9 +#define USB_SETUP_GET_STATUS 0 +#define USB_SETUP_CLEAR_FEATURE 1 +#define USB_SETUP_SET_FEATURE 3 +#define USB_SETUP_SET_ADDRESS 5 +#define USB_SETUP_GET_DESCRIPTOR 6 +#define USB_SETUP_SET_DESCRIPTOR 7 +#define USB_SETUP_GET_CONFIGURATION 8 +#define USB_SETUP_SET_CONFIGURATION 9 #define USB_SETUP_GET_INTERFACE 10 #define USB_SETUP_SET_INTERFACE 11 #define USB_SETUP_SYNCH_FRAME 12 static const usb_setup_dissector_table_t setup_request_dissectors[] = { - {USB_SETUP_GET_STATUS, dissect_usb_setup_get_status_request}, - {USB_SETUP_CLEAR_FEATURE, dissect_usb_setup_clear_feature_request}, - {USB_SETUP_SET_FEATURE, dissect_usb_setup_set_feature_request}, - {USB_SETUP_SET_ADDRESS, dissect_usb_setup_set_address_request}, - {USB_SETUP_GET_DESCRIPTOR, dissect_usb_setup_get_descriptor_request}, + {USB_SETUP_GET_STATUS, dissect_usb_setup_get_status_request}, + {USB_SETUP_CLEAR_FEATURE, dissect_usb_setup_clear_feature_request}, + {USB_SETUP_SET_FEATURE, dissect_usb_setup_set_feature_request}, + {USB_SETUP_SET_ADDRESS, dissect_usb_setup_set_address_request}, + {USB_SETUP_GET_DESCRIPTOR, dissect_usb_setup_get_descriptor_request}, {USB_SETUP_SET_CONFIGURATION, dissect_usb_setup_set_configuration_request}, - {USB_SETUP_GET_INTERFACE, dissect_usb_setup_get_interface_request}, - {USB_SETUP_SET_INTERFACE, dissect_usb_setup_set_interface_request}, - {USB_SETUP_SYNCH_FRAME, dissect_usb_setup_synch_frame_request}, + {USB_SETUP_GET_INTERFACE, dissect_usb_setup_get_interface_request}, + {USB_SETUP_SET_INTERFACE, dissect_usb_setup_set_interface_request}, + {USB_SETUP_SYNCH_FRAME, dissect_usb_setup_synch_frame_request}, {0, NULL} }; static const usb_setup_dissector_table_t setup_response_dissectors[] = { - {USB_SETUP_GET_STATUS, dissect_usb_setup_get_status_response}, - {USB_SETUP_CLEAR_FEATURE, dissect_usb_setup_clear_feature_response}, - {USB_SETUP_SET_FEATURE, dissect_usb_setup_set_feature_response}, - {USB_SETUP_SET_ADDRESS, dissect_usb_setup_set_address_response}, - {USB_SETUP_GET_DESCRIPTOR, dissect_usb_setup_get_descriptor_response}, + {USB_SETUP_GET_STATUS, dissect_usb_setup_get_status_response}, + {USB_SETUP_CLEAR_FEATURE, dissect_usb_setup_clear_feature_response}, + {USB_SETUP_SET_FEATURE, dissect_usb_setup_set_feature_response}, + {USB_SETUP_SET_ADDRESS, dissect_usb_setup_set_address_response}, + {USB_SETUP_GET_DESCRIPTOR, dissect_usb_setup_get_descriptor_response}, {USB_SETUP_GET_CONFIGURATION, dissect_usb_setup_get_configuration_response}, {USB_SETUP_SET_CONFIGURATION, dissect_usb_setup_set_configuration_response}, - {USB_SETUP_GET_INTERFACE, dissect_usb_setup_get_interface_response}, - {USB_SETUP_SET_INTERFACE, dissect_usb_setup_set_interface_response}, - {USB_SETUP_SYNCH_FRAME, dissect_usb_setup_synch_frame_response}, + {USB_SETUP_GET_INTERFACE, dissect_usb_setup_get_interface_response}, + {USB_SETUP_SET_INTERFACE, dissect_usb_setup_set_interface_response}, + {USB_SETUP_SYNCH_FRAME, dissect_usb_setup_synch_frame_response}, {0, NULL} }; @@ -1851,11 +1852,11 @@ static int dissect_usb_bmrequesttype(proto_tree *parent_tree, tvbuff_t *tvb, int offset, int *type) { - proto_item *item=NULL; - proto_tree *tree=NULL; + proto_item *item = NULL; + proto_tree *tree = NULL; if(parent_tree){ - item=proto_tree_add_item(parent_tree, hf_usb_bmRequestType, tvb, offset, 1, ENC_LITTLE_ENDIAN); + item = proto_tree_add_item(parent_tree, hf_usb_bmRequestType, tvb, offset, 1, ENC_LITTLE_ENDIAN); tree = proto_item_add_subtree(item, ett_usb_setup_bmrequesttype); } @@ -1876,10 +1877,10 @@ dissect_usb_bmrequesttype(proto_tree *parent_tree, tvbuff_t *tvb, int offset, static void dissect_linux_usb_pseudo_header(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) { - guint8 transfer_type; - guint8 endpoint_number; - guint8 transfer_type_and_direction; - guint8 type, flag; + guint8 transfer_type; + guint8 endpoint_number; + guint8 transfer_type_and_direction; + guint8 type, flag; guint16 val16; guint32 val32; guint64 val64; @@ -1895,7 +1896,7 @@ dissect_linux_usb_pseudo_header(tvbuff_t *tvb, packet_info *pinfo, proto_tree *t proto_tree_add_item(tree, hf_usb_transfer_type, tvb, 9, 1, ENC_BIG_ENDIAN); if (check_col(pinfo->cinfo, COL_INFO)) { - transfer_type = tvb_get_guint8(tvb, 9); + transfer_type = tvb_get_guint8(tvb, 9); endpoint_number = tvb_get_guint8(tvb, 10); transfer_type_and_direction = (transfer_type & 0x7F) | (endpoint_number & 0x80); col_append_str(pinfo->cinfo, COL_INFO, @@ -1973,18 +1974,18 @@ static void dissect_linux_usb_common(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent, gboolean header_len_64_bytes) { - unsigned int offset = 0; - int type, endpoint; - guint8 setup_flag; - proto_tree *tree = NULL; - guint32 tmp_addr; - static usb_address_t src_addr, dst_addr; /* has to be static due to SET_ADDRESS */ - guint32 src_endpoint, dst_endpoint; - gboolean is_request=FALSE; - usb_conv_info_t *usb_conv_info=NULL; - usb_trans_info_t *usb_trans_info=NULL; - conversation_t *conversation; - usb_tap_data_t *tap_data=NULL; + unsigned int offset = 0; + int type, endpoint; + guint8 setup_flag; + proto_tree *tree = NULL; + guint32 tmp_addr; + static usb_address_t src_addr, dst_addr; /* has to be static due to SET_ADDRESS */ + guint32 src_endpoint, dst_endpoint; + gboolean is_request = FALSE; + usb_conv_info_t *usb_conv_info = NULL; + usb_trans_info_t *usb_trans_info = NULL; + conversation_t *conversation; + usb_tap_data_t *tap_data = NULL; col_set_str(pinfo->cinfo, COL_PROTOCOL, "USB"); @@ -1997,23 +1998,23 @@ dissect_linux_usb_common(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent, } dissect_linux_usb_pseudo_header(tvb, pinfo, tree); - is_request = (tvb_get_guint8(tvb, 8) == URB_SUBMIT) ? TRUE : FALSE; - type = tvb_get_guint8(tvb, 9); - endpoint = tvb_get_guint8(tvb, 10) & (~URB_TRANSFER_IN); - tmp_addr = tvb_get_guint8(tvb, 11); - setup_flag = tvb_get_guint8(tvb, 14); - offset += 40; /* skip first part of the pseudo-header */ + is_request = (tvb_get_guint8(tvb, 8) == URB_SUBMIT) ? TRUE : FALSE; + type = tvb_get_guint8(tvb, 9); + endpoint = tvb_get_guint8(tvb, 10) & (~URB_TRANSFER_IN); + tmp_addr = tvb_get_guint8(tvb, 11); + setup_flag = tvb_get_guint8(tvb, 14); + offset += 40; /* skip first part of the pseudo-header */ /* Set up addresses and ports. */ if (is_request) { - src_addr.device = 0xffffffff; + src_addr.device = 0xffffffff; src_addr.endpoint = src_endpoint = NO_ENDPOINT; - dst_addr.device = htolel(tmp_addr); + dst_addr.device = htolel(tmp_addr); dst_addr.endpoint = dst_endpoint = htolel(endpoint); } else { - src_addr.device = htolel(tmp_addr); + src_addr.device = htolel(tmp_addr); src_addr.endpoint = src_endpoint = htolel(endpoint); - dst_addr.device = 0xffffffff; + dst_addr.device = 0xffffffff; dst_addr.endpoint = dst_endpoint = NO_ENDPOINT; } @@ -2021,14 +2022,14 @@ dissect_linux_usb_common(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent, SET_ADDRESS(&pinfo->src, AT_USB, USB_ADDR_LEN, (char *)&src_addr); SET_ADDRESS(&pinfo->net_dst, AT_USB, USB_ADDR_LEN, (char *)&dst_addr); SET_ADDRESS(&pinfo->dst, AT_USB, USB_ADDR_LEN, (char *)&dst_addr); - pinfo->ptype=PT_USB; - pinfo->srcport=src_endpoint; - pinfo->destport=dst_endpoint; + pinfo->ptype = PT_USB; + pinfo->srcport = src_endpoint; + pinfo->destport = dst_endpoint; - conversation=get_usb_conversation(pinfo, &pinfo->src, &pinfo->dst, pinfo->srcport, pinfo->destport); + conversation = get_usb_conversation(pinfo, &pinfo->src, &pinfo->dst, pinfo->srcport, pinfo->destport); - usb_conv_info=get_usb_conv_info(conversation); - pinfo->usb_conv_info=usb_conv_info; + usb_conv_info = get_usb_conv_info(conversation); + pinfo->usb_conv_info = usb_conv_info; /* request/response matching so we can keep track of transaction specific @@ -2036,55 +2037,55 @@ dissect_linux_usb_common(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent, */ if(is_request){ /* this is a request */ - usb_trans_info=se_tree_lookup32(usb_conv_info->transactions, pinfo->fd->num); + usb_trans_info = se_tree_lookup32(usb_conv_info->transactions, pinfo->fd->num); if(!usb_trans_info){ - usb_trans_info=se_alloc0(sizeof(usb_trans_info_t)); - usb_trans_info->request_in=pinfo->fd->num; - usb_trans_info->req_time=pinfo->fd->abs_ts; + usb_trans_info = se_alloc0(sizeof(usb_trans_info_t)); + usb_trans_info->request_in = pinfo->fd->num; + usb_trans_info->req_time = pinfo->fd->abs_ts; usb_trans_info->header_len_64 = header_len_64_bytes; se_tree_insert32(usb_conv_info->transactions, pinfo->fd->num, usb_trans_info); } - usb_conv_info->usb_trans_info=usb_trans_info; + usb_conv_info->usb_trans_info = usb_trans_info; if(usb_trans_info->response_in){ proto_item *ti; - ti=proto_tree_add_uint(tree, hf_usb_response_in, tvb, 0, 0, usb_trans_info->response_in); + ti = proto_tree_add_uint(tree, hf_usb_response_in, tvb, 0, 0, usb_trans_info->response_in); PROTO_ITEM_SET_GENERATED(ti); } } else { /* this is a response */ if(pinfo->fd->flags.visited){ - usb_trans_info=se_tree_lookup32(usb_conv_info->transactions, pinfo->fd->num); + usb_trans_info = se_tree_lookup32(usb_conv_info->transactions, pinfo->fd->num); } else { - usb_trans_info=se_tree_lookup32_le(usb_conv_info->transactions, pinfo->fd->num); + usb_trans_info = se_tree_lookup32_le(usb_conv_info->transactions, pinfo->fd->num); if(usb_trans_info){ - usb_trans_info->response_in=pinfo->fd->num; + usb_trans_info->response_in = pinfo->fd->num; se_tree_insert32(usb_conv_info->transactions, pinfo->fd->num, usb_trans_info); } } - usb_conv_info->usb_trans_info=usb_trans_info; + usb_conv_info->usb_trans_info = usb_trans_info; if(usb_trans_info && usb_trans_info->request_in){ proto_item *ti; nstime_t t, deltat; - ti=proto_tree_add_uint(tree, hf_usb_request_in, tvb, 0, 0, usb_trans_info->request_in); + ti = proto_tree_add_uint(tree, hf_usb_request_in, tvb, 0, 0, usb_trans_info->request_in); PROTO_ITEM_SET_GENERATED(ti); t = pinfo->fd->abs_ts; nstime_delta(&deltat, &t, &usb_trans_info->req_time); - ti=proto_tree_add_time(tree, hf_usb_time, tvb, 0, 0, &deltat); + ti = proto_tree_add_time(tree, hf_usb_time, tvb, 0, 0, &deltat); PROTO_ITEM_SET_GENERATED(ti); } } - tap_data=ep_alloc(sizeof(usb_tap_data_t)); - tap_data->urb_type=tvb_get_guint8(tvb, 8); - tap_data->transfer_type=(guint8)type; - tap_data->conv_info=usb_conv_info; - tap_data->trans_info=usb_trans_info; + tap_data = ep_alloc(sizeof(usb_tap_data_t)); + tap_data->urb_type = tvb_get_guint8(tvb, 8); + tap_data->transfer_type = (guint8)type; + tap_data->conv_info = usb_conv_info; + tap_data->trans_info = usb_trans_info; if (type != URB_CONTROL) { tap_queue_packet(usb_tap, pinfo, tap_data); @@ -2095,7 +2096,7 @@ dissect_linux_usb_common(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent, { proto_item *item; - item=proto_tree_add_uint(tree, hf_usb_bInterfaceClass, tvb, 0, 0, usb_conv_info->interfaceClass); + item = proto_tree_add_uint(tree, hf_usb_bInterfaceClass, tvb, 0, 0, usb_conv_info->interfaceClass); PROTO_ITEM_SET_GENERATED(item); /* Skip setup/isochronous header - it's not applicable */ @@ -2111,8 +2112,8 @@ dissect_linux_usb_common(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent, if(tvb_reported_length_remaining(tvb, offset)){ tvbuff_t *next_tvb; - pinfo->usb_conv_info=usb_conv_info; - next_tvb=tvb_new_subset_remaining(tvb, offset); + pinfo->usb_conv_info = usb_conv_info; + next_tvb = tvb_new_subset_remaining(tvb, offset); if (try_heuristics && dissector_try_heuristic(heur_bulk_subdissector_list, next_tvb, pinfo, parent)) { return; } @@ -2126,7 +2127,7 @@ dissect_linux_usb_common(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent, { proto_item *item; - item=proto_tree_add_uint(tree, hf_usb_bInterfaceClass, tvb, 0, 0, usb_conv_info->interfaceClass); + item = proto_tree_add_uint(tree, hf_usb_bInterfaceClass, tvb, 0, 0, usb_conv_info->interfaceClass); PROTO_ITEM_SET_GENERATED(item); /* Skip setup/isochronous header - it's not applicable */ @@ -2142,8 +2143,8 @@ dissect_linux_usb_common(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent, if(tvb_reported_length_remaining(tvb, offset)){ tvbuff_t *next_tvb; - pinfo->usb_conv_info=usb_conv_info; - next_tvb=tvb_new_subset_remaining(tvb, offset); + pinfo->usb_conv_info = usb_conv_info; + next_tvb = tvb_new_subset_remaining(tvb, offset); if (try_heuristics && dissector_try_heuristic(heur_interrupt_subdissector_list, next_tvb, pinfo, parent)) { return; } @@ -2172,7 +2173,7 @@ dissect_linux_usb_common(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent, ti = proto_tree_add_protocol_format(parent, proto_usb, tvb, offset, 8, "URB setup"); setup_tree = proto_item_add_subtree(ti, usb_setup_hdr); usb_trans_info->setup.requesttype = tvb_get_guint8(tvb, offset); - offset=dissect_usb_bmrequesttype(setup_tree, tvb, offset, &type_2); + offset = dissect_usb_bmrequesttype(setup_tree, tvb, offset, &type_2); /* read the request code and spawn off to a class specific @@ -2194,23 +2195,23 @@ dissect_linux_usb_common(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent, * dissector */ proto_tree_add_item(setup_tree, hf_usb_request, tvb, offset, 1, ENC_LITTLE_ENDIAN); - offset++; + offset += 1; if (check_col(pinfo->cinfo, COL_INFO)) { col_add_fstr(pinfo->cinfo, COL_INFO, "%s Request", val_to_str(usb_trans_info->setup.request, setup_request_names_vals, "Unknown type %x")); } - dissector=NULL; - for(tmp=setup_request_dissectors;tmp->dissector;tmp++){ + dissector = NULL; + for(tmp = setup_request_dissectors;tmp->dissector;tmp++){ if (tmp->request == usb_trans_info->setup.request){ - dissector=tmp->dissector; + dissector = tmp->dissector; break; } } if(dissector){ - offset=dissector(pinfo, setup_tree, tvb, offset, usb_trans_info, usb_conv_info); + offset = dissector(pinfo, setup_tree, tvb, offset, usb_trans_info, usb_conv_info); } else { proto_tree_add_item(setup_tree, hf_usb_value, tvb, offset, 2, ENC_LITTLE_ENDIAN); offset += 2; @@ -2247,11 +2248,11 @@ dissect_linux_usb_common(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent, tap_data->trans_info = usb_trans_info; tap_queue_packet(usb_tap, pinfo, tap_data); - ti=proto_tree_add_uint(tree, hf_usb_bInterfaceClass, tvb, 0, 0, usb_conv_info->interfaceClass); + ti = proto_tree_add_uint(tree, hf_usb_bInterfaceClass, tvb, 0, 0, usb_conv_info->interfaceClass); PROTO_ITEM_SET_GENERATED(ti); /* Try to find a class specific dissector */ - next_tvb=tvb_new_subset_remaining(tvb, offset); + next_tvb = tvb_new_subset_remaining(tvb, offset); if (try_heuristics && dissector_try_heuristic(heur_control_subdissector_list, next_tvb, pinfo, setup_tree)) { return; } @@ -2260,7 +2261,7 @@ dissect_linux_usb_common(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent, } /* Else no class dissector, just display generic fields */ proto_tree_add_item(setup_tree, hf_usb_request_unknown_class, tvb, offset, 1, ENC_LITTLE_ENDIAN); - offset++; + offset += 1; proto_tree_add_item(setup_tree, hf_usb_value, tvb, offset, 2, ENC_LITTLE_ENDIAN); offset += 2; proto_tree_add_item(setup_tree, hf_usb_index, tvb, offset, 2, ENC_LITTLE_ENDIAN); @@ -2271,7 +2272,7 @@ dissect_linux_usb_common(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent, default: proto_tree_add_item(setup_tree, hf_usb_request_unknown_class, tvb, offset, 1, ENC_LITTLE_ENDIAN); - offset++; + offset += 1; proto_tree_add_item(setup_tree, hf_usb_value, tvb, offset, 2, ENC_LITTLE_ENDIAN); offset += 2; proto_tree_add_item(setup_tree, hf_usb_index, tvb, offset, 2, ENC_LITTLE_ENDIAN); @@ -2326,7 +2327,7 @@ dissect_linux_usb_common(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent, src_addr.endpoint = src_endpoint = htolel(endpoint); SET_ADDRESS(&endpoint_addr, AT_USB, USB_ADDR_LEN, (char *)&src_addr); - conversation = get_usb_conversation(pinfo, &endpoint_addr, &pinfo->dst, src_endpoint, pinfo->destport); + conversation = get_usb_conversation(pinfo, &endpoint_addr, &pinfo->dst, src_endpoint, pinfo->destport); usb_conv_info = get_usb_conv_info(conversation); usb_conv_info->usb_trans_info = usb_trans_info; pinfo->usb_conv_info = usb_conv_info; @@ -2338,7 +2339,7 @@ dissect_linux_usb_common(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent, tap_data->trans_info = usb_trans_info; tap_queue_packet(usb_tap, pinfo, tap_data); - ti=proto_tree_add_uint(tree, hf_usb_bInterfaceClass, tvb, 0, 0, usb_conv_info->interfaceClass); + ti = proto_tree_add_uint(tree, hf_usb_bInterfaceClass, tvb, 0, 0, usb_conv_info->interfaceClass); PROTO_ITEM_SET_GENERATED(ti); /* @@ -2350,7 +2351,7 @@ dissect_linux_usb_common(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent, if(usb_trans_info){ /* Try to find a class specific dissector */ - next_tvb=tvb_new_subset_remaining(tvb, offset); + next_tvb = tvb_new_subset_remaining(tvb, offset); if (try_heuristics && dissector_try_heuristic(heur_control_subdissector_list, next_tvb, pinfo, parent)) { return; } @@ -2372,10 +2373,10 @@ dissect_linux_usb_common(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent, setup_request_names_vals, "Unknown type %x")); } - dissector=NULL; - for(tmp=setup_response_dissectors;tmp->dissector;tmp++){ + dissector = NULL; + for(tmp = setup_response_dissectors;tmp->dissector;tmp++){ if (tmp->request == usb_conv_info->usb_trans_info->setup.request){ - dissector=tmp->dissector; + dissector = tmp->dissector; break; } } @@ -2410,7 +2411,7 @@ dissect_linux_usb_common(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent, { guint32 iso_numdesc = 0; proto_item *ti = NULL; - ti=proto_tree_add_uint(tree, hf_usb_bInterfaceClass, tvb, offset, 0, usb_conv_info->interfaceClass); + ti = proto_tree_add_uint(tree, hf_usb_bInterfaceClass, tvb, offset, 0, usb_conv_info->interfaceClass); PROTO_ITEM_SET_GENERATED(ti); /* All fields which belong to Linux usbmon headers are in host-endian @@ -2424,7 +2425,7 @@ dissect_linux_usb_common(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent, if (setup_flag == 0) { proto_tree *setup_tree = NULL; - int type_2; + int type_2; /* Dissect the setup header - it's applicable */ @@ -2433,7 +2434,7 @@ dissect_linux_usb_common(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent, offset = dissect_usb_bmrequesttype(setup_tree, tvb, offset, &type_2); proto_tree_add_item(setup_tree, hf_usb_request, tvb, offset, 1, ENC_LITTLE_ENDIAN); - offset++; + offset += 1; proto_tree_add_item(setup_tree, hf_usb_value, tvb, offset, 2, ENC_LITTLE_ENDIAN); offset += 2; proto_tree_add_item(setup_tree, hf_usb_index, tvb, offset, 2, ENC_LITTLE_ENDIAN); @@ -2474,13 +2475,13 @@ dissect_linux_usb_common(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent, } if (setup_flag != 0) { - proto_tree *urb_tree = NULL; - guint32 i; - unsigned int data_base; - guint32 iso_status; - guint32 iso_off; - guint32 iso_len; - guint32 iso_pad; + proto_tree *urb_tree = NULL; + guint32 i; + unsigned int data_base; + guint32 iso_status; + guint32 iso_off; + guint32 iso_len; + guint32 iso_pad; data_base = offset + iso_numdesc * 16; urb_tree = tree; @@ -2526,23 +2527,23 @@ dissect_linux_usb_common(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent, default: /* dont know */ if (setup_flag == 0) { - proto_item *ti = NULL; - proto_tree *setup_tree = NULL; - int type_2; + proto_item *ti; + proto_tree *setup_tree; + int type_2; /* Dissect the setup header - it's applicable */ ti = proto_tree_add_protocol_format(parent, proto_usb, tvb, offset, 8, "URB setup"); setup_tree = proto_item_add_subtree(ti, usb_setup_hdr); - offset=dissect_usb_bmrequesttype(setup_tree, tvb, offset, &type_2); + offset = dissect_usb_bmrequesttype(setup_tree, tvb, offset, &type_2); proto_tree_add_item(setup_tree, hf_usb_request, tvb, offset, 1, ENC_LITTLE_ENDIAN); - offset++; - proto_tree_add_item(setup_tree, hf_usb_value, tvb, offset, 2, ENC_LITTLE_ENDIAN); + offset += 1; + proto_tree_add_item(setup_tree, hf_usb_value, tvb, offset, 2, ENC_LITTLE_ENDIAN); offset += 2; - proto_tree_add_item(setup_tree, hf_usb_index, tvb, offset, 2, ENC_LITTLE_ENDIAN); + proto_tree_add_item(setup_tree, hf_usb_index, tvb, offset, 2, ENC_LITTLE_ENDIAN); offset += 2; - proto_tree_add_item(setup_tree, hf_usb_length, tvb, offset, 2, ENC_LITTLE_ENDIAN); + proto_tree_add_item(setup_tree, hf_usb_length, tvb, offset, 2, ENC_LITTLE_ENDIAN); offset += 2; } else { /* Skip setup/isochronous header - it's not applicable */ @@ -3006,7 +3007,7 @@ proto_register_usb(void) "attempting to dissect the packet using the \"usb.bulk\", \"usb.interrupt\" or " "\"usb.control\" dissector tables.", &try_heuristics); - usb_tap=register_tap("usb"); + usb_tap = register_tap("usb"); } void |