diff options
author | Bill Meier <wmeier@newsguy.com> | 2014-10-03 10:13:07 -0400 |
---|---|---|
committer | Bill Meier <wmeier@newsguy.com> | 2014-10-03 14:28:42 +0000 |
commit | bb5daa6ae9070a1093b5fbc8f078d9eaf101d769 (patch) | |
tree | 9af6b8bd3bbcaa75ea90adf0709069d245e14c2d /epan/dissectors/packet-gsm_bsslap.c | |
parent | 451de17929eaa48af07bfc6154a9603318121562 (diff) |
Add editor modelines; Adjust whitespace as needed.
Change-Id: I391cdf80a6e4ae5b0f4068e0500a90d013588f8a
Reviewed-on: https://code.wireshark.org/review/4442
Reviewed-by: Bill Meier <wmeier@newsguy.com>
Diffstat (limited to 'epan/dissectors/packet-gsm_bsslap.c')
-rw-r--r-- | epan/dissectors/packet-gsm_bsslap.c | 1177 |
1 files changed, 595 insertions, 582 deletions
diff --git a/epan/dissectors/packet-gsm_bsslap.c b/epan/dissectors/packet-gsm_bsslap.c index b062ac1030..2b0235be8f 100644 --- a/epan/dissectors/packet-gsm_bsslap.c +++ b/epan/dissectors/packet-gsm_bsslap.c @@ -37,10 +37,10 @@ void proto_register_gsm_bsslap(void); static dissector_handle_t bsslap_rrlp_handle = NULL; /* Initialize the protocol and registered fields */ -static int proto_gsm_bsslap = -1; -static int hf_gsm_bsslap_msg_type = -1; -int hf_gsm_a_bsslap_elem_id = -1; -static int hf_gsm_bsslap_ta = -1; +static int proto_gsm_bsslap = -1; +static int hf_gsm_bsslap_msg_type = -1; +int hf_gsm_a_bsslap_elem_id = -1; +static int hf_gsm_bsslap_ta = -1; static int hf_gsm_bsslap_timer_value = -1; static int hf_gsm_bsslap_ms_pow = -1; static int hf_gsm_bsslap_cause = -1; @@ -88,78 +88,78 @@ static int ett_bsslap_cell_list = -1; #define BSSLAP_PARAM_STARTING_TIME 0x2D static const value_string gsm_bsslap_elem_strings[] = { - { DE_BLAP_RES1, "Reserved" }, - { DE_BLAP_TA, "Timing Advance" }, - { DE_BLAP_RES3, "Reserved" }, /* (note) */ - { DE_BLAP_RES4, "Cell Identity" }, - { DE_BLAP_RES5, "Reserved" }, /* (note) */ - { DE_BLAP_RES6, "Reserved" }, /* (note) */ - { DE_BLAP_RES7, "Reserved" }, /* (note) */ - { DE_BLAP_CH_DESC, "Channel Description" }, - { DE_BLAP_RES9, "Reserved" }, /* (note) */ - { DE_BLAP_RES10, "Reserved" }, /* (note) */ - { DE_BLAP_RES11, "Reserved" }, /* (note) */ - { DE_BLAP_MEAS_REP, "Measurement Report" }, - { DE_BLAP_RES13, "Reserved" }, /* (note) */ - { DE_BLAP_CAUSE, "Cause" }, - { DE_BLAP_RRLP_FLG, "RRLP Flag" }, - { DE_BLAP_RRLP_IE, "RRLP IE" }, - { DE_BLAP_CELL_ID_LIST, "Cell Identity List" }, - { DE_BLAP_ENH_MEAS_REP, "Enhanced Measurement Report" }, - { DE_BLAP_LAC, "Location Area Code" }, - { DE_BLAP_FREQ_LIST, "Frequency List" }, - { DE_BLAP_MS_POW, "MS Power" }, - { DE_BLAP_DELTA_TIME, "Delta Timer" }, - { DE_BLAP_SERV_CELL_ID, "Serving Cell Identifier" }, - { DE_BLAP_ENC_KEY, "Encryption Key (Kc)" }, - { DE_BLAP_CIP_M_SET, "Cipher Mode Setting" }, - { DE_BLAP_CH_MODE, "Channel Mode" }, - { DE_BLAP_POLL_REP, "Polling Repetition" }, - { DE_BLAP_PKT_CH_DESC, "Packet Channel Description" }, - { DE_BLAP_TLLI, "TLLI" }, - { DE_BLAP_TFI, "TFI" }, - { DE_BLAP_START_TIME, "Starting Time" }, - { 0, NULL }, + { DE_BLAP_RES1, "Reserved" }, + { DE_BLAP_TA, "Timing Advance" }, + { DE_BLAP_RES3, "Reserved" }, /* (note) */ + { DE_BLAP_RES4, "Cell Identity" }, + { DE_BLAP_RES5, "Reserved" }, /* (note) */ + { DE_BLAP_RES6, "Reserved" }, /* (note) */ + { DE_BLAP_RES7, "Reserved" }, /* (note) */ + { DE_BLAP_CH_DESC, "Channel Description" }, + { DE_BLAP_RES9, "Reserved" }, /* (note) */ + { DE_BLAP_RES10, "Reserved" }, /* (note) */ + { DE_BLAP_RES11, "Reserved" }, /* (note) */ + { DE_BLAP_MEAS_REP, "Measurement Report" }, + { DE_BLAP_RES13, "Reserved" }, /* (note) */ + { DE_BLAP_CAUSE, "Cause" }, + { DE_BLAP_RRLP_FLG, "RRLP Flag" }, + { DE_BLAP_RRLP_IE, "RRLP IE" }, + { DE_BLAP_CELL_ID_LIST, "Cell Identity List" }, + { DE_BLAP_ENH_MEAS_REP, "Enhanced Measurement Report" }, + { DE_BLAP_LAC, "Location Area Code" }, + { DE_BLAP_FREQ_LIST, "Frequency List" }, + { DE_BLAP_MS_POW, "MS Power" }, + { DE_BLAP_DELTA_TIME, "Delta Timer" }, + { DE_BLAP_SERV_CELL_ID, "Serving Cell Identifier" }, + { DE_BLAP_ENC_KEY, "Encryption Key (Kc)" }, + { DE_BLAP_CIP_M_SET, "Cipher Mode Setting" }, + { DE_BLAP_CH_MODE, "Channel Mode" }, + { DE_BLAP_POLL_REP, "Polling Repetition" }, + { DE_BLAP_PKT_CH_DESC, "Packet Channel Description" }, + { DE_BLAP_TLLI, "TLLI" }, + { DE_BLAP_TFI, "TFI" }, + { DE_BLAP_START_TIME, "Starting Time" }, + { 0, NULL }, }; value_string_ext gsm_bsslap_elem_strings_ext = VALUE_STRING_EXT_INIT(gsm_bsslap_elem_strings); /* - * NOTE: These values of the codepoints shall not be used as they were used in an earlier version of the - * protocol. - * All unassigned codes are spare. + * NOTE: These values of the codepoints shall not be used as they were used in an earlier version of the + * protocol. + * All unassigned codes are spare. */ -#define BSSLAP_TA_REQUEST 1 -#define BSSLAP_TA_RESPONSE 2 -#define BSSLAP_REJECT 10 -#define BSSLAP_RESET 11 -#define BSSLAP_ABORT 12 -#define BSSLAP_TA_LAYER3 13 -#define BSSLAP_MS_POS_CMD 15 -#define BSSLAP_MS_POS_RES 16 -#define BSSLAP_U_TDOA_REQ 17 -#define BSSLAP_U_TDOA_RES 18 +#define BSSLAP_TA_REQUEST 1 +#define BSSLAP_TA_RESPONSE 2 +#define BSSLAP_REJECT 10 +#define BSSLAP_RESET 11 +#define BSSLAP_ABORT 12 +#define BSSLAP_TA_LAYER3 13 +#define BSSLAP_MS_POS_CMD 15 +#define BSSLAP_MS_POS_RES 16 +#define BSSLAP_U_TDOA_REQ 17 +#define BSSLAP_U_TDOA_RES 18 /* Table 5.1.1: Message Type codes */ static const value_string gsm_a_bsslap_msg_strings[] = { - { 0x00, "Reserved" }, - { BSSLAP_TA_REQUEST, "TA REQUEST" }, - { BSSLAP_TA_RESPONSE, "TA RESPONSE" }, - { 0x04, "Reserved" }, - { 0x05, "Reserved" }, - { BSSLAP_REJECT, "REJECT" }, - { BSSLAP_RESET, "RESET" }, - { BSSLAP_ABORT, "ABORT" }, - { BSSLAP_TA_LAYER3, "TA LAYER3" }, - { BSSLAP_MS_POS_CMD, "MS Position Command" }, - { BSSLAP_MS_POS_RES, "MS Position Response" }, - { BSSLAP_U_TDOA_REQ, "U-TDOA Request" }, - { BSSLAP_U_TDOA_RES, "U-TDOA Response" }, - { 0, NULL } + { 0x00, "Reserved" }, + { BSSLAP_TA_REQUEST, "TA REQUEST" }, + { BSSLAP_TA_RESPONSE, "TA RESPONSE" }, + { 0x04, "Reserved" }, + { 0x05, "Reserved" }, + { BSSLAP_REJECT, "REJECT" }, + { BSSLAP_RESET, "RESET" }, + { BSSLAP_ABORT, "ABORT" }, + { BSSLAP_TA_LAYER3, "TA LAYER3" }, + { BSSLAP_MS_POS_CMD, "MS Position Command" }, + { BSSLAP_MS_POS_RES, "MS Position Response" }, + { BSSLAP_U_TDOA_REQ, "U-TDOA Request" }, + { BSSLAP_U_TDOA_RES, "U-TDOA Response" }, + { 0, NULL } }; -#define NUM_GSM_BSSLAP_ELEM (sizeof(gsm_bsslap_elem_strings)/sizeof(value_string)) +#define NUM_GSM_BSSLAP_ELEM (sizeof(gsm_bsslap_elem_strings)/sizeof(value_string)) gint ett_gsm_bsslap_elem[NUM_GSM_BSSLAP_ELEM]; /* @@ -168,13 +168,13 @@ gint ett_gsm_bsslap_elem[NUM_GSM_BSSLAP_ELEM]; static guint16 de_ta(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; - proto_tree_add_item(tree, hf_gsm_bsslap_ta, tvb, curr_offset, 1, ENC_BIG_ENDIAN); - curr_offset++; + curr_offset = offset; + proto_tree_add_item(tree, hf_gsm_bsslap_ta, tvb, curr_offset, 1, ENC_BIG_ENDIAN); + curr_offset++; - return(curr_offset - offset); + return(curr_offset - offset); } /* * 5.12 Measurement Report IE @@ -183,80 +183,80 @@ de_ta(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32 offset, g static guint16 de_meas_rep(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; + guint32 curr_offset; - curr_offset = offset; - proto_tree_add_text(tree,tvb, curr_offset, len,"Not decoded yet"); + curr_offset = offset; + proto_tree_add_text(tree,tvb, curr_offset, len,"Not decoded yet"); - return(len); + return(len); } #endif /* * 5.14 Cause IE */ static const value_string gsm_bsslap_cause_vals[] = { - { 0x00, "Congestion" }, - { 0x01, "Channel Mode not supported" }, - { 0x02, "Positioning procedure not supported" }, - { 0x03, "Failure for other radio related events" }, - { 0x04, "Intra-BSS handover" }, - { 0x05, "Supervision Timer Expired" }, - { 0x06, "Inter-BSS handover" }, - { 0x07, "Loss of signalling connection to MS" }, - { 0x08, "Incorrect serving cell identity" }, - { 0x09, "BSSAP-LE Segmentation error" }, - { 0, NULL } + { 0x00, "Congestion" }, + { 0x01, "Channel Mode not supported" }, + { 0x02, "Positioning procedure not supported" }, + { 0x03, "Failure for other radio related events" }, + { 0x04, "Intra-BSS handover" }, + { 0x05, "Supervision Timer Expired" }, + { 0x06, "Inter-BSS handover" }, + { 0x07, "Loss of signalling connection to MS" }, + { 0x08, "Incorrect serving cell identity" }, + { 0x09, "BSSAP-LE Segmentation error" }, + { 0, NULL } }; static guint16 de_bsslap_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; - proto_tree_add_item(tree, hf_gsm_bsslap_cause, tvb, curr_offset, 1, ENC_BIG_ENDIAN); - curr_offset++; + curr_offset = offset; + proto_tree_add_item(tree, hf_gsm_bsslap_cause, tvb, curr_offset, 1, ENC_BIG_ENDIAN); + curr_offset++; - return(curr_offset - offset); + return(curr_offset - offset); } /* * 5.15 RRLP Flag IE */ static const true_false_string gsm_bsslap_rrlp_flg_vals = { - "Not a Positioning Command or final response." , - "Position Command (SMLC to BSC) or final response (BSC to SMLC)" + "Not a Positioning Command or final response." , + "Position Command (SMLC to BSC) or final response (BSC to SMLC)" }; static guint16 de_rrlp_flg(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; - proto_tree_add_item(tree, hf_gsm_bsslap_rrlp_flg, tvb, curr_offset, 1, ENC_BIG_ENDIAN); - curr_offset++; + curr_offset = offset; + proto_tree_add_item(tree, hf_gsm_bsslap_rrlp_flg, tvb, curr_offset, 1, ENC_BIG_ENDIAN); + curr_offset++; - return(curr_offset - offset); + return(curr_offset - offset); } static guint16 de_rrlp_ie(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guint len _U_, gchar *add_string _U_, int string_len _U_) { - guint32 curr_offset; - tvbuff_t *rrlp_tvb; - guint16 length; - - length = tvb_get_ntohs(tvb, offset); - - curr_offset = offset + 2; - if (length > 0) - { - rrlp_tvb = tvb_new_subset_length(tvb, curr_offset, length); - if (bsslap_rrlp_handle) - call_dissector(bsslap_rrlp_handle, rrlp_tvb, pinfo, tree); - } - - curr_offset += length; - return(curr_offset - offset); + guint32 curr_offset; + tvbuff_t *rrlp_tvb; + guint16 length; + + length = tvb_get_ntohs(tvb, offset); + + curr_offset = offset + 2; + if (length > 0) + { + rrlp_tvb = tvb_new_subset_length(tvb, curr_offset, length); + if (bsslap_rrlp_handle) + call_dissector(bsslap_rrlp_handle, rrlp_tvb, pinfo, tree); + } + + curr_offset += length; + return(curr_offset - offset); } /* * 5.17 Cell Identity List IE @@ -265,11 +265,11 @@ de_rrlp_ie(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, * The Cell identification discriminator i is coded as follows: */ static const value_string gsm_a_bsslap_cell_id_disc_vals[] = { - { 0x0, "The whole Cell Global Identification, CGI, is used to identify the 2G cells" }, - { 0x1, "Location Area Code, LAC, and Cell Identify, CI, are used to identify the 2G cells" }, - { 0x2, "3G Cell identification container 1" }, - { 0x3, "3G Cell identification container 2" }, - { 0, NULL } + { 0x0, "The whole Cell Global Identification, CGI, is used to identify the 2G cells" }, + { 0x1, "Location Area Code, LAC, and Cell Identify, CI, are used to identify the 2G cells" }, + { 0x2, "3G Cell identification container 1" }, + { 0x3, "3G Cell identification container 2" }, + { 0, NULL } }; @@ -277,55 +277,55 @@ static const value_string gsm_a_bsslap_cell_id_disc_vals[] = { static guint16 de_cell_id_list(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guint len, gchar *add_string _U_, int string_len _U_) { - guint32 curr_offset; - guint8 consumed; - guint8 cell_id_disc; - guint8 num_cells; - proto_item *item = NULL; - proto_tree *subtree = NULL; - - curr_offset = offset; - cell_id_disc = tvb_get_guint8(tvb,curr_offset); - num_cells = 0; - - while(len>0){ - num_cells++; - consumed = 0; - subtree = proto_tree_add_subtree_format(tree, tvb, curr_offset, -1, ett_bsslap_cell_list, &item, "Cell %u", num_cells); - - if (add_string) - add_string[0] = '\0'; - proto_tree_add_item(subtree, hf_gsm_bsslap_cell_id_disc, tvb, curr_offset, 1, ENC_BIG_ENDIAN); - curr_offset++; - len--; - switch(cell_id_disc){ - case 0: - /* The whole Cell Global Identification, CGI, is used to identify the 2G cells. */ - consumed+= be_cell_id_aux(tvb, subtree, pinfo, curr_offset, len, NULL, 0, 0); - break; - case 1: - /* Location Area Code, LAC, and Cell Identify, CI, are used to identify the 2G cells. */ - consumed+= be_cell_id_aux(tvb, subtree, pinfo, curr_offset, len, NULL, 0, 1); - break; - case 2: - /* 3G Cell identification container 1 */ - /* fall trough */ - case 3: - /* 3G Cell identification container 2 */ - /* fall trough */ - default: - proto_tree_add_text(subtree,tvb, curr_offset, len,"Not decoded yet"); - consumed = len; - break; - } - curr_offset += consumed; - len-=consumed; - /* lengt is "cell id" + discriminator */ - proto_item_set_len(item, consumed+1); - } - - - return(curr_offset - offset); + guint32 curr_offset; + guint8 consumed; + guint8 cell_id_disc; + guint8 num_cells; + proto_item *item = NULL; + proto_tree *subtree = NULL; + + curr_offset = offset; + cell_id_disc = tvb_get_guint8(tvb,curr_offset); + num_cells = 0; + + while(len>0){ + num_cells++; + consumed = 0; + subtree = proto_tree_add_subtree_format(tree, tvb, curr_offset, -1, ett_bsslap_cell_list, &item, "Cell %u", num_cells); + + if (add_string) + add_string[0] = '\0'; + proto_tree_add_item(subtree, hf_gsm_bsslap_cell_id_disc, tvb, curr_offset, 1, ENC_BIG_ENDIAN); + curr_offset++; + len--; + switch(cell_id_disc){ + case 0: + /* The whole Cell Global Identification, CGI, is used to identify the 2G cells. */ + consumed+= be_cell_id_aux(tvb, subtree, pinfo, curr_offset, len, NULL, 0, 0); + break; + case 1: + /* Location Area Code, LAC, and Cell Identify, CI, are used to identify the 2G cells. */ + consumed+= be_cell_id_aux(tvb, subtree, pinfo, curr_offset, len, NULL, 0, 1); + break; + case 2: + /* 3G Cell identification container 1 */ + /* fall trough */ + case 3: + /* 3G Cell identification container 2 */ + /* fall trough */ + default: + proto_tree_add_text(subtree,tvb, curr_offset, len,"Not decoded yet"); + consumed = len; + break; + } + curr_offset += consumed; + len-=consumed; + /* lengt is "cell id" + discriminator */ + proto_item_set_len(item, consumed+1); + } + + + return(curr_offset - offset); } /* * 5.18 Enhanced Measurement Report IE @@ -336,13 +336,13 @@ de_cell_id_list(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 off static guint16 de_enh_meas_rep(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; + guint32 curr_offset; - curr_offset = offset; - proto_tree_add_text(tree,tvb, curr_offset, len,"Not decoded yet"); + curr_offset = offset; + proto_tree_add_text(tree,tvb, curr_offset, len,"Not decoded yet"); - return(len); + return(len); } /* * 5.19 Location Area Code IE @@ -350,13 +350,13 @@ de_enh_meas_rep(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32 static guint16 de_lac(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; - proto_tree_add_item(tree, hf_gsm_bsslap_lac, tvb, curr_offset, 1, ENC_BIG_ENDIAN); - curr_offset++; + curr_offset = offset; + proto_tree_add_item(tree, hf_gsm_bsslap_lac, tvb, curr_offset, 1, ENC_BIG_ENDIAN); + curr_offset++; - return(curr_offset - offset); + return(curr_offset - offset); } /* * 5.21 MS Power IE @@ -364,13 +364,13 @@ de_lac(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32 offset, static guint16 de_ms_pow(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; - proto_tree_add_item(tree, hf_gsm_bsslap_ms_pow, tvb, curr_offset, 1, ENC_BIG_ENDIAN); - curr_offset++; + curr_offset = offset; + proto_tree_add_item(tree, hf_gsm_bsslap_ms_pow, tvb, curr_offset, 1, ENC_BIG_ENDIAN); + curr_offset++; - return(curr_offset - offset); + return(curr_offset - offset); } /* @@ -379,13 +379,13 @@ de_ms_pow(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32 offse static guint16 de_delta_time(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; - proto_tree_add_item(tree, hf_gsm_bsslap_timer_value, tvb, curr_offset, 1, ENC_BIG_ENDIAN); - curr_offset++; + curr_offset = offset; + proto_tree_add_item(tree, hf_gsm_bsslap_timer_value, tvb, curr_offset, 1, ENC_BIG_ENDIAN); + curr_offset++; - return(curr_offset - offset); + return(curr_offset - offset); } /* * 5.23 Serving Cell Identifier IE @@ -397,13 +397,13 @@ de_delta_time(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32 o static guint16 de_blap_enc_key(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; - proto_tree_add_text(tree,tvb, curr_offset, 8,"Encryption Key (Kc)"); - curr_offset = curr_offset + 8; + curr_offset = offset; + proto_tree_add_text(tree,tvb, curr_offset, 8,"Encryption Key (Kc)"); + curr_offset = curr_offset + 8; - return(curr_offset - offset); + return(curr_offset - offset); } /* * 5.25 Cipher Mode Setting IE @@ -423,13 +423,13 @@ de_blap_enc_key(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32 static guint16 de_poll_rep(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; - proto_tree_add_item(tree, hf_gsm_bsslap_poll_rep, tvb, curr_offset, 1, ENC_BIG_ENDIAN); - curr_offset++; + curr_offset = offset; + proto_tree_add_item(tree, hf_gsm_bsslap_poll_rep, tvb, curr_offset, 1, ENC_BIG_ENDIAN); + curr_offset++; - return(curr_offset - offset); + return(curr_offset - offset); } /* * 5.29 Packet Channel Description IE @@ -440,13 +440,13 @@ de_poll_rep(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32 off static guint16 de_pkt_ch_desc(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; + guint32 curr_offset; - curr_offset = offset; - proto_tree_add_text(tree,tvb, curr_offset, len,"Not decoded yet"); + curr_offset = offset; + proto_tree_add_text(tree,tvb, curr_offset, len,"Not decoded yet"); - return(len); + return(len); } /* * 5.31 TFI IE @@ -459,13 +459,13 @@ de_pkt_ch_desc(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32 static guint16 de_tfi(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; - proto_tree_add_item(tree, hf_gsm_bsslap_tfi, tvb, curr_offset, 1, ENC_BIG_ENDIAN); - curr_offset++; + curr_offset = offset; + proto_tree_add_item(tree, hf_gsm_bsslap_tfi, tvb, curr_offset, 1, ENC_BIG_ENDIAN); + curr_offset++; - return(curr_offset - offset); + return(curr_offset - offset); } /* @@ -478,104 +478,104 @@ Note this enum must be of the same size as the element decoding list typedef enum { - /. BSS LAP Elements 5 ./ - DE_BLAP_RES1, /. Reserved ./ - DE_BLAP_TA, /. Timing Advance ./ - DE_BLAP_RES3, /. Reserved ./ /. (note) ./ - DE_BLAP_RES4, /. Cell Identity ./ - DE_BLAP_RES5, /. Reserved ./ /. (note) ./ - DE_BLAP_RES6, /. Reserved ./ /. (note) ./ - DE_BLAP_RES7, /. Reserved ./ /. (note) ./ - DE_BLAP_CH_DESC, /. Channel Description ./ - DE_BLAP_RES9, /. Reserved ./ /. (note) ./ - DE_BLAP_RES10, /. Reserved ./ /. (note) ./ - DE_BLAP_RES11, /. Reserved ./ /. (note) ./ - DE_BLAP_MEAS_REP, /. Measurement Report ./ - DE_BLAP_RES13, /. Reserved ./ /. (note) ./ - DE_BLAP_CAUSE, /. Cause ./ - DE_BLAP_RRLP_FLG, /. RRLP Flag ./ - DE_BLAP_RRLP_IE, /. RRLP IE ./ - DE_BLAP_CELL_ID_LIST, /. Cell Identity List ./ - DE_BLAP_ENH_MEAS_REP, /. Enhanced Measurement Report ./ - DE_BLAP_LAC, /. Location Area Code ./ - DE_BLAP_FREQ_LIST, /. Frequency List ./ - DE_BLAP_MS_POW, /. MS Power ./ - DE_BLAP_DELTA_TIME, /. Delta Timer ./ - DE_BLAP_SERV_CELL_ID, /. Serving Cell Identifier ./ - DE_BLAP_ENC_KEY, /. Encryption Key (Kc) ./ - DE_BLAP_CIP_M_SET, /. Cipher Mode Setting ./ - DE_BLAP_CH_MODE, /. Channel Mode ./ - DE_BLAP_POLL_REP, /. Polling Repetition ./ - DE_BLAP_PKT_CH_DESC, /. Packet Channel Description ./ - DE_BLAP_TLLI, /. TLLI ./ - DE_BLAP_TFI, /. TFI ./ - DE_BLAP_START_TIME, /. Starting Time ./ - BSSLAP_NONE /. NONE ./ + /. BSS LAP Elements 5 ./ + DE_BLAP_RES1, /. Reserved ./ + DE_BLAP_TA, /. Timing Advance ./ + DE_BLAP_RES3, /. Reserved ./ /. (note) ./ + DE_BLAP_RES4, /. Cell Identity ./ + DE_BLAP_RES5, /. Reserved ./ /. (note) ./ + DE_BLAP_RES6, /. Reserved ./ /. (note) ./ + DE_BLAP_RES7, /. Reserved ./ /. (note) ./ + DE_BLAP_CH_DESC, /. Channel Description ./ + DE_BLAP_RES9, /. Reserved ./ /. (note) ./ + DE_BLAP_RES10, /. Reserved ./ /. (note) ./ + DE_BLAP_RES11, /. Reserved ./ /. (note) ./ + DE_BLAP_MEAS_REP, /. Measurement Report ./ + DE_BLAP_RES13, /. Reserved ./ /. (note) ./ + DE_BLAP_CAUSE, /. Cause ./ + DE_BLAP_RRLP_FLG, /. RRLP Flag ./ + DE_BLAP_RRLP_IE, /. RRLP IE ./ + DE_BLAP_CELL_ID_LIST, /. Cell Identity List ./ + DE_BLAP_ENH_MEAS_REP, /. Enhanced Measurement Report ./ + DE_BLAP_LAC, /. Location Area Code ./ + DE_BLAP_FREQ_LIST, /. Frequency List ./ + DE_BLAP_MS_POW, /. MS Power ./ + DE_BLAP_DELTA_TIME, /. Delta Timer ./ + DE_BLAP_SERV_CELL_ID, /. Serving Cell Identifier ./ + DE_BLAP_ENC_KEY, /. Encryption Key (Kc) ./ + DE_BLAP_CIP_M_SET, /. Cipher Mode Setting ./ + DE_BLAP_CH_MODE, /. Channel Mode ./ + DE_BLAP_POLL_REP, /. Polling Repetition ./ + DE_BLAP_PKT_CH_DESC, /. Packet Channel Description ./ + DE_BLAP_TLLI, /. TLLI ./ + DE_BLAP_TFI, /. TFI ./ + DE_BLAP_START_TIME, /. Starting Time ./ + BSSLAP_NONE /. NONE ./ } bsslap_elem_idx_t; */ elem_fcn bsslap_elem_fcn[] = { - /* BSS LAP Elements 5 */ - NULL, /* Reserved */ - de_ta, /* Timing Advance */ - NULL, /* Reserved */ /* (note) */ - NULL, /* "Cell Identity */ - NULL, /* "Reserved */ /* (note) */ - NULL, /* "Reserved */ /* (note) */ - NULL, /* "Reserved */ /* (note) */ - NULL, /* "Channel Description */ - NULL, /* "Reserved */ /* (note) */ - NULL, /* Reserved */ /* (note) */ - NULL, /* Reserved */ /* (note) */ - de_rr_meas_res, /* "Measurement Report */ - NULL, /* "Reserved */ /* (note) */ - de_bsslap_cause, /* "Cause */ - de_rrlp_flg, /* "RRLP Flag */ - de_rrlp_ie, /* "RRLP IE */ - de_cell_id_list, /* "Cell Identity List */ - de_enh_meas_rep, /* Enhanced Measurement Report */ - de_lac, /* "Location Area Code */ - NULL, /* "Frequency List */ - de_ms_pow, /* MS Power */ - de_delta_time, /* Delta Timer */ - NULL, /* Serving Cell Identifier */ - de_blap_enc_key, /* Encryption Key (Kc) */ - NULL, /* Cipher Mode Setting */ - NULL, /* Channel Mode */ - de_poll_rep, /* Polling Repetition */ - de_pkt_ch_desc, /* Packet Channel Description */ - NULL, /* TLLI */ - de_tfi, /* TFI */ - NULL, /* Starting Time */ - NULL, /* NONE */ + /* BSS LAP Elements 5 */ + NULL, /* Reserved */ + de_ta, /* Timing Advance */ + NULL, /* Reserved */ /* (note) */ + NULL, /* "Cell Identity */ + NULL, /* "Reserved */ /* (note) */ + NULL, /* "Reserved */ /* (note) */ + NULL, /* "Reserved */ /* (note) */ + NULL, /* "Channel Description */ + NULL, /* "Reserved */ /* (note) */ + NULL, /* Reserved */ /* (note) */ + NULL, /* Reserved */ /* (note) */ + de_rr_meas_res, /* "Measurement Report */ + NULL, /* "Reserved */ /* (note) */ + de_bsslap_cause, /* "Cause */ + de_rrlp_flg, /* "RRLP Flag */ + de_rrlp_ie, /* "RRLP IE */ + de_cell_id_list, /* "Cell Identity List */ + de_enh_meas_rep, /* Enhanced Measurement Report */ + de_lac, /* "Location Area Code */ + NULL, /* "Frequency List */ + de_ms_pow, /* MS Power */ + de_delta_time, /* Delta Timer */ + NULL, /* Serving Cell Identifier */ + de_blap_enc_key, /* Encryption Key (Kc) */ + NULL, /* Cipher Mode Setting */ + NULL, /* Channel Mode */ + de_poll_rep, /* Polling Repetition */ + de_pkt_ch_desc, /* Packet Channel Description */ + NULL, /* TLLI */ + de_tfi, /* TFI */ + NULL, /* Starting Time */ + NULL, /* NONE */ }; -#define NUM_GSM_BSSLAP_MSG (sizeof(gsm_a_bsslap_msg_strings)/sizeof(value_string)) +#define NUM_GSM_BSSLAP_MSG (sizeof(gsm_a_bsslap_msg_strings)/sizeof(value_string)) static gint ett_gsm_bsslap_msg[NUM_GSM_BSSLAP_MSG]; /* 4.2.2 TA Response ETSI TS 148 071 V7.2.0 (2007-06) */ static void dissect_gsm_bsslap_ta_res(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, int offset) { - guint32 curr_offset; - guint32 consumed; - guint curr_len; - - curr_offset = offset; - curr_len = tvb_length_remaining(tvb,offset); - - /* Cell Identity IE / 5.4 M TV 3 */ - ELEM_MAND_TV(BSSLAP_PARAM_CELL_IDENTITY, GSM_A_PDU_TYPE_COMMON, DE_CELL_ID, "Serving Cell Identity"); - /* Timing Advance IE / 5.2 M TV 2 */ - ELEM_MAND_TV(BSSLAP_PARAM_TIMING_ADVANCE, GSM_A_PDU_TYPE_BSSLAP, DE_BLAP_TA, NULL); - /* Measurement Report IE / 5.12 O TLV 18 */ - ELEM_OPT_TLV(BSSLAP_PARAM_MEASUREMENT_REPORT, GSM_A_PDU_TYPE_BSSLAP, DE_BLAP_MEAS_REP, " BSSLAP"); - /* Enhanced Measurement Report IE / 5.18 O TLV 4-n */ - ELEM_OPT_TLV(BSSLAP_PARAM_ENHANCED_MEASUREMENT_REPORT, GSM_A_PDU_TYPE_BSSLAP, DE_BLAP_ENH_MEAS_REP, NULL); - /* Cell Identity List IE / 5.17 O TLV 6-n */ - ELEM_OPT_TLV(BSSLAP_PARAM_CELL_IDENTITY_LIST, GSM_A_PDU_TYPE_BSSLAP, DE_BLAP_CELL_ID_LIST, "-Measured Cell"); - - return; + guint32 curr_offset; + guint32 consumed; + guint curr_len; + + curr_offset = offset; + curr_len = tvb_length_remaining(tvb,offset); + + /* Cell Identity IE / 5.4 M TV 3 */ + ELEM_MAND_TV(BSSLAP_PARAM_CELL_IDENTITY, GSM_A_PDU_TYPE_COMMON, DE_CELL_ID, "Serving Cell Identity"); + /* Timing Advance IE / 5.2 M TV 2 */ + ELEM_MAND_TV(BSSLAP_PARAM_TIMING_ADVANCE, GSM_A_PDU_TYPE_BSSLAP, DE_BLAP_TA, NULL); + /* Measurement Report IE / 5.12 O TLV 18 */ + ELEM_OPT_TLV(BSSLAP_PARAM_MEASUREMENT_REPORT, GSM_A_PDU_TYPE_BSSLAP, DE_BLAP_MEAS_REP, " BSSLAP"); + /* Enhanced Measurement Report IE / 5.18 O TLV 4-n */ + ELEM_OPT_TLV(BSSLAP_PARAM_ENHANCED_MEASUREMENT_REPORT, GSM_A_PDU_TYPE_BSSLAP, DE_BLAP_ENH_MEAS_REP, NULL); + /* Cell Identity List IE / 5.17 O TLV 6-n */ + ELEM_OPT_TLV(BSSLAP_PARAM_CELL_IDENTITY_LIST, GSM_A_PDU_TYPE_BSSLAP, DE_BLAP_CELL_ID_LIST, "-Measured Cell"); + + return; } @@ -586,263 +586,263 @@ dissect_gsm_bsslap_ta_res(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, i static void dissect_gsm_bsslap_reject(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, int offset) { - guint32 curr_offset; - guint32 consumed; - guint curr_len; + guint32 curr_offset; + guint32 consumed; + guint curr_len; - curr_offset = offset; - curr_len = tvb_length_remaining(tvb,offset); + curr_offset = offset; + curr_len = tvb_length_remaining(tvb,offset); - /* Cause IE / 5.14 M TV 2 */ - ELEM_MAND_TV(BSSLAP_PARAM_CAUSE, GSM_A_PDU_TYPE_BSSLAP, DE_BLAP_CAUSE,NULL); + /* Cause IE / 5.14 M TV 2 */ + ELEM_MAND_TV(BSSLAP_PARAM_CAUSE, GSM_A_PDU_TYPE_BSSLAP, DE_BLAP_CAUSE,NULL); - return; + return; } /* 4.2.6 Reset ETSI TS 148 071 V7.2.0 (2007-06) */ static void dissect_gsm_bsslap_reset(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, int offset) { - guint32 curr_offset; - guint32 consumed; - guint curr_len; - - curr_offset = offset; - curr_len = tvb_length_remaining(tvb,offset); - - /* Cell Identity IE / 5.4 M TV 3 */ - ELEM_MAND_TV(BSSLAP_PARAM_CELL_IDENTITY, GSM_A_PDU_TYPE_COMMON, DE_CELL_ID, NULL); - /* Timing Advance IE / 5.2 M TV 2 */ - ELEM_MAND_TV(BSSLAP_PARAM_TIMING_ADVANCE, GSM_A_PDU_TYPE_BSSLAP, DE_BLAP_TA, NULL); - /* Channel Description IE / 5.8 M TV 4 */ - ELEM_MAND_TV(BSSLAP_PARAM_CHANNEL_DESCRIPTION,GSM_A_PDU_TYPE_RR, DE_RR_CH_DSC,NULL); - /* Cause IE / 5.1 M TV 2 */ - ELEM_MAND_TV(BSSLAP_PARAM_CAUSE, GSM_A_PDU_TYPE_BSSLAP, DE_BLAP_CAUSE,NULL); - /* Measurement Report Measurement Report IE / 5.12 O TLV 18 */ - ELEM_OPT_TLV(BSSLAP_PARAM_MEASUREMENT_REPORT, GSM_A_PDU_TYPE_BSSLAP, DE_BLAP_MEAS_REP, " BSSLAP"); - /* Enhanced Measurement Report Enhanced Measurement Report IE / 5.18 O TLV 4-n */ - ELEM_OPT_TLV(BSSLAP_PARAM_ENHANCED_MEASUREMENT_REPORT, GSM_A_PDU_TYPE_BSSLAP, DE_BLAP_ENH_MEAS_REP, NULL); - /* Cell Identity List IE / 5.17 O TLV 6-n */ - ELEM_OPT_TLV(BSSLAP_PARAM_CELL_IDENTITY_LIST, GSM_A_PDU_TYPE_BSSLAP, DE_BLAP_CELL_ID_LIST, "-Measured Cell"); - /* LAC Location Area Code IE / 5.19 O TV 3 */ - ELEM_OPT_TLV(BSSLAP_PARAM_LOCATION_AREA_CODE, GSM_A_PDU_TYPE_BSSLAP, DE_BLAP_LAC, NULL); - /* Frequency List Frequency List IE 5.20 C (note 1) TLV 3-n */ - ELEM_OPT_TLV(BSSLAP_PARAM_FREQUENCY_LIST, GSM_A_PDU_TYPE_RR, DE_RR_FREQ_LIST, NULL); - /* Channel Mode IE 5.26 C (notes 2 & 4) TV 2 */ - ELEM_OPT_TV(BSSLAP_PARAM_CHANNEL_MODE, GSM_A_PDU_TYPE_RR, DE_RR_CH_MODE, NULL); - /* MultiRate Configuration 5.27 C (notes 3 & 4) TLV 4-n */ - ELEM_OPT_TLV(BSSLAP_PARAM_MULTIRATE_CONFIGURATION, GSM_A_PDU_TYPE_RR, DE_RR_MULTIRATE_CONF, NULL); - /* Packet Channel Description Packet Channel Description IE 5.29 C (note 5) TV 4 */ - ELEM_OPT_TLV(BSSLAP_PARAM_PACKET_CHANNEL_DESCRIPTION, GSM_A_PDU_TYPE_BSSLAP, DE_BLAP_PKT_CH_DESC, NULL); - /* TLLI IE 5.30 C (note 5) TV 5 */ - ELEM_OPT_TV(BSSLAP_PARAM_TLLI, GSM_A_PDU_TYPE_RR, DE_RR_TLLI,NULL); - /* TFI 5.31 C (note 5) TV 2 */ - ELEM_OPT_TV(BSSLAP_PARAM_TFI, GSM_A_PDU_TYPE_BSSLAP, DE_BLAP_TFI,NULL); - /* Starting Time IE 5.32 C (note 5) TV 3 */ - ELEM_OPT_TV(BSSLAP_PARAM_STARTING_TIME, GSM_A_PDU_TYPE_RR, DE_RR_STARTING_TIME, "TBF Starting Time"); - /* Encryption Key IE 5.24 C (note 4) TV 9 */ - ELEM_OPT_TV(BSSLAP_PARAM_ENCRYPTION_KEY, GSM_A_PDU_TYPE_BSSLAP, DE_BLAP_ENC_KEY,NULL); - /* Cipher Mode Setting IE 5.25 C (note 4) TV 2 */ - ELEM_OPT_TV(BSSLAP_PARAM_CIPHER_MODE_SETTING, GSM_A_PDU_TYPE_RR, DE_RR_CIP_MODE_SET, NULL); - return; + guint32 curr_offset; + guint32 consumed; + guint curr_len; + + curr_offset = offset; + curr_len = tvb_length_remaining(tvb,offset); + + /* Cell Identity IE / 5.4 M TV 3 */ + ELEM_MAND_TV(BSSLAP_PARAM_CELL_IDENTITY, GSM_A_PDU_TYPE_COMMON, DE_CELL_ID, NULL); + /* Timing Advance IE / 5.2 M TV 2 */ + ELEM_MAND_TV(BSSLAP_PARAM_TIMING_ADVANCE, GSM_A_PDU_TYPE_BSSLAP, DE_BLAP_TA, NULL); + /* Channel Description IE / 5.8 M TV 4 */ + ELEM_MAND_TV(BSSLAP_PARAM_CHANNEL_DESCRIPTION,GSM_A_PDU_TYPE_RR, DE_RR_CH_DSC,NULL); + /* Cause IE / 5.1 M TV 2 */ + ELEM_MAND_TV(BSSLAP_PARAM_CAUSE, GSM_A_PDU_TYPE_BSSLAP, DE_BLAP_CAUSE,NULL); + /* Measurement Report Measurement Report IE / 5.12 O TLV 18 */ + ELEM_OPT_TLV(BSSLAP_PARAM_MEASUREMENT_REPORT, GSM_A_PDU_TYPE_BSSLAP, DE_BLAP_MEAS_REP, " BSSLAP"); + /* Enhanced Measurement Report Enhanced Measurement Report IE / 5.18 O TLV 4-n */ + ELEM_OPT_TLV(BSSLAP_PARAM_ENHANCED_MEASUREMENT_REPORT, GSM_A_PDU_TYPE_BSSLAP, DE_BLAP_ENH_MEAS_REP, NULL); + /* Cell Identity List IE / 5.17 O TLV 6-n */ + ELEM_OPT_TLV(BSSLAP_PARAM_CELL_IDENTITY_LIST, GSM_A_PDU_TYPE_BSSLAP, DE_BLAP_CELL_ID_LIST, "-Measured Cell"); + /* LAC Location Area Code IE / 5.19 O TV 3 */ + ELEM_OPT_TLV(BSSLAP_PARAM_LOCATION_AREA_CODE, GSM_A_PDU_TYPE_BSSLAP, DE_BLAP_LAC, NULL); + /* Frequency List Frequency List IE 5.20 C (note 1) TLV 3-n */ + ELEM_OPT_TLV(BSSLAP_PARAM_FREQUENCY_LIST, GSM_A_PDU_TYPE_RR, DE_RR_FREQ_LIST, NULL); + /* Channel Mode IE 5.26 C (notes 2 & 4) TV 2 */ + ELEM_OPT_TV(BSSLAP_PARAM_CHANNEL_MODE, GSM_A_PDU_TYPE_RR, DE_RR_CH_MODE, NULL); + /* MultiRate Configuration 5.27 C (notes 3 & 4) TLV 4-n */ + ELEM_OPT_TLV(BSSLAP_PARAM_MULTIRATE_CONFIGURATION, GSM_A_PDU_TYPE_RR, DE_RR_MULTIRATE_CONF, NULL); + /* Packet Channel Description Packet Channel Description IE 5.29 C (note 5) TV 4 */ + ELEM_OPT_TLV(BSSLAP_PARAM_PACKET_CHANNEL_DESCRIPTION, GSM_A_PDU_TYPE_BSSLAP, DE_BLAP_PKT_CH_DESC, NULL); + /* TLLI IE 5.30 C (note 5) TV 5 */ + ELEM_OPT_TV(BSSLAP_PARAM_TLLI, GSM_A_PDU_TYPE_RR, DE_RR_TLLI,NULL); + /* TFI 5.31 C (note 5) TV 2 */ + ELEM_OPT_TV(BSSLAP_PARAM_TFI, GSM_A_PDU_TYPE_BSSLAP, DE_BLAP_TFI,NULL); + /* Starting Time IE 5.32 C (note 5) TV 3 */ + ELEM_OPT_TV(BSSLAP_PARAM_STARTING_TIME, GSM_A_PDU_TYPE_RR, DE_RR_STARTING_TIME, "TBF Starting Time"); + /* Encryption Key IE 5.24 C (note 4) TV 9 */ + ELEM_OPT_TV(BSSLAP_PARAM_ENCRYPTION_KEY, GSM_A_PDU_TYPE_BSSLAP, DE_BLAP_ENC_KEY,NULL); + /* Cipher Mode Setting IE 5.25 C (note 4) TV 2 */ + ELEM_OPT_TV(BSSLAP_PARAM_CIPHER_MODE_SETTING, GSM_A_PDU_TYPE_RR, DE_RR_CIP_MODE_SET, NULL); + return; } /* 4.2.7 Abort ETSI TS 148 071 V7.2.0 (2007-06) */ static void dissect_gsm_bsslap_abort(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, int offset) { - guint32 curr_offset; - guint32 consumed; - guint curr_len; + guint32 curr_offset; + guint32 consumed; + guint curr_len; - curr_offset = offset; - curr_len = tvb_length_remaining(tvb,offset); + curr_offset = offset; + curr_len = tvb_length_remaining(tvb,offset); - /* Cause IE / 5.14 M TV 2 */ - ELEM_MAND_TV(BSSLAP_PARAM_CAUSE, GSM_A_PDU_TYPE_BSSLAP, DE_BLAP_CAUSE,NULL); + /* Cause IE / 5.14 M TV 2 */ + ELEM_MAND_TV(BSSLAP_PARAM_CAUSE, GSM_A_PDU_TYPE_BSSLAP, DE_BLAP_CAUSE,NULL); - return; + return; } /* 4.2.8 TA Layer3 ETSI TS 148 071 V7.2.0 (2007-06) */ static void dissect_gsm_bsslap_ta_layer3(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, int offset) { - guint32 curr_offset; - guint32 consumed; - guint curr_len; - - curr_offset = offset; - curr_len = tvb_length_remaining(tvb,offset); - - /* Timing Advance IE / 5.2 M TV 2 */ - ELEM_MAND_TV(BSSLAP_PARAM_TIMING_ADVANCE, GSM_A_PDU_TYPE_BSSLAP, DE_BLAP_TA, NULL); - /* Measurement Report IE / 5.12 O TLV 18 */ - ELEM_OPT_TLV(BSSLAP_PARAM_MEASUREMENT_REPORT, GSM_A_PDU_TYPE_BSSLAP, DE_BLAP_MEAS_REP, " BSSLAP"); - /* Enhanced Measurement Report IE / 5.18 O TLV 4-n */ - ELEM_OPT_TLV(BSSLAP_PARAM_ENHANCED_MEASUREMENT_REPORT, GSM_A_PDU_TYPE_BSSLAP, DE_BLAP_ENH_MEAS_REP, NULL); - /*Cell Identity List IE / 5.17 O TLV 6-n */ - ELEM_OPT_TLV(BSSLAP_PARAM_CELL_IDENTITY_LIST, GSM_A_PDU_TYPE_BSSLAP, DE_BLAP_CELL_ID_LIST, "-Measured Cell"); - return; + guint32 curr_offset; + guint32 consumed; + guint curr_len; + + curr_offset = offset; + curr_len = tvb_length_remaining(tvb,offset); + + /* Timing Advance IE / 5.2 M TV 2 */ + ELEM_MAND_TV(BSSLAP_PARAM_TIMING_ADVANCE, GSM_A_PDU_TYPE_BSSLAP, DE_BLAP_TA, NULL); + /* Measurement Report IE / 5.12 O TLV 18 */ + ELEM_OPT_TLV(BSSLAP_PARAM_MEASUREMENT_REPORT, GSM_A_PDU_TYPE_BSSLAP, DE_BLAP_MEAS_REP, " BSSLAP"); + /* Enhanced Measurement Report IE / 5.18 O TLV 4-n */ + ELEM_OPT_TLV(BSSLAP_PARAM_ENHANCED_MEASUREMENT_REPORT, GSM_A_PDU_TYPE_BSSLAP, DE_BLAP_ENH_MEAS_REP, NULL); + /*Cell Identity List IE / 5.17 O TLV 6-n */ + ELEM_OPT_TLV(BSSLAP_PARAM_CELL_IDENTITY_LIST, GSM_A_PDU_TYPE_BSSLAP, DE_BLAP_CELL_ID_LIST, "-Measured Cell"); + return; } /* 4.2.9 MS Position Command ETSI TS 148 071 V7.2.0 (2007-06) */ static void dissect_gsm_bsslap_ms_pos_cmd(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, int offset) { - guint32 curr_offset; - guint32 consumed; - guint curr_len; - - curr_offset = offset; - curr_len = tvb_length_remaining(tvb,offset); - - /* RRLP flag IE / 5.15 M TV 2 */ - ELEM_MAND_TV(BSSLAP_PARAM_RRLP_FLAG, GSM_A_PDU_TYPE_BSSLAP, DE_BLAP_RRLP_FLG,"flag"); - /* RRLP IE / 5.16 M TLV 3-n */ - ELEM_MAND_TV(BSSLAP_PARAM_RRLP_IE, GSM_A_PDU_TYPE_BSSLAP, DE_BLAP_RRLP_IE,"RRLP Info"); - return; + guint32 curr_offset; + guint32 consumed; + guint curr_len; + + curr_offset = offset; + curr_len = tvb_length_remaining(tvb,offset); + + /* RRLP flag IE / 5.15 M TV 2 */ + ELEM_MAND_TV(BSSLAP_PARAM_RRLP_FLAG, GSM_A_PDU_TYPE_BSSLAP, DE_BLAP_RRLP_FLG,"flag"); + /* RRLP IE / 5.16 M TLV 3-n */ + ELEM_MAND_TV(BSSLAP_PARAM_RRLP_IE, GSM_A_PDU_TYPE_BSSLAP, DE_BLAP_RRLP_IE,"RRLP Info"); + return; } /* 4.2.10 MS Position Response ETSI TS 148 071 V7.2.0 (2007-06) */ static void dissect_gsm_bsslap_ms_pos_res(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, int offset) { - guint32 curr_offset; - guint32 consumed; - guint curr_len; - - curr_offset = offset; - curr_len = tvb_length_remaining(tvb,offset); - - /* flag RRLP flag IE / 5.15 M TV 2 */ - ELEM_MAND_TV(BSSLAP_PARAM_RRLP_FLAG, GSM_A_PDU_TYPE_BSSLAP, DE_BLAP_RRLP_FLG,"flag"); - /* RRLP Info RRLP IE / 5.16 M TLV 3-n */ - ELEM_MAND_TV(BSSLAP_PARAM_RRLP_IE, GSM_A_PDU_TYPE_BSSLAP, DE_BLAP_RRLP_IE,"RRLP Info"); - /* Timing Advance IE / 5.2 O TV 2 */ - ELEM_OPT_TV(BSSLAP_PARAM_TIMING_ADVANCE, GSM_A_PDU_TYPE_BSSLAP, DE_BLAP_TA, NULL); - /* Measurement Report IE / 5.12 O TLV 18 */ - ELEM_OPT_TLV(BSSLAP_PARAM_MEASUREMENT_REPORT, GSM_A_PDU_TYPE_BSSLAP, DE_BLAP_MEAS_REP, " BSSLAP"); - /* Enhanced Measurement Report IE / 5.18 O TLV 4-n */ - ELEM_OPT_TLV(BSSLAP_PARAM_ENHANCED_MEASUREMENT_REPORT, GSM_A_PDU_TYPE_BSSLAP, DE_BLAP_ENH_MEAS_REP, NULL); - /* Cell Identity List IE / 5.17 O TLV 6-n */ - ELEM_OPT_TLV(BSSLAP_PARAM_CELL_IDENTITY_LIST, GSM_A_PDU_TYPE_BSSLAP, DE_BLAP_CELL_ID_LIST, "-Measured Cell"); - return; + guint32 curr_offset; + guint32 consumed; + guint curr_len; + + curr_offset = offset; + curr_len = tvb_length_remaining(tvb,offset); + + /* flag RRLP flag IE / 5.15 M TV 2 */ + ELEM_MAND_TV(BSSLAP_PARAM_RRLP_FLAG, GSM_A_PDU_TYPE_BSSLAP, DE_BLAP_RRLP_FLG,"flag"); + /* RRLP Info RRLP IE / 5.16 M TLV 3-n */ + ELEM_MAND_TV(BSSLAP_PARAM_RRLP_IE, GSM_A_PDU_TYPE_BSSLAP, DE_BLAP_RRLP_IE,"RRLP Info"); + /* Timing Advance IE / 5.2 O TV 2 */ + ELEM_OPT_TV(BSSLAP_PARAM_TIMING_ADVANCE, GSM_A_PDU_TYPE_BSSLAP, DE_BLAP_TA, NULL); + /* Measurement Report IE / 5.12 O TLV 18 */ + ELEM_OPT_TLV(BSSLAP_PARAM_MEASUREMENT_REPORT, GSM_A_PDU_TYPE_BSSLAP, DE_BLAP_MEAS_REP, " BSSLAP"); + /* Enhanced Measurement Report IE / 5.18 O TLV 4-n */ + ELEM_OPT_TLV(BSSLAP_PARAM_ENHANCED_MEASUREMENT_REPORT, GSM_A_PDU_TYPE_BSSLAP, DE_BLAP_ENH_MEAS_REP, NULL); + /* Cell Identity List IE / 5.17 O TLV 6-n */ + ELEM_OPT_TLV(BSSLAP_PARAM_CELL_IDENTITY_LIST, GSM_A_PDU_TYPE_BSSLAP, DE_BLAP_CELL_ID_LIST, "-Measured Cell"); + return; } /* 4.2.11 U-TDOA Request ETSI TS 148 071 V7.2.0 (2007-06) */ static void dissect_gsm_bsslap_u_tdoa_req(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, int offset) { - guint32 curr_offset; - guint32 consumed; - guint curr_len; + guint32 curr_offset; + guint32 consumed; + guint curr_len; - curr_offset = offset; - curr_len = tvb_length_remaining(tvb,offset); + curr_offset = offset; + curr_len = tvb_length_remaining(tvb,offset); - /* Delta Timer IE 5.22 O (note 1) TV 2 */ - ELEM_OPT_TV(BSSLAP_PARAM_DELTA_TIMER, GSM_A_PDU_TYPE_BSSLAP, DE_BLAP_DELTA_TIME, NULL); - /* Polling Repitition IE 5.28 (note) C (note 2) TV 2 */ - ELEM_OPT_TV(BSSLAP_PARAM_POLLING_REPETITION, GSM_A_PDU_TYPE_BSSLAP, DE_BLAP_POLL_REP, NULL); + /* Delta Timer IE 5.22 O (note 1) TV 2 */ + ELEM_OPT_TV(BSSLAP_PARAM_DELTA_TIMER, GSM_A_PDU_TYPE_BSSLAP, DE_BLAP_DELTA_TIME, NULL); + /* Polling Repitition IE 5.28 (note) C (note 2) TV 2 */ + ELEM_OPT_TV(BSSLAP_PARAM_POLLING_REPETITION, GSM_A_PDU_TYPE_BSSLAP, DE_BLAP_POLL_REP, NULL); - return; + return; } /* 4.2.12 U-TDOA Response ETSI TS 148 071 V7.2.0 (2007-06) */ static void dissect_gsm_bsslap_u_tdoa_res(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, int offset) { - guint32 curr_offset; - guint32 consumed; - guint curr_len; - - curr_offset = offset; - curr_len = tvb_length_remaining(tvb,offset); - - /* Channel Description IE 5.8 M TV 4 */ - ELEM_MAND_TV(BSSLAP_PARAM_CHANNEL_DESCRIPTION,GSM_A_PDU_TYPE_RR, DE_RR_CH_DSC, NULL); - /* Serving Cell Identifier Cell Identifier IE 5.23 M TLV 4-n */ - ELEM_MAND_TLV(BSSLAP_PARAM_SERVING_CELL_IDENTIFIER,GSM_A_PDU_TYPE_BSSMAP, BE_CELL_ID, NULL); - /* Frequency List IE 5.20 C (note 3) TLV 3-n */ - ELEM_OPT_TLV(BSSLAP_PARAM_FREQUENCY_LIST, GSM_A_PDU_TYPE_RR, DE_RR_FREQ_LIST, NULL); - /* Timing Advance IE 5.2 O TV 2 */ - ELEM_OPT_TV(BSSLAP_PARAM_TIMING_ADVANCE, GSM_A_PDU_TYPE_BSSLAP, DE_BLAP_TA, NULL); - /* MS Power IE 5.21 O TV 2 */ - ELEM_OPT_TV(BSSLAP_PARAM_MS_POWER, GSM_A_PDU_TYPE_BSSLAP, DE_BLAP_MS_POW, NULL); - /* Measurement Report IE 5.12 O TLV 18 */ - ELEM_OPT_TLV(BSSLAP_PARAM_MEASUREMENT_REPORT, GSM_A_PDU_TYPE_BSSLAP, DE_BLAP_MEAS_REP, " BSSLAP"); - /* Encryption Key IE 5.24 C (note 4) TV 9 */ - ELEM_OPT_TV(BSSLAP_PARAM_ENCRYPTION_KEY, GSM_A_PDU_TYPE_BSSLAP, DE_BLAP_ENC_KEY, NULL); - /* Cipher Mode Setting IE 5.25 C (note 4) TV 2 */ - ELEM_OPT_TV(BSSLAP_PARAM_CIPHER_MODE_SETTING, GSM_A_PDU_TYPE_RR, DE_RR_CIP_MODE_SET, NULL); - /* Channel Mode IE 5.26 C (notes 1 & 4)TV 2 */ - ELEM_OPT_TV(BSSLAP_PARAM_CHANNEL_MODE, GSM_A_PDU_TYPE_RR, DE_RR_CH_MODE, NULL); - /* MultiRate Configuration IE 5.27 C (notes 1 & 4)TLV 4-n */ - ELEM_OPT_TLV(BSSLAP_PARAM_MULTIRATE_CONFIGURATION, GSM_A_PDU_TYPE_RR, DE_RR_MULTIRATE_CONF, NULL); - /* Cell Identity List IE / 5.17 O TLV 6-n */ - ELEM_OPT_TLV(BSSLAP_PARAM_CELL_IDENTITY_LIST, GSM_A_PDU_TYPE_BSSLAP, DE_BLAP_CELL_ID_LIST, "-Measured Cell"); - /* Packet Channel Description IE 5.29 C (note 5) TV 4 */ - ELEM_OPT_TLV(BSSLAP_PARAM_PACKET_CHANNEL_DESCRIPTION, GSM_A_PDU_TYPE_BSSLAP, DE_BLAP_PKT_CH_DESC, NULL); - /* TLLI IE 5.30 C (note 5) TV 5 */ - ELEM_OPT_TV(BSSLAP_PARAM_TLLI, GSM_A_PDU_TYPE_RR, DE_RR_TLLI, NULL); - /* TFI IE 5.31 C (note 5) TV 2 BSSLAP_PARAM_TFI*/ - ELEM_OPT_TV(BSSLAP_PARAM_TFI, GSM_A_PDU_TYPE_BSSLAP, DE_BLAP_TFI, NULL); - /* Starting Time IE 5.32 C (note 5) TV 3*/ - ELEM_OPT_TV(BSSLAP_PARAM_STARTING_TIME, GSM_A_PDU_TYPE_RR, DE_RR_STARTING_TIME, "TBF Starting Time"); - return; + guint32 curr_offset; + guint32 consumed; + guint curr_len; + + curr_offset = offset; + curr_len = tvb_length_remaining(tvb,offset); + + /* Channel Description IE 5.8 M TV 4 */ + ELEM_MAND_TV(BSSLAP_PARAM_CHANNEL_DESCRIPTION,GSM_A_PDU_TYPE_RR, DE_RR_CH_DSC, NULL); + /* Serving Cell Identifier Cell Identifier IE 5.23 M TLV 4-n */ + ELEM_MAND_TLV(BSSLAP_PARAM_SERVING_CELL_IDENTIFIER,GSM_A_PDU_TYPE_BSSMAP, BE_CELL_ID, NULL); + /* Frequency List IE 5.20 C (note 3) TLV 3-n */ + ELEM_OPT_TLV(BSSLAP_PARAM_FREQUENCY_LIST, GSM_A_PDU_TYPE_RR, DE_RR_FREQ_LIST, NULL); + /* Timing Advance IE 5.2 O TV 2 */ + ELEM_OPT_TV(BSSLAP_PARAM_TIMING_ADVANCE, GSM_A_PDU_TYPE_BSSLAP, DE_BLAP_TA, NULL); + /* MS Power IE 5.21 O TV 2 */ + ELEM_OPT_TV(BSSLAP_PARAM_MS_POWER, GSM_A_PDU_TYPE_BSSLAP, DE_BLAP_MS_POW, NULL); + /* Measurement Report IE 5.12 O TLV 18 */ + ELEM_OPT_TLV(BSSLAP_PARAM_MEASUREMENT_REPORT, GSM_A_PDU_TYPE_BSSLAP, DE_BLAP_MEAS_REP, " BSSLAP"); + /* Encryption Key IE 5.24 C (note 4) TV 9 */ + ELEM_OPT_TV(BSSLAP_PARAM_ENCRYPTION_KEY, GSM_A_PDU_TYPE_BSSLAP, DE_BLAP_ENC_KEY, NULL); + /* Cipher Mode Setting IE 5.25 C (note 4) TV 2 */ + ELEM_OPT_TV(BSSLAP_PARAM_CIPHER_MODE_SETTING, GSM_A_PDU_TYPE_RR, DE_RR_CIP_MODE_SET, NULL); + /* Channel Mode IE 5.26 C (notes 1 & 4)TV 2 */ + ELEM_OPT_TV(BSSLAP_PARAM_CHANNEL_MODE, GSM_A_PDU_TYPE_RR, DE_RR_CH_MODE, NULL); + /* MultiRate Configuration IE 5.27 C (notes 1 & 4)TLV 4-n */ + ELEM_OPT_TLV(BSSLAP_PARAM_MULTIRATE_CONFIGURATION, GSM_A_PDU_TYPE_RR, DE_RR_MULTIRATE_CONF, NULL); + /* Cell Identity List IE / 5.17 O TLV 6-n */ + ELEM_OPT_TLV(BSSLAP_PARAM_CELL_IDENTITY_LIST, GSM_A_PDU_TYPE_BSSLAP, DE_BLAP_CELL_ID_LIST, "-Measured Cell"); + /* Packet Channel Description IE 5.29 C (note 5) TV 4 */ + ELEM_OPT_TLV(BSSLAP_PARAM_PACKET_CHANNEL_DESCRIPTION, GSM_A_PDU_TYPE_BSSLAP, DE_BLAP_PKT_CH_DESC, NULL); + /* TLLI IE 5.30 C (note 5) TV 5 */ + ELEM_OPT_TV(BSSLAP_PARAM_TLLI, GSM_A_PDU_TYPE_RR, DE_RR_TLLI, NULL); + /* TFI IE 5.31 C (note 5) TV 2 BSSLAP_PARAM_TFI*/ + ELEM_OPT_TV(BSSLAP_PARAM_TFI, GSM_A_PDU_TYPE_BSSLAP, DE_BLAP_TFI, NULL); + /* Starting Time IE 5.32 C (note 5) TV 3*/ + ELEM_OPT_TV(BSSLAP_PARAM_STARTING_TIME, GSM_A_PDU_TYPE_RR, DE_RR_STARTING_TIME, "TBF Starting Time"); + return; } static void dissect_gsm_bsslap(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) { - proto_item *item; - proto_tree *sub_tree; - int offset=0; - guint8 octet; + proto_item *item; + proto_tree *sub_tree; + int offset=0; + guint8 octet; /* Make entries in Protocol column and Info column on summary display */ - col_append_str(pinfo->cinfo, COL_PROTOCOL, "/BSSLAP"); - if (tree) { - octet = tvb_get_guint8(tvb, offset); - item = proto_tree_add_item(tree, proto_gsm_bsslap, tvb, 0, -1, ENC_NA); - sub_tree = proto_item_add_subtree(item, ett_gsm_bsslap); - - /* Message Type IE / 5.1 M V 1 */ - proto_tree_add_item(sub_tree, hf_gsm_bsslap_msg_type, tvb, offset, 1, ENC_BIG_ENDIAN); - offset++; - - switch (octet){ - case BSSLAP_TA_REQUEST: - /* Only message type IE */ - break; - case BSSLAP_TA_RESPONSE: - dissect_gsm_bsslap_ta_res(tvb, sub_tree, pinfo, offset); - break; - case BSSLAP_REJECT: - dissect_gsm_bsslap_reject(tvb, sub_tree, pinfo, offset); - break; - case BSSLAP_RESET: - dissect_gsm_bsslap_reset(tvb, sub_tree, pinfo, offset); - break; - case BSSLAP_ABORT: - dissect_gsm_bsslap_abort(tvb, sub_tree, pinfo, offset); - break; - case BSSLAP_TA_LAYER3: - dissect_gsm_bsslap_ta_layer3(tvb, sub_tree, pinfo, offset); - break; - case BSSLAP_MS_POS_CMD: - dissect_gsm_bsslap_ms_pos_cmd(tvb, sub_tree, pinfo, offset); - break; - case BSSLAP_MS_POS_RES: - dissect_gsm_bsslap_ms_pos_res(tvb, sub_tree, pinfo, offset); - break; - case BSSLAP_U_TDOA_REQ: - dissect_gsm_bsslap_u_tdoa_req(tvb, sub_tree, pinfo, offset); - break; - case BSSLAP_U_TDOA_RES: - dissect_gsm_bsslap_u_tdoa_res(tvb, sub_tree, pinfo, offset); - break; - default: - break; - } - } + col_append_str(pinfo->cinfo, COL_PROTOCOL, "/BSSLAP"); + if (tree) { + octet = tvb_get_guint8(tvb, offset); + item = proto_tree_add_item(tree, proto_gsm_bsslap, tvb, 0, -1, ENC_NA); + sub_tree = proto_item_add_subtree(item, ett_gsm_bsslap); + + /* Message Type IE / 5.1 M V 1 */ + proto_tree_add_item(sub_tree, hf_gsm_bsslap_msg_type, tvb, offset, 1, ENC_BIG_ENDIAN); + offset++; + + switch (octet){ + case BSSLAP_TA_REQUEST: + /* Only message type IE */ + break; + case BSSLAP_TA_RESPONSE: + dissect_gsm_bsslap_ta_res(tvb, sub_tree, pinfo, offset); + break; + case BSSLAP_REJECT: + dissect_gsm_bsslap_reject(tvb, sub_tree, pinfo, offset); + break; + case BSSLAP_RESET: + dissect_gsm_bsslap_reset(tvb, sub_tree, pinfo, offset); + break; + case BSSLAP_ABORT: + dissect_gsm_bsslap_abort(tvb, sub_tree, pinfo, offset); + break; + case BSSLAP_TA_LAYER3: + dissect_gsm_bsslap_ta_layer3(tvb, sub_tree, pinfo, offset); + break; + case BSSLAP_MS_POS_CMD: + dissect_gsm_bsslap_ms_pos_cmd(tvb, sub_tree, pinfo, offset); + break; + case BSSLAP_MS_POS_RES: + dissect_gsm_bsslap_ms_pos_res(tvb, sub_tree, pinfo, offset); + break; + case BSSLAP_U_TDOA_REQ: + dissect_gsm_bsslap_u_tdoa_req(tvb, sub_tree, pinfo, offset); + break; + case BSSLAP_U_TDOA_RES: + dissect_gsm_bsslap_u_tdoa_res(tvb, sub_tree, pinfo, offset); + break; + default: + break; + } + } } @@ -850,107 +850,120 @@ dissect_gsm_bsslap(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) void proto_reg_handoff_gsm_bsslap(void) { - bsslap_rrlp_handle = find_dissector("rrlp"); + bsslap_rrlp_handle = find_dissector("rrlp"); } void proto_register_gsm_bsslap(void) { - guint i; - guint last_offset; - - - /* Setup list of header fields */ - static hf_register_info hf[] = { - { &hf_gsm_bsslap_msg_type, - { "Message Type IE", "gsm_bsslap.msg_type", - FT_UINT8, BASE_DEC, VALS(gsm_a_bsslap_msg_strings), 0x0, - NULL, HFILL } - }, - { &hf_gsm_a_bsslap_elem_id, - { "Element ID", "gsm_bsslap.elem_id", - FT_UINT8, BASE_HEX, NULL, 0, - NULL, HFILL } - }, - { &hf_gsm_bsslap_ta, - { "Timing Advance", "gsm_bsslap.ta", - FT_UINT8, BASE_HEX, NULL, 0x0, - NULL, HFILL } - }, + guint i; + guint last_offset; + + + /* Setup list of header fields */ + static hf_register_info hf[] = { + { &hf_gsm_bsslap_msg_type, + { "Message Type IE", "gsm_bsslap.msg_type", + FT_UINT8, BASE_DEC, VALS(gsm_a_bsslap_msg_strings), 0x0, + NULL, HFILL } + }, + { &hf_gsm_a_bsslap_elem_id, + { "Element ID", "gsm_bsslap.elem_id", + FT_UINT8, BASE_HEX, NULL, 0, + NULL, HFILL } + }, + { &hf_gsm_bsslap_ta, + { "Timing Advance", "gsm_bsslap.ta", + FT_UINT8, BASE_HEX, NULL, 0x0, + NULL, HFILL } + }, { &hf_gsm_bsslap_timer_value, - {"Timer Value", "gsm_bsslap.timerValue", - FT_UINT8, BASE_DEC, NULL, 0x0, - NULL, HFILL } - }, + {"Timer Value", "gsm_bsslap.timerValue", + FT_UINT8, BASE_DEC, NULL, 0x0, + NULL, HFILL } + }, { &hf_gsm_bsslap_ms_pow, - {"MS Power", "gsm_bsslap.MS_pow", - FT_UINT8, BASE_DEC, NULL, 0x0, - NULL, HFILL } - }, - { &hf_gsm_bsslap_cause, - {"Cause", "gsm_bsslap.cause", - FT_UINT8, BASE_DEC, VALS(gsm_bsslap_cause_vals), 0x0, - NULL, HFILL } - }, - { &hf_gsm_bsslap_rrlp_flg, - {"RRLP Flag", "gsm_bsslap.rrlp_flg", - FT_BOOLEAN, 8, TFS(&gsm_bsslap_rrlp_flg_vals), 0x01, - "Cause", HFILL } - }, - { &hf_gsm_bsslap_tfi, - {"TFI", "gsm_bsslap.tfi", - FT_UINT8, BASE_DEC, NULL, 0x1f, - NULL, HFILL } - }, - { &hf_gsm_bsslap_poll_rep, - {"Number of polling repetitions", "gsm_bsslap.poll_rep", - FT_UINT8, BASE_DEC, NULL, 0x3F, - NULL, HFILL } - }, - { &hf_gsm_bsslap_lac, - {"Location Area Code", "gsm_bsslap.lac", - FT_UINT8, BASE_DEC, NULL, 0x3f, - NULL, HFILL } - }, - { &hf_gsm_bsslap_cell_id_disc, - {"Cell identification Discriminator", "gsm_bsslap.cell_id_disc", - FT_UINT8, BASE_DEC, VALS(gsm_a_bsslap_cell_id_disc_vals), 0xf, - NULL, HFILL } - }, - }; - - /* Setup protocol subtree array */ -#define NUM_INDIVIDUAL_ELEMS 2 - gint *ett[NUM_INDIVIDUAL_ELEMS + NUM_GSM_BSSLAP_MSG + - NUM_GSM_BSSLAP_ELEM]; - - ett[0] = &ett_gsm_bsslap; - ett[1] = &ett_bsslap_cell_list; - - last_offset = NUM_INDIVIDUAL_ELEMS; - - for (i=0; i < NUM_GSM_BSSLAP_MSG; i++, last_offset++) - { - ett_gsm_bsslap_msg[i] = -1; - ett[last_offset] = &ett_gsm_bsslap_msg[i]; - } - - for (i=0; i < NUM_GSM_BSSLAP_ELEM; i++, last_offset++) - { - ett_gsm_bsslap_elem[i] = -1; - ett[last_offset] = &ett_gsm_bsslap_elem[i]; - } + {"MS Power", "gsm_bsslap.MS_pow", + FT_UINT8, BASE_DEC, NULL, 0x0, + NULL, HFILL } + }, + { &hf_gsm_bsslap_cause, + {"Cause", "gsm_bsslap.cause", + FT_UINT8, BASE_DEC, VALS(gsm_bsslap_cause_vals), 0x0, + NULL, HFILL } + }, + { &hf_gsm_bsslap_rrlp_flg, + {"RRLP Flag", "gsm_bsslap.rrlp_flg", + FT_BOOLEAN, 8, TFS(&gsm_bsslap_rrlp_flg_vals), 0x01, + "Cause", HFILL } + }, + { &hf_gsm_bsslap_tfi, + {"TFI", "gsm_bsslap.tfi", + FT_UINT8, BASE_DEC, NULL, 0x1f, + NULL, HFILL } + }, + { &hf_gsm_bsslap_poll_rep, + {"Number of polling repetitions", "gsm_bsslap.poll_rep", + FT_UINT8, BASE_DEC, NULL, 0x3F, + NULL, HFILL } + }, + { &hf_gsm_bsslap_lac, + {"Location Area Code", "gsm_bsslap.lac", + FT_UINT8, BASE_DEC, NULL, 0x3f, + NULL, HFILL } + }, + { &hf_gsm_bsslap_cell_id_disc, + {"Cell identification Discriminator", "gsm_bsslap.cell_id_disc", + FT_UINT8, BASE_DEC, VALS(gsm_a_bsslap_cell_id_disc_vals), 0xf, + NULL, HFILL } + }, + }; + + /* Setup protocol subtree array */ +#define NUM_INDIVIDUAL_ELEMS 2 + gint *ett[NUM_INDIVIDUAL_ELEMS + NUM_GSM_BSSLAP_MSG + + NUM_GSM_BSSLAP_ELEM]; + + ett[0] = &ett_gsm_bsslap; + ett[1] = &ett_bsslap_cell_list; + + last_offset = NUM_INDIVIDUAL_ELEMS; + + for (i=0; i < NUM_GSM_BSSLAP_MSG; i++, last_offset++) + { + ett_gsm_bsslap_msg[i] = -1; + ett[last_offset] = &ett_gsm_bsslap_msg[i]; + } + + for (i=0; i < NUM_GSM_BSSLAP_ELEM; i++, last_offset++) + { + ett_gsm_bsslap_elem[i] = -1; + ett[last_offset] = &ett_gsm_bsslap_elem[i]; + } /* Register the protocol name and description */ - proto_gsm_bsslap = - proto_register_protocol("BSS LCS Assistance Protocol", - "BSSLAP", "bsslap"); + proto_gsm_bsslap = + proto_register_protocol("BSS LCS Assistance Protocol", + "BSSLAP", "bsslap"); /* Required function calls to register the header fields and subtrees used */ - proto_register_field_array(proto_gsm_bsslap, hf, array_length(hf)); - proto_register_subtree_array(ett, array_length(ett)); + proto_register_field_array(proto_gsm_bsslap, hf, array_length(hf)); + proto_register_subtree_array(ett, array_length(ett)); - register_dissector("gsm_bsslap", dissect_gsm_bsslap, proto_gsm_bsslap); + register_dissector("gsm_bsslap", dissect_gsm_bsslap, proto_gsm_bsslap); } + +/* + * Editor modelines - http://www.wireshark.org/tools/modelines.html + * + * Local variables: + * c-basic-offset: 4 + * tab-width: 8 + * indent-tabs-mode: nil + * End: + * + * vi: set shiftwidth=4 tabstop=8 expandtab: + * :indentSize=4:tabSize=8:noTabs=true: + */ |