From Joerg Mayer: get rid of some unused arguments, and make some

routines not used outside the file in which they're defined static.

svn path=/trunk/; revision=5144
This commit is contained in:
Guy Harris 2002-04-11 09:38:03 +00:00
parent 665fecd413
commit 5cf5c87abc
4 changed files with 32 additions and 33 deletions

View File

@ -2,7 +2,7 @@
* Routines for socks versions 4 &5 packet dissection
* Copyright 2000, Jeffrey C. Foster <jfoste@woodward.com>
*
* $Id: packet-socks.c,v 1.36 2002/03/09 22:54:27 guy Exp $
* $Id: packet-socks.c,v 1.37 2002/04/11 09:38:03 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@ -252,7 +252,7 @@ static GMemChunk *socks_vals = NULL;
/************************* 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 char *get_command_name( guint Number){
}
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 @@ static int display_address(tvbuff_t *tvb, int offset,
}
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 @@ socks_udp_dissector(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) {
++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 @@ new_udp_conversation( socks_hash_entry_t *hash_info, packet_info *pinfo){
/**************** 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 @@ display_socks_v4(tvbuff_t *tvb, int offset, packet_info *pinfo,
}
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 @@ display_socks_v5(tvbuff_t *tvb, int offset, packet_info *pinfo,
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 @@ display_socks_v5(tvbuff_t *tvb, int offset, packet_info *pinfo,
"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 @@ dissect_socks(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) {
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 @@ proto_reg_handoff_socks(void) {
dissector_add("tcp.port", TCP_PORT_SOCKS, socks_handle);
}

View File

@ -2,7 +2,7 @@
* Routines for v120 frame disassembly
* Bert Driehuis <driehuis@playbeing.org>
*
* $Id: packet-v120.c,v 1.25 2002/04/09 08:15:02 guy Exp $
* $Id: packet-v120.c,v 1.26 2002/04/11 09:38:03 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@ -49,7 +49,7 @@ static gint ett_v120_header = -1;
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 @@ dissect_v120(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
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 @@ dissect_v120(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
}
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;

View File

@ -2,7 +2,7 @@
* Routines for Wellfleet Compression frame disassembly
* Copyright 2001, Jeffrey C. Foster <jfoste@woodward.com>
*
* $Id: packet-wcp.c,v 1.22 2002/02/27 05:45:48 guy Exp $
* $Id: packet-wcp.c,v 1.23 2002/04/11 09:38:03 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@ -223,7 +223,7 @@ static tvbuff_t *wcp_uncompress( tvbuff_t *src_tvb, int offset, packet_info *pin
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 @@ dissect_wcp_con_req(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *t
}
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 @@ dissect_wcp_con_ack( tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *
}
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 @@ dissect_wcp_init( tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tre
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 @@ static void dissect_wcp( tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) {
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 @@ static void dissect_wcp( tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) {
}
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 */

View File

@ -2,7 +2,7 @@
* Routines for X11 dissection
* Copyright 2000, Christophe Tronche <ch.tronche@computer.org>
*
* $Id: packet-x11.c,v 1.31 2002/04/05 20:04:52 guy Exp $
* $Id: packet-x11.c,v 1.32 2002/04/11 09:38:03 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@ -652,7 +652,7 @@ static struct maskStruct {
#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 @@ static void bitmask(tvbuff_t *tvb, proto_tree *t, int hf, int ett, int size)
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);