Fix bug 1328 and related bugs found when examining the trace.

svn path=/trunk/; revision=20634
This commit is contained in:
Anders Broman 2007-01-30 22:52:09 +00:00
parent 750e036e4c
commit c9ea62712c
4 changed files with 91 additions and 69 deletions

View File

@ -329,6 +329,7 @@ static const value_string event_name_vals[] = {
{ 0x000c0001, "rtp, Payload Transition" },
{ 0x00210000, "Generic Bearer Connection Q.1950 Annex A" },
{ 0x00210001, "GB/BNCChange" },
{ 0x00220001, "BT/TIND (Tunnel Indication)" },
{ 0x002a0001, "H.245/h245msg (Incoming H.245 Message)" },
{ 0x002a0004, "H.245/h245ChC (H.245 Channel Closed)" },
{ 0x00450000, "Inactivity Timer H.248.14" },
@ -810,10 +811,12 @@ dissect_h248_EventName(gboolean implicit_tag, tvbuff_t *tvb, int offset, packet_
if (name_major == pkg->id) {
break;
} else {
pkg = NULL;
}
}
if (!pkg->hfid) pkg = &no_package;
if (! pkg ) pkg = &no_package;
curr_info.pkg = pkg;

View File

@ -1,6 +1,6 @@
/* Do not modify this file. */
/* It is created automatically by the ASN.1 to Wireshark dissector compiler */
/* ./packet-h248.c */
/* .\packet-h248.c */
/* ../../tools/asn2wrs.py -b -e -p h248 -c h248.cnf -s packet-h248-template h248v3.asn */
/* Input file: packet-h248-template.c */
@ -746,26 +746,31 @@ static const value_string event_name_vals[] = {
{ 0x00010000, "g H.248.1 Annex E" },
{ 0x00010001, "g/Cause" },
{ 0x00010002, "g/Signal Completion" },
{ 0x00040000, "tonedet H.248.1 Annex E" },
{ 0x00040001, "tonedet/std(Start tone detected)" },
{ 0x00040002, "tonedet/etd(End tone detected)" },
{ 0x00040003, "tonedet/ltd(Long tone detected)" },
{ 0x00060000, "dd H.248.1 Annex E" },
{ 0x00060001, "dd/std" },
{ 0x00060002, "dd/etd" },
{ 0x00060003, "dd/ltd" },
{ 0x00060004, "dd, DigitMap Completion Event" },
{ 0x00060010, "dd, DTMF character 0" },
{ 0x00060011, "dd, DTMF character 1" },
{ 0x00060012, "dd, DTMF character 2" },
{ 0x00060013, "dd, DTMF character 3" },
{ 0x00060014, "dd, DTMF character 4" },
{ 0x00060015, "dd, DTMF character 5" },
{ 0x00060016, "dd, DTMF character 6" },
{ 0x00060017, "dd, DTMF character 7" },
{ 0x00060018, "dd, DTMF character 8" },
{ 0x00060019, "dd, DTMF character 9" },
{ 0x0006001a, "dd, DTMF character A" },
{ 0x0006001b, "dd, DTMF character B" },
{ 0x0006001c, "dd, DTMF character C" },
{ 0x0006001d, "dd, DTMF character D" },
{ 0x00060020, "dd, DTMF character *" },
{ 0x00060021, "dd, DTMF character #" },
{ 0x00060010, "dd/d0, DTMF character 0" },
{ 0x00060011, "dd/d1, DTMF character 1" },
{ 0x00060012, "dd/d2, DTMF character 2" },
{ 0x00060013, "dd/d3, DTMF character 3" },
{ 0x00060014, "dd/d4, DTMF character 4" },
{ 0x00060015, "dd/d5, DTMF character 5" },
{ 0x00060016, "dd/d6, DTMF character 6" },
{ 0x00060017, "dd/d7, DTMF character 7" },
{ 0x00060018, "dd/d8, DTMF character 8" },
{ 0x00060019, "dd/d9, DTMF character 9" },
{ 0x0006001a, "dd/a, DTMF character A" },
{ 0x0006001b, "dd/b, DTMF character B" },
{ 0x0006001c, "dd/c, DTMF character C" },
{ 0x0006001d, "dd/d, DTMF character D" },
{ 0x00060020, "dd/*, DTMF character *" },
{ 0x00060021, "dd/#, DTMF character #" },
{ 0x00080030, "cd, Dial Tone" },
{ 0x00080031, "cd, Ringing Tone" },
{ 0x00080032, "cd, Busy Tone" },
@ -779,14 +784,18 @@ static const value_string event_name_vals[] = {
{ 0x00090005, "al, offhook" },
{ 0x00090006, "al, flashhook" },
{ 0x0009ffff, "al, *" },
{ 0x000a0005, "ct, Completion" },
{ 0x000a0005, "ct, Completion of Continuity test" },
{ 0x000b0005, "nt, network failure" },
{ 0x000b0006, "nt, quality alert" },
{ 0x000c0001, "rtp, Payload Transition" },
{ 0x00210000, "Generic Bearer Connection Q.1950 Annex A" },
{ 0x00210001, "GB/BNCChange" },
{ 0x00220001, "BT/TIND (Tunnel Indication)" },
{ 0x002a0001, "H.245/h245msg (Incoming H.245 Message)" },
{ 0x002a0004, "H.245/h245ChC (H.245 Channel Closed)" },
{ 0x00450000, "Inactivity Timer H.248.14" },
{ 0x00450001, "it/ito" },
{ 0x00450002, "it/ito" },
{ 0x800a0000, "Nokia Bearer Characteristics Package" },
{0, NULL}
};
@ -988,21 +997,21 @@ static const value_string cmd_type[] = {
{ H248_CMD_ADD_REQ, "addReq"},
{ H248_CMD_MOVE_REQ, "moveReq"},
{ H248_CMD_MOD_REQ, "modReq"},
{ H248_CMD_SUB_REQ, "subReq"},
{ H248_CMD_AUDITCAP_REQ, "auditCapReq"},
{ H248_CMD_AUDITVAL_REQ, "auditValReq"},
{ H248_CMD_SUB_REQ, "subtractReq"},
{ H248_CMD_AUDITCAP_REQ, "auditCapRequest"},
{ H248_CMD_AUDITVAL_REQ, "auditValueRequest"},
{ H248_CMD_NOTIFY_REQ, "notifyReq"},
{ H248_CMD_SVCCHG_REQ, "svcChgReq"},
{ H248_CMD_SVCCHG_REQ, "serviceChangeReq"},
{ H248_CMD_TOPOLOGY_REQ, "topologyReq"},
{ H248_CMD_CTX_ATTR_AUDIT_REQ, "ctxAttrAuditReq"},
{ H248_CMD_ADD_REPLY, "addReply"},
{ H248_CMD_MOVE_REPLY, "moveReply"},
{ H248_CMD_MOD_REPLY, "modReply"},
{ H248_CMD_SUB_REPLY, "subReply"},
{ H248_CMD_SUB_REPLY, "subtractReply"},
{ H248_CMD_AUDITCAP_REPLY, "auditCapReply"},
{ H248_CMD_AUDITVAL_REPLY, "auditValReply"},
{ H248_CMD_NOTIFY_REPLY, "notifyReply"},
{ H248_CMD_SVCCHG_REPLY, "svcChgReply"},
{ H248_CMD_SVCCHG_REPLY, "serviceChangeReply"},
{ H248_CMD_TOPOLOGY_REPLY, "topologyReply"},
{ 0, NULL }
};
@ -1263,10 +1272,12 @@ dissect_h248_EventName(gboolean implicit_tag, tvbuff_t *tvb, int offset, packet_
if (name_major == pkg->id) {
break;
} else {
pkg = NULL;
}
}
if (!pkg->hfid) pkg = &no_package;
if (! pkg ) pkg = &no_package;
curr_info.pkg = pkg;
@ -6342,7 +6353,7 @@ dissect_h248_ServiceChangeReasonStr(gboolean implicit_tag _U_, tvbuff_t *tvb, in
/*--- End of included file: packet-h248-fn.c ---*/
#line 1765 "packet-h248-template.c"
#line 1776 "packet-h248-template.c"
static void
dissect_h248(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
@ -7698,7 +7709,7 @@ void proto_register_h248(void) {
"", HFILL }},
/*--- End of included file: packet-h248-hfarr.c ---*/
#line 1904 "packet-h248-template.c"
#line 1915 "packet-h248-template.c"
{ &hf_h248_ctx, { "Context", "h248.ctx", FT_UINT32, BASE_HEX, NULL, 0, "", HFILL }},
{ &hf_h248_ctx_term, { "Termination", "h248.ctx.term", FT_STRING, BASE_NONE, NULL, 0, "", HFILL }},
@ -7867,7 +7878,7 @@ void proto_register_h248(void) {
&ett_h248_Value,
/*--- End of included file: packet-h248-ettarr.c ---*/
#line 1929 "packet-h248-template.c"
#line 1940 "packet-h248-template.c"
};
module_t *h248_module;

View File

@ -1,6 +1,6 @@
/* Do not modify this file. */
/* It is created automatically by the ASN.1 to Wireshark dissector compiler */
/* ./packet-h248.h */
/* .\packet-h248.h */
/* ../../tools/asn2wrs.py -b -e -p h248 -c h248.cnf -s packet-h248-template h248v3.asn */
/* Input file: packet-h248-template.h */

View File

@ -43,7 +43,7 @@ static int hf_h248_pkg_BCP_BNCChar = -1;
static int ett_h248_pkg_BCP = -1;
static gboolean implicit = TRUE;
static gboolean implicit = FALSE;
static const value_string h248_pkg_BCP_parameters[] = {
{ 0x0001, "BNCChar (BNC Characteristics)" },
@ -67,10 +67,55 @@ static h248_package_t h248_pkg_BCP = {
NULL, /* events */
NULL /* statistics */
};
/* A.6 Generic bearer connection package
Package Name: GB
Package ID: 0x0021
*/
/* A.7 Bearer control tunnelling package */
static dissector_handle_t sdp_dissector = NULL;
static int hf_h248_pkg_bct = -1;
static int hf_h248_pkg_bct_param = -1;
static int hf_h248_pkg_bct_tind = -1;
static gint ett_h248_pkg_bct = -1;
static gint ett_h248_pkg_bct_tind = -1;
static void dissect_bct_tind_bit(proto_tree* tree, tvbuff_t* tvb, packet_info* pinfo, int hfid, h248_curr_info_t* i _U_, void* d _U_) {
tvbuff_t* sdp_tvb;
dissect_ber_octet_string(FALSE, pinfo, tree, tvb, 0, hfid, &sdp_tvb);
if(sdp_tvb)
call_dissector(sdp_dissector,sdp_tvb,pinfo,tree);
}
static h248_pkg_param_t h248_pkg_bct_tind[] = {
{ 0x0001, &hf_h248_pkg_bct_tind, dissect_bct_tind_bit, &implicit },
{ 0, NULL, NULL, NULL}
};
/* Events */
static h248_pkg_evt_t h248_pkg_bct_events[] = {
{ 0x0001, &hf_h248_pkg_bct_tind, &ett_h248_pkg_bct_tind, h248_pkg_bct_tind},
{ 0, NULL, NULL, NULL}
};
/* Packet defenitions */
static h248_package_t h248_pkg_bct = {
0x0022,
&hf_h248_pkg_bct,
&hf_h248_pkg_bct_param,
&ett_h248_pkg_bct,
NULL, /* Properties */
NULL, /* signals */
h248_pkg_bct_events, /* events */
NULL /* statistics */
};
/* A.8 Basic call progress tones generator with directionality */
static int hf_h248_pkg_bcg = -1;
static int hf_h248_pkg_bcg_param = -1;
static int hf_h248_pkg_bcg_sig_bdt_par_btd = -1;
static int hf_h248_pkg_bcg_sig_bdt = -1;
static int hf_h248_pkg_bcg_sig_brt = -1;
@ -117,7 +162,7 @@ static h248_pkg_sig_t h248_pkg_bcg_signals[] = {
static h248_package_t h248_pkg_bcg = {
0x0023,
&hf_h248_pkg_bcg,
NULL,
&hf_h248_pkg_bcg_param,
&ett_h248_pkg_bcg,
NULL, /* Properties */
h248_pkg_bcg_signals, /* signals */
@ -126,43 +171,6 @@ static h248_package_t h248_pkg_bcg = {
};
static dissector_handle_t sdp_dissector = NULL;
static int hf_h248_pkg_bct = -1;
static int hf_h248_pkg_bct_tind = -1;
static gint ett_h248_pkg_bct = -1;
static gint ett_h248_pkg_bct_tind = -1;
static void dissect_bct_tind_bit(proto_tree* tree, tvbuff_t* tvb, packet_info* pinfo, int hfid, h248_curr_info_t* i _U_, void* d _U_) {
tvbuff_t* sdp_tvb;
dissect_ber_octet_string(FALSE, pinfo, tree, tvb, 0, hfid, &sdp_tvb);
call_dissector(sdp_dissector,sdp_tvb,pinfo,tree);
}
static h248_pkg_param_t h248_pkg_bct_tind[] = {
{ 0x0001, &hf_h248_pkg_bct_tind, dissect_bct_tind_bit, NULL },
{ 0, NULL, NULL, NULL}
};
/* Events */
static h248_pkg_evt_t h248_pkg_bct_events[] = {
{ 0x0001, &hf_h248_pkg_bct_tind, &ett_h248_pkg_bct_tind, h248_pkg_bct_tind},
{ 0, NULL, NULL, NULL}
};
/* Packet defenitions */
static h248_package_t h248_pkg_bct = {
0x0022,
&hf_h248_pkg_bct,
NULL,
&ett_h248_pkg_bct,
NULL, /* Properties */
NULL, /* signals */
h248_pkg_bct_events, /* events */
NULL /* statistics */
};
/* Register dissector */
void proto_register_q1950(void) {