Hi!
From Jason House: The other way involves populating the pri paramater from the protocol you are trying to tap. ... having a structure that you define a field for what you want to access, and then having that field sent directly to your tap listener. The packet-rpc* should be a good example of that.
1. Is it allowable ("smart" would be better) to change the packet-rtp.c in a way, that when calling tap_queue_packet(rtp_tap, pinfo, *pri) the pri is a structure with information I need (seq.nr, timestemp, ssrc, data,...). That seems to me much faster than doing all the "...g_node_first_child(edt->tree), "g_node_next_sibling(),... " stuff.
2.my code looks something like:
...
rtp_packet(void *prs, packet_info *pinfo, epan_dissect_t *edt _U_, void *pri)
{
printf("in rtp packet\n");
}void gtk_rtp_init(void)
{
if(register_tap_listener("rtp", NULL, NULL, rtp_reset, rtp_packet, rtp_draw)){
printf("ethereal: rtp_init() failed to attach to tap.\n");
exit(1);
}
}void rtp_analyse_cb(GtkWidget *w _U_) {
gtk_rtp_init();
}void
register_tap_listener_gtkrtp(void)
{
register_ethereal_tap("rtp", gtk_rtp_init, NULL, NULL);
}Thanks for further help, Miha.
Powered by MHonArc 2.6.10