Minimalistic support for counting IPv6 packets during capture
svn path=/trunk/; revision=6476
This commit is contained in:
parent
4c80b2ac3f
commit
40e1ec7fad
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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)
|
||||
{
|
||||
|
|
|
@ -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__ */
|
||||
|
|
Loading…
Reference in New Issue