/* 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>
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;
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;
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);
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);
* 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>
*
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;
/* 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>
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);
* 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>
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) {
* 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>
{ 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 },
/* 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>
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;
/* 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>
gint ospf;
gint gre;
gint netbios;
+ gint ipx;
gint other;
gint total;
} 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