forked from osmocom/wireshark
"new" dissector API -> dissector API for docs/examples
Change-Id: If862aadbd483933782d5979a3c0be2cb3c08a480 Reviewed-on: https://code.wireshark.org/review/12481 Reviewed-by: Michael Mann <mmann78@netscape.net>
This commit is contained in:
parent
a391a70b3b
commit
12f6311b20
|
@ -3037,11 +3037,11 @@ example, stolen from packet-dns.c:
|
|||
dissector_handle_t dns_tcp_handle;
|
||||
dissector_handle_t mdns_udp_handle;
|
||||
|
||||
dns_udp_handle = new_create_dissector_handle(dissect_dns_udp,
|
||||
dns_udp_handle = create_dissector_handle(dissect_dns_udp,
|
||||
proto_dns);
|
||||
dns_tcp_handle = new_create_dissector_handle(dissect_dns_tcp,
|
||||
dns_tcp_handle = create_dissector_handle(dissect_dns_tcp,
|
||||
proto_dns);
|
||||
mdns_udp_handle = new_create_dissector_handle(dissect_mdns_udp,
|
||||
mdns_udp_handle = create_dissector_handle(dissect_mdns_udp,
|
||||
proto_dns);
|
||||
|
||||
dissector_add_uint("udp.port", UDP_PORT_DNS, dns_udp_handle);
|
||||
|
@ -3192,8 +3192,8 @@ example using UDP and TCP dissection, stolen from packet-dnp.c:
|
|||
dissector_handle_t dnp3_tcp_handle;
|
||||
dissector_handle_t dnp3_udp_handle;
|
||||
|
||||
dnp3_tcp_handle = new_create_dissector_handle(dissect_dnp3_tcp, proto_dnp3);
|
||||
dnp3_udp_handle = new_create_dissector_handle(dissect_dnp3_udp, proto_dnp3);
|
||||
dnp3_tcp_handle = create_dissector_handle(dissect_dnp3_tcp, proto_dnp3);
|
||||
dnp3_udp_handle = create_dissector_handle(dissect_dnp3_udp, proto_dnp3);
|
||||
|
||||
dissector_add_uint("tcp.port", TCP_PORT_DNP, dnp3_tcp_handle);
|
||||
dissector_add_uint("udp.port", UDP_PORT_DNP, dnp3_udp_handle);
|
||||
|
|
|
@ -210,9 +210,9 @@ dissect_PROTOABBREV_heur_udp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree
|
|||
void
|
||||
proto_reg_handoff_PROTOABBREV(void)
|
||||
{
|
||||
PROTOABBREV_tcp_handle = new_create_dissector_handle(dissect_PROTOABBREV_tcp,
|
||||
PROTOABBREV_tcp_handle = create_dissector_handle(dissect_PROTOABBREV_tcp,
|
||||
proto_PROTOABBREV);
|
||||
PROTOABBREV_pdu_handle = new_create_dissector_handle(dissect_PROTOABBREV_pdu,
|
||||
PROTOABBREV_pdu_handle = create_dissector_handle(dissect_PROTOABBREV_pdu,
|
||||
proto_PROTOABBREV);
|
||||
|
||||
/* register as heuristic dissector for both TCP and UDP */
|
||||
|
|
|
@ -301,11 +301,11 @@ proto_reg_handoff_PROTOABBREV(void)
|
|||
static int current_port;
|
||||
|
||||
if (!initialized) {
|
||||
/* Use new_create_dissector_handle() to indicate that
|
||||
/* Use create_dissector_handle() to indicate that
|
||||
* dissect_PROTOABBREV() returns the number of bytes it dissected (or 0
|
||||
* if it thinks the packet does not belong to PROTONAME).
|
||||
*/
|
||||
PROTOABBREV_handle = new_create_dissector_handle(dissect_PROTOABBREV,
|
||||
PROTOABBREV_handle = create_dissector_handle(dissect_PROTOABBREV,
|
||||
proto_PROTOABBREV);
|
||||
initialized = TRUE;
|
||||
|
||||
|
@ -336,11 +336,11 @@ proto_reg_handoff_PROTOABBREV(void)
|
|||
{
|
||||
dissector_handle_t PROTOABBREV_handle;
|
||||
|
||||
/* Use new_create_dissector_handle() to indicate that dissect_PROTOABBREV()
|
||||
/* Use create_dissector_handle() to indicate that dissect_PROTOABBREV()
|
||||
* returns the number of bytes it dissected (or 0 if it thinks the packet
|
||||
* does not belong to PROTONAME).
|
||||
*/
|
||||
PROTOABBREV_handle = new_create_dissector_handle(dissect_PROTOABBREV,
|
||||
PROTOABBREV_handle = create_dissector_handle(dissect_PROTOABBREV,
|
||||
proto_PROTOABBREV);
|
||||
dissector_add_uint("tcp.port", PROTOABBREV_TCP_PORT, PROTOABBREV_handle);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue