diff options
author | Bill Meier <wmeier@newsguy.com> | 2014-10-14 21:12:13 -0400 |
---|---|---|
committer | Bill Meier <wmeier@newsguy.com> | 2014-10-15 01:29:09 +0000 |
commit | 6206fa5a191ec67354648d6f3d8b6abd9c34519d (patch) | |
tree | 7da73eead60966b0298c10db729090c946280c63 /epan/dissectors | |
parent | 60e738cd2036af7c8f3654a44b7b6648360f1671 (diff) |
raknet: fix two checkfiltername errors; mcpe,raknet: minor cleanup;
Change-Id: Ieac370d232c6349f7acc45f4817637a80915e315
Reviewed-on: https://code.wireshark.org/review/4695
Reviewed-by: Bill Meier <wmeier@newsguy.com>
Diffstat (limited to 'epan/dissectors')
-rw-r--r-- | epan/dissectors/packet-mcpe.c | 16 | ||||
-rw-r--r-- | epan/dissectors/packet-raknet.c | 21 |
2 files changed, 20 insertions, 17 deletions
diff --git a/epan/dissectors/packet-mcpe.c b/epan/dissectors/packet-mcpe.c index 495f529877..e3f15414e2 100644 --- a/epan/dissectors/packet-mcpe.c +++ b/epan/dissectors/packet-mcpe.c @@ -36,7 +36,6 @@ static guint mcpe_udp_port_requested = MCPE_UDP_PORT_DEFAULT; static int proto_mcpe = -1; static gint ett_mcpe = -1; /* Should this node be expanded */ -static dissector_handle_t raknet_dissector = NULL; /* @@ -332,8 +331,8 @@ proto_register_mcpe(void) */ proto_mcpe = proto_register_protocol ( "Minecraft Pocket Edition", /* name */ - "MCPE", /* short name */ - "mcpe" /* abbrev */ + "MCPE", /* short name */ + "mcpe" /* abbrev */ ); /* @@ -354,7 +353,7 @@ proto_register_mcpe(void) void proto_reg_handoff_mcpe(void) { - dissector_handle_t mcpe_gen_handle; + static dissector_handle_t raknet_dissector = NULL; static guint last_server_port; static gboolean init_done = FALSE; @@ -367,6 +366,8 @@ proto_reg_handoff_mcpe(void) /* * First time, create dissector handle, and find raknet dissector. */ + dissector_handle_t mcpe_gen_handle; + init_done = TRUE; raknet_dissector = find_dissector("raknet"); @@ -388,15 +389,16 @@ proto_reg_handoff_mcpe(void) /* MCPE is the protocol that carries RakNet packets over UDP */ dissector_add_uint("udp.port", mcpe_udp_port_requested, raknet_dissector); } + /* - * Editor modelines + * Editor modelines - http://www.wireshark.org/tools/modelines.html * - * Local Variables: + * Local variables: * c-basic-offset: 4 * tab-width: 8 * indent-tabs-mode: nil * End: * - * ex: set shiftwidth=4 tabstop=8 expandtab: + * vi: set shiftwidth=4 tabstop=8 expandtab: * :indentSize=4:tabSize=8:noTabs=true: */ diff --git a/epan/dissectors/packet-raknet.c b/epan/dissectors/packet-raknet.c index c5e2b8d008..1924d53af6 100644 --- a/epan/dissectors/packet-raknet.c +++ b/epan/dissectors/packet-raknet.c @@ -75,7 +75,7 @@ static int hf_raknet_0x1C_server_id_str = -1; */ void proto_register_raknet(void); void proto_reg_handoff_raknet(void); -static proto_tree* init_raknet(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, gint *offset); +static proto_tree *init_raknet(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, gint *offset); struct raknet_handler_entry { @@ -472,7 +472,7 @@ init_raknet(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, gint *offset) * RakNet is just a dissector. It is invoked by protocols whose applications * are built using the RakNet libs. */ -void +static void dissect_raknet(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) { guint8 packet_id; @@ -530,7 +530,7 @@ proto_register_raknet(void) NULL, HFILL } }, { &hf_raknet_general_raknet_proto_ver, - { "RAKNET RakNet protocol version", "raknet.raknet_proto_ver", + { "RAKNET RakNet protocol version", "raknet.proto_ver", FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL } @@ -557,7 +557,7 @@ proto_register_raknet(void) * Packet ID 0x05 */ { &hf_raknet_0x05_null_padding, - { "RAKNET Null padding", "raknet.raknet_proto_ver", + { "RAKNET Null padding", "raknet.null_padding", FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL } @@ -613,7 +613,7 @@ proto_register_raknet(void) EXPFILL } } }; - expert_module_t* expert_raknet; + expert_module_t *expert_raknet; /* * Init data structs. @@ -631,8 +631,8 @@ proto_register_raknet(void) */ proto_raknet = proto_register_protocol ( "RAKNET game libs", /* name */ - "RAKNET", /* short name */ - "raknet" /* abbrev */ + "RAKNET", /* short name */ + "raknet" /* abbrev */ ); /* @@ -664,15 +664,16 @@ proto_reg_handoff_raknet(void) raknet_handle_tmp); } } + /* - * Editor modelines + * Editor modelines - http://www.wireshark.org/tools/modelines.html * - * Local Variables: + * Local variables: * c-basic-offset: 4 * tab-width: 8 * indent-tabs-mode: nil * End: * - * ex: set shiftwidth=4 tabstop=8 expandtab: + * vi: set shiftwidth=4 tabstop=8 expandtab: * :indentSize=4:tabSize=8:noTabs=true: */ |