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>
This commit is contained in:
Bill Meier 2014-10-14 21:12:13 -04:00
parent 60e738cd20
commit 6206fa5a19
2 changed files with 20 additions and 17 deletions

View File

@ -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:
*/

View File

@ -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:
*/