|
Hi , I want to include some RANAP ( asn.1 format) messages in my
dissector. I have seen the way H245 messages are included in MEGACO. On
similar lines, I have written the following code: dissect_xxx_reset(tvbuff_t *tvb,int offset ,proto_tree *xxx_tree,packet_info
*pinfo) { guint8 *buf = ep_alloc(10240); tvbuff_t *ranap_tvb; int i = 0; asn1_ctx_t actx; offset = add_IE_indicator(tvb, offset, xxx_tree); /* To add
IE Indicator */ offset = add_IE_length(tvb, offset, xxx_tree);
/* To add IE length */ ranap_tvb = tvb_new_real_data(buf,i,i); tvb_set_child_real_data_tvbuff(tvb,ranap_tvb); add_new_data_source(pinfo, ranap_tvb, "RANAP OVER XXX"); asn1_ctx_init(&actx, ASN1_ENC_PER, TRUE, pinfo); offset = dissect_ranap_Reset(tvb, offset, &actx, xxx_tree,
hf_xxx_ranap_reset); ………… ……… } But I am not getting any display of RANAP messages. On the contrary, if I do not use the functions tvb_set_child_real_data_tvbuff,
add_new_data_source, I am getting partial display of the RANAP message. I could not completely understand the way it is implemented
inn MEGACO. 1. The purpose of the functions tvb_set_child_real_data_tvbuff
and add_new_data_source. 2. The values to be passed to the function tvb_new_real_data.
I have initialised with zero, but its not working out. So can somebody help me on the above mentioned functions and
how should I go about implementation. Regards, Tarani
|