* Portions based on information/specs retrieved from the OpenAFS sources at
* www.openafs.org, Copyright IBM.
*
- * $Id: packet-afs.c,v 1.30 2001/05/27 01:48:23 guy Exp $
+ * $Id: packet-afs.c,v 1.31 2001/05/27 05:00:17 guy Exp $
*
* Ethereal - Network traffic analyzer
- * By Gerald Combs <gerald@zing.org>
+ * By Gerald Combs <gerald@ethereal.com>
* Copyright 1998 Gerald Combs
*
* Copied from packet-tftp.c
* Dissection routines
*/
-void
+static void
dissect_afs(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
{
int reply = 0;
proto_register_field_array(proto_afs, hf, array_length(hf));
proto_register_subtree_array(ett, array_length(ett));
register_init_routine(&afs_init_protocol);
-}
+ register_dissector("afs", dissect_afs, proto_afs);
+}
/* packet-afs.h
* Definitions for packet disassembly structures and routines
*
- * $Id: packet-afs.h,v 1.6 2001/05/27 01:48:23 guy Exp $
+ * $Id: packet-afs.h,v 1.7 2001/05/27 05:00:17 guy Exp $
*
* Ethereal - Network traffic analyzer
- * By Gerald Combs <gerald@zing.org>
+ * By Gerald Combs <gerald@ethereal.com>
* Copyright 1998 Gerald Combs
*
*
#ifndef PACKET_AFS_H
#define PACKET_AFS_H
-void dissect_afs(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree);
-
#define AFS_PORT_FS 7000
#define AFS_PORT_CB 7001
#define AFS_PORT_PROT 7002
* Based on routines from tcpdump patches by
* Ken Hornstein <kenh@cmf.nrl.navy.mil>
*
- * $Id: packet-rx.c,v 1.20 2001/05/27 01:48:24 guy Exp $
+ * $Id: packet-rx.c,v 1.21 2001/05/27 05:00:17 guy Exp $
*
* Ethereal - Network traffic analyzer
- * By Gerald Combs <gerald@zing.org>
+ * By Gerald Combs <gerald@ethereal.com>
* Copyright 1998 Gerald Combs
*
* Copied from packet-tftp.c
#include <glib.h>
#include "packet.h"
#include "packet-rx.h"
-#include "packet-afs.h"
#include "resolv.h"
#define UDP_PORT_RX_LOW 7000
static gint ett_rx_response = -1;
static gint ett_rx_encrypted = -1;
+static dissector_handle_t afs_handle;
+
static int
dissect_rx_response_encrypted(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree, int offset)
{
case RX_PACKET_TYPE_DATA: {
tvbuff_t *next_tvb;
next_tvb = tvb_new_subset(tvb, offset, -1, -1);
- dissect_afs(next_tvb, pinfo, parent_tree);
+ call_dissector(afs_handle, next_tvb, pinfo, parent_tree);
};
break;
}
{
int port;
+ /*
+ * Get handle for the AFS dissector.
+ */
+ afs_handle = find_dissector("afs");
+
/* Ports in the range UDP_PORT_RX_LOW to UDP_PORT_RX_HIGH
are all used for various AFS services. */
for (port = UDP_PORT_RX_LOW; port <= UDP_PORT_RX_HIGH; port++)