Ethereal-dev: [Ethereal-dev] unused parameters in wcp, x11, v120 and socks removed
Note: This archive is from the project's previous web site, ethereal.com. This list is no longer active.
From: Joerg Mayer <jmayer@xxxxxxxxx>
Date: Tue, 9 Apr 2002 18:18:40 +0200
patch with changelog attached. ciao Jörg -- Joerg Mayer <jmayer@xxxxxxxxx> I found out that "pro" means "instead of" (as in proconsul). Now I know what proactive means.
Changelog: <jmayer@xxxxxxxxx> packet-socks.c, packet-v120.c, packet-wcp.c, packet-x11.c: Removed unused parameters and made declared some functions static. Index: ethereal/packet-socks.c =================================================================== RCS file: /cvsroot/ethereal/packet-socks.c,v retrieving revision 1.36 diff -u -r1.36 packet-socks.c --- packet-socks.c 2002/03/09 22:54:27 1.36 +++ packet-socks.c 2002/04/09 16:13:04 @@ -252,7 +252,7 @@ /************************* Support routines ***************************/ -static int display_string(tvbuff_t *tvb, int offset, packet_info *pinfo, +static int display_string(tvbuff_t *tvb, int offset, proto_tree *tree, char *label){ /* display a string with a length, characters encoding */ @@ -319,8 +319,7 @@ } -static int display_address(tvbuff_t *tvb, int offset, - packet_info *pinfo, proto_tree *tree) { +static int display_address(tvbuff_t *tvb, int offset, proto_tree *tree) { /* decode and display the v5 address, return offset of next byte */ @@ -340,7 +339,7 @@ } else if ( a_type == 3){ /* domain name address */ - offset += display_string(tvb, offset, pinfo, tree, + offset += display_string(tvb, offset, tree, "Remote name"); } else if ( a_type == 4){ /* IPv6 address */ @@ -421,7 +420,7 @@ ++offset; - offset = display_address( tvb, offset, pinfo, socks_tree); + offset = display_address( tvb, offset, socks_tree); hash_info->udp_remote_port = tvb_get_ntohs(tvb, offset); proto_tree_add_uint( socks_tree, hf_socks_dstport, tvb, @@ -468,9 +467,9 @@ /**************** Protocol Tree Display routines ******************/ -void +static void display_socks_v4(tvbuff_t *tvb, int offset, packet_info *pinfo, - proto_tree *parent, proto_tree *tree, socks_hash_entry_t *hash_info) { + proto_tree *tree, socks_hash_entry_t *hash_info) { /* Display the protocol tree for the V4 version. This routine uses the */ @@ -551,9 +550,9 @@ } -void +static void display_socks_v5(tvbuff_t *tvb, int offset, packet_info *pinfo, - proto_tree *parent, proto_tree *tree, socks_hash_entry_t *hash_info) { + proto_tree *tree, socks_hash_entry_t *hash_info) { /* Display the protocol tree for the version. This routine uses the */ /* stored conversation information to decide what to do with the row. */ @@ -612,10 +611,10 @@ proto_tree_add_item( tree, hf_socks_ver, tvb, offset, 1, FALSE); ++offset; /* process user name */ - offset += display_string( tvb, offset, pinfo, tree, + offset += display_string( tvb, offset, tree, "User name"); /* process password */ - offset += display_string( tvb, offset, pinfo, tree, + offset += display_string( tvb, offset, tree, "Password"); } /* command to the server */ @@ -645,7 +644,7 @@ "Reserved: 0x%0x (should = 0x00)", tvb_get_guint8(tvb, offset)); ++offset; - offset = display_address(tvb, offset, pinfo, tree); + offset = display_address(tvb, offset, tree); /*XXX Add remote port for search somehow */ /* Do remote port */ proto_tree_add_text( tree, tvb, offset, 2, @@ -1041,11 +1040,11 @@ socks_tree = proto_item_add_subtree(ti, ett_socks); if ( hash_info->version == 4) - display_socks_v4(tvb, offset, pinfo, tree, socks_tree, + display_socks_v4(tvb, offset, pinfo, socks_tree, hash_info); else if ( hash_info->version == 5) - display_socks_v5(tvb, offset, pinfo, tree, socks_tree, + display_socks_v5(tvb, offset, pinfo, socks_tree, hash_info); /* if past startup, add the faked stuff */ @@ -1182,3 +1181,4 @@ dissector_add("tcp.port", TCP_PORT_SOCKS, socks_handle); } + Index: ethereal/packet-v120.c =================================================================== RCS file: /cvsroot/ethereal/packet-v120.c,v retrieving revision 1.25 diff -u -r1.25 packet-v120.c --- packet-v120.c 2002/04/09 08:15:02 1.25 +++ packet-v120.c 2002/04/09 16:13:04 @@ -49,7 +49,7 @@ static dissector_handle_t data_handle; -static int dissect_v120_header(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree); +static int dissect_v120_header(tvbuff_t *tvb, int offset, proto_tree *tree); static void dissect_v120(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) @@ -138,7 +138,7 @@ if (tree) { v120len = 2 + XDLC_CONTROL_LEN(control, TRUE); if (tvb_bytes_exist(tvb, v120len, 1)) - v120len += dissect_v120_header(tvb, v120len, pinfo, v120_tree); + v120len += dissect_v120_header(tvb, v120len, v120_tree); proto_item_set_len(ti, v120len); next_tvb = tvb_new_subset(tvb, v120len, -1, -1); call_dissector(data_handle,next_tvb, pinfo, v120_tree); @@ -146,7 +146,7 @@ } static int -dissect_v120_header(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree) +dissect_v120_header(tvbuff_t *tvb, int offset, proto_tree *tree) { char info[80]; int header_len, nbits; Index: ethereal/packet-wcp.c =================================================================== RCS file: /cvsroot/ethereal/packet-wcp.c,v retrieving revision 1.22 diff -u -r1.22 packet-wcp.c --- packet-wcp.c 2002/02/27 05:45:48 1.22 +++ packet-wcp.c 2002/04/09 16:13:05 @@ -223,7 +223,7 @@ static wcp_window_t *get_wcp_window_ptr( packet_info *pinfo); static void -dissect_wcp_con_req(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree) { +dissect_wcp_con_req(tvbuff_t *tvb, int offset, proto_tree *tree) { /* WCP connector request message */ @@ -244,7 +244,7 @@ } static void -dissect_wcp_con_ack( tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree){ +dissect_wcp_con_ack( tvbuff_t *tvb, int offset, proto_tree *tree){ /* WCP connector ack message */ @@ -255,7 +255,7 @@ } static void -dissect_wcp_init( tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree){ +dissect_wcp_init( tvbuff_t *tvb, int offset, proto_tree *tree){ /* WCP Initiate Request/Ack message */ @@ -268,7 +268,7 @@ static void -dissect_wcp_reset( tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree){ +dissect_wcp_reset( tvbuff_t *tvb, int offset, proto_tree *tree){ /* Process WCP Reset Request/Ack message */ @@ -345,19 +345,19 @@ tvb_get_guint8( tvb, 0)); switch (ext_cmd){ case CONNECT_REQ: - dissect_wcp_con_req( tvb, 1, pinfo, wcp_tree); + dissect_wcp_con_req( tvb, 1, wcp_tree); break; case CONNECT_ACK: - dissect_wcp_con_ack( tvb, 1, pinfo, wcp_tree); + dissect_wcp_con_ack( tvb, 1, wcp_tree); break; case INIT_REQ: case INIT_ACK: - dissect_wcp_init( tvb, 1, pinfo, wcp_tree); + dissect_wcp_init( tvb, 1, wcp_tree); break; case RESET_REQ: case RESET_ACK: - dissect_wcp_reset( tvb, 1, pinfo, wcp_tree); + dissect_wcp_reset( tvb, 1, wcp_tree); break; default: break; @@ -403,7 +403,7 @@ } -guint8 *decompressed_entry( guint8 *src, guint8 *dst, int *len, guint8 * buf_start, guint8 *buf_end){ +static guint8 *decompressed_entry( guint8 *src, guint8 *dst, int *len, guint8 * buf_start, guint8 *buf_end){ /* do the decompression for one field */ Index: ethereal/packet-x11.c =================================================================== RCS file: /cvsroot/ethereal/packet-x11.c,v retrieving revision 1.31 diff -u -r1.31 packet-x11.c --- packet-x11.c 2002/04/05 20:04:52 1.31 +++ packet-x11.c 2002/04/09 16:13:06 @@ -652,7 +652,7 @@ #define BITMASK8(name) { bitmask(tvb, t, hf_x11_##name##_mask, ett_x11_##name##_mask, 1); } #define BITMASK16(name) { bitmask(tvb, t, hf_x11_##name##_mask, ett_x11_##name##_mask, 2); } #define BITMASK32(name) { bitmask(tvb, t, hf_x11_##name##_mask, ett_x11_##name##_mask, 4); } -#define BOOL(name) (add_boolean(tvb, t, #name, hf_x11_##name)) +#define BOOL(name) (add_boolean(tvb, t, hf_x11_##name)) #define BUTTON(name) { FIELD8(name); } #define CARD8(name) { FIELD8(name); } #define CARD16(name) (FIELD16(name)) @@ -742,8 +742,7 @@ cur_offset += size; } -static guint32 add_boolean(tvbuff_t *tvb, proto_tree *t, - const char *nameAsChar, int hf) +static guint32 add_boolean(tvbuff_t *tvb, proto_tree *t, int hf) { guint32 v = VALUE8(tvb, cur_offset); proto_tree_add_boolean(t, hf, tvb, cur_offset, 1, v); @@ -1135,7 +1134,7 @@ #define STRING16_MAX_DISPLAYED_LENGTH 150 -static int stringIsActuallyAn8BitString(tvbuff_t *tvb, int offset, unsigned length) +static int stringIsActuallyAn8BitString(tvbuff_t *tvb, unsigned length) { if (length > STRING16_MAX_DISPLAYED_LENGTH) length = STRING16_MAX_DISPLAYED_LENGTH; for(; length > 0; cur_offset += 2, length--) { @@ -1155,7 +1154,7 @@ int truncated = FALSE; unsigned l = length / 2; - if (stringIsActuallyAn8BitString(tvb, offset, l)) { + if (stringIsActuallyAn8BitString(tvb, l)) { char *dp; int soffset = offset;
- Follow-Ups:
- Prev by Date: [Ethereal-dev] Problem printing broken TFTP packets
- Next by Date: Re: [Ethereal-dev] Problem printing broken TFTP packets
- Previous by thread: Re: [Ethereal-dev] Problem printing broken TFTP packets
- Next by thread: Re: [Ethereal-dev] unused parameters in wcp, x11, v120 and socks removed
- Index(es):