* 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>
/************************* 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 */
}
-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 */
}
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 */
++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,
/**************** 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 */
}
-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. */
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 */
"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,
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 */
dissector_add("tcp.port", TCP_PORT_SOCKS, socks_handle);
}
+
* 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>
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)
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);
}
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;
* 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>
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 */
}
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 */
}
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 */
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 */
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;
}
-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 */
* 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>
#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))
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);