aboutsummaryrefslogtreecommitdiffstats
path: root/epan
diff options
context:
space:
mode:
authorChris Maynard <Christopher.Maynard@GTECH.COM>2013-12-09 21:33:54 +0000
committerChris Maynard <Christopher.Maynard@GTECH.COM>2013-12-09 21:33:54 +0000
commite3c369eb6786e8f17e3e8ce6da027012511566b8 (patch)
tree43baf541d943dd315366a229d03478466b60b4e6 /epan
parentaba06b568d02eb70286c5ae01dd4e15f9c4880f6 (diff)
Minor whitespace changes and to keep the GNU-syle indentation scheme consistent.
svn path=/trunk/; revision=53894
Diffstat (limited to 'epan')
-rw-r--r--epan/dissectors/packet-ziop.c50
1 files changed, 24 insertions, 26 deletions
diff --git a/epan/dissectors/packet-ziop.c b/epan/dissectors/packet-ziop.c
index 6a0ae1a81f..b4b2d75db9 100644
--- a/epan/dissectors/packet-ziop.c
+++ b/epan/dissectors/packet-ziop.c
@@ -213,16 +213,17 @@ get_ziop_pdu_len(packet_info *pinfo _U_, tvbuff_t *tvb, int offset)
}
static int
-dissect_ziop_tcp (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree, void* data) {
-
- if ( tvb_memeql(tvb, 0, ZIOP_MAGIC ,4) != 0) {
-
- if (tvb_get_ntohl(tvb, 0) == GIOP_MAGIC_NUMBER) {
- dissect_giop(tvb, pinfo, tree);
- return tvb_length(tvb);
- }
+dissect_ziop_tcp (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree, void* data)
+{
+ if ( tvb_memeql(tvb, 0, ZIOP_MAGIC, 4) != 0)
+ {
+ if (tvb_get_ntohl(tvb, 0) == GIOP_MAGIC_NUMBER)
+ {
+ dissect_giop(tvb, pinfo, tree);
+ return tvb_length(tvb);
+ }
return 0;
- }
+ }
tcp_dissect_pdus(tvb, pinfo, tree, ziop_desegment, ZIOP_HEADER_SIZE,
get_ziop_pdu_len, dissect_ziop, data);
@@ -231,26 +232,25 @@ dissect_ziop_tcp (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree, void*
gboolean
-dissect_ziop_heur (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree, void * data) {
-
+dissect_ziop_heur (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree, void * data)
+{
guint tot_len;
conversation_t *conversation;
/* check magic number and version */
-
tot_len = tvb_length(tvb);
-
if (tot_len < ZIOP_HEADER_SIZE) /* tot_len < 12 */
{
/* Not enough data captured to hold the ZIOP header; don't try
to interpret it as GIOP. */
return FALSE;
}
- if ( tvb_memeql(tvb, 0, ZIOP_MAGIC, 4) != 0) {
- return FALSE;
- }
+ if ( tvb_memeql(tvb, 0, ZIOP_MAGIC, 4) != 0)
+ {
+ return FALSE;
+ }
if ( pinfo->ptype == PT_TCP )
{
@@ -275,12 +275,11 @@ dissect_ziop_heur (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree, void
dissect_ziop (tvb, pinfo, tree, data);
}
return TRUE;
-
}
-void proto_register_ziop (void) {
-
-
+void
+proto_register_ziop (void)
+{
/* A header field is something you can search/filter on.
*
* We create a structure to register our fields. It consists of an
@@ -311,12 +310,11 @@ void proto_register_ziop (void) {
"ZIOPHeader compressor_id", HFILL }},
{ &hf_ziop_original_length,
{ "Header original length", "ziop.original_length", FT_UINT32, BASE_DEC, NULL, 0x0,
- "ZIOP original_length", HFILL }},
+ "ZIOP original_length", HFILL }}
};
-
static gint *ett[] = {
- &ett_ziop,
+ &ett_ziop
};
proto_ziop = proto_register_protocol("Zipped Inter-ORB Protocol", "ZIOP",
@@ -325,12 +323,12 @@ void proto_register_ziop (void) {
proto_register_subtree_array (ett, array_length (ett));
new_register_dissector("ziop", dissect_ziop, proto_ziop);
-
}
-void proto_reg_handoff_ziop (void) {
-
+void
+proto_reg_handoff_ziop (void)
+{
ziop_tcp_handle = new_create_dissector_handle(dissect_ziop_tcp, proto_ziop);
dissector_add_handle("udp.port", ziop_tcp_handle); /* For 'Decode As' */