aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJörg Mayer <jmayer@loplof.de>2002-10-22 22:04:23 +0000
committerJörg Mayer <jmayer@loplof.de>2002-10-22 22:04:23 +0000
commit40e1ec7fad04f0b008eb692f7b00fb0287a7cd2a (patch)
treed33cc6142b76fbcca2b75361837fb72dd81012c8
parent4c80b2ac3fbb12ba37ac93664b89642a8c09b359 (diff)
Minimalistic support for counting IPv6 packets during capture
svn path=/trunk/; revision=6476
-rw-r--r--epan/packet.h3
-rw-r--r--packet-ethertype.c6
-rw-r--r--packet-ipv6.c12
-rw-r--r--packet-ipv6.h5
4 files changed, 22 insertions, 4 deletions
diff --git a/epan/packet.h b/epan/packet.h
index 29fb1ab75c..947797f301 100644
--- a/epan/packet.h
+++ b/epan/packet.h
@@ -1,7 +1,7 @@
/* packet.h
* Definitions for packet disassembly structures and routines
*
- * $Id: packet.h,v 1.61 2002/10/14 17:33:50 guy Exp $
+ * $Id: packet.h,v 1.62 2002/10/22 22:04:23 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@@ -60,6 +60,7 @@ typedef struct _packet_counts {
gint gre;
gint netbios;
gint ipx;
+ gint ipv6;
gint vines;
gint other;
gint total;
diff --git a/packet-ethertype.c b/packet-ethertype.c
index a7622e8985..849ee33161 100644
--- a/packet-ethertype.c
+++ b/packet-ethertype.c
@@ -1,7 +1,7 @@
/* ethertype.c
* Routines for calling the right protocol for the ethertype.
*
- * $Id: packet-ethertype.c,v 1.32 2002/10/14 17:33:48 guy Exp $
+ * $Id: packet-ethertype.c,v 1.33 2002/10/22 22:04:21 jmayer Exp $
*
* Gilbert Ramirez <gram@alumni.rice.edu>
*
@@ -31,6 +31,7 @@
#include <glib.h>
#include <epan/packet.h>
#include "packet-ip.h"
+#include "packet-ipv6.h"
#include "packet-ipx.h"
#include "packet-vlan.h"
#include "packet-vines.h"
@@ -110,6 +111,9 @@ capture_ethertype(guint16 etype, const guchar *pd, int offset, int len,
case ETHERTYPE_IP:
capture_ip(pd, offset, len, ld);
break;
+ case ETHERTYPE_IPv6:
+ capture_ipv6(pd, offset, len, ld);
+ break;
case ETHERTYPE_IPX:
capture_ipx(ld);
break;
diff --git a/packet-ipv6.c b/packet-ipv6.c
index 0565b93654..eb8a41ec7c 100644
--- a/packet-ipv6.c
+++ b/packet-ipv6.c
@@ -1,7 +1,7 @@
/* packet-ipv6.c
* Routines for IPv6 packet disassembly
*
- * $Id: packet-ipv6.c,v 1.87 2002/08/28 21:00:18 jmayer Exp $
+ * $Id: packet-ipv6.c,v 1.88 2002/10/22 22:04:21 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@@ -121,6 +121,16 @@ static gboolean ipv6_reassemble = FALSE;
*/
static GHashTable *ipv6_fragment_table = NULL;
+void
+capture_ipv6(const guchar *pd, int offset, int len, packet_counts *ld)
+{
+ ld->ipv6++;
+ /* FIXME: We should count the actual ipv6 payload by protocol,
+ * but it looks like we need to replicate quite a few
+ * parts of the dissection stuff.
+ */
+}
+
static void
ipv6_reassemble_init(void)
{
diff --git a/packet-ipv6.h b/packet-ipv6.h
index 8066d64fd2..813b45d1d3 100644
--- a/packet-ipv6.h
+++ b/packet-ipv6.h
@@ -1,7 +1,7 @@
/* packet-ipv6.h
* Definitions for IPv6 packet disassembly
*
- * $Id: packet-ipv6.h,v 1.28 2002/08/28 21:00:18 jmayer Exp $
+ * $Id: packet-ipv6.h,v 1.29 2002/10/22 22:04:21 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@@ -572,4 +572,7 @@ struct rr_result { /* router renumbering result message */
#define ICMP6_RR_RESULT_FLAGS_OOB 0x0002
#define ICMP6_RR_RESULT_FLAGS_FORBIDDEN 0x0001
+void capture_ipv6(const guchar *, int, int, packet_counts *);
+
+
#endif /* __PACKET_IPV6_H_DEFINED__ */