pcap-missing.h
ppp.h
print-802_11.c
+print-ap1394.c
print-ah.c
print-aodv.c
print-arcnet.c
-@(#) $Header: /tcpdump/master/tcpdump/Attic/INSTALL,v 1.59 2004-03-11 09:36:15 guy Exp $ (LBL)
+@(#) $Header: /tcpdump/master/tcpdump/Attic/INSTALL,v 1.60 2004-03-17 19:40:41 guy Exp $ (LBL)
If you have not built libpcap, do so first. See the README
file in this directory for the ftp location.
pcap-missing.h - declarations of functions possibly missing from libpcap
ppp.h - Point to Point Protocol definitions
print-802_11.c - IEEE 802.11 printer routines
+print-ap1394.c - Apple IP-over-IEEE 1394 printer routines
print-ah.c - IPSEC Authentication Header printer routines
print-aodv.c - AODV printer routines
print-arcnet.c - ARCNET printer routines
# WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
#
-# @(#) $Header: /tcpdump/master/tcpdump/Makefile.in,v 1.280 2004-03-11 09:36:15 guy Exp $ (LBL)
+# @(#) $Header: /tcpdump/master/tcpdump/Makefile.in,v 1.281 2004-03-17 19:40:41 guy Exp $ (LBL)
#
# Various configurable paths (remember to edit Makefile.in, not Makefile)
$(CC) $(CFLAGS) -c $(srcdir)/$*.c
CSRC = addrtoname.c gmpls.c oui.c gmt2local.c machdep.c parsenfsfh.c \
- print-802_11.c print-ah.c print-arcnet.c print-aodv.c \
- print-arp.c print-ascii.c print-atalk.c print-atm.c \
+ print-802_11.c print-ap1394.c print-ah.c print-arcnet.c \
+ print-aodv.c print-arp.c print-ascii.c print-atalk.c print-atm.c \
print-beep.c print-bfd.c print-bgp.c print-bootp.c print-cdp.c \
print-chdlc.c print-cip.c print-cnfp.c print-decnet.c \
print-domain.c print-dvmrp.c print-enc.c print-egp.c \
* WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
*
- * @(#) $Header: /tcpdump/master/tcpdump/interface.h,v 1.223 2004-03-11 09:36:15 guy Exp $ (LBL)
+ * @(#) $Header: /tcpdump/master/tcpdump/interface.h,v 1.224 2004-03-17 19:40:41 guy Exp $ (LBL)
*/
#ifndef tcpdump_interface_h
extern u_int arcnet_if_print(const struct pcap_pkthdr *, const u_char *);
extern u_int arcnet_linux_if_print(const struct pcap_pkthdr *, const u_char *);
extern void ether_print(const u_char *, u_int, u_int);
-extern u_int ether_if_print(const struct pcap_pkthdr *,
- const u_char *);
+extern u_int ether_if_print(const struct pcap_pkthdr *, const u_char *);
extern u_int token_print(const u_char *, u_int, u_int);
extern u_int token_if_print(const struct pcap_pkthdr *, const u_char *);
extern void fddi_print(const u_char *, u_int, u_int);
extern u_int ieee802_11_if_print(const struct pcap_pkthdr *, const u_char *);
extern u_int ieee802_11_radio_if_print(const struct pcap_pkthdr *,
const u_char *);
+extern u_int ap1394_if_print(const struct pcap_pkthdr *, const u_char *);
extern void gre_print(const u_char *, u_int);
extern void icmp_print(const u_char *, u_int, const u_char *, int);
extern void igmp_print(const u_char *, u_int);
--- /dev/null
+/*
+ * Copyright (c) 1988, 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 2000
+ * The Regents of the University of California. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that: (1) source code distributions
+ * retain the above copyright notice and this paragraph in its entirety, (2)
+ * distributions including binary code include the above copyright notice and
+ * this paragraph in its entirety in the documentation or other materials
+ * provided with the distribution, and (3) all advertising materials mentioning
+ * features or use of this software display the following acknowledgement:
+ * ``This product includes software developed by the University of California,
+ * Lawrence Berkeley Laboratory and its contributors.'' Neither the name of
+ * the University nor the names of its contributors may be used to endorse
+ * or promote products derived from this software without specific prior
+ * written permission.
+ * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+ */
+#ifndef lint
+static const char rcsid[] _U_ =
+ "@(#) $Header: /tcpdump/master/tcpdump/print-ap1394.c,v 1.1 2004-03-17 19:40:42 guy Exp $ (LBL)";
+#endif
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <tcpdump-stdinc.h>
+
+#include <stdio.h>
+#include <pcap.h>
+
+#include "interface.h"
+#include "addrtoname.h"
+#include "ethertype.h"
+
+/*
+ * Structure of a header for Apple's IP-over-IEEE 1384 BPF header.
+ */
+#define FIREWIRE_EUI64_LEN 8
+struct firewire_header {
+ u_char firewire_dhost[FIREWIRE_EUI64_LEN];
+ u_char firewire_shost[FIREWIRE_EUI64_LEN];
+ u_short firewire_type;
+};
+
+/*
+ * Length of that header; note that some compilers may pad
+ * "struct firewire_header" to a multiple of 4 bytes, for example, so
+ * "sizeof (struct firewire_header)" may not give the right answer.
+ */
+#define FIREWIRE_HDRLEN 18
+
+/*
+ * This is the top level routine of the printer. 'p' points
+ * to the ether header of the packet, 'h->ts' is the timestamp,
+ * 'h->length' is the length of the packet off the wire, and 'h->caplen'
+ * is the number of bytes actually captured.
+ */
+u_int
+ap1394_if_print(const struct pcap_pkthdr *h, const u_char *p)
+{
+ u_int length = h->len;
+ u_int caplen = h->caplen;
+ struct firewire_header *fp;
+ u_short ether_type;
+ u_short extracted_ether_type;
+
+ if (caplen < FIREWIRE_HDRLEN) {
+ printf("[|ap1394]");
+ return FIREWIRE_HDRLEN;
+ }
+
+ length -= FIREWIRE_HDRLEN;
+ caplen -= FIREWIRE_HDRLEN;
+ fp = (struct firewire_header *)p;
+ p += FIREWIRE_HDRLEN;
+
+ ether_type = ntohs(fp->firewire_type);
+
+ extracted_ether_type = 0;
+ if (ether_encap_print(ether_type, p, length, caplen,
+ &extracted_ether_type) == 0) {
+ /* ether_type not known, print raw packet */
+ if (!xflag && !qflag)
+ default_print(p, caplen);
+ }
+
+ return FIREWIRE_HDRLEN;
+}
"@(#) Copyright (c) 1988, 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 2000\n\
The Regents of the University of California. All rights reserved.\n";
static const char rcsid[] _U_ =
- "@(#) $Header: /tcpdump/master/tcpdump/tcpdump.c,v 1.234 2004-03-11 09:36:16 guy Exp $ (LBL)";
+ "@(#) $Header: /tcpdump/master/tcpdump/tcpdump.c,v 1.235 2004-03-17 19:40:42 guy Exp $ (LBL)";
#endif
/*
#endif
#ifdef DLT_SYMANTEC_FIREWALL
{ symantec_if_print, DLT_SYMANTEC_FIREWALL },
+#endif
+#ifdef DLT_APPLE_IP_OVER_IEEE1394
+ { ap1394_if_print, DLT_APPLE_IP_OVER_IEEE1394 },
#endif
{ NULL, 0 },
};