When doing the
WBXML dissector, I'm using a defined dissector table in WSP (the lower-layer
protocol), and then I register the WBXML dissector for specific content types
(wsp.content_type.type is used, it is defined as a "port" in regular dissector
tables).
In
packet-wsp.c:
void
proto_register_wsp(void)
{
proto_register_wsp(void)
{
[ . . .
]
wsp_dissector_table =
register_dissector_table("wsp.content_type.type",
"WSP content type", FT_UINT8, BASE_HEX);
"WSP content type", FT_UINT8, BASE_HEX);
}
In
packet-wbxml.c:
void
proto_reg_handoff_wbxml(void)
{
dissector_handle_t wbxml_handle;
proto_reg_handoff_wbxml(void)
{
dissector_handle_t wbxml_handle;
wbxml_handle =
create_dissector_handle(dissect_wbxml, proto_wbxml);
/* application/vnd.wap.wmlc
*/
dissector_add("wsp.content_type.type", 0x14, wbxml_handle);
/* application/vnd.wap.wta-eventc */
dissector_add("wsp.content_type.type", 0x16, wbxml_handle);
dissector_add("wsp.content_type.type", 0x14, wbxml_handle);
/* application/vnd.wap.wta-eventc */
dissector_add("wsp.content_type.type", 0x16, wbxml_handle);
[ . . .
]
}
-----Original Message-----
From: Giles Scott [mailto:[EMAIL PROTECTED]
Sent: maandag 17 februari 2003 16:09
To: [EMAIL PROTECTED]
Subject: [Ethereal-dev] advice?Hi
I'm writing a dissector which shares a port with another dissector.
I'm looking for the best way for the two dissectors to co-exist.
The 'new' protocol is on tcp port 80 which obviously shares with HTTP.
Any advice?
Cheers
Giles Scott