diff --git a/packet-data.c b/packet-data.c index e389ab56c6..77f5cde17c 100644 --- a/packet-data.c +++ b/packet-data.c @@ -2,7 +2,7 @@ * Routines for raw data (default case) * Gilbert Ramirez * - * $Id: packet-data.c,v 1.5 1998/11/12 00:06:25 gram Exp $ + * $Id: packet-data.c,v 1.6 1999/03/22 03:44:43 guy Exp $ * * Ethereal - Network traffic analyzer * By Gerald Combs @@ -39,6 +39,11 @@ #include "ethereal.h" #include "packet.h" +void +capture_data(const u_char *pd, int offset, guint32 cap_len, packet_counts *ld) { + + ld->other++; +} void dissect_data(const u_char *pd, int offset, frame_data *fd, GtkTree *tree) { diff --git a/packet-llc.c b/packet-llc.c index c5abf9a564..a995afc9fa 100644 --- a/packet-llc.c +++ b/packet-llc.c @@ -2,7 +2,7 @@ * Routines for IEEE 802.2 LLC layer * Gilbert Ramirez * - * $Id: packet-llc.c,v 1.11 1999/02/09 00:35:37 guy Exp $ + * $Id: packet-llc.c,v 1.12 1999/03/22 03:44:44 guy Exp $ * * Ethereal - Network traffic analyzer * By Gerald Combs @@ -41,10 +41,13 @@ #include "packet.h" #include "etypes.h" +typedef void (capture_func_t)(const u_char *, int, guint32, packet_counts *); +typedef void (dissect_func_t)(const u_char *, int, frame_data *, GtkTree *); + struct sap_info { guint8 sap; - void (*capture_func) (const u_char *, int, guint32, packet_counts *); - void (*dissect_func) (const u_char *, int, frame_data *, GtkTree *); + capture_func_t *capture_func; + dissect_func_t *dissect_func; char *text; }; @@ -90,7 +93,7 @@ sap_text(u_char sap) { return "Unknown"; } -static void* +static capture_func_t * sap_capture_func(u_char sap) { int i=0; @@ -100,10 +103,10 @@ sap_capture_func(u_char sap) { } i++; } - return dissect_data; + return capture_data; } -static void* +static dissect_func_t * sap_dissect_func(u_char sap) { int i=0; @@ -136,7 +139,7 @@ capture_llc(const u_char *pd, int offset, guint32 cap_len, packet_counts *ld) { guint16 etype; int is_snap; - void (*capture) (const u_char *, int, guint32, packet_counts *); + capture_func_t *capture; is_snap = (pd[offset] == 0xAA) && (pd[offset+1] == 0xAA); if (is_snap) { @@ -166,7 +169,7 @@ dissect_llc(const u_char *pd, int offset, frame_data *fd, GtkTree *tree) { GtkWidget *llc_tree = NULL, *ti; guint16 etype; int is_snap; - void (*dissect) (const u_char *, int, frame_data *, GtkTree *); + dissect_func_t *dissect; /* LLC Strings */ char *llc_ctrl[4] = { diff --git a/packet.h b/packet.h index af1aa134b8..0d1c59b172 100644 --- a/packet.h +++ b/packet.h @@ -1,7 +1,7 @@ /* packet.h * Definitions for packet disassembly structures and routines * - * $Id: packet.h,v 1.38 1999/02/15 06:36:57 guy Exp $ + * $Id: packet.h,v 1.39 1999/03/22 03:44:44 guy Exp $ * * Ethereal - Network traffic analyzer * By Gerald Combs @@ -545,6 +545,7 @@ void capture_tr(const u_char *, guint32, packet_counts *); * packet_counts * * They should never modify the packet data. */ +void capture_data(const u_char *, int, guint32, packet_counts *); void capture_llc(const u_char *, int, guint32, packet_counts *); void capture_ip(const u_char *, int, guint32, packet_counts *);