Wireshark  4.3.0
The Wireshark network protocol analyzer
packet-raknet.h
1 /* packet-raknet.h
2  *
3  * Wireshark - Network traffic analyzer
4  * By Gerald Combs <gerald@wireshark.org>
5  * Copyright 1998 Gerald Combs
6  *
7  * SPDX-License-Identifier: GPL-2.0-or-later
8  */
9 
10 #ifndef __PACKET_RAKNET_H__
11 #define __PACKET_RAKNET_H__
12 
13 #include <epan/packet.h>
14 #include "ws_symbol_export.h"
15 
16 /*
17  * Different protocols (i.e. games) use different set of message IDs,
18  * and we can't infer protocols from message ID because there is no
19  * central registry. So the only thing we can do is to use port number
20  * or heuristics to determine the protocol.
21  *
22  * If your protocol has a fixed port number, you can register it with
23  * this function. The registered dissector will be called with a tvb
24  * buffer which contains a RakNet message including message ID at its
25  * first octet. Header analysis, packet reassembly, and RakNet system
26  * messages are all handled by the RakNet dissector so you don't need
27  * to worry about them.
28  */
29 WS_DLL_PUBLIC
30 void
31 raknet_add_udp_dissector(guint32 port, const dissector_handle_t handle);
32 
33 /*
34  * Opposite of "raknet_add_udp_dissector()".
35  */
36 WS_DLL_PUBLIC
37 void
38 raknet_delete_udp_dissector(guint32 port, const dissector_handle_t handle);
39 
40 /*
41  * You can also register a heuristic dissector for your protocol with
42  * the standard "heur_dissector_add()" function with parent protocol
43  * "raknet". Protocols with no fixed port are especially encouraged to
44  * do so. Once your heuristic dissector finds that the protocol of the
45  * conversation is indeed yours, call this function to skip further
46  * heuristics. DO NOT USE the standard "conversation_set_dissector()".
47  */
48 WS_DLL_PUBLIC
49 void
50 raknet_conversation_set_dissector(packet_info *pinfo, const dissector_handle_t handle);
51 
52 #endif /* __PACKET_RAKNET_H__ */
Definition: packet_info.h:44
Definition: packet.c:763