* Routines for raw data (default case)
* Gilbert Ramirez <gram@verdict.uthscsa.edu>
*
- * $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 <gerald@unicom.net>
#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) {
* Routines for IEEE 802.2 LLC layer
* Gilbert Ramirez <gram@verdict.uthscsa.edu>
*
- * $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 <gerald@unicom.net>
#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;
};
return "Unknown";
}
-static void*
+static capture_func_t *
sap_capture_func(u_char sap) {
int i=0;
}
i++;
}
- return dissect_data;
+ return capture_data;
}
-static void*
+static dissect_func_t *
sap_dissect_func(u_char sap) {
int i=0;
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) {
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] = {
/* 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 <gerald@zing.org>
* 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 *);