Get rid of ber_last_created_item().

svn path=/trunk/; revision=24009
This commit is contained in:
Anders Broman 2008-01-04 12:53:29 +00:00
parent a6d82ae12e
commit bf7150a834
5 changed files with 29 additions and 29 deletions

View File

@ -579,13 +579,13 @@ extern void h248_param_PkgdName(proto_tree* tree, tvbuff_t* tvb, packet_info* pi
name_minor=tvb_get_ntohs(new_tvb, 2);
/* do the prettification */
proto_item_append_text(ber_last_created_item, " %s (%04x)", val_to_str(name_major, package_name_vals, "Unknown Package"), name_major);
proto_item_append_text(asn1_ctx.created_item, " %s (%04x)", val_to_str(name_major, package_name_vals, "Unknown Package"), name_major);
if(tree){
proto_item* pi;
const gchar* strval;
package_tree = proto_item_add_subtree(ber_last_created_item, ett_packagename);
package_tree = proto_item_add_subtree(asn1_ctx.created_item, ett_packagename);
proto_tree_add_uint(package_tree, hf_h248_pkg_name, tvb, offset-4, 2, name_major);
for(i=0; i < packages->len; i++) {
@ -731,10 +731,10 @@ static int dissect_h248_PkgdName(gboolean implicit_tag, tvbuff_t *tvb, int offse
packageandid=(name_major<<16)|name_minor;
/* do the prettification */
proto_item_append_text(ber_last_created_item, " %s (%04x)", val_to_str(name_major, package_name_vals, "Unknown Package"), name_major);
proto_item_append_text(actx->created_item, " %s (%04x)", val_to_str(name_major, package_name_vals, "Unknown Package"), name_major);
if(tree){
package_tree = proto_item_add_subtree(ber_last_created_item, ett_packagename);
package_tree = proto_item_add_subtree(actx->created_item, ett_packagename);
proto_tree_add_uint(package_tree, hf_h248_pkg_name, tvb, offset-4, 2, name_major);
}
@ -790,9 +790,9 @@ static int dissect_h248_EventName(gboolean implicit_tag, tvbuff_t *tvb, int offs
packageandid=(name_major<<16)|name_minor;
/* do the prettification */
proto_item_append_text(ber_last_created_item, " %s (%04x)", val_to_str(name_major, package_name_vals, "Unknown Package"), name_major);
proto_item_append_text(actx->created_item, " %s (%04x)", val_to_str(name_major, package_name_vals, "Unknown Package"), name_major);
if(tree){
package_tree = proto_item_add_subtree(ber_last_created_item, ett_packagename);
package_tree = proto_item_add_subtree(actx->created_item, ett_packagename);
}
proto_tree_add_uint(package_tree, hf_h248_pkg_name, tvb, offset-4, 2, name_major);
@ -867,9 +867,9 @@ static int dissect_h248_SignalName(gboolean implicit_tag , tvbuff_t *tvb, int of
packageandid=(name_major<<16)|name_minor;
/* do the prettification */
proto_item_append_text(ber_last_created_item, " %s (%04x)", val_to_str(name_major, package_name_vals, "Unknown Package"), name_major);
proto_item_append_text(actx->created_item, " %s (%04x)", val_to_str(name_major, package_name_vals, "Unknown Package"), name_major);
if(tree){
package_tree = proto_item_add_subtree(ber_last_created_item, ett_packagename);
package_tree = proto_item_add_subtree(actx->created_item, ett_packagename);
}
proto_tree_add_uint(package_tree, hf_h248_pkg_name, tvb, offset-4, 2, name_major);
@ -980,7 +980,7 @@ static int dissect_h248_SigParameterName(gboolean implicit_tag _U_, tvbuff_t *tv
proto_item* pi;
offset = dissect_ber_octet_string(implicit_tag, actx, tree, tvb, offset, hf_index, &next_tvb);
pi = get_ber_last_created_item();
pi = actx->created_item;
switch(tvb_length(next_tvb)) {
case 4: param_id = tvb_get_ntohl(next_tvb,0); break;
@ -1049,7 +1049,7 @@ static int dissect_h248_EventParameterName(gboolean implicit_tag _U_, tvbuff_t *
proto_item* pi;
offset = dissect_ber_octet_string(implicit_tag, actx, tree, tvb, offset, hf_index, &next_tvb);
pi = get_ber_last_created_item();
pi = actx->created_item;
if (next_tvb) {
switch(tvb_length(next_tvb)) {
@ -1134,9 +1134,9 @@ static int dissect_h248_MtpAddress(gboolean implicit_tag, tvbuff_t *tvb, int off
}
/* do the prettification */
proto_item_append_text(ber_last_created_item, " NI = %d, PC = %d ( %d-%d )", val&0x03,val>>2,val&0x03,val>>2);
proto_item_append_text(actx->created_item, " NI = %d, PC = %d ( %d-%d )", val&0x03,val>>2,val&0x03,val>>2);
if(tree){
mtp_tree = proto_item_add_subtree(ber_last_created_item, ett_mtpaddress);
mtp_tree = proto_item_add_subtree(actx->created_item, ett_mtpaddress);
}
proto_tree_add_uint(mtp_tree, hf_h248_mtpaddress_ni, tvb, old_offset, offset-old_offset, val&0x03);
proto_tree_add_uint(mtp_tree, hf_h248_mtpaddress_pc, tvb, old_offset, offset-old_offset, val>>2);

View File

@ -1,7 +1,7 @@
/* Do not modify this file. */
/* It is created automatically by the ASN.1 to Wireshark dissector compiler */
/* packet-h248.c */
/* ../../tools/asn2wrs.py -b -X -T -p h248 -c h248.cnf -s packet-h248-template h248v3.asn */
/* ../../tools/asn2wrs.py -b -p h248 -c h248.cnf -s packet-h248-template h248v3.asn */
/* Input file: packet-h248-template.c */
@ -1039,13 +1039,13 @@ extern void h248_param_PkgdName(proto_tree* tree, tvbuff_t* tvb, packet_info* pi
name_minor=tvb_get_ntohs(new_tvb, 2);
/* do the prettification */
proto_item_append_text(ber_last_created_item, " %s (%04x)", val_to_str(name_major, package_name_vals, "Unknown Package"), name_major);
proto_item_append_text(asn1_ctx.created_item, " %s (%04x)", val_to_str(name_major, package_name_vals, "Unknown Package"), name_major);
if(tree){
proto_item* pi;
const gchar* strval;
package_tree = proto_item_add_subtree(ber_last_created_item, ett_packagename);
package_tree = proto_item_add_subtree(asn1_ctx.created_item, ett_packagename);
proto_tree_add_uint(package_tree, hf_h248_pkg_name, tvb, offset-4, 2, name_major);
for(i=0; i < packages->len; i++) {
@ -1191,10 +1191,10 @@ static int dissect_h248_PkgdName(gboolean implicit_tag, tvbuff_t *tvb, int offse
packageandid=(name_major<<16)|name_minor;
/* do the prettification */
proto_item_append_text(ber_last_created_item, " %s (%04x)", val_to_str(name_major, package_name_vals, "Unknown Package"), name_major);
proto_item_append_text(actx->created_item, " %s (%04x)", val_to_str(name_major, package_name_vals, "Unknown Package"), name_major);
if(tree){
package_tree = proto_item_add_subtree(ber_last_created_item, ett_packagename);
package_tree = proto_item_add_subtree(actx->created_item, ett_packagename);
proto_tree_add_uint(package_tree, hf_h248_pkg_name, tvb, offset-4, 2, name_major);
}
@ -1250,9 +1250,9 @@ static int dissect_h248_EventName(gboolean implicit_tag, tvbuff_t *tvb, int offs
packageandid=(name_major<<16)|name_minor;
/* do the prettification */
proto_item_append_text(ber_last_created_item, " %s (%04x)", val_to_str(name_major, package_name_vals, "Unknown Package"), name_major);
proto_item_append_text(actx->created_item, " %s (%04x)", val_to_str(name_major, package_name_vals, "Unknown Package"), name_major);
if(tree){
package_tree = proto_item_add_subtree(ber_last_created_item, ett_packagename);
package_tree = proto_item_add_subtree(actx->created_item, ett_packagename);
}
proto_tree_add_uint(package_tree, hf_h248_pkg_name, tvb, offset-4, 2, name_major);
@ -1327,9 +1327,9 @@ static int dissect_h248_SignalName(gboolean implicit_tag , tvbuff_t *tvb, int of
packageandid=(name_major<<16)|name_minor;
/* do the prettification */
proto_item_append_text(ber_last_created_item, " %s (%04x)", val_to_str(name_major, package_name_vals, "Unknown Package"), name_major);
proto_item_append_text(actx->created_item, " %s (%04x)", val_to_str(name_major, package_name_vals, "Unknown Package"), name_major);
if(tree){
package_tree = proto_item_add_subtree(ber_last_created_item, ett_packagename);
package_tree = proto_item_add_subtree(actx->created_item, ett_packagename);
}
proto_tree_add_uint(package_tree, hf_h248_pkg_name, tvb, offset-4, 2, name_major);
@ -1440,7 +1440,7 @@ static int dissect_h248_SigParameterName(gboolean implicit_tag _U_, tvbuff_t *tv
proto_item* pi;
offset = dissect_ber_octet_string(implicit_tag, actx, tree, tvb, offset, hf_index, &next_tvb);
pi = get_ber_last_created_item();
pi = actx->created_item;
switch(tvb_length(next_tvb)) {
case 4: param_id = tvb_get_ntohl(next_tvb,0); break;
@ -1509,7 +1509,7 @@ static int dissect_h248_EventParameterName(gboolean implicit_tag _U_, tvbuff_t *
proto_item* pi;
offset = dissect_ber_octet_string(implicit_tag, actx, tree, tvb, offset, hf_index, &next_tvb);
pi = get_ber_last_created_item();
pi = actx->created_item;
if (next_tvb) {
switch(tvb_length(next_tvb)) {
@ -1594,9 +1594,9 @@ static int dissect_h248_MtpAddress(gboolean implicit_tag, tvbuff_t *tvb, int off
}
/* do the prettification */
proto_item_append_text(ber_last_created_item, " NI = %d, PC = %d ( %d-%d )", val&0x03,val>>2,val&0x03,val>>2);
proto_item_append_text(actx->created_item, " NI = %d, PC = %d ( %d-%d )", val&0x03,val>>2,val&0x03,val>>2);
if(tree){
mtp_tree = proto_item_add_subtree(ber_last_created_item, ett_mtpaddress);
mtp_tree = proto_item_add_subtree(actx->created_item, ett_mtpaddress);
}
proto_tree_add_uint(mtp_tree, hf_h248_mtpaddress_ni, tvb, old_offset, offset-old_offset, val&0x03);
proto_tree_add_uint(mtp_tree, hf_h248_mtpaddress_pc, tvb, old_offset, offset-old_offset, val>>2);

View File

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

View File

@ -295,7 +295,7 @@ static void dissect_3GTFO_codec_mode(proto_tree* tree, tvbuff_t* tvb, packet_inf
dissect_ber_octet_string(FALSE, &asn1_ctx, tree, tvb, 0, hfid, &sub_tvb );
if (sub_tvb) {
proto_tree* pt = proto_item_add_subtree(get_ber_last_created_item(),ett_h248_3GTFO_codec);
proto_tree* pt = proto_item_add_subtree(asn1_ctx.created_item, ett_h248_3GTFO_codec);
dissect_codec_mode(pt, sub_tvb, 0, tvb_length(tvb));
}
} else {
@ -319,7 +319,7 @@ static void dissect_3GTFO_codec_list(proto_tree* tree, tvbuff_t* tvb, packet_inf
dissect_ber_octet_string(FALSE, &asn1_ctx, tree, tvb, 0, hfid, &sub_tvb );
if (sub_tvb) {
proto_tree* pt = proto_item_add_subtree(get_ber_last_created_item(),ett_h248_3GTFO_codec_list);
proto_tree* pt = proto_item_add_subtree(asn1_ctx.created_item,ett_h248_3GTFO_codec_list);
int len = tvb_length(sub_tvb);
int offset = 0;
do {

View File

@ -742,7 +742,7 @@ static void dissect_h248_annexc_acodec(proto_tree* tree,
asn1_ctx_init(&asn1_ctx, ASN1_ENC_BER, TRUE, pinfo);
dissect_ber_octet_string(implicit_p ? *((gboolean*)implicit_p) : FALSE, &asn1_ctx, tree, tvb, 0, hfid, &new_tvb);
tree = proto_item_add_subtree(get_ber_last_created_item(),ett_codec);
tree = proto_item_add_subtree(asn1_ctx.created_item,ett_codec);
len = tvb_length(new_tvb);
dissect_codec_mode(tree,new_tvb,0,len);
}