aboutsummaryrefslogtreecommitdiffstats
path: root/packet-fddi.c
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>1999-02-09 00:35:38 +0000
committerGuy Harris <guy@alum.mit.edu>1999-02-09 00:35:38 +0000
commit75305346b532da113629c21311817099305762f3 (patch)
tree80d9f3e8a36588385000c9c9e0ffd34ab77c7629 /packet-fddi.c
parentfacb50396007c70e5616ff61a4aa22ff43e44001 (diff)
When doing a capture, decode enough of the incoming packets to correctly
update the packet counts and percentages in the dialog box popped up during a capture, even for non-Ethernet captures. svn path=/trunk/; revision=184
Diffstat (limited to 'packet-fddi.c')
-rw-r--r--packet-fddi.c46
1 files changed, 44 insertions, 2 deletions
diff --git a/packet-fddi.c b/packet-fddi.c
index b131839a0f..b4ae01e111 100644
--- a/packet-fddi.c
+++ b/packet-fddi.c
@@ -3,7 +3,7 @@
*
* Laurent Deniel <deniel@worldnet.fr>
*
- * $Id: packet-fddi.c,v 1.8 1998/11/17 04:28:53 gerald Exp $
+ * $Id: packet-fddi.c,v 1.9 1999/02/09 00:35:37 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@zing.org>
@@ -133,6 +133,49 @@ static void get_mac_addr(u_char *swapped_addr, const u_char *addr)
}
}
+void
+capture_fddi(const u_char *pd, guint32 cap_len, packet_counts *ld) {
+ int offset = 0, fc;
+
+ if (cap_len < FDDI_HEADER_SIZE) {
+ ld->other++;
+ return;
+ }
+ offset = FDDI_HEADER_SIZE;
+
+ fc = (int) pd[FDDI_P_FC];
+
+ switch (fc) {
+
+ /* From now, only 802.2 SNAP (Async. LCC frame) is supported */
+
+ case FDDI_FC_LLC_ASYNC + 0 :
+ case FDDI_FC_LLC_ASYNC + 1 :
+ case FDDI_FC_LLC_ASYNC + 2 :
+ case FDDI_FC_LLC_ASYNC + 3 :
+ case FDDI_FC_LLC_ASYNC + 4 :
+ case FDDI_FC_LLC_ASYNC + 5 :
+ case FDDI_FC_LLC_ASYNC + 6 :
+ case FDDI_FC_LLC_ASYNC + 7 :
+ case FDDI_FC_LLC_ASYNC + 8 :
+ case FDDI_FC_LLC_ASYNC + 9 :
+ case FDDI_FC_LLC_ASYNC + 10 :
+ case FDDI_FC_LLC_ASYNC + 11 :
+ case FDDI_FC_LLC_ASYNC + 12 :
+ case FDDI_FC_LLC_ASYNC + 13 :
+ case FDDI_FC_LLC_ASYNC + 14 :
+ case FDDI_FC_LLC_ASYNC + 15 :
+ capture_llc(pd, offset, cap_len, ld);
+ return;
+
+ default :
+ ld->other++;
+ return;
+
+ } /* fc */
+
+} /* capture_fddi */
+
void dissect_fddi(const u_char *pd, frame_data *fd, GtkTree *tree)
{
int offset = 0, fc;
@@ -211,4 +254,3 @@ void dissect_fddi(const u_char *pd, frame_data *fd, GtkTree *tree)
} /* fc */
} /* dissect_fddi */
-