diff options
author | Bill Meier <wmeier@newsguy.com> | 2010-03-16 01:07:42 +0000 |
---|---|---|
committer | Bill Meier <wmeier@newsguy.com> | 2010-03-16 01:07:42 +0000 |
commit | f12c3e59ff19923ebd1246162e5066f9c4480656 (patch) | |
tree | 0e0d78d9e076241916b5f28e46576bb9cefc5ac4 | |
parent | 1f1a9ef2cc7f78d766c505ee9565c45888d1adb0 (diff) |
A few minor changes:
- Move proto_reg_handoff... to the end of the file;
- Remove unneeded forward declaration;
- Fix a typo;
- Use #if 0/#endif rather than /*...*/to comment-out code.
svn path=/trunk/; revision=32200
-rw-r--r-- | epan/dissectors/packet-gvcp.c | 29 |
1 files changed, 15 insertions, 14 deletions
diff --git a/epan/dissectors/packet-gvcp.c b/epan/dissectors/packet-gvcp.c index 49bee4f886..441c32ab16 100644 --- a/epan/dissectors/packet-gvcp.c +++ b/epan/dissectors/packet-gvcp.c @@ -40,7 +40,7 @@ * TODO: * - fill holes (missing opcodes / field meanings / ...) * - conversation level: - * . validity of anwers (is CMD packet propoerly ACK'ed by follow-up packet?) + * . validity of anwers (is CMD packet properly ACK'ed by follow-up packet?) * . reassemble, unzip, store and parse XML file, so that addresses * may be translated back into register names * @@ -51,8 +51,6 @@ #include <epan/packet.h> -void proto_reg_handoff_gvcp(void); - #define GVCP_PORT 3956 static int proto_gvcp = -1; @@ -131,8 +129,10 @@ dissect_gvcp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) /* packets from the camera GVCP_PORT to the PC seem to start with 0x0000, but can be different on error condition (e.g. 0x8005) */ - /* if ( pinfo->srcport == GVCP_PORT && tvb_get_ntohs(tvb, 0) != 0x0 ) - return 0; */ +#if 0 + if ( pinfo->srcport == GVCP_PORT && tvb_get_ntohs(tvb, 0) != 0x0 ) + return 0; +#endif col_set_str(pinfo->cinfo, COL_PROTOCOL, "GVCP"); /* Clear out stuff in the info column */ @@ -339,15 +339,6 @@ dissect_gvcp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) } void -proto_reg_handoff_gvcp(void) -{ - static dissector_handle_t gvcp_handle; - - gvcp_handle = new_create_dissector_handle(dissect_gvcp, proto_gvcp); - dissector_add("udp.port", GVCP_PORT, gvcp_handle); -} - -void proto_register_gvcp(void) { static hf_register_info hf[] = { @@ -462,3 +453,13 @@ proto_register_gvcp(void) proto_register_subtree_array(ett, array_length(ett)); } + +void +proto_reg_handoff_gvcp(void) +{ + dissector_handle_t gvcp_handle; + + gvcp_handle = new_create_dissector_handle(dissect_gvcp, proto_gvcp); + dissector_add("udp.port", GVCP_PORT, gvcp_handle); +} + |