General minor cleanup including:

- remove unneeded #includes;
- use val_to_str_const() as appropriate;
- reformat hf[] entries;
- reformat long lines;
- use #if 0/#endif to coment out code instead of /* ... */;
- remove boilerplate comments;
- whitespace & indentation


svn path=/trunk/; revision=42487
This commit is contained in:
Bill Meier 2012-05-07 22:11:34 +00:00
parent 8d33dddd11
commit c055ca8c7e
10 changed files with 6438 additions and 5973 deletions

File diff suppressed because it is too large Load Diff

View File

@ -373,16 +373,16 @@ static const value_string gsm_a_rr_channel_needed_vals[] = {
};
static const value_string bssmap_positioning_methods[] = {
{ 0, "Timing Advance" },
{ 1, "Reserved (Note)" },
{ 2, "Reserved (Note)" },
{ 3, "Mobile Assisted E-OTD" },
{ 4, "Mobile Based E-OTD" },
{ 5, "Mobile Assisted GPS" },
{ 6, "Mobile Based GPS" },
{ 7, "Conventional GPS" },
{ 8, "U-TDOA" },
{ 9, "Reserved for UTRAN use only" },
{ 0, "Timing Advance" },
{ 1, "Reserved (Note)" },
{ 2, "Reserved (Note)" },
{ 3, "Mobile Assisted E-OTD" },
{ 4, "Mobile Based E-OTD" },
{ 5, "Mobile Assisted GPS" },
{ 6, "Mobile Based GPS" },
{ 7, "Conventional GPS" },
{ 8, "U-TDOA" },
{ 9, "Reserved for UTRAN use only" },
{ 10, "Reserved for UTRAN use only" },
{ 11, "Reserved for UTRAN use only" },
{ 12, "Cell ID" },
@ -440,18 +440,18 @@ static const value_string chan_mode_vals[] = {
};
static const value_string fe_cur_chan_type2_chan_field_vals[] = {
{ 1, "SDCCH" },
{ 8, "1 Full rate TCH" },
{ 9, "1 Half rate TCH" },
{ 1, "SDCCH" },
{ 8, "1 Full rate TCH" },
{ 9, "1 Half rate TCH" },
{ 10, "2 Full Rate TCHs" },
{ 11, "3 Full Rate TCHs" },
{ 12, "4 Full Rate TCHs" },
{ 13, "5 Full Rate TCHs" },
{ 14, "6 Full Rate TCHs" },
{ 15, "7 Full Rate TCHs" },
{ 4, "8 Full Rate TCHs" },
{ 0, "reserved" },
{ 0, NULL}
{ 4, "8 Full Rate TCHs" },
{ 0, "reserved" },
{ 0, NULL}
};
/* Initialize the protocol and registered fields */
@ -594,120 +594,120 @@ Note this enum must be of the same size as the element decoding list
typedef enum
{
BE_CIC, /. Circuit Identity Code ./
BE_RSVD_1, /. Reserved ./
BE_RES_AVAIL, /. Resource Available ./
BE_CAUSE, /. Cause ./
BE_CELL_ID, /. Cell Identifier ./
BE_PRIO, /. Priority ./
BE_L3_HEADER_INFO, /. Layer 3 Header Information ./
BE_IMSI, /. IMSI ./
BE_TMSI, /. TMSI ./
BE_ENC_INFO, /. Encryption Information ./
BE_CHAN_TYPE, /. Channel Type ./
BE_PERIODICITY, /. Periodicity ./
BE_EXT_RES_IND, /. Extended Resource Indicator ./
BE_NUM_MS, /. Number Of MSs ./
BE_RSVD_2, /. Reserved ./
BE_RSVD_3, /. Reserved ./
BE_RSVD_4, /. Reserved ./
BE_CM_INFO_2, /. Classmark Information Type 2 ./
BE_CM_INFO_3, /. Classmark Information Type 3 ./
BE_INT_BAND, /. Interference Band To Be Used ./
BE_RR_CAUSE, /. RR Cause ./
BE_RSVD_5, /. Reserved ./
BE_L3_INFO, /. Layer 3 Information ./
BE_DLCI, /. DLCI ./
BE_DOWN_DTX_FLAG, /. Downlink DTX Flag ./
BE_CELL_ID_LIST, /. Cell Identifier List ./
BE_RESP_REQ, /. Response Request ./
BE_RES_IND_METHOD, /. Resource Indication Method ./
BE_CM_INFO_1, /. Classmark Information Type 1 ./
BE_CIC_LIST, /. Circuit Identity Code List ./
BE_DIAG, /. Diagnostic ./
BE_L3_MSG, /. Layer 3 Message Contents ./
BE_CHOSEN_CHAN, /. Chosen Channel ./
BE_TOT_RES_ACC, /. Total Resource Accessible ./
BE_CIPH_RESP_MODE, /. Cipher Response Mode ./
BE_CHAN_NEEDED, /. Channel Needed ./
BE_TRACE_TYPE, /. Trace Type ./
BE_TRIGGERID, /. TriggerID ./
BE_TRACE_REF, /. Trace Reference ./
BE_TRANSID, /. TransactionID ./
BE_MID, /. Mobile Identity ./
BE_OMCID, /. OMCID ./
BE_FOR_IND, /. Forward Indicator ./
BE_CHOSEN_ENC_ALG, /. Chosen Encryption Algorithm ./
BE_CCT_POOL, /. Circuit Pool ./
BE_CCT_POOL_LIST, /. Circuit Pool List ./
BE_TIME_IND, /. Time Indication ./
BE_RES_SIT, /. Resource Situation ./
BE_CURR_CHAN_1, /. Current Channel Type 1 ./
BE_QUE_IND, /. Queueing Indicator ./
BE_SPEECH_VER, /. Speech Version ./
BE_ASS_REQ, /. Assignment Requirement ./
BE_TALKER_FLAG, /. Talker Flag ./
BE_CONN_REL_REQ, /. Connection Release Requested ./
BE_GROUP_CALL_REF, /. Group Call Reference ./
BE_EMLPP_PRIO, /. eMLPP Priority ./
BE_CONF_EVO_IND, /. Configuration Evolution Indication ./
BE_OLD2NEW_INFO, /. Old BSS to New BSS Information ./
BE_LSA_ID, /. LSA Identifier ./
BE_LSA_ID_LIST, /. LSA Identifier List ./
BE_LSA_INFO, /. LSA Information ./
BE_LCS_QOS, /. LCS QoS ./
BE_LSA_ACC_CTRL, /. LSA access control suppression ./
BE_LCS_PRIO, /. LCS Priority ./
BE_LOC_TYPE, /. Location Type ./
BE_LOC_EST, /. Location Estimate ./
BE_POS_DATA, /. Positioning Data ./
BE_LCS_CAUSE, /. 3.2.2.66 LCS Cause ./
BE_LCS_CLIENT, /. LCS Client Type ./
BE_APDU, /. APDU ./
BE_NE_ID, /. Network Element Identity ./
BE_GPS_ASSIST_DATA, /. GPS Assistance Data ./
BE_DECIPH_KEYS, /. Deciphering Keys ./
BE_RET_ERR_REQ, /. Return Error Request ./
BE_RET_ERR_CAUSE, /. Return Error Cause ./
BE_SEG, /. Segmentation ./
BE_SERV_HO, /. Service Handover ./
BE_SRC_RNC_TO_TAR_RNC_UMTS, /. Source RNC to target RNC transparent information (UMTS) ./
BE_SRC_RNC_TO_TAR_RNC_CDMA, /. Source RNC to target RNC transparent information (cdma2000) ./
BE_GERAN_CLS_M, /. GERAN Classmark ./
BE_GRAN_BSC_CONT, /. GERAN BSC Container ./
BE_NEW_BSS_TO_OLD_BSS_INF, /. New BSS to Old BSS Information ./
BE_INTER_SYS_INF, /. Inter-System Information ./
BE_SNA_ACC_INF, /. SNA Access Information ./
BE_VSTK_RAND_INF, /. VSTK_RAND Information ./
BE_VSTK_INF, /. VSTK Information ./
BE_PAGING_INF, /. Paging Information ./
BE_IMEI, /. IMEI ./
BE_VEL_EST, /. Velocity Estimate ./
BE_VGCS_FEAT_FLG, /. VGCS Feature Flags ./
BE_TALKER_PRI, /. Talker Priority ./
BE_EMRG_SET_IND, /. Emergency Set Indication ./
BE_TALKER_ID, /. Talker Identity ./
BE_CELL_ID_LIST_SEG, /. Cell Identifier List Segment ./
BE_SMS_TO_VGCS, /. SMS to VGCS ./
BE_VGCS_TALKER_MOD, /. VGCS Talker Mode ./
BE_VGS_VBS_CELL_STAT, /. VGCS/VBS Cell Status ./
BE_CELL_ID_LST_SEG_F_EST_CELLS, /. Cell Identifier List Segment for established cells ./
BE_CELL_ID_LST_SEG_F_CELL_TB_EST, /. Cell Identifier List Segment for cells to be established ./
BE_CELL_ID_LST_SEG_F_REL_CELL, /. Cell Identifier List Segment for released cells - no user present ./
BE_CELL_ID_LST_SEG_F_NOT_EST_CELL, /. Cell Identifier List Segment for not established cells - no establishment possible ./
BE_GANSS_ASS_DTA, /. GANSS Assistance Data ./
BE_GANSS_POS_DTA, /. GANSS Positioning Data ./
BE_GANSS_LOC_TYP, /. GANSS Location Type ./
BE_APP_DATA, /. Application Data ./
BE_DATA_ID /. Data Identity ./
BE_APP_DATA_INF, /. Application Data Information ./
BE_MSISDN, /. MSISDN ./
BE_AOIP_TRANS_LAY_ADD, /. AoIP Transport Layer Address ./
BE_SPEECH_CODEC_LST, /. Speech Codec List ./
BE_SPEECH_CODEC, /. Speech Codec ./
BE_CALL_ID, /. Call Identifier ./
BE_CALL_ID_LST, /. Call Identifier List ./
BE_NONE /. NONE ./
BE_CIC, /* Circuit Identity Code */
BE_RSVD_1, /* Reserved */
BE_RES_AVAIL, /* Resource Available */
BE_CAUSE, /* Cause */
BE_CELL_ID, /* Cell Identifier */
BE_PRIO, /* Priority */
BE_L3_HEADER_INFO, /* Layer 3 Header Information */
BE_IMSI, /* IMSI */
BE_TMSI, /* TMSI */
BE_ENC_INFO, /* Encryption Information */
BE_CHAN_TYPE, /* Channel Type */
BE_PERIODICITY, /* Periodicity */
BE_EXT_RES_IND, /* Extended Resource Indicator */
BE_NUM_MS, /* Number Of MSs */
BE_RSVD_2, /* Reserved */
BE_RSVD_3, /* Reserved */
BE_RSVD_4, /* Reserved */
BE_CM_INFO_2, /* Classmark Information Type 2 */
BE_CM_INFO_3, /* Classmark Information Type 3 */
BE_INT_BAND, /* Interference Band To Be Used */
BE_RR_CAUSE, /* RR Cause */
BE_RSVD_5, /* Reserved */
BE_L3_INFO, /* Layer 3 Information */
BE_DLCI, /* DLCI */
BE_DOWN_DTX_FLAG, /* Downlink DTX Flag */
BE_CELL_ID_LIST, /* Cell Identifier List */
BE_RESP_REQ, /* Response Request */
BE_RES_IND_METHOD, /* Resource Indication Method */
BE_CM_INFO_1, /* Classmark Information Type 1 */
BE_CIC_LIST, /* Circuit Identity Code List */
BE_DIAG, /* Diagnostic */
BE_L3_MSG, /* Layer 3 Message Contents */
BE_CHOSEN_CHAN, /* Chosen Channel */
BE_TOT_RES_ACC, /* Total Resource Accessible */
BE_CIPH_RESP_MODE, /* Cipher Response Mode */
BE_CHAN_NEEDED, /* Channel Needed */
BE_TRACE_TYPE, /* Trace Type */
BE_TRIGGERID, /* TriggerID */
BE_TRACE_REF, /* Trace Reference */
BE_TRANSID, /* TransactionID */
BE_MID, /* Mobile Identity */
BE_OMCID, /* OMCID */
BE_FOR_IND, /* Forward Indicator */
BE_CHOSEN_ENC_ALG, /* Chosen Encryption Algorithm */
BE_CCT_POOL, /* Circuit Pool */
BE_CCT_POOL_LIST, /* Circuit Pool List */
BE_TIME_IND, /* Time Indication */
BE_RES_SIT, /* Resource Situation */
BE_CURR_CHAN_1, /* Current Channel Type 1 */
BE_QUE_IND, /* Queueing Indicator */
BE_SPEECH_VER, /* Speech Version */
BE_ASS_REQ, /* Assignment Requirement */
BE_TALKER_FLAG, /* Talker Flag */
BE_CONN_REL_REQ, /* Connection Release Requested */
BE_GROUP_CALL_REF, /* Group Call Reference */
BE_EMLPP_PRIO, /* eMLPP Priority */
BE_CONF_EVO_IND, /* Configuration Evolution Indication */
BE_OLD2NEW_INFO, /* Old BSS to New BSS Information */
BE_LSA_ID, /* LSA Identifier */
BE_LSA_ID_LIST, /* LSA Identifier List */
BE_LSA_INFO, /* LSA Information */
BE_LCS_QOS, /* LCS QoS */
BE_LSA_ACC_CTRL, /* LSA access control suppression */
BE_LCS_PRIO, /* LCS Priority */
BE_LOC_TYPE, /* Location Type */
BE_LOC_EST, /* Location Estimate */
BE_POS_DATA, /* Positioning Data */
BE_LCS_CAUSE, /* 3*2*2*66 LCS Cause */
BE_LCS_CLIENT, /* LCS Client Type */
BE_APDU, /* APDU */
BE_NE_ID, /* Network Element Identity */
BE_GPS_ASSIST_DATA, /* GPS Assistance Data */
BE_DECIPH_KEYS, /* Deciphering Keys */
BE_RET_ERR_REQ, /* Return Error Request */
BE_RET_ERR_CAUSE, /* Return Error Cause */
BE_SEG, /* Segmentation */
BE_SERV_HO, /* Service Handover */
BE_SRC_RNC_TO_TAR_RNC_UMTS, /* Source RNC to target RNC transparent information (UMTS) */
BE_SRC_RNC_TO_TAR_RNC_CDMA, /* Source RNC to target RNC transparent information (cdma2000) */
BE_GERAN_CLS_M, /* GERAN Classmark */
BE_GRAN_BSC_CONT, /* GERAN BSC Container */
BE_NEW_BSS_TO_OLD_BSS_INF, /* New BSS to Old BSS Information */
BE_INTER_SYS_INF, /* Inter-System Information */
BE_SNA_ACC_INF, /* SNA Access Information */
BE_VSTK_RAND_INF, /* VSTK_RAND Information */
BE_VSTK_INF, /* VSTK Information */
BE_PAGING_INF, /* Paging Information */
BE_IMEI, /* IMEI */
BE_VEL_EST, /* Velocity Estimate */
BE_VGCS_FEAT_FLG, /* VGCS Feature Flags */
BE_TALKER_PRI, /* Talker Priority */
BE_EMRG_SET_IND, /* Emergency Set Indication */
BE_TALKER_ID, /* Talker Identity */
BE_CELL_ID_LIST_SEG, /* Cell Identifier List Segment */
BE_SMS_TO_VGCS, /* SMS to VGCS */
BE_VGCS_TALKER_MOD, /* VGCS Talker Mode */
BE_VGS_VBS_CELL_STAT, /* VGCS/VBS Cell Status */
BE_CELL_ID_LST_SEG_F_EST_CELLS, /* Cell Identifier List Segment for established cells */
BE_CELL_ID_LST_SEG_F_CELL_TB_EST, /* Cell Identifier List Segment for cells to be established */
BE_CELL_ID_LST_SEG_F_REL_CELL, /* Cell Identifier List Segment for released cells - no user present */
BE_CELL_ID_LST_SEG_F_NOT_EST_CELL, /* Cell Identifier List Segment for not established cells - no establishment possible */
BE_GANSS_ASS_DTA, /* GANSS Assistance Data */
BE_GANSS_POS_DTA, /* GANSS Positioning Data */
BE_GANSS_LOC_TYP, /* GANSS Location Type */
BE_APP_DATA, /* Application Data */
BE_DATA_ID /* Data Identity */
BE_APP_DATA_INF, /* Application Data Information */
BE_MSISDN, /* MSISDN */
BE_AOIP_TRANS_LAY_ADD, /* AoIP Transport Layer Address */
BE_SPEECH_CODEC_LST, /* Speech Codec List */
BE_SPEECH_CODEC, /* Speech Codec */
BE_CALL_ID, /* Call Identifier */
BE_CALL_ID_LST, /* Call Identifier List */
BE_NONE /* NONE */
}
bssmap_elem_idx_t;
#endif
@ -764,11 +764,11 @@ be_res_avail(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32 of
{
guint32 curr_offset;
guint16 value;
int i;
int i;
curr_offset = offset;
for (i=0; i < 5; i++){
for (i=0; i < 5; i++) {
value = tvb_get_ntohl(tvb, curr_offset);
proto_tree_add_text(tree, tvb, curr_offset, len, "Number of full rate channels available in band %u %u",i+1,value);
curr_offset+=2;
@ -785,9 +785,9 @@ be_res_avail(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32 of
static guint16
be_cause(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32 offset, guint len, gchar *add_string, int string_len)
{
guint8 oct;
guint32 value;
guint32 curr_offset;
guint8 oct;
guint32 value;
guint32 curr_offset;
const gchar *str = NULL;
curr_offset = offset;
@ -1127,10 +1127,10 @@ be_enc_info(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32 off
guint16
be_chan_type(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32 offset, guint len, gchar *add_string, int string_len)
{
guint8 oct;
guint8 sdi;
guint8 num_chan;
guint32 curr_offset;
guint8 oct;
guint8 sdi;
guint8 num_chan;
guint32 curr_offset;
const gchar *str;
curr_offset = offset;
@ -1595,7 +1595,7 @@ be_lsa_id_list(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32
/* LSA identification 1 - n */
while (curr_offset-offset < len){
while (curr_offset-offset < len) {
proto_tree_add_item(tree, hf_gsm_a_bssmap_lsa_id, tvb, curr_offset, 3, ENC_BIG_ENDIAN);
curr_offset+=3;
}
@ -1659,7 +1659,7 @@ be_cell_id_aux(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32
if (add_string)
g_snprintf(add_string, string_len, " - LAC (0x%04x)", value);
/* FALLTHRU */
if (disc == 0x0b){
if (disc == 0x0b) {
/* If SAI, SAC follows */
proto_tree_add_item(tree, hf_gsm_a_bssmap_sac, tvb, curr_offset, 2, ENC_BIG_ENDIAN);
curr_offset += 2;
@ -1668,7 +1668,7 @@ be_cell_id_aux(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32
case 0x09: /* For intersystem handover from GSM to UMTS or cdma2000: */
if ((disc == 0x08) ||(disc == 0x09) || (disc == 0x0a)|| (disc == 0x0c)){
if ((disc == 0x08) ||(disc == 0x09) || (disc == 0x0a)|| (disc == 0x0c)) {
/* RNC-ID
* The octets 9-10 are coded as the RNC-ID (0..4095) or the
* Extended RNC-ID (4096..65535) specified in 3GPP TS 25.413 [31]:
@ -1771,8 +1771,8 @@ static const true_false_string bssmap_pvi_value = {
guint16
be_prio(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32 offset, guint len _U_, gchar *add_string, int string_len)
{
guint8 oct;
guint32 curr_offset;
guint8 oct;
guint32 curr_offset;
const gchar *str;
curr_offset = offset;
@ -1866,7 +1866,7 @@ be_lsa_info(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32 off
proto_tree_add_item(tree, hf_gsm_a_bssmap_lsa_only, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
curr_offset++;
while (curr_offset-offset < len){
while (curr_offset-offset < len) {
/* LSA identification and attributes */
/* 8 7 6 5 4 3 2 1
* spare act pref priority
@ -1888,8 +1888,8 @@ be_lsa_info(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32 off
static guint16
be_l3_info(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;
tvbuff_t *l3_tvb;
guint32 curr_offset;
tvbuff_t *l3_tvb;
curr_offset = offset;
@ -1944,10 +1944,10 @@ be_l3_info(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32 offs
static guint16
be_dlci(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;
proto_item *item = NULL;
proto_tree *subtree = NULL;
guint8 oct;
guint32 curr_offset;
proto_item *item = NULL;
proto_tree *subtree = NULL;
curr_offset = offset;
@ -2004,13 +2004,13 @@ be_down_dtx_flag(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint3
guint16
be_cell_id_list(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guint len, gchar *add_string, int string_len)
{
guint8 oct;
guint16 consumed;
guint8 disc;
guint8 num_cells;
guint32 curr_offset;
proto_item *item = NULL;
proto_tree *subtree = NULL;
guint8 oct;
guint16 consumed;
guint8 disc;
guint8 num_cells;
guint32 curr_offset;
proto_item *item = NULL;
proto_tree *subtree = NULL;
curr_offset = offset;
@ -2367,7 +2367,7 @@ be_ciph_resp_mode(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint
static guint16
be_l3_msg(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32 offset, guint len, gchar *add_string _U_, int string_len _U_)
{
tvbuff_t *l3_tvb;
tvbuff_t *l3_tvb;
proto_tree_add_text(tree, tvb, offset, len,
"Layer 3 Message Contents");
@ -2409,7 +2409,7 @@ static guint16
be_trace_type(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;
gint bit_offset;
gint bit_offset;
bit_offset = (offset<<3);
curr_offset = offset;
@ -2517,8 +2517,8 @@ be_trace_omc_id(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32
static guint16
be_for_ind(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;
guint8 oct;
guint32 curr_offset;
const gchar *str = NULL;
curr_offset = offset;
@ -2556,8 +2556,8 @@ be_for_ind(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32 offs
static guint16
be_chosen_enc_alg(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32 offset, guint len _U_, gchar *add_string, int string_len)
{
guint8 oct;
guint32 curr_offset;
guint8 oct;
guint32 curr_offset;
const gchar *str = NULL;
curr_offset = offset;
@ -2600,8 +2600,8 @@ be_chosen_enc_alg(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint
static guint16
be_cct_pool(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32 offset, guint len _U_, gchar *add_string, int string_len)
{
guint8 oct;
guint32 curr_offset;
guint8 oct;
guint32 curr_offset;
const gchar *str = NULL;
curr_offset = offset;
@ -2700,9 +2700,9 @@ be_que_ind(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32 offs
static guint16
be_speech_ver(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32 offset, guint len _U_, gchar *add_string, int string_len)
{
guint8 oct;
guint32 curr_offset;
const gchar *str = NULL;
guint8 oct;
guint32 curr_offset;
const gchar *str = NULL;
const gchar *short_str = NULL;
curr_offset = offset;
@ -2901,7 +2901,7 @@ static guint16
be_loc_type(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;
guint8 location_information;
guint8 location_information;
curr_offset = offset;
@ -2910,7 +2910,7 @@ be_loc_type(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32 off
proto_tree_add_item(tree, hf_gsm_a_bssmap_location_type_location_information, tvb, offset, 1, ENC_BIG_ENDIAN);
curr_offset++;
if(location_information == 1 || location_information == 2)
if (location_information == 1 || location_information == 2)
{
/* protocol method */
proto_tree_add_item(tree, hf_gsm_a_bssmap_location_type_positioning_method, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
@ -2929,7 +2929,7 @@ static guint16
be_loc_est(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32 offset, guint len _U_, gchar *add_string _U_, int string_len _U_)
{
tvbuff_t *data_tvb;
guint32 curr_offset;
guint32 curr_offset;
curr_offset = offset;
@ -2946,9 +2946,9 @@ static guint16
be_pos_data(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;
guint8 i;
guint8 i;
guint64 pos_data_disc;
gint bit_offset;
gint bit_offset;
curr_offset = offset;
@ -3011,8 +3011,8 @@ static const value_string gsm_a_apdu_protocol_id_strings[] = {
static guint16
be_apdu(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;
guint8 apdu_protocol_id;
guint32 curr_offset;
guint8 apdu_protocol_id;
tvbuff_t *APDU_tvb;
curr_offset = offset;
@ -3032,13 +3032,13 @@ be_apdu(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32 offset,
curr_offset++;
len--;
switch(apdu_protocol_id){
switch (apdu_protocol_id) {
case 1:
/* BSSLAP
* the embedded message is as defined in 3GPP TS 08.71(3GPP TS 48.071 version 7.2.0 Release 7)
*/
APDU_tvb = tvb_new_subset(tvb, curr_offset, len, len);
if(gsm_bsslap_handle)
if (gsm_bsslap_handle)
call_dissector(gsm_bsslap_handle, APDU_tvb, g_pinfo, g_tree);
break;
case 2:
@ -3567,11 +3567,11 @@ static guint16
be_aoip_trans_lay_add(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;
guint8 addr_type = 0;
guint32 rtp_ipv4_address;
guint16 rtp_port;
address rtp_dst_addr;
struct e_in6_addr rtp_addr_ipv6;
guint8 addr_type = 0;
guint32 rtp_ipv4_address;
guint16 rtp_port;
address rtp_dst_addr;
struct e_in6_addr rtp_addr_ipv6;
curr_offset = offset;
@ -3579,19 +3579,19 @@ be_aoip_trans_lay_add(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, g
* for the Transport Layer information of the connection end point.
* The Length differentiates between IPv4 and IPv6.
*/
switch(len){
switch (len) {
case 6:
/* IPv4 */
addr_type = 1;
addr_type = 1;
proto_tree_add_item(tree, hf_gsm_a_bssmap_aoip_trans_ipv4, tvb, curr_offset, 4, ENC_BIG_ENDIAN);
rtp_ipv4_address = tvb_get_ipv4(tvb, curr_offset);
rtp_ipv4_address = tvb_get_ipv4(tvb, curr_offset);
curr_offset+=4;
break;
case 18:
/* IPv6 */
addr_type = 2;
addr_type = 2;
proto_tree_add_item(tree, hf_gsm_a_bssmap_aoip_trans_ipv6, tvb, curr_offset, 16, ENC_NA);
tvb_get_ipv6(tvb, offset + 5, &rtp_addr_ipv6);
tvb_get_ipv6(tvb, offset + 5, &rtp_addr_ipv6);
curr_offset+=16;
break;
default:
@ -3600,29 +3600,29 @@ be_aoip_trans_lay_add(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, g
return(len);
}
proto_tree_add_item(tree, hf_gsm_a_bssmap_aoip_trans_port, tvb, curr_offset, 2, ENC_BIG_ENDIAN);
rtp_port = tvb_get_ntohs(tvb,curr_offset);
rtp_port = tvb_get_ntohs(tvb,curr_offset);
curr_offset+=2;
switch(addr_type){
case 0:
break;
case 1:
/* IPv4 */
rtp_dst_addr.type=AT_IPv4;
rtp_dst_addr.len=4;
rtp_dst_addr.data=(guint8 *)&rtp_ipv4_address;
break;
case 2:
/* IPv6 */
rtp_dst_addr.type=AT_IPv6;
rtp_dst_addr.len=16;
rtp_dst_addr.data=(guint8 *)&rtp_addr_ipv6;
break;
}
if((!pinfo->fd->flags.visited) && rtp_port != 0 && rtp_handle && addr_type != 0){
rtp_add_address(pinfo, &rtp_dst_addr, rtp_port, 0, "BSS MAP", pinfo->fd->num, FALSE, 0);
}
switch (addr_type) {
case 0:
break;
case 1:
/* IPv4 */
rtp_dst_addr.type = AT_IPv4;
rtp_dst_addr.len = 4;
rtp_dst_addr.data = (guint8 *)&rtp_ipv4_address;
break;
case 2:
/* IPv6 */
rtp_dst_addr.type = AT_IPv6;
rtp_dst_addr.len = 16;
rtp_dst_addr.data = (guint8 *)&rtp_addr_ipv6;
break;
}
if ((!pinfo->fd->flags.visited) && rtp_port != 0 && rtp_handle && addr_type != 0) {
rtp_add_address(pinfo, &rtp_dst_addr, rtp_port, 0, "BSS MAP", pinfo->fd->num, FALSE, 0);
}
return(curr_offset - offset);
}
/*
@ -3703,13 +3703,13 @@ be_speech_codec_lst(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, gui
curr_offset = offset;
while (curr_offset-offset < len){
while (curr_offset-offset < len) {
number++;
consumed=0;
consumed = 0;
item = proto_tree_add_text(tree, tvb, curr_offset, 1, "Speech Codec Element %u",number);
subtree = proto_item_add_subtree(item, ett_codec_lst);
codec = tvb_get_guint8(tvb,curr_offset)&0x0f;
switch(codec){
switch (codec) {
case 0:
/* GSM_FR is coded "0000" */
/* fall through */
@ -3729,7 +3729,10 @@ be_speech_codec_lst(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, gui
proto_tree_add_item(subtree, hf_gsm_a_bssmap_tf, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
/* Codec Type */
proto_tree_add_item(subtree, hf_gsm_a_bssap_speech_codec, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
proto_item_append_text(item, " - %s",val_to_str(tvb_get_guint8(tvb, curr_offset) & 0x0f, bssap_speech_codec_values, "Unknown"));
proto_item_append_text(item, " - %s",
val_to_str_const(tvb_get_guint8(tvb, curr_offset) & 0x0f,
bssap_speech_codec_values,
"Unknown"));
curr_offset++;
consumed++;
break;
@ -3752,7 +3755,10 @@ be_speech_codec_lst(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, gui
proto_tree_add_item(subtree, hf_gsm_a_bssmap_tf, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
/* Codec Type */
proto_tree_add_item(subtree, hf_gsm_a_bssap_speech_codec, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
proto_item_append_text(item, " - %s",val_to_str(tvb_get_guint8(tvb, curr_offset) & 0x0f, bssap_speech_codec_values, "Unknown"));
proto_item_append_text(item, " - %s",
val_to_str_const(tvb_get_guint8(tvb, curr_offset) & 0x0f,
bssap_speech_codec_values,
"Unknown"));
curr_offset++;
consumed++;
proto_tree_add_text(subtree, tvb, curr_offset, 2, "S0 - S15");
@ -3778,7 +3784,10 @@ be_speech_codec_lst(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, gui
proto_tree_add_item(subtree, hf_gsm_a_bssmap_tf, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
/* Codec Type */
proto_tree_add_item(subtree, hf_gsm_a_bssap_speech_codec, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
proto_item_append_text(item, " - %s",val_to_str(tvb_get_guint8(tvb, curr_offset) & 0x0f, bssap_speech_codec_values, "Unknown"));
proto_item_append_text(item, " - %s",
val_to_str_const(tvb_get_guint8(tvb, curr_offset) & 0x0f,
bssap_speech_codec_values,
"Unknown"));
curr_offset++;
consumed++;
proto_tree_add_text(subtree, tvb, curr_offset, 1, "S0 - S7");
@ -3797,7 +3806,10 @@ be_speech_codec_lst(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, gui
consumed++;
/* Codec Extension */
proto_tree_add_item(subtree, hf_gsm_a_bssap_extended_codec, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
proto_item_append_text(item, " - %s",val_to_str(tvb_get_guint8(tvb, curr_offset), bssap_extended_codec_values, "Unknown"));
proto_item_append_text(item, " - %s",
val_to_str_const(tvb_get_guint8(tvb, curr_offset),
bssap_extended_codec_values,
"Unknown"));
curr_offset++;
consumed++;
proto_tree_add_item(subtree, hf_gsm_a_bssap_extended_codec_r2, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
@ -3845,13 +3857,13 @@ be_speech_codec(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32
curr_offset = offset;
while (curr_offset-offset < len){
while (curr_offset-offset < len) {
number++;
consumed=0;
consumed = 0;
item = proto_tree_add_text(tree, tvb, curr_offset, 1, "Speech Codec Element %u",number);
subtree = proto_item_add_subtree(item, ett_codec_lst);
codec = tvb_get_guint8(tvb,curr_offset)&0x0f;
switch(codec){
switch (codec) {
case 3:
/* fall through */
case 4:
@ -3960,10 +3972,10 @@ be_call_id_lst(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32
guint32 curr_offset;
curr_offset = offset;
if (len==0){
if (len==0) {
proto_tree_add_text(tree, tvb, curr_offset, len, "all resources and references associated to all Call Identifiers in use between the BSC and the MSC need to be released");
}
while (curr_offset-offset < len){
while (curr_offset-offset < len) {
proto_tree_add_item(tree, hf_gsm_a_bssmap_call_id, tvb, curr_offset, 4, ENC_LITTLE_ENDIAN);
curr_offset+=4;
}
@ -6458,15 +6470,15 @@ dissect_bssmap(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
{
static gsm_a_tap_rec_t tap_rec[4];
static gsm_a_tap_rec_t *tap_p;
static guint tap_current=0;
guint8 oct;
guint32 offset, saved_offset;
guint32 len;
gint idx;
proto_item *bssmap_item = NULL;
proto_tree *bssmap_tree = NULL;
const gchar *str;
sccp_msg_info_t* sccp_msg_p;
static guint tap_current = 0;
guint8 oct;
guint32 offset, saved_offset;
guint32 len;
gint idx;
proto_item *bssmap_item = NULL;
proto_tree *bssmap_tree = NULL;
const gchar *str;
sccp_msg_info_t* sccp_msg_p;
sccp_msg_p = pinfo->sccp_info;
@ -6503,7 +6515,9 @@ dissect_bssmap(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
str = match_strval_idx_ext((guint32) oct, &gsm_a_bssmap_msg_strings_ext, &idx);
if (sccp_msg_p && !sccp_msg_p->data.co.label) {
sccp_msg_p->data.co.label = se_strdup(val_to_str_ext((guint32) oct, &gsm_a_bssmap_msg_strings_ext, "BSSMAP (0x%02x)"));
sccp_msg_p->data.co.label = se_strdup(val_to_str_ext((guint32)oct,
&gsm_a_bssmap_msg_strings_ext,
"BSSMAP (0x%02x)"));
}
/*
@ -6551,18 +6565,18 @@ dissect_bssmap(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
/*
* decode elements
*/
if (idx < 0 || bssmap_msg_fcn[idx] == NULL){
if (idx < 0 || bssmap_msg_fcn[idx] == NULL) {
proto_tree_add_text(bssmap_tree,
tvb, offset, len - offset,
"Message Elements");
}else{
if (sccp_msg_p && ((sccp_msg_p->data.co.assoc->app_info & 0xCD00) == 0xCD00)){
if (sccp_msg_p && ((sccp_msg_p->data.co.assoc->app_info & 0xCD00) == 0xCD00)) {
cell_discriminator = sccp_msg_p->data.co.assoc->app_info & 0xFF;
}else{
cell_discriminator = 0xFF;
}
(*bssmap_msg_fcn[idx])(tvb, bssmap_tree, pinfo, offset, len - offset);
if (sccp_msg_p){
if (sccp_msg_p) {
sccp_msg_p->data.co.assoc->app_info = cell_discriminator | 0xCDF0;
}
}
@ -7151,11 +7165,11 @@ proto_reg_handoff_gsm_a_bssmap(void)
bssmap_handle = find_dissector("gsm_a_bssmap");
dissector_add_uint("bssap.pdu_type", GSM_A_PDU_TYPE_BSSMAP, bssmap_handle);
dtap_handle = find_dissector("gsm_a_dtap");
dtap_handle = find_dissector("gsm_a_dtap");
gsm_bsslap_handle = find_dissector("gsm_bsslap");
bssgp_handle = find_dissector ("bssgp");
rrc_handle = find_dissector ("rrc");
rtp_handle = find_dissector("rtp");
bssgp_handle = find_dissector ("bssgp");
rrc_handle = find_dissector ("rrc");
rtp_handle = find_dissector("rtp");
}

View File

@ -65,8 +65,6 @@ static dissector_handle_t rrc_irat_ho_to_utran_cmd_handle;
#define PADDING_BYTE 0x2B
/* PROTOTYPES/FORWARDS */
const value_string gsm_a_dtap_msg_rr_strings[] = {
{ 0x3c, "Reserved" },
{ 0x3b, "Additional Assignment" },
@ -882,10 +880,10 @@ gint ett_gsm_rr_rest_octets_elem[NUM_GSM_RR_REST_OCTETS_ELEM];
/* this function is used for dissecting the 0/1 presence flags in CSN.1 coded IEs */
static gboolean gsm_rr_csn_flag(tvbuff_t *tvb, proto_tree *tree, gint bit_offset, const char *description, const char *true_string, const char * false_string)
{
guint8 bit_mask = 0x80 >> (bit_offset % 8);
guint8 value = tvb_get_guint8(tvb, bit_offset >> 3);
char bits_str[] = {".... ...."};
guint8 bit_mask = 0x80 >> (bit_offset % 8);
guint8 value = tvb_get_guint8(tvb, bit_offset >> 3);
guint8 offset_in_octet = bit_offset % 8;
char bits_str[] = {".... ...."};
if (value & bit_mask)
{
@ -895,7 +893,7 @@ static gboolean gsm_rr_csn_flag(tvbuff_t *tvb, proto_tree *tree, gint bit_offset
}
bits_str[offset_in_octet + (offset_in_octet / 4)] = '0';
proto_tree_add_text(tree, tvb, bit_offset>>3, 1, "%s: %s: %s", bits_str, description, false_string);
return FALSE;
return FALSE;
}
/* this function is used for dissecting the H/L presence flags in CSN.1 coded IEs"
@ -936,7 +934,7 @@ static gboolean gsm_rr_csn_HL_flag(tvbuff_t *tvb, proto_tree *tree, guint trunca
}
bits_str[offset_in_octet + (offset_in_octet / 4)] = 'L';
proto_tree_add_text(tree, tvb, bit_offset>>3, 1, "%s: %s: %s", bits_str, description, false_string);
return FALSE;
return FALSE;
}
/*
@ -1040,8 +1038,8 @@ static gint greatest_power_of_2_lesser_or_equal_to(gint idx)
{
gint j = 1;
do {
j<<=1;
} while (j<=idx);
j <<= 1;
} while (j <= idx);
j >>= 1;
return j;
}
@ -1085,7 +1083,7 @@ static void dissect_channel_list_n_range(tvbuff_t *tvb, proto_tree *tree, packet
subtree = proto_item_add_subtree(item, ett_gsm_rr_elem[DE_RR_NEIGH_CELL_DESC]);
octet = tvb_get_guint8(tvb, curr_offset);
if (range==1024) {
if (range == 1024) {
f0 = (octet>>2)&1;
if (f0)
list[0] = 1;
@ -1125,21 +1123,21 @@ static void dissect_channel_list_n_range(tvbuff_t *tvb, proto_tree *tree, packet
for (i=1; i<=imax; i++) {
w[i] = (gint) tvb_get_bits(tvb, bit_offset, wsize, FALSE);
proto_tree_add_text(subtree, tvb, bit_offset>>3, ((bit_offset+wsize-1)>>3) - (bit_offset>>3) + 1 , "%s %s(%d): %d",
decode_bits_in_field(bit_offset, wsize, w[i]),
"W",
i,
w[i]);
decode_bits_in_field(bit_offset, wsize, w[i]),
"W",
i,
w[i]);
bit_offset += wsize;
curr_offset = bit_offset>>3;
if ((iused == imax) && (w[i] == 0) ) {
iused = i - 1;
}
if ((curr_offset-offset)>len) {
if ((curr_offset-offset)>len) {
iused = i - 1;
break;
}
if (++jwi==nwi) { /* check if the number of wi at this wsize has been extracted */
}
if (++jwi == nwi) { /* check if the number of wi at this wsize has been extracted */
jwi = 0; /* reset the count of wi at this size */
nwi <<= 1; /* get twice as many of the next size */
wsize--; /* make the next size 1 bit smaller */
@ -1172,7 +1170,7 @@ dissect_arfcn_list_core(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, gui
item = proto_tree_add_text(tree,tvb, curr_offset, len, "List of ARFCNs =");
bit = 4;
arfcn = 125;
for (byte = 0;byte <= len-1;byte++)
for (byte = 0; byte <= len-1; byte++)
{
oct = tvb_get_guint8(tvb, curr_offset);
while (bit-- != 0)
@ -1218,7 +1216,7 @@ dissect_arfcn_list_core(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, gui
item = proto_tree_add_text(tree,tvb,curr_offset,len,"List of ARFCNs = %d",arfcn);
curr_offset = curr_offset + 2;
bit = 7;
for (byte = 0;byte <= len-3;byte++)
for (byte = 0; byte <= len-3; byte++)
{
oct = tvb_get_guint8(tvb, curr_offset);
while (bit-- != 0)
@ -1333,7 +1331,7 @@ de_rr_utran_freq_list(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, g
* { 1 < TDD_ARFCN > : bit (14) } ** 0 -- TDD frequencies
* <spare bit>**;
* Spare bits in the end of the field are used to fill the last octet.
*/
*/
bit_offset = curr_offset << 3;
proto_tree_add_bits_item(tree, hf_gsm_a_rr_utran_freq_list_length, tvb, bit_offset, 8, ENC_BIG_ENDIAN);
bit_offset += 8;
@ -1440,7 +1438,7 @@ de_rr_cell_select_indic(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_,
idx = 0;
break;
}
if (++jwi==nwi)
if (++jwi == nwi)
{
jwi = 0;
nwi <<= 1;
@ -1508,12 +1506,12 @@ de_rr_cell_select_indic(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_,
w[i] = tvb_get_bits(tvb, bit_offset, wsize, ENC_BIG_ENDIAN);
bit_offset += wsize;
idx -= wsize;
if (w[i] == 0)
if (w[i] == 0)
{
idx = 0;
break;
}
if (++jwi==nwi)
if (++jwi == nwi)
{
jwi = 0;
nwi <<= 1;
@ -2081,7 +2079,7 @@ de_rr_chnl_needed(tvbuff_t *tvb, proto_tree *subtree, packet_info *pinfo _U_, gu
gint bit_offset;
curr_offset = offset;
if (RIGHT_NIBBLE==len)
if (RIGHT_NIBBLE == len)
bit_offset = 4;
else
bit_offset = 0;
@ -2124,7 +2122,7 @@ de_rr_cip_mode_set(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guin
* Note: The coding of fields SC and algorithm identifier is defined in [44.018]
* as part of the Cipher Mode Setting IE.
*/
if (RIGHT_NIBBLE==len)
if (RIGHT_NIBBLE == len)
bit_offset = 4;
else
bit_offset = 0;
@ -2155,7 +2153,7 @@ de_rr_cip_mode_resp(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, gui
gint bit_offset;
curr_offset = offset;
if (RIGHT_NIBBLE==len)
if (RIGHT_NIBBLE == len)
bit_offset = 4;
else
bit_offset = 0;
@ -4873,7 +4871,7 @@ de_rr_si2quater_meas_info_utran_fdd_desc(tvbuff_t *tvb, proto_tree *tree, gint b
idx = 0;
break;
}
if (++jwi==nwi)
if (++jwi == nwi)
{
jwi = 0;
nwi <<= 1;
@ -4953,7 +4951,7 @@ de_rr_si2quater_meas_info_utran_tdd_desc(tvbuff_t *tvb, proto_tree *tree, gint b
idx = 0;
break;
}
if (++jwi==nwi)
if (++jwi == nwi)
{
jwi = 0;
nwi <<= 1;
@ -5906,7 +5904,7 @@ de_rr_eutran_param_desc(tvbuff_t *tvb, proto_tree *tree, gint bit_offset)
proto_tree_add_bits_item(subtree, hf_gsm_a_rr_qsearch_p_eutran, tvb, curr_bit_offset, 4, ENC_BIG_ENDIAN);
curr_bit_offset += 4;
rep_quant = gsm_rr_csn_flag(tvb, subtree, curr_bit_offset, "E-UTRAN Reporting Quantity", "RSRQ", "RSRP");
curr_bit_offset++;
curr_bit_offset++;
proto_tree_add_bits_item(subtree, hf_gsm_a_rr_eutran_multirat_reporting, tvb, curr_bit_offset, 2, ENC_BIG_ENDIAN);
curr_bit_offset += 2;
@ -7448,12 +7446,12 @@ static const value_string gsm_a_rr_si2n_support_vals[] = {
static guint16
de_rr_si13_rest_oct(tvbuff_t *tvb, proto_tree *subtree, packet_info *pinfo _U_, guint32 offset, guint len _U_, gchar *add_string _U_, int string_len _U_)
{
proto_tree *subtree2;
proto_item *item2;
guint bit_offset, bit_offset_sav;
guint8 tvb_len = tvb_length(tvb);
guint16 bit_len = tvb_len << 3;
bit_offset = offset << 3;
proto_tree *subtree2;
proto_item *item2;
guint bit_offset, bit_offset_sav;
guint8 tvb_len = tvb_length(tvb);
guint16 bit_len = tvb_len << 3;
bit_offset = offset << 3;
if (gsm_rr_csn_HL_flag(tvb, subtree, 0, bit_offset++, "SI13 contents", "Present", "Not present"))
{
@ -7603,7 +7601,7 @@ static const value_string gsm_a_rr_sync_ind_si_vals[] = {
};
/* NCI: Normal cell indication (octet 1, bit 4) */
static const true_false_string gsm_a_rr_sync_ind_nci_value = {
static const true_false_string gsm_a_rr_sync_ind_nci_value = {
"Out of range timing advance shall trigger a handover failure procedure",
"Out of range timing advance is ignored"
};
@ -7683,9 +7681,9 @@ de_rr_tlli(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32 offs
static guint16
de_rr_tmsi_ptmsi(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32 offset, guint len _U_, gchar *add_string _U_, int string_len _U_)
{
proto_tree *subtree;
proto_item *item;
guint32 curr_offset;
proto_tree *subtree;
proto_item *item;
guint32 curr_offset;
curr_offset = offset;
@ -7773,8 +7771,8 @@ static guint16
de_rr_ext_meas_result(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;
gint bit_offset, i;
guint8 value;
gint bit_offset, i;
guint8 value;
curr_offset = offset;
bit_offset = curr_offset << 3;
@ -7987,7 +7985,7 @@ de_rr_carrier_ind(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint
{
proto_tree *subtree;
proto_item *item;
guint32 curr_offset;
guint32 curr_offset;
curr_offset = offset;
@ -8161,7 +8159,7 @@ dtap_rr_add_ass(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32
{
guint32 curr_offset;
guint32 consumed;
guint curr_len;
guint curr_len;
curr_offset = offset;
curr_len = len;
@ -8278,9 +8276,9 @@ dtap_rr_ass_cmd(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32
static void
dtap_rr_ass_comp(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32 offset, guint len)
{
guint32 curr_offset;
guint32 consumed;
guint curr_len;
guint32 curr_offset;
guint32 consumed;
guint curr_len;
curr_offset = offset;
curr_len = len;
@ -8298,9 +8296,9 @@ dtap_rr_ass_comp(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint3
static void
dtap_rr_ass_fail(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32 offset, guint len)
{
guint32 curr_offset;
guint32 consumed;
guint curr_len;
guint32 curr_offset;
guint32 consumed;
guint curr_len;
curr_offset = offset;
curr_len = len;
@ -8318,9 +8316,9 @@ dtap_rr_ass_fail(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint3
static void
dtap_rr_ch_mode_mod(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32 offset, guint len)
{
guint32 curr_offset;
guint32 consumed;
guint curr_len;
guint32 curr_offset;
guint32 consumed;
guint curr_len;
curr_offset = offset;
curr_len = len;
@ -8347,9 +8345,9 @@ dtap_rr_ch_mode_mod(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, gui
static void
dtap_rr_ch_mode_mod_ack(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32 offset, guint len)
{
guint32 curr_offset;
guint32 consumed;
guint curr_len;
guint32 curr_offset;
guint32 consumed;
guint curr_len;
curr_offset = offset;
curr_len = len;
@ -8370,9 +8368,9 @@ dtap_rr_ch_mode_mod_ack(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_,
static void
dtap_rr_ch_rel(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32 offset, guint len)
{
guint32 curr_offset;
guint32 consumed;
guint curr_len;
guint32 curr_offset;
guint32 consumed;
guint curr_len;
curr_offset = offset;
curr_len = len;
@ -8419,8 +8417,8 @@ dtap_rr_ch_rel(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32
static void
dtap_rr_cip_mode_cmd(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32 offset, guint len)
{
guint32 curr_offset;
guint curr_len;
guint32 curr_offset;
guint curr_len;
curr_offset = offset;
curr_len = len;
@ -8439,9 +8437,9 @@ dtap_rr_cip_mode_cmd(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, gu
void
dtap_rr_cip_mode_cpte(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32 offset, guint len)
{
guint32 curr_offset;
guint32 consumed;
guint curr_len;
guint32 curr_offset;
guint32 consumed;
guint curr_len;
curr_offset = offset;
curr_len = len;
@ -8459,9 +8457,9 @@ dtap_rr_cip_mode_cpte(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, g
static void
dtap_rr_mm_cm_change(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32 offset, guint len)
{
guint32 curr_offset;
guint32 consumed;
guint curr_len;
guint32 curr_offset;
guint32 consumed;
guint curr_len;
curr_offset = offset;
curr_len = len;
@ -8481,9 +8479,9 @@ dtap_rr_mm_cm_change(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, gu
static void
dtap_rr_utran_classmark_change(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32 offset, guint len)
{
guint32 curr_offset;
guint32 consumed;
guint curr_len;
guint32 curr_offset;
guint32 consumed;
guint curr_len;
curr_offset = offset;
curr_len = len;
@ -8500,9 +8498,9 @@ dtap_rr_utran_classmark_change(tvbuff_t *tvb, proto_tree *tree, packet_info *pin
static void
dtap_rr_cm_enq(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32 offset, guint len)
{
guint32 curr_offset;
guint32 consumed;
guint curr_len;
guint32 curr_offset;
guint32 consumed;
guint curr_len;
curr_offset = offset;
curr_len = len;
@ -8522,7 +8520,7 @@ dtap_rr_conf_change_cmd(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_,
{
guint32 curr_offset;
guint32 consumed;
guint curr_len;
guint curr_len;
curr_offset = offset;
curr_len = len;
@ -8570,7 +8568,7 @@ dtap_rr_conf_change_rej(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_,
{
guint32 curr_offset;
guint32 consumed;
guint curr_len;
guint curr_len;
curr_offset = offset;
curr_len = len;
@ -8590,7 +8588,7 @@ dtap_rr_freq_redef(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guin
{
guint32 curr_offset;
guint32 consumed;
guint curr_len;
guint curr_len;
curr_offset = offset;
curr_len = len;
@ -8625,9 +8623,9 @@ dtap_rr_freq_redef(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guin
static void
dtap_rr_gprs_sus_req(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32 offset, guint len)
{
guint32 curr_offset;
guint32 consumed;
guint curr_len;
guint32 curr_offset;
guint32 consumed;
guint curr_len;
curr_offset = offset;
curr_len = len;
@ -8658,9 +8656,9 @@ dtap_rr_gprs_sus_req(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, gu
void
dtap_rr_ho_cmd(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32 offset, guint len)
{
guint32 curr_offset;
guint32 consumed;
guint curr_len;
guint32 curr_offset;
guint32 consumed;
guint curr_len;
curr_offset = offset;
curr_len = len;
@ -8789,9 +8787,9 @@ dtap_rr_ho_cmd(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32
static void
dtap_rr_inter_syst_to_utran_ho_cmd(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32 offset, guint len)
{
guint32 curr_offset;
guint32 consumed;
guint curr_len;
guint32 curr_offset;
guint32 consumed;
guint curr_len;
curr_offset = offset;
curr_len = len;
@ -8808,9 +8806,9 @@ dtap_rr_inter_syst_to_utran_ho_cmd(tvbuff_t *tvb, proto_tree *tree, packet_info
static void
dtap_rr_ho_cpte(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32 offset, guint len)
{
guint32 curr_offset;
guint32 consumed;
guint curr_len;
guint32 curr_offset;
guint32 consumed;
guint curr_len;
curr_offset = offset;
curr_len = len;
@ -8831,9 +8829,9 @@ dtap_rr_ho_cpte(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32
static void
dtap_rr_ho_fail(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32 offset, guint len)
{
guint32 curr_offset;
guint32 consumed;
guint curr_len;
guint32 curr_offset;
guint32 consumed;
guint curr_len;
curr_offset = offset;
curr_len = len;
@ -8851,10 +8849,10 @@ dtap_rr_ho_fail(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32
static void
dtap_rr_imm_ass(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32 offset, guint len)
{
guint32 curr_offset;
guint32 consumed;
guint curr_len;
guint8 oct;
guint32 curr_offset;
guint32 consumed;
guint curr_len;
guint8 oct;
curr_offset = offset;
curr_len = len;
@ -8911,9 +8909,9 @@ dtap_rr_imm_ass(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32
static void
dtap_rr_imm_ass_ext(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32 offset, guint len)
{
guint32 curr_offset;
guint32 consumed;
guint curr_len;
guint32 curr_offset;
guint32 consumed;
guint curr_len;
curr_offset = offset;
curr_len = len;
@ -8950,9 +8948,9 @@ dtap_rr_imm_ass_ext(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, gui
static void
dtap_rr_imm_ass_rej(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32 offset, guint len)
{
guint32 curr_offset;
guint32 consumed;
guint curr_len;
guint32 curr_offset;
guint32 consumed;
guint curr_len;
curr_offset = offset;
curr_len = len;
@ -8989,9 +8987,9 @@ dtap_rr_imm_ass_rej(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, gui
static void
dtap_rr_meas_rep(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32 offset, guint len)
{
guint32 curr_offset;
guint32 consumed;
guint curr_len;
guint32 curr_offset;
guint32 consumed;
guint curr_len;
curr_offset = offset;
curr_len = len;
@ -9006,9 +9004,9 @@ dtap_rr_meas_rep(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint3
static void
dtap_rr_paging_req_type_1(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32 offset, guint len)
{
guint32 curr_offset;
guint32 consumed;
guint curr_len;
guint32 curr_offset;
guint32 consumed;
guint curr_len;
curr_offset = offset;
curr_len = len;
@ -9035,9 +9033,9 @@ dtap_rr_paging_req_type_1(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U
static void
dtap_rr_paging_req_type_2(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32 offset, guint len)
{
guint32 curr_offset;
guint32 consumed;
guint curr_len;
guint32 curr_offset;
guint32 consumed;
guint curr_len;
curr_offset = offset;
curr_len = len;
@ -9067,9 +9065,9 @@ dtap_rr_paging_req_type_2(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U
static void
dtap_rr_paging_req_type_3(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32 offset, guint len)
{
guint32 curr_offset;
guint32 consumed;
guint curr_len;
guint32 curr_offset;
guint32 consumed;
guint curr_len;
curr_offset = offset;
curr_len = len;
@ -9102,12 +9100,12 @@ dtap_rr_paging_req_type_3(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U
static void
dtap_rr_paging_resp(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32 offset, guint len)
{
guint32 curr_offset;
guint32 consumed;
guint curr_len;
guint8 oct;
proto_tree *subtree;
proto_item *item;
guint32 curr_offset;
guint32 consumed;
guint curr_len;
guint8 oct;
proto_tree *subtree;
proto_item *item;
curr_offset = offset;
curr_len = len;
@ -9176,7 +9174,7 @@ dtap_rr_partial_rel(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, gui
{
guint32 curr_offset;
guint32 consumed;
guint curr_len;
guint curr_len;
curr_offset = offset;
curr_len = len;
@ -9198,9 +9196,9 @@ dtap_rr_partial_rel(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, gui
static void
dtap_rr_phy_info(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32 offset, guint len)
{
guint32 curr_offset;
guint32 consumed;
guint curr_len;
guint32 curr_offset;
guint32 consumed;
guint curr_len;
curr_offset = offset;
curr_len = len;
@ -9216,9 +9214,9 @@ dtap_rr_phy_info(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint3
static void
dtap_rr_rr_status(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32 offset, guint len)
{
guint32 curr_offset;
guint32 consumed;
guint curr_len;
guint32 curr_offset;
guint32 consumed;
guint curr_len;
curr_offset = offset;
curr_len = len;
@ -9234,9 +9232,9 @@ dtap_rr_rr_status(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint
static void
dtap_rr_sys_info_1(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32 offset, guint len)
{
guint32 curr_offset;
guint32 consumed;
guint curr_len;
guint32 curr_offset;
guint32 consumed;
guint curr_len;
curr_offset = offset;
curr_len = len;
@ -9254,9 +9252,9 @@ dtap_rr_sys_info_1(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guin
static void
dtap_rr_sys_info_2(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32 offset, guint len)
{
guint32 curr_offset;
guint32 consumed;
guint curr_len;
guint32 curr_offset;
guint32 consumed;
guint curr_len;
curr_offset = offset;
curr_len = len;
@ -9274,9 +9272,9 @@ dtap_rr_sys_info_2(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guin
static void
dtap_rr_sys_info_2bis(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32 offset, guint len)
{
guint32 curr_offset;
guint32 consumed;
guint curr_len;
guint32 curr_offset;
guint32 consumed;
guint curr_len;
curr_offset = offset;
curr_len = len;
@ -9292,9 +9290,9 @@ dtap_rr_sys_info_2bis(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, g
static void
dtap_rr_sys_info_2ter(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32 offset, guint len)
{
guint32 curr_offset;
guint32 consumed;
guint curr_len;
guint32 curr_offset;
guint32 consumed;
guint curr_len;
curr_offset = offset;
curr_len = len;
@ -9310,9 +9308,9 @@ dtap_rr_sys_info_2ter(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, g
static void
dtap_rr_sys_info_2quater(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32 offset, guint len)
{
guint32 curr_offset;
guint32 consumed;
guint curr_len;
guint32 curr_offset;
guint32 consumed;
guint curr_len;
curr_offset = offset;
curr_len = len;
@ -9326,9 +9324,9 @@ dtap_rr_sys_info_2quater(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_
static void
dtap_rr_sys_info_3(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32 offset, guint len)
{
guint32 curr_offset;
guint32 consumed;
guint curr_len;
guint32 curr_offset;
guint32 consumed;
guint curr_len;
curr_offset = offset;
curr_len = len;
@ -9354,9 +9352,9 @@ dtap_rr_sys_info_3(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guin
static void
dtap_rr_sys_info_4(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32 offset, guint len)
{
guint32 curr_offset;
guint32 consumed;
guint curr_len;
guint32 curr_offset;
guint32 consumed;
guint curr_len;
curr_offset = offset;
curr_len = len;
@ -9380,9 +9378,9 @@ dtap_rr_sys_info_4(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guin
static void
dtap_rr_sys_info_5(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32 offset, guint len)
{
guint32 curr_offset;
guint32 consumed;
guint curr_len;
guint32 curr_offset;
guint32 consumed;
guint curr_len;
curr_offset = offset;
curr_len = len;
@ -9412,9 +9410,9 @@ dtap_rr_sys_info_5bis(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, g
static void
dtap_rr_sys_info_5ter(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32 offset, guint len)
{
guint32 curr_offset;
guint32 consumed;
guint curr_len;
guint32 curr_offset;
guint32 consumed;
guint curr_len;
curr_offset = offset;
curr_len = len;
@ -9428,9 +9426,9 @@ dtap_rr_sys_info_5ter(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, g
static void
dtap_rr_sys_info_6(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32 offset, guint len)
{
guint32 curr_offset;
guint32 consumed;
guint curr_len;
guint32 curr_offset;
guint32 consumed;
guint curr_len;
curr_offset = offset;
curr_len = len;
@ -9452,9 +9450,9 @@ dtap_rr_sys_info_6(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guin
static void
dtap_rr_sys_info_13(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32 offset, guint len)
{
guint32 curr_offset;
guint32 consumed;
guint curr_len;
guint32 curr_offset;
guint32 consumed;
guint curr_len;
curr_offset = offset;
curr_len = len;
@ -9468,9 +9466,9 @@ dtap_rr_sys_info_13(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, gui
static void
dtap_rr_ext_meas_order(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32 offset, guint len)
{
guint32 curr_offset;
guint32 consumed;
guint curr_len;
guint32 curr_offset;
guint32 consumed;
guint curr_len;
curr_offset = offset;
curr_len = len;
@ -9487,7 +9485,7 @@ dtap_rr_ext_meas_report(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_,
{
guint32 curr_offset;
guint32 consumed;
guint curr_len;
guint curr_len;
curr_offset = offset;
curr_len = len;
@ -9502,9 +9500,9 @@ dtap_rr_ext_meas_report(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_,
static void
dtap_rr_app_inf(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32 offset, guint len)
{
guint32 curr_offset;
guint32 consumed;
guint curr_len;
guint32 curr_offset;
guint32 consumed;
guint curr_len;
curr_offset = offset;
curr_len = len;
@ -9535,11 +9533,11 @@ sacch_rr_meas_info(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guin
{
proto_tree *subtree = NULL, *subtree2 = NULL;
proto_item *item, *item2;
guint32 curr_offset;
gint bit_offset, bit_offset_sav, bit_offset_sav2;
guint8 value, idx;
guint8 tvb_len = tvb_length(tvb);
guint16 bit_len = tvb_len << 3;
guint32 curr_offset;
gint bit_offset, bit_offset_sav, bit_offset_sav2;
guint8 value, idx;
guint8 tvb_len = tvb_length(tvb);
guint16 bit_len = tvb_len << 3;
curr_offset = offset;
bit_offset = curr_offset << 3;
@ -9794,8 +9792,8 @@ sacch_rr_eutran_meas_report(tvbuff_t *tvb, proto_tree *tree, guint32 bit_offset,
{
proto_tree *subtree;
proto_item *item;
gint curr_bit_offset;
gint8 n_eutran;
gint curr_bit_offset;
gint8 n_eutran;
curr_bit_offset = bit_offset;
@ -9887,11 +9885,11 @@ sacch_rr_enh_meas_report(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_
{
proto_tree *subtree;
proto_item *item;
guint32 curr_offset;
guint bit_offset, bit_offset_sav;
guint8 tvb_len = tvb_length(tvb);
guint16 bit_len = tvb_len << 3;
guint8 idx;
guint32 curr_offset;
guint bit_offset, bit_offset_sav;
guint8 tvb_len = tvb_length(tvb);
guint16 bit_len = tvb_len << 3;
guint8 idx;
curr_offset = offset;
bit_offset = curr_offset << 3;
@ -10094,7 +10092,7 @@ static void (*dtap_msg_rr_fcn[])(tvbuff_t *tvb, proto_tree *tree, packet_info *p
void get_rr_msg_params(guint8 oct, const gchar **msg_str, int *ett_tree, int *hf_idx, msg_fcn *msg_fcn_p)
{
gint idx;
gint idx;
*msg_str = match_strval_idx((guint32) (oct & DTAP_RR_IEI_MASK), gsm_a_dtap_msg_rr_strings, &idx);
*hf_idx = hf_gsm_a_dtap_msg_rr_type;
@ -10114,25 +10112,25 @@ static void
dissect_ccch(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
{
static gsm_a_tap_rec_t tap_rec[4];
static gsm_a_tap_rec_t *tap_p;
static guint tap_current=0;
static gsm_a_tap_rec_t tap_rec[4];
static gsm_a_tap_rec_t *tap_p;
static guint tap_current = 0;
void (*msg_fcn_p)(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32 offset, guint len);
guint8 oct;
guint8 pd;
guint32 offset;
guint32 len;
guint32 oct_1, oct_2;
proto_item *ccch_item = NULL;
proto_tree *ccch_tree = NULL;
proto_item *oct_1_item = NULL;
proto_tree *pd_tree = NULL;
const gchar *msg_str;
gint ett_tree;
gint ti;
int hf_idx;
gboolean nsd;
void (*msg_fcn_p)(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32 offset, guint len);
guint8 oct;
guint8 pd;
guint32 offset;
guint32 len;
guint32 oct_1, oct_2;
proto_item *ccch_item = NULL;
proto_tree *ccch_tree = NULL;
proto_item *oct_1_item = NULL;
proto_tree *pd_tree = NULL;
const gchar *msg_str;
gint ett_tree;
gint ti;
int hf_idx;
gboolean nsd;
len = tvb_length(tvb);
@ -10331,7 +10329,7 @@ static void (*sacch_msg_rr_fcn[])(tvbuff_t *tvb, proto_tree *tree, packet_info *
static void
get_rr_short_pd_msg_params(guint8 mess_type, const gchar **msg_str, int *ett_tree, int *hf_idx, msg_fcn *msg_fcn_p)
{
gint idx;
gint idx;
*msg_str = match_strval_idx((guint32) mess_type, gsm_a_rr_short_pd_msg_strings, &idx);
*hf_idx = hf_gsm_a_rr_short_pd_msg_type;
@ -10349,19 +10347,19 @@ const value_string short_protocol_discriminator_vals[] = {
static void
dissect_sacch(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
{
static gsm_a_tap_rec_t tap_rec[4];
static gsm_a_tap_rec_t *tap_p;
static guint tap_current=0;
static gsm_a_tap_rec_t tap_rec[4];
static gsm_a_tap_rec_t *tap_p;
static guint tap_current = 0;
void (*msg_fcn_p)(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32 offset, guint len);
guint8 oct, short_pd, mess_type;
guint32 offset, bit_offset = 0;
guint32 len;
proto_item *sacch_item = NULL;
proto_tree *sacch_tree = NULL;
const gchar *msg_str;
gint ett_tree;
int hf_idx;
void (*msg_fcn_p)(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32 offset, guint len);
guint8 oct, short_pd, mess_type;
guint32 offset, bit_offset = 0;
guint32 len;
proto_item *sacch_item = NULL;
proto_tree *sacch_tree = NULL;
const gchar *msg_str;
gint ett_tree;
int hf_idx;
len = tvb_length(tvb);
@ -10455,8 +10453,8 @@ dissect_sacch(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
void
proto_register_gsm_a_rr(void)
{
guint i;
guint last_offset;
guint i;
guint last_offset;
/* Setup list of header fields */
@ -10554,8 +10552,8 @@ proto_register_gsm_a_rr(void)
},
{ &hf_gsm_a_rr_rxlev_sub_serv_cell,
{ "RXLEV-SUB-SERVING-CELL","gsm_a.rr.rxlev_sub_serv_cell",
FT_UINT8,BASE_DEC|BASE_EXT_STRING, &gsm_a_rr_rxlev_vals_ext, 0x00,
NULL, HFILL }
FT_UINT8,BASE_DEC|BASE_EXT_STRING, &gsm_a_rr_rxlev_vals_ext, 0x00,
NULL, HFILL }
},
{ &hf_gsm_a_rr_rxqual_full_serv_cell,
{ "RXQUAL-FULL-SERVING-CELL","gsm_a.rr.rxqual_full_serv_cell",
@ -11430,8 +11428,8 @@ proto_register_gsm_a_rr(void)
},
{ &hf_gsm_a_rr_gprs_ra_colour,
{ "GPRS RA Colour", "gsm_a.rr.gprs_ra_colour",
FT_UINT8, BASE_DEC, NULL, 0x0,
NULL, HFILL }
FT_UINT8, BASE_DEC, NULL, 0x0,
NULL, HFILL }
},
{ &hf_gsm_a_rr_si13_position,
{ "SI13 Position", "gsm_a.rr.si13_position",
@ -12180,7 +12178,7 @@ proto_register_gsm_a_rr(void)
},
{ &hf_gsm_a_rr_link_quality_meas_mode,
{ "Link_Quality_Measure_Mode", "gsm_a.rr.link_qual_meas_mode",
FT_UINT8, BASE_DEC, VALS(&gsm_a_link_quality_meas_mode_vals), 0x00,
FT_UINT8, BASE_DEC, VALS(gsm_a_link_quality_meas_mode_vals), 0x00,
NULL, HFILL }
},
{ &hf_gsm_a_rr_emr_bitmap_length,
@ -12218,22 +12216,22 @@ proto_register_gsm_a_rr(void)
FT_UINT16, BASE_DEC, NULL, 0x00,
NULL, HFILL }
},
};
};
static hf_register_info hf_rr_short_pd[] =
{
{ &hf_gsm_a_rr_short_pd,
{ "Radio Resources Short Protocol Discriminator", "gsm_a.rr_short_pd",
{ "Radio Resources Short Protocol Discriminator", "gsm_a.rr_short_pd",
FT_UINT8, BASE_HEX, NULL, 0x0,
NULL, HFILL }
},
{ &hf_gsm_a_rr_short_pd_msg_type,
{ "Radio Resources Short PD Message Type", "gsm_a.rr_short_pd_type",
{ "Radio Resources Short PD Message Type", "gsm_a.rr_short_pd_type",
FT_UINT8, BASE_HEX, VALS(gsm_a_rr_short_pd_msg_strings), 0x0,
NULL, HFILL }
},
{ &hf_gsm_a_rr_short_l2_header,
{ "Radio Resources Short L2 Header", "gsm_a.rr_short_l2_header",
{ "Radio Resources Short L2 Header", "gsm_a.rr_short_l2_header",
FT_UINT8, BASE_HEX, NULL, 0x0,
NULL, HFILL }
}

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -15,7 +15,7 @@
* introduced by Abhik Sarkar
*
* Support for Huawei SMPP+ extensions
* introduced by Xu Bo and enhance by Abhik Sarkar
* introduced by Xu Bo and enhanced by Abhik Sarkar
*
* Enhanced error code handling
* provided by Stipe Tolj from Kannel.
@ -42,6 +42,7 @@
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*
* ----------
*
* Dissector of an SMPP (Short Message Peer to Peer) PDU, as defined by the
@ -53,8 +54,6 @@
# include "config.h"
#endif
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <time.h>
@ -95,182 +94,182 @@ static void dissect_smpp_pdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree
*
* Fixed header section
*/
static int proto_smpp = -1;
static int proto_smpp = -1;
static int st_smpp_ops = -1;
static int st_smpp_req = -1;
static int st_smpp_res = -1;
static int st_smpp_res_status = -1;
static int st_smpp_ops = -1;
static int st_smpp_req = -1;
static int st_smpp_res = -1;
static int st_smpp_res_status = -1;
static int hf_smpp_command_id = -1;
static int hf_smpp_command_length = -1;
static int hf_smpp_command_status = -1;
static int hf_smpp_sequence_number = -1;
static int hf_smpp_command_id = -1;
static int hf_smpp_command_length = -1;
static int hf_smpp_command_status = -1;
static int hf_smpp_sequence_number = -1;
/*
* Fixed body section
*/
static int hf_smpp_system_id = -1;
static int hf_smpp_password = -1;
static int hf_smpp_system_type = -1;
static int hf_smpp_interface_version = -1;
static int hf_smpp_addr_ton = -1;
static int hf_smpp_addr_npi = -1;
static int hf_smpp_address_range = -1;
static int hf_smpp_service_type = -1;
static int hf_smpp_source_addr_ton = -1;
static int hf_smpp_source_addr_npi = -1;
static int hf_smpp_source_addr = -1;
static int hf_smpp_dest_addr_ton = -1;
static int hf_smpp_dest_addr_npi = -1;
static int hf_smpp_destination_addr = -1;
static int hf_smpp_esm_submit_msg_mode = -1;
static int hf_smpp_esm_submit_msg_type = -1;
static int hf_smpp_esm_submit_features = -1;
static int hf_smpp_protocol_id = -1;
static int hf_smpp_priority_flag = -1;
static int hf_smpp_schedule_delivery_time = -1;
static int hf_smpp_schedule_delivery_time_r = -1;
static int hf_smpp_validity_period = -1;
static int hf_smpp_validity_period_r = -1;
static int hf_smpp_regdel_receipt = -1;
static int hf_smpp_regdel_acks = -1;
static int hf_smpp_regdel_notif = -1;
static int hf_smpp_replace_if_present_flag = -1;
static int hf_smpp_data_coding = -1;
static int hf_smpp_sm_default_msg_id = -1;
static int hf_smpp_sm_length = -1;
static int hf_smpp_short_message = -1;
static int hf_smpp_message_id = -1;
static int hf_smpp_dlist = -1;
static int hf_smpp_dlist_resp = -1;
static int hf_smpp_dl_name = -1;
static int hf_smpp_final_date = -1;
static int hf_smpp_final_date_r = -1;
static int hf_smpp_message_state = -1;
static int hf_smpp_error_code = -1;
static int hf_smpp_error_status_code = -1;
static int hf_smpp_esme_addr_ton = -1;
static int hf_smpp_esme_addr_npi = -1;
static int hf_smpp_esme_addr = -1;
static int hf_smpp_system_id = -1;
static int hf_smpp_password = -1;
static int hf_smpp_system_type = -1;
static int hf_smpp_interface_version = -1;
static int hf_smpp_addr_ton = -1;
static int hf_smpp_addr_npi = -1;
static int hf_smpp_address_range = -1;
static int hf_smpp_service_type = -1;
static int hf_smpp_source_addr_ton = -1;
static int hf_smpp_source_addr_npi = -1;
static int hf_smpp_source_addr = -1;
static int hf_smpp_dest_addr_ton = -1;
static int hf_smpp_dest_addr_npi = -1;
static int hf_smpp_destination_addr = -1;
static int hf_smpp_esm_submit_msg_mode = -1;
static int hf_smpp_esm_submit_msg_type = -1;
static int hf_smpp_esm_submit_features = -1;
static int hf_smpp_protocol_id = -1;
static int hf_smpp_priority_flag = -1;
static int hf_smpp_schedule_delivery_time = -1;
static int hf_smpp_schedule_delivery_time_r = -1;
static int hf_smpp_validity_period = -1;
static int hf_smpp_validity_period_r = -1;
static int hf_smpp_regdel_receipt = -1;
static int hf_smpp_regdel_acks = -1;
static int hf_smpp_regdel_notif = -1;
static int hf_smpp_replace_if_present_flag = -1;
static int hf_smpp_data_coding = -1;
static int hf_smpp_sm_default_msg_id = -1;
static int hf_smpp_sm_length = -1;
static int hf_smpp_short_message = -1;
static int hf_smpp_message_id = -1;
static int hf_smpp_dlist = -1;
static int hf_smpp_dlist_resp = -1;
static int hf_smpp_dl_name = -1;
static int hf_smpp_final_date = -1;
static int hf_smpp_final_date_r = -1;
static int hf_smpp_message_state = -1;
static int hf_smpp_error_code = -1;
static int hf_smpp_error_status_code = -1;
static int hf_smpp_esme_addr_ton = -1;
static int hf_smpp_esme_addr_npi = -1;
static int hf_smpp_esme_addr = -1;
/*
* Optional parameter section
*/
static int hf_smpp_opt_params = -1;
static int hf_smpp_opt_param = -1;
static int hf_smpp_opt_param_tag = -1;
static int hf_smpp_opt_param_len = -1;
static int hf_smpp_vendor_op = -1;
static int hf_smpp_reserved_op = -1;
static int hf_smpp_opt_params = -1;
static int hf_smpp_opt_param = -1;
static int hf_smpp_opt_param_tag = -1;
static int hf_smpp_opt_param_len = -1;
static int hf_smpp_vendor_op = -1;
static int hf_smpp_reserved_op = -1;
static int hf_smpp_dest_addr_subunit = -1;
static int hf_smpp_dest_network_type = -1;
static int hf_smpp_dest_bearer_type = -1;
static int hf_smpp_dest_telematics_id = -1;
static int hf_smpp_source_addr_subunit = -1;
static int hf_smpp_source_network_type = -1;
static int hf_smpp_source_bearer_type = -1;
static int hf_smpp_source_telematics_id = -1;
static int hf_smpp_qos_time_to_live = -1;
static int hf_smpp_payload_type = -1;
static int hf_smpp_additional_status_info_text = -1;
static int hf_smpp_receipted_message_id = -1;
static int hf_smpp_msg_wait_ind = -1;
static int hf_smpp_msg_wait_type = -1;
static int hf_smpp_privacy_indicator = -1;
static int hf_smpp_source_subaddress = -1;
static int hf_smpp_dest_subaddress = -1;
static int hf_smpp_user_message_reference = -1;
static int hf_smpp_user_response_code = -1;
static int hf_smpp_source_port = -1;
static int hf_smpp_destination_port = -1;
static int hf_smpp_sar_msg_ref_num = -1;
static int hf_smpp_language_indicator = -1;
static int hf_smpp_sar_total_segments = -1;
static int hf_smpp_sar_segment_seqnum = -1;
static int hf_smpp_SC_interface_version = -1;
static int hf_smpp_callback_num_pres = -1;
static int hf_smpp_callback_num_scrn = -1;
static int hf_smpp_callback_num_atag = -1;
static int hf_smpp_number_of_messages = -1;
static int hf_smpp_callback_num = -1;
static int hf_smpp_dpf_result = -1;
static int hf_smpp_set_dpf = -1;
static int hf_smpp_ms_availability_status = -1;
static int hf_smpp_network_error_type = -1;
static int hf_smpp_network_error_code = -1;
static int hf_smpp_message_payload = -1;
static int hf_smpp_delivery_failure_reason = -1;
static int hf_smpp_more_messages_to_send = -1;
static int hf_smpp_ussd_service_op = -1;
static int hf_smpp_display_time = -1;
static int hf_smpp_sms_signal = -1;
static int hf_smpp_ms_validity = -1;
static int hf_smpp_alert_on_message_delivery_null = -1;
static int hf_smpp_alert_on_message_delivery = -1;
static int hf_smpp_its_reply_type = -1;
static int hf_smpp_its_session_number = -1;
static int hf_smpp_its_session_sequence = -1;
static int hf_smpp_its_session_ind = -1;
static int hf_smpp_dest_addr_subunit = -1;
static int hf_smpp_dest_network_type = -1;
static int hf_smpp_dest_bearer_type = -1;
static int hf_smpp_dest_telematics_id = -1;
static int hf_smpp_source_addr_subunit = -1;
static int hf_smpp_source_network_type = -1;
static int hf_smpp_source_bearer_type = -1;
static int hf_smpp_source_telematics_id = -1;
static int hf_smpp_qos_time_to_live = -1;
static int hf_smpp_payload_type = -1;
static int hf_smpp_additional_status_info_text = -1;
static int hf_smpp_receipted_message_id = -1;
static int hf_smpp_msg_wait_ind = -1;
static int hf_smpp_msg_wait_type = -1;
static int hf_smpp_privacy_indicator = -1;
static int hf_smpp_source_subaddress = -1;
static int hf_smpp_dest_subaddress = -1;
static int hf_smpp_user_message_reference = -1;
static int hf_smpp_user_response_code = -1;
static int hf_smpp_source_port = -1;
static int hf_smpp_destination_port = -1;
static int hf_smpp_sar_msg_ref_num = -1;
static int hf_smpp_language_indicator = -1;
static int hf_smpp_sar_total_segments = -1;
static int hf_smpp_sar_segment_seqnum = -1;
static int hf_smpp_SC_interface_version = -1;
static int hf_smpp_callback_num_pres = -1;
static int hf_smpp_callback_num_scrn = -1;
static int hf_smpp_callback_num_atag = -1;
static int hf_smpp_number_of_messages = -1;
static int hf_smpp_callback_num = -1;
static int hf_smpp_dpf_result = -1;
static int hf_smpp_set_dpf = -1;
static int hf_smpp_ms_availability_status = -1;
static int hf_smpp_network_error_type = -1;
static int hf_smpp_network_error_code = -1;
static int hf_smpp_message_payload = -1;
static int hf_smpp_delivery_failure_reason = -1;
static int hf_smpp_more_messages_to_send = -1;
static int hf_smpp_ussd_service_op = -1;
static int hf_smpp_display_time = -1;
static int hf_smpp_sms_signal = -1;
static int hf_smpp_ms_validity = -1;
static int hf_smpp_alert_on_message_delivery_null = -1;
static int hf_smpp_alert_on_message_delivery = -1;
static int hf_smpp_its_reply_type = -1;
static int hf_smpp_its_session_number = -1;
static int hf_smpp_its_session_sequence = -1;
static int hf_smpp_its_session_ind = -1;
/* Optional Parameters introduced in SMPP 5.0 */
static int hf_smpp_congestion_state = -1;
static int hf_smpp_billing_identification = -1;
static int hf_smpp_dest_addr_np_country = -1;
static int hf_smpp_dest_addr_np_information = -1;
static int hf_smpp_dest_addr_np_resolution = -1;
static int hf_smpp_source_network_id = -1;
static int hf_smpp_source_node_id = -1;
static int hf_smpp_dest_network_id = -1;
static int hf_smpp_dest_node_id = -1;
static int hf_smpp_congestion_state = -1;
static int hf_smpp_billing_identification = -1;
static int hf_smpp_dest_addr_np_country = -1;
static int hf_smpp_dest_addr_np_information = -1;
static int hf_smpp_dest_addr_np_resolution = -1;
static int hf_smpp_source_network_id = -1;
static int hf_smpp_source_node_id = -1;
static int hf_smpp_dest_network_id = -1;
static int hf_smpp_dest_node_id = -1;
/* Optional Parameters for Cell Broadcast Operations */
static int hf_smpp_broadcast_channel_indicator = -1;
static int hf_smpp_broadcast_content_type_nw = -1;
static int hf_smpp_broadcast_content_type_type = -1;
static int hf_smpp_broadcast_content_type_info = -1;
static int hf_smpp_broadcast_message_class = -1;
static int hf_smpp_broadcast_rep_num = -1;
static int hf_smpp_broadcast_frequency_interval_unit = -1;
static int hf_smpp_broadcast_frequency_interval_value = -1;
static int hf_smpp_broadcast_area_identifier = -1;
static int hf_smpp_broadcast_area_identifier_format = -1;
static int hf_smpp_broadcast_error_status = -1;
static int hf_smpp_broadcast_area_success = -1;
static int hf_smpp_broadcast_end_time = -1;
static int hf_smpp_broadcast_end_time_r = -1;
static int hf_smpp_broadcast_service_group = -1;
static int hf_smpp_broadcast_channel_indicator = -1;
static int hf_smpp_broadcast_content_type_nw = -1;
static int hf_smpp_broadcast_content_type_type = -1;
static int hf_smpp_broadcast_content_type_info = -1;
static int hf_smpp_broadcast_message_class = -1;
static int hf_smpp_broadcast_rep_num = -1;
static int hf_smpp_broadcast_frequency_interval_unit = -1;
static int hf_smpp_broadcast_frequency_interval_value = -1;
static int hf_smpp_broadcast_area_identifier = -1;
static int hf_smpp_broadcast_area_identifier_format = -1;
static int hf_smpp_broadcast_error_status = -1;
static int hf_smpp_broadcast_area_success = -1;
static int hf_smpp_broadcast_end_time = -1;
static int hf_smpp_broadcast_end_time_r = -1;
static int hf_smpp_broadcast_service_group = -1;
/*
* Data Coding Scheme section
*/
static int hf_smpp_dcs = -1;
static int hf_smpp_dcs_sms_coding_group = -1;
static int hf_smpp_dcs_text_compression = -1;
static int hf_smpp_dcs_class_present = -1;
static int hf_smpp_dcs_charset = -1;
static int hf_smpp_dcs_class = -1;
static int hf_smpp_dcs_cbs_coding_group = -1;
static int hf_smpp_dcs_cbs_language = -1;
static int hf_smpp_dcs_wap_charset = -1;
static int hf_smpp_dcs_wap_class = -1;
static int hf_smpp_dcs_cbs_class = -1;
static int hf_smpp_dcs = -1;
static int hf_smpp_dcs_sms_coding_group = -1;
static int hf_smpp_dcs_text_compression = -1;
static int hf_smpp_dcs_class_present = -1;
static int hf_smpp_dcs_charset = -1;
static int hf_smpp_dcs_class = -1;
static int hf_smpp_dcs_cbs_coding_group = -1;
static int hf_smpp_dcs_cbs_language = -1;
static int hf_smpp_dcs_wap_charset = -1;
static int hf_smpp_dcs_wap_class = -1;
static int hf_smpp_dcs_cbs_class = -1;
/*
* Huawei SMPP+ extensions
*/
static int hf_huawei_smpp_version = -1;
static int hf_huawei_smpp_smsc_addr = -1;
static int hf_huawei_smpp_msc_addr_noa = -1;
static int hf_huawei_smpp_msc_addr_npi = -1;
static int hf_huawei_smpp_msc_addr = -1;
static int hf_huawei_smpp_mo_mt_flag = -1;
static int hf_huawei_smpp_length_auth = -1;
static int hf_huawei_smpp_sm_id = -1;
static int hf_huawei_smpp_service_id = -1;
static int hf_huawei_smpp_operation_result = -1;
static int hf_huawei_smpp_notify_mode = -1;
static int hf_huawei_smpp_delivery_result = -1;
static int hf_huawei_smpp_version = -1;
static int hf_huawei_smpp_smsc_addr = -1;
static int hf_huawei_smpp_msc_addr_noa = -1;
static int hf_huawei_smpp_msc_addr_npi = -1;
static int hf_huawei_smpp_msc_addr = -1;
static int hf_huawei_smpp_mo_mt_flag = -1;
static int hf_huawei_smpp_length_auth = -1;
static int hf_huawei_smpp_sm_id = -1;
static int hf_huawei_smpp_service_id = -1;
static int hf_huawei_smpp_operation_result = -1;
static int hf_huawei_smpp_notify_mode = -1;
static int hf_huawei_smpp_delivery_result = -1;
/* Initialize the subtree pointers */
static gint ett_smpp = -1;
@ -584,16 +583,16 @@ static const value_string vals_replace_if_present_flag[] = {
};
static const value_string vals_data_coding[] = {
{ 0, "SMSC default alphabet" },
{ 1, "IA5 (CCITT T.50/ASCII (ANSI X3.4)" },
{ 2, "Octet unspecified (8-bit binary)" },
{ 3, "Latin 1 (ISO-8859-1)" },
{ 4, "Octet unspecified (8-bit binary)" },
{ 5, "JIS (X 0208-1990)" },
{ 6, "Cyrillic (ISO-8859-5)" },
{ 7, "Latin/Hebrew (ISO-8859-8)" },
{ 8, "UCS2 (ISO/IEC-10646)" },
{ 9, "Pictogram encoding" },
{ 0, "SMSC default alphabet" },
{ 1, "IA5 (CCITT T.50/ASCII (ANSI X3.4)" },
{ 2, "Octet unspecified (8-bit binary)" },
{ 3, "Latin 1 (ISO-8859-1)" },
{ 4, "Octet unspecified (8-bit binary)" },
{ 5, "JIS (X 0208-1990)" },
{ 6, "Cyrillic (ISO-8859-5)" },
{ 7, "Latin/Hebrew (ISO-8859-8)" },
{ 8, "UCS2 (ISO/IEC-10646)" },
{ 9, "Pictogram encoding" },
{ 10, "ISO-2022-JP (Music codes)" },
{ 11, "reserved" },
{ 12, "reserved" },
@ -1030,9 +1029,9 @@ static const value_string vals_dest_addr_np_resolution[] = {
};
static const range_string vals_broadcast_area_identifier_format[] = {
{0, 0, "Alias / Name"},
{1, 1, "Ellipsoid Arc"},
{2, 2, "Polygon"},
{0, 0, "Alias / Name"},
{1, 1, "Ellipsoid Arc"},
{2, 2, "Polygon"},
{3, 255, "[Reserved]"},
{0, 0, NULL }
};
@ -1179,35 +1178,35 @@ smpp_mktime(const char *datestr, time_t *secs, int *nsecs)
r_time.tm_isdst = -1;
if (relative == FALSE) {
struct tm *gm, *local_time;
int gm_hour, gm_min;
time_t current_time;
struct tm *gm, *local_time;
int gm_hour, gm_min;
time_t current_time;
*secs = mktime(&r_time);
/* Subtract out the timezone information since we will adjust for
* the presented time's timezone below and then display in UTC.
*
* To do that, first determine the current timezone's offset to UTC.
*/
current_time = time(NULL);
gm = gmtime(&current_time);
gm_hour = gm->tm_hour;
gm_min = gm->tm_min;
local_time = localtime(&current_time);
/* Then subtract out that difference (whether the difference is
* measured in hours, minutes, or both).
*/
*secs -= 3600*(gm_hour - local_time->tm_hour);
*secs -= 60*(gm_min - local_time->tm_min);
/* Subtract out the timezone information since we will adjust for
* the presented time's timezone below and then display in UTC.
*
* To do that, first determine the current timezone's offset to UTC.
*/
current_time = time(NULL);
gm = gmtime(&current_time);
gm_hour = gm->tm_hour;
gm_min = gm->tm_min;
local_time = localtime(&current_time);
/* Then subtract out that difference (whether the difference is
* measured in hours, minutes, or both).
*/
*secs -= 3600*(gm_hour - local_time->tm_hour);
*secs -= 60*(gm_min - local_time->tm_min);
*nsecs = (datestr[12] - '0') * 100000000;
t_diff = (10 * (datestr[13] - '0') + (datestr[14] - '0')) * 900;
if (datestr[15] == '-')
/* Represented time is behind UTC, shift it forward to UTC */
/* Represented time is behind UTC, shift it forward to UTC */
*secs += t_diff;
else if (datestr[15] == '+')
/* Represented time is ahead of UTC, shift it backward to UTC */
/* Represented time is ahead of UTC, shift it backward to UTC */
*secs -= t_diff;
} else {
*secs = r_time.tm_sec + 60 *
@ -1309,9 +1308,9 @@ static void
smpp_handle_time(proto_tree *tree, tvbuff_t *tvb,
int field, int field_R, int *offset)
{
char *strval;
gint len;
nstime_t tmptime;
char *strval;
gint len;
nstime_t tmptime;
strval = (char *) tvb_get_ephemeral_stringz(tvb, *offset, &len);
if (*strval)
@ -1794,8 +1793,8 @@ smpp_handle_tlv(proto_tree *tree, tvbuff_t *tvb, int *offset)
void
smpp_handle_dcs(proto_tree *tree, tvbuff_t *tvb, int *offset)
{
guint8 val;
int off = *offset;
guint8 val;
int off = *offset;
proto_tree *subtree = NULL;
proto_item *pi;
@ -1881,7 +1880,7 @@ bind_receiver(proto_tree *tree, tvbuff_t *tvb)
int offset = 0;
guint8 field;
guint8 major, minor;
char *strval;
char *strval;
smpp_handle_string(tree, tvb, hf_smpp_system_id, &offset);
smpp_handle_string(tree, tvb, hf_smpp_password, &offset);
@ -1925,13 +1924,13 @@ static void
submit_sm(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo,
proto_tree *top_tree)
{
tvbuff_t *tvb_msg;
int offset = 0;
guint8 flag, udhi;
guint8 length;
char *src_str = NULL;
char *dst_str = NULL;
address save_src, save_dst;
tvbuff_t *tvb_msg;
int offset = 0;
guint8 flag, udhi;
guint8 length;
char *src_str = NULL;
char *dst_str = NULL;
address save_src, save_dst;
smpp_handle_string_z(tree, tvb, hf_smpp_service_type, &offset, "(Default)");
smpp_handle_int1(tree, tvb, hf_smpp_source_addr_ton, &offset);
@ -2289,7 +2288,7 @@ query_broadcast_sm_resp(proto_tree *tree, tvbuff_t *tvb)
static void
huawei_auth_acc(proto_tree *tree, tvbuff_t *tvb)
{
int offset = 0;
int offset = 0;
guint8 version = 0;
smpp_handle_int1(tree, tvb, hf_huawei_smpp_version, &offset);
@ -2320,7 +2319,7 @@ huawei_auth_acc_resp(proto_tree *tree, tvbuff_t *tvb)
static void
huawei_sm_result_notify(proto_tree *tree, tvbuff_t *tvb)
{
int offset = 0;
int offset = 0;
guint8 version = 0;
smpp_handle_int1(tree, tvb, hf_huawei_smpp_version, &offset);
@ -2377,7 +2376,7 @@ dissect_smpp_heur(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
return FALSE;
command_status = tvb_get_ntohl(tvb, 8); /* ..with known status */
if (match_strval(command_status, vals_command_status) == NULL &&
match_strrval(command_status, reserved_command_status) == NULL)
match_strrval(command_status, reserved_command_status) == NULL)
return FALSE;
dissect_smpp(tvb, pinfo, tree);
return TRUE;
@ -2436,17 +2435,17 @@ dissect_smpp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
static void
dissect_smpp_pdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
{
int offset = 0; /* Offset within tvbuff */
guint command_length; /* length of PDU */
guint command_id; /* SMPP command */
guint command_status; /* Status code */
guint sequence_number; /* ...of command */
smpp_tap_rec_t* tap_rec; /* Tap record */
const gchar *command_str;
const gchar *command_status_str = NULL;
int offset = 0; /* Offset within tvbuff */
guint command_length; /* length of PDU */
guint command_id; /* SMPP command */
guint command_status; /* Status code */
guint sequence_number; /* ...of command */
smpp_tap_rec_t *tap_rec; /* Tap record */
const gchar *command_str;
const gchar *command_status_str = NULL;
/* Set up structures needed to add the protocol subtree and manage it */
proto_item *ti = NULL;
proto_tree *smpp_tree = NULL;
proto_item *ti = NULL;
proto_tree *smpp_tree = NULL;
/*
* Safety: don't even try to dissect the PDU
@ -2463,13 +2462,13 @@ dissect_smpp_pdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
command_status = tvb_get_ntohl(tvb, offset);
if (command_id & 0x80000000) {
/* PDU is a response. */
command_status_str = match_strval(command_status, vals_command_status);
if (command_status_str == NULL) {
/* Check if the reserved value is in the vendor-specific range. */
command_status_str = (command_status >= 0x400 && command_status <= 0x4FF ?
ep_strdup_printf("Vendor-specific Error (0x%08X)", command_status) :
ep_strdup_printf("(Reserved Error 0x%08X)", command_status));
}
command_status_str = match_strval(command_status, vals_command_status);
if (command_status_str == NULL) {
/* Check if the reserved value is in the vendor-specific range. */
command_status_str = (command_status >= 0x400 && command_status <= 0x4FF ?
ep_strdup_printf("Vendor-specific Error (0x%08X)", command_status) :
ep_strdup_printf("(Reserved Error 0x%08X)", command_status));
}
}
offset += 4;
sequence_number = tvb_get_ntohl(tvb, offset);
@ -3788,11 +3787,6 @@ proto_register_smpp(void)
&reassemble_over_tcp);
}
/*
* If 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_smpp(void)
{

File diff suppressed because it is too large Load Diff