Wireshark mailing list archives
Re: Dissector Development; _init function for inizilizing GHashTable
From: Pascal Quantin <pascal.quantin () gmail com>
Date: Mon, 26 Jan 2015 11:27:31 +0100
2015-01-26 8:58 GMT+01:00 leonardocito () libero it <leonardocito () libero it>:
I am working on the FTP dissector at the moment. I have introduced a GHashTable for the purpose of storing seq and lastackseq numbers and pinfo data. I have introduced a static void ftp_init(void) function in the same fashion as in other protocols - ie. packet-acse.c - in which I call g_hash_table_new. The relevant hashtble_oid_hash and hashtble_oid_equal are not called, presumably because they are not registered by the g_hash_table_new function. My debugger indicates note of these funcion code is reachable. What do I need to fix this?
Hi, did you register the init function with a line register_init_routine(ftp_init); in proto_register_ftp() function? You took as example some dead code (as seen with the #if NOT NEEDED compilation flag in packet-acse.c) which is not the best reference :) Regards, Pascal.
___________________________________________________________________________ Sent via: Wireshark-dev mailing list <wireshark-dev () wireshark org> Archives: http://www.wireshark.org/lists/wireshark-dev Unsubscribe: https://wireshark.org/mailman/options/wireshark-dev mailto:wireshark-dev-request () wireshark org?subject=unsubscribe
Current thread:
- Dissector Development; _init function for inizilizing GHashTable leonardocito () libero it (Jan 25)
- Re: Dissector Development; _init function for inizilizing GHashTable Pascal Quantin (Jan 26)