Comment # 8
on bug 9217
from Guy Harris
(In reply to comment #7)
> Get rid of the preference for "encapsulated in TCP" vs. "directly captured
> from the line" and, instead, have separate dissectors for those cases...
> You want me to have different dissectors registered separately and both of
> which has its own preferences, header fields, handles etc. Am I right?
No.
I want you to have:
*one* protocol, registered in proto_register_s5066dts();
*two* dissector routines, *both* registered in
proto_reg_handoff_s5066dts(), which *share* preferences and header fields, but
have *different* handles:
void proto_reg_handoff_s5066dts(void)
{
static gint initialized = FALSE;
static dissector_handle_t s5066dts_handle;
static dissector_handle_t s5066dts_over_tcp_handle;
static int currentPort;
if (!initialized) {
s5066dts_handle = create_dissector_handle(dissect_s5066dts,
proto_s5066dts);
dissector_add_uint("wtap_encap", WTAP_ENCAP_STANAG_5066_D_PDU,
s5066dts_handle);
s5066dts_over_tcp_handle =
create_dissector_handle(dissect_s5066dts_tcp, proto_s5066dts);
initialized = TRUE;
}
else {
dissector_delete_uint("tcp.port", currentPort,
s5066dts_over_tcp_handle);
}
currentPort = config_s5066dts_port;
dissector_add_uint("tcp.port", currentPort, s5066dts_over_tcp_handle);
}
You are receiving this mail because:
- You are watching all bug changes.