Add IPX to packet stats during capture.
svn path=/trunk/; revision=1173
This commit is contained in:
parent
ada449cf1b
commit
3fa90ff0cf
13
capture.c
13
capture.c
|
@ -1,7 +1,7 @@
|
|||
/* capture.c
|
||||
* Routines for packet capture windows
|
||||
*
|
||||
* $Id: capture.c,v 1.84 1999/11/30 20:49:45 guy Exp $
|
||||
* $Id: capture.c,v 1.85 1999/11/30 23:56:34 gram Exp $
|
||||
*
|
||||
* Ethereal - Network traffic analyzer
|
||||
* By Gerald Combs <gerald@zing.org>
|
||||
|
@ -480,7 +480,7 @@ int
|
|||
capture(void)
|
||||
{
|
||||
GtkWidget *cap_w, *main_vb, *count_lb, *tcp_lb, *udp_lb, *icmp_lb,
|
||||
*ospf_lb, *gre_lb, *netbios_lb, *other_lb, *stop_bt;
|
||||
*ospf_lb, *gre_lb, *netbios_lb, *ipx_lb, *other_lb, *stop_bt;
|
||||
pcap_t *pch;
|
||||
gchar err_str[PCAP_ERRBUF_SIZE], label_str[32];
|
||||
loop_data ld;
|
||||
|
@ -499,6 +499,7 @@ capture(void)
|
|||
ld.counts.icmp = 0;
|
||||
ld.counts.ospf = 0;
|
||||
ld.counts.gre = 0;
|
||||
ld.counts.ipx = 0;
|
||||
ld.counts.netbios = 0;
|
||||
ld.counts.other = 0;
|
||||
ld.pdh = NULL;
|
||||
|
@ -630,6 +631,10 @@ capture(void)
|
|||
gtk_box_pack_start(GTK_BOX(main_vb), netbios_lb, FALSE, FALSE, 3);
|
||||
gtk_widget_show(netbios_lb);
|
||||
|
||||
ipx_lb = gtk_label_new("IPX: 0 (0.0%)");
|
||||
gtk_box_pack_start(GTK_BOX(main_vb), ipx_lb, FALSE, FALSE, 3);
|
||||
gtk_widget_show(ipx_lb);
|
||||
|
||||
other_lb = gtk_label_new("Other: 0 (0.0%)");
|
||||
gtk_box_pack_start(GTK_BOX(main_vb), other_lb, FALSE, FALSE, 3);
|
||||
gtk_widget_show(other_lb);
|
||||
|
@ -685,6 +690,10 @@ capture(void)
|
|||
pct(ld.counts.netbios, ld.counts.total));
|
||||
gtk_label_set(GTK_LABEL(netbios_lb), label_str);
|
||||
|
||||
sprintf(label_str, "IPX: %d (%.1f%%)", ld.counts.ipx,
|
||||
pct(ld.counts.ipx, ld.counts.total));
|
||||
gtk_label_set(GTK_LABEL(ipx_lb), label_str);
|
||||
|
||||
sprintf(label_str, "Other: %d (%.1f%%)", ld.counts.other,
|
||||
pct(ld.counts.other, ld.counts.total));
|
||||
gtk_label_set(GTK_LABEL(other_lb), label_str);
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
* Routines for calling the right protocol for the ethertype.
|
||||
* This is called by both packet-eth.c (Ethernet II) and packet-llc.c (SNAP)
|
||||
*
|
||||
* $Id: ethertype.c,v 1.18 1999/11/26 04:52:36 gram Exp $
|
||||
* $Id: ethertype.c,v 1.19 1999/11/30 23:56:35 gram Exp $
|
||||
*
|
||||
* Gilbert Ramirez <gram@verdict.uthscsa.edu>
|
||||
*
|
||||
|
@ -63,6 +63,9 @@ capture_ethertype(guint16 etype, int offset,
|
|||
case ETHERTYPE_IP:
|
||||
capture_ip(pd, offset, cap_len, ld);
|
||||
break;
|
||||
case ETHERTYPE_IPX:
|
||||
capture_ipx(pd, offset, cap_len, ld);
|
||||
break;
|
||||
default:
|
||||
ld->other++;
|
||||
break;
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/* packet-eth.c
|
||||
* Routines for ethernet packet disassembly
|
||||
*
|
||||
* $Id: packet-eth.c,v 1.24 1999/11/20 03:27:02 gram Exp $
|
||||
* $Id: packet-eth.c,v 1.25 1999/11/30 23:56:35 gram Exp $
|
||||
*
|
||||
* Ethereal - Network traffic analyzer
|
||||
* By Gerald Combs <gerald@zing.org>
|
||||
|
@ -98,7 +98,7 @@ capture_eth(const u_char *pd, guint32 cap_len, packet_counts *ld) {
|
|||
|
||||
switch (ethhdr_type) {
|
||||
case ETHERNET_802_3:
|
||||
ld->other++; /* IPX */
|
||||
capture_ipx(pd, offset, cap_len, ld);
|
||||
break;
|
||||
case ETHERNET_802_2:
|
||||
capture_llc(pd, offset, cap_len, ld);
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
* Routines for NetWare's IPX
|
||||
* Gilbert Ramirez <gram@verdict.uthscsa.edu>
|
||||
*
|
||||
* $Id: packet-ipx.c,v 1.38 1999/11/30 09:01:55 guy Exp $
|
||||
* $Id: packet-ipx.c,v 1.39 1999/11/30 23:56:35 gram Exp $
|
||||
*
|
||||
* Ethereal - Network traffic analyzer
|
||||
* By Gerald Combs <gerald@unicom.net>
|
||||
|
@ -315,6 +315,12 @@ ipxnet_to_str_punct(const guint32 ad, char punct) {
|
|||
return p;
|
||||
}
|
||||
|
||||
void
|
||||
capture_ipx(const u_char *pd, int offset, guint32 cap_len, packet_counts *ld)
|
||||
{
|
||||
ld->ipx++;
|
||||
}
|
||||
|
||||
void
|
||||
dissect_ipx(const u_char *pd, int offset, frame_data *fd, proto_tree *tree) {
|
||||
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
* Routines for IEEE 802.2 LLC layer
|
||||
* Gilbert Ramirez <gramirez@tivoli.com>
|
||||
*
|
||||
* $Id: packet-llc.c,v 1.28 1999/11/16 11:42:38 guy Exp $
|
||||
* $Id: packet-llc.c,v 1.29 1999/11/30 23:56:36 gram Exp $
|
||||
*
|
||||
* Ethereal - Network traffic analyzer
|
||||
* By Gerald Combs <gerald@unicom.net>
|
||||
|
@ -99,7 +99,7 @@ static struct sap_info saps[] = {
|
|||
{ 0xAA, NULL, NULL },
|
||||
{ 0xBA, NULL, NULL },
|
||||
{ 0xBC, NULL, NULL },
|
||||
{ 0xE0, NULL, dissect_ipx },
|
||||
{ 0xE0, capture_ipx, dissect_ipx },
|
||||
{ 0xF0, capture_netbios, dissect_netbios },
|
||||
{ 0xF4, NULL, NULL },
|
||||
{ 0xF5, NULL, NULL },
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/* packet-ppp.c
|
||||
* Routines for ppp packet disassembly
|
||||
*
|
||||
* $Id: packet-ppp.c,v 1.22 1999/11/16 11:42:47 guy Exp $
|
||||
* $Id: packet-ppp.c,v 1.23 1999/11/30 23:56:36 gram Exp $
|
||||
*
|
||||
* Ethereal - Network traffic analyzer
|
||||
* By Gerald Combs <gerald@zing.org>
|
||||
|
@ -525,6 +525,9 @@ capture_ppp( const u_char *pd, guint32 cap_len, packet_counts *ld ) {
|
|||
case PPP_IP:
|
||||
capture_ip(pd, 4, cap_len, ld);
|
||||
break;
|
||||
case PPP_IPX:
|
||||
capture_ipx(pd, 4, cap_len, ld);
|
||||
break;
|
||||
default:
|
||||
ld->other++;
|
||||
break;
|
||||
|
|
4
packet.h
4
packet.h
|
@ -1,7 +1,7 @@
|
|||
/* packet.h
|
||||
* Definitions for packet disassembly structures and routines
|
||||
*
|
||||
* $Id: packet.h,v 1.153 1999/11/29 19:43:25 nneul Exp $
|
||||
* $Id: packet.h,v 1.154 1999/11/30 23:56:37 gram Exp $
|
||||
*
|
||||
* Ethereal - Network traffic analyzer
|
||||
* By Gerald Combs <gerald@zing.org>
|
||||
|
@ -102,6 +102,7 @@ typedef struct _packet_counts {
|
|||
gint ospf;
|
||||
gint gre;
|
||||
gint netbios;
|
||||
gint ipx;
|
||||
gint other;
|
||||
gint total;
|
||||
} packet_counts;
|
||||
|
@ -286,6 +287,7 @@ void capture_tr(const u_char *, guint32, packet_counts *);
|
|||
void capture_netbios(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 *);
|
||||
void capture_ipx(const u_char *, int, guint32, packet_counts *);
|
||||
|
||||
/*
|
||||
* Routines in packet-*.c
|
||||
|
|
Loading…
Reference in New Issue