diff options
author | Ronnie Sahlberg <ronnie_sahlberg@ozemail.com.au> | 2005-06-26 06:16:03 +0000 |
---|---|---|
committer | Ronnie Sahlberg <ronnie_sahlberg@ozemail.com.au> | 2005-06-26 06:16:03 +0000 |
commit | e55dcb785e7496932edb22d5956ee29cdc5dd27c (patch) | |
tree | 1b9a3e77af496127d88606c68b4b54c7c11a63f3 /epan | |
parent | 3a51ba4293f6d98309471aeee7f2b1010c96b7cb (diff) |
prettify ftam by puttign the command name in the info column
svn path=/trunk/; revision=14759
Diffstat (limited to 'epan')
-rw-r--r-- | epan/dissectors/packet-ber.c | 6 | ||||
-rw-r--r-- | epan/dissectors/packet-ftam.c | 45 |
2 files changed, 42 insertions, 9 deletions
diff --git a/epan/dissectors/packet-ber.c b/epan/dissectors/packet-ber.c index ffce260143..e2b4400dc6 100644 --- a/epan/dissectors/packet-ber.c +++ b/epan/dissectors/packet-ber.c @@ -1139,12 +1139,12 @@ printf("CHOICE dissect_ber_CHOICE(%s) entered len:%d\n",name,tvb_length_remainin run out of entries */ ch = choice; if(branch_taken){ - branch_taken=-1; + *branch_taken=-1; } while(ch->func){ choice_try_again: if(branch_taken){ - branch_taken++; + (*branch_taken)++; } #ifdef DEBUG_BER printf("CHOICE testing potential subdissector class:%d:(expected)%d tag:%d:(expected)%d flags:%d\n",class,ch->class,tag,ch->tag,ch->flags); @@ -1227,7 +1227,7 @@ printf("CHOICE dissect_ber_CHOICE(%s) subdissector ate %d bytes\n",name,count); if(branch_taken){ /* none of the branches were taken so set the param back to -1 */ - branch_taken=-1; + *branch_taken=-1; } #ifdef REMOVED /*XXX here we should have another flag to the CHOICE to distinguish diff --git a/epan/dissectors/packet-ftam.c b/epan/dissectors/packet-ftam.c index 5a517ed184..f92ab1fc98 100644 --- a/epan/dissectors/packet-ftam.c +++ b/epan/dissectors/packet-ftam.c @@ -59,8 +59,6 @@ int proto_ftam = -1; static char object_identifier_id[MAX_OID_STR_LEN]; -static struct SESSION_DATA_STRUCTURE* session = NULL; - /*--- Included file: packet-ftam-hf.c ---*/ @@ -1648,8 +1646,17 @@ static const ber_choice_t FTAM_Regime_PDU_choice[] = { static int dissect_ftam_FTAM_Regime_PDU(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) { + gint branch_taken; + offset = dissect_ber_CHOICE(pinfo, tree, tvb, offset, - FTAM_Regime_PDU_choice, hf_index, ett_ftam_FTAM_Regime_PDU, NULL); + FTAM_Regime_PDU_choice, hf_index, ett_ftam_FTAM_Regime_PDU, &branch_taken); + + if( (branch_taken!=-1) && ftam_FTAM_Regime_PDU_vals[branch_taken].strptr ){ + if (check_col(pinfo->cinfo, COL_INFO)) { + col_append_fstr(pinfo->cinfo, COL_INFO, " %s:", ftam_FTAM_Regime_PDU_vals[branch_taken].strptr); + } + } + return offset; } @@ -3868,8 +3875,17 @@ static const ber_choice_t File_PDU_choice[] = { static int dissect_ftam_File_PDU(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) { + gint branch_taken; + offset = dissect_ber_CHOICE(pinfo, tree, tvb, offset, - File_PDU_choice, hf_index, ett_ftam_File_PDU, NULL); + File_PDU_choice, hf_index, ett_ftam_File_PDU, &branch_taken); + + if( (branch_taken!=-1) && ftam_File_PDU_vals[branch_taken].strptr ){ + if (check_col(pinfo->cinfo, COL_INFO)) { + col_append_fstr(pinfo->cinfo, COL_INFO, " %s:", ftam_File_PDU_vals[branch_taken].strptr); + } + } + return offset; } @@ -4197,8 +4213,17 @@ static const ber_choice_t Bulk_Data_PDU_choice[] = { static int dissect_ftam_Bulk_Data_PDU(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) { + gint branch_taken; + offset = dissect_ber_CHOICE(pinfo, tree, tvb, offset, - Bulk_Data_PDU_choice, hf_index, ett_ftam_Bulk_Data_PDU, NULL); + Bulk_Data_PDU_choice, hf_index, ett_ftam_Bulk_Data_PDU, &branch_taken); + + if( (branch_taken!=-1) && ftam_Bulk_Data_PDU_vals[branch_taken].strptr ){ + if (check_col(pinfo->cinfo, COL_INFO)) { + col_append_fstr(pinfo->cinfo, COL_INFO, " %s:", ftam_Bulk_Data_PDU_vals[branch_taken].strptr); + } + } + return offset; } @@ -5657,8 +5682,16 @@ static const ber_choice_t FSM_PDU_choice[] = { static int dissect_ftam_FSM_PDU(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) { + gint branch_taken; + offset = dissect_ber_CHOICE(pinfo, tree, tvb, offset, - FSM_PDU_choice, hf_index, ett_ftam_FSM_PDU, NULL); + FSM_PDU_choice, hf_index, ett_ftam_FSM_PDU, &branch_taken); + + if( (branch_taken!=-1) && ftam_FSM_PDU_vals[branch_taken].strptr ){ + if (check_col(pinfo->cinfo, COL_INFO)) { + col_append_fstr(pinfo->cinfo, COL_INFO, " %s:", ftam_FSM_PDU_vals[branch_taken].strptr); + } + } return offset; } |