Skip to content

Instantly share code, notes, and snippets.

@jaybosamiya
Created March 19, 2014 13:44
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jaybosamiya/69268d3055f3fd05b386 to your computer and use it in GitHub Desktop.
Save jaybosamiya/69268d3055f3fd05b386 to your computer and use it in GitHub Desktop.
[NMAP] [Patch] Upgrade libpcap to 1.5.3
Index: libpcap/NMAP_MODIFICATIONS/0004-Include-netpacket-packet.h-before-pcap-bpf.h.patch
===================================================================
--- libpcap/NMAP_MODIFICATIONS/0004-Include-netpacket-packet.h-before-pcap-bpf.h.patch (revision 32783)
+++ libpcap/NMAP_MODIFICATIONS/0004-Include-netpacket-packet.h-before-pcap-bpf.h.patch (working copy)
@@ -22,9 +22,8 @@
---
fad-getad.c | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
-
diff --git fad-getad.c fad-getad.c
-index 742ae1f..519893a 100644
+index af371d4..2b483f6 100644
--- fad-getad.c
+++ fad-getad.c
@@ -54,12 +54,6 @@ static const char rcsid[] _U_ =
@@ -37,12 +36,12 @@
-#include "os-proto.h"
-#endif
-
- #ifdef AF_PACKET
- # ifdef HAVE_NETPACKET_PACKET_H
- /* Solaris 11 and later, Linux distributions with newer glibc */
-@@ -77,6 +71,12 @@ static const char rcsid[] _U_ =
+ /*
+ * We don't do this on Solaris 11 and later, as it appears there aren't
+ * any AF_PACKET addresses on interfaces, so we don't need this, and
+@@ -83,6 +77,12 @@ static const char rcsid[] _U_ =
# endif /* HAVE_NETPACKET_PACKET_H */
- #endif /* AF_PACKET */
+ #endif /* (defined(linux) || defined(__Lynx__)) && defined(AF_PACKET) */
+#include "pcap-int.h"
+
Index: libpcap/NMAP_MODIFICATIONS/HOWTO-UPGRADE
===================================================================
--- libpcap/NMAP_MODIFICATIONS/HOWTO-UPGRADE (revision 32783)
+++ libpcap/NMAP_MODIFICATIONS/HOWTO-UPGRADE (working copy)
@@ -3,7 +3,7 @@
cd
# Make a copy of this directory.
-cp -r ~/nmap/NMAP_MODIFICATIONS .
+cp -r ~/nmap/libpcap/NMAP_MODIFICATIONS .
tar xzvf libpcap-X.Y.tar.gz
cd nmap
rsync -rv --delete ~/libpcap-X.Y/ ~/nmap/libpcap/
Index: libpcap/NMAP_MODIFICATIONS/0002-Add-the-disable-packet-ring-configure-option.patch
===================================================================
--- libpcap/NMAP_MODIFICATIONS/0002-Add-the-disable-packet-ring-configure-option.patch (revision 32783)
+++ libpcap/NMAP_MODIFICATIONS/0002-Add-the-disable-packet-ring-configure-option.patch (working copy)
@@ -40,28 +40,34 @@
AC_CONFIG_HEADER(config.h)
diff --git pcap-linux.c pcap-linux.c
-index d4f50b7..213558b 100644
+index 17bd0f5..bd2457d 100644
--- pcap-linux.c
+++ pcap-linux.c
-@@ -219,14 +219,16 @@ static const char rcsid[] _U_ =
+@@ -196,17 +196,19 @@ static const char rcsid[] _U_ =
/* check for memory mapped access avaibility. We assume every needed
* struct is defined if the macro TPACKET_HDRLEN is defined, because it
* uses many ring related structs and macros */
-# ifdef TPACKET_HDRLEN
-# define HAVE_PACKET_RING
+-# ifdef TPACKET3_HDRLEN
+-# define HAVE_TPACKET3
+-# endif /* TPACKET3_HDRLEN */
-# ifdef TPACKET2_HDRLEN
-# define HAVE_TPACKET2
--# else
--# define TPACKET_V1 0
+-# else /* TPACKET2_HDRLEN */
+-# define TPACKET_V1 0 /* Old kernel with only V1, so no TPACKET_Vn defined */
-# endif /* TPACKET2_HDRLEN */
-# endif /* TPACKET_HDRLEN */
+# ifdef PCAP_SUPPORT_PACKET_RING
+# ifdef TPACKET_HDRLEN
+# define HAVE_PACKET_RING
++# ifdef TPACKET3_HDRLEN
++# define HAVE_TPACKET3
++# endif /* TPACKET3_HDRLEN */
+# ifdef TPACKET2_HDRLEN
+# define HAVE_TPACKET2
-+# else
-+# define TPACKET_V1 0
++# else /* TPACKET2_HDRLEN */
++# define TPACKET_V1 0 /* Old kernel with only V1, so no TPACKET_Vn defined */
+# endif /* TPACKET2_HDRLEN */
+# endif /* TPACKET_HDRLEN */
+# endif /* PCAP_SUPPORT_PACKET_RING */
Index: todo/nmap.txt
===================================================================
--- todo/nmap.txt (revision 32783)
+++ todo/nmap.txt (working copy)
@@ -1,12 +1,6 @@
TODO $Id: TODO 11866 2009-01-24 23:10:05Z fyodor $ -*-text-*-
-o We should probably update our included libpcap. We currently
- include version 1.2.1 (we upgraded to that in April 2012) while the
- latest version on tcpdump.org is 1.5.2. We make minor changes to
- libpcap that we ship, and instructions for upgrading are in
- libpcap/NMAP_MODIFICATIONS.
-
o Fix a segmentation fault in Ncat when scanned with the SSL NSE
scripts. I was able to reproduce this on 2013-09-27 with latest SVN
by running:
@@ -783,6 +777,12 @@
DONE:
+o We should probably update our included libpcap. We currently
+ include version 1.2.1 (we upgraded to that in April 2012) while the
+ latest version on tcpdump.org is 1.5.3. We make minor changes to
+ libpcap that we ship, and instructions for upgrading are in
+ libpcap/NMAP_MODIFICATIONS.
+
o Web: figure out why autogeneration of nmap.org/nsedoc/ doesn't seem
to be working. I think we had a cron job which was supposed to be
doing it.
Index: libpcap/sf-pcap.c
===================================================================
--- libpcap/sf-pcap.c (revision 32783)
+++ libpcap/sf-pcap.c (working copy)
@@ -123,25 +123,57 @@
static int pcap_next_packet(pcap_t *p, struct pcap_pkthdr *hdr, u_char **datap);
/*
+ * Private data for reading pcap savefiles.
+ */
+typedef enum {
+ NOT_SWAPPED,
+ SWAPPED,
+ MAYBE_SWAPPED
+} swapped_type_t;
+
+typedef enum {
+ PASS_THROUGH,
+ SCALE_UP,
+ SCALE_DOWN
+} tstamp_scale_type_t;
+
+struct pcap_sf {
+ size_t hdrsize;
+ swapped_type_t lengths_swapped;
+ tstamp_scale_type_t scale_type;
+};
+
+/*
* Check whether this is a pcap savefile and, if it is, extract the
* relevant information from the header.
*/
-int
-pcap_check_header(pcap_t *p, bpf_u_int32 magic, FILE *fp, char *errbuf)
+pcap_t *
+pcap_check_header(bpf_u_int32 magic, FILE *fp, u_int precision, char *errbuf,
+ int *err)
{
struct pcap_file_header hdr;
size_t amt_read;
+ pcap_t *p;
+ int swapped = 0;
+ struct pcap_sf *ps;
/*
+ * Assume no read errors.
+ */
+ *err = 0;
+
+ /*
* Check whether the first 4 bytes of the file are the magic
* number for a pcap savefile, or for a byte-swapped pcap
* savefile.
*/
- if (magic != TCPDUMP_MAGIC && magic != KUZNETZOV_TCPDUMP_MAGIC) {
+ if (magic != TCPDUMP_MAGIC && magic != KUZNETZOV_TCPDUMP_MAGIC &&
+ magic != NSEC_TCPDUMP_MAGIC) {
magic = SWAPLONG(magic);
- if (magic != TCPDUMP_MAGIC && magic != KUZNETZOV_TCPDUMP_MAGIC)
- return (0); /* nope */
- p->sf.swapped = 1;
+ if (magic != TCPDUMP_MAGIC && magic != KUZNETZOV_TCPDUMP_MAGIC &&
+ magic != NSEC_TCPDUMP_MAGIC)
+ return (NULL); /* nope */
+ swapped = 1;
}
/*
@@ -162,13 +194,14 @@
(unsigned long)sizeof(hdr),
(unsigned long)amt_read);
}
- return (-1);
+ *err = 1;
+ return (NULL);
}
/*
* If it's a byte-swapped capture file, byte-swap the header.
*/
- if (p->sf.swapped) {
+ if (swapped) {
hdr.version_major = SWAPSHORT(hdr.version_major);
hdr.version_minor = SWAPSHORT(hdr.version_minor);
hdr.thiszone = SWAPLONG(hdr.thiszone);
@@ -180,18 +213,83 @@
if (hdr.version_major < PCAP_VERSION_MAJOR) {
snprintf(errbuf, PCAP_ERRBUF_SIZE,
"archaic pcap savefile format");
- return (-1);
+ *err = 1;
+ return (NULL);
}
- p->sf.version_major = hdr.version_major;
- p->sf.version_minor = hdr.version_minor;
+
+ /*
+ * OK, this is a good pcap file.
+ * Allocate a pcap_t for it.
+ */
+ p = pcap_open_offline_common(errbuf, sizeof (struct pcap_sf));
+ if (p == NULL) {
+ /* Allocation failed. */
+ *err = 1;
+ return (NULL);
+ }
+ p->swapped = swapped;
+ p->version_major = hdr.version_major;
+ p->version_minor = hdr.version_minor;
p->tzoff = hdr.thiszone;
p->snapshot = hdr.snaplen;
p->linktype = linktype_to_dlt(LT_LINKTYPE(hdr.linktype));
p->linktype_ext = LT_LINKTYPE_EXT(hdr.linktype);
- p->sf.next_packet_op = pcap_next_packet;
+ p->next_packet_op = pcap_next_packet;
+ ps = p->priv;
+
+ p->opt.tstamp_precision = precision;
+
/*
+ * Will we need to scale the timestamps to match what the
+ * user wants?
+ */
+ switch (precision) {
+
+ case PCAP_TSTAMP_PRECISION_MICRO:
+ if (magic == NSEC_TCPDUMP_MAGIC) {
+ /*
+ * The file has nanoseconds, the user
+ * wants microseconds; scale the
+ * precision down.
+ */
+ ps->scale_type = SCALE_DOWN;
+ } else {
+ /*
+ * The file has microseconds, the
+ * user wants microseconds; nothing to do.
+ */
+ ps->scale_type = PASS_THROUGH;
+ }
+ break;
+
+ case PCAP_TSTAMP_PRECISION_NANO:
+ if (magic == NSEC_TCPDUMP_MAGIC) {
+ /*
+ * The file has nanoseconds, the
+ * user wants nanoseconds; nothing to do.
+ */
+ ps->scale_type = PASS_THROUGH;
+ } else {
+ /*
+ * The file has microoseconds, the user
+ * wants nanoseconds; scale the
+ * precision up.
+ */
+ ps->scale_type = SCALE_UP;
+ }
+ break;
+
+ default:
+ snprintf(errbuf, PCAP_ERRBUF_SIZE,
+ "unknown time stamp resolution %u", precision);
+ free(p);
+ *err = 1;
+ return (NULL);
+ }
+
+ /*
* We interchanged the caplen and len fields at version 2.3,
* in order to match the bpf header layout. But unfortunately
* some files were written with version 2.3 in their headers
@@ -205,19 +303,19 @@
case 2:
if (hdr.version_minor < 3)
- p->sf.lengths_swapped = SWAPPED;
+ ps->lengths_swapped = SWAPPED;
else if (hdr.version_minor == 3)
- p->sf.lengths_swapped = MAYBE_SWAPPED;
+ ps->lengths_swapped = MAYBE_SWAPPED;
else
- p->sf.lengths_swapped = NOT_SWAPPED;
+ ps->lengths_swapped = NOT_SWAPPED;
break;
case 543:
- p->sf.lengths_swapped = SWAPPED;
+ ps->lengths_swapped = SWAPPED;
break;
default:
- p->sf.lengths_swapped = NOT_SWAPPED;
+ ps->lengths_swapped = NOT_SWAPPED;
break;
}
@@ -239,7 +337,7 @@
* data ourselves and read from that buffer in order to
* make that work.
*/
- p->sf.hdrsize = sizeof(struct pcap_sf_patched_pkthdr);
+ ps->hdrsize = sizeof(struct pcap_sf_patched_pkthdr);
if (p->linktype == DLT_EN10MB) {
/*
@@ -265,7 +363,7 @@
p->snapshot += 14;
}
} else
- p->sf.hdrsize = sizeof(struct pcap_sf_pkthdr);
+ ps->hdrsize = sizeof(struct pcap_sf_pkthdr);
/*
* Allocate a buffer for the packet data.
@@ -280,10 +378,14 @@
p->buffer = malloc(p->bufsize);
if (p->buffer == NULL) {
snprintf(errbuf, PCAP_ERRBUF_SIZE, "out of memory");
- return (-1);
+ free(p);
+ *err = 1;
+ return (NULL);
}
- return (1);
+ p->cleanup_op = sf_cleanup;
+
+ return (p);
}
/*
@@ -294,8 +396,9 @@
static int
pcap_next_packet(pcap_t *p, struct pcap_pkthdr *hdr, u_char **data)
{
+ struct pcap_sf *ps = p->priv;
struct pcap_sf_patched_pkthdr sf_hdr;
- FILE *fp = p->sf.rfile;
+ FILE *fp = p->rfile;
size_t amt_read;
bpf_u_int32 t;
@@ -306,8 +409,8 @@
* unpatched libpcap we only read as many bytes as the regular
* header has.
*/
- amt_read = fread(&sf_hdr, 1, p->sf.hdrsize, fp);
- if (amt_read != p->sf.hdrsize) {
+ amt_read = fread(&sf_hdr, 1, ps->hdrsize, fp);
+ if (amt_read != ps->hdrsize) {
if (ferror(fp)) {
snprintf(p->errbuf, PCAP_ERRBUF_SIZE,
"error reading dump file: %s",
@@ -317,7 +420,7 @@
if (amt_read != 0) {
snprintf(p->errbuf, PCAP_ERRBUF_SIZE,
"truncated dump file; tried to read %lu header bytes, only got %lu",
- (unsigned long)p->sf.hdrsize,
+ (unsigned long)ps->hdrsize,
(unsigned long)amt_read);
return (-1);
}
@@ -326,7 +429,7 @@
}
}
- if (p->sf.swapped) {
+ if (p->swapped) {
/* these were written in opposite byte order */
hdr->caplen = SWAPLONG(sf_hdr.caplen);
hdr->len = SWAPLONG(sf_hdr.len);
@@ -338,8 +441,34 @@
hdr->ts.tv_sec = sf_hdr.ts.tv_sec;
hdr->ts.tv_usec = sf_hdr.ts.tv_usec;
}
+
+ switch (ps->scale_type) {
+
+ case PASS_THROUGH:
+ /*
+ * Just pass the time stamp through.
+ */
+ break;
+
+ case SCALE_UP:
+ /*
+ * File has microseconds, user wants nanoseconds; convert
+ * it.
+ */
+ hdr->ts.tv_usec = hdr->ts.tv_usec * 1000;
+ break;
+
+ case SCALE_DOWN:
+ /*
+ * File has nanoseconds, user wants microseconds; convert
+ * it.
+ */
+ hdr->ts.tv_usec = hdr->ts.tv_usec / 1000;
+ break;
+ }
+
/* Swap the caplen and len fields, if necessary. */
- switch (p->sf.lengths_swapped) {
+ switch (ps->lengths_swapped) {
case NOT_SWAPPED:
break;
@@ -430,7 +559,7 @@
}
*data = p->buffer;
- if (p->sf.swapped) {
+ if (p->swapped) {
/*
* Convert pseudo-headers from the byte order of
* the host on which the file was saved to our
@@ -452,11 +581,11 @@
}
static int
-sf_write_header(FILE *fp, int linktype, int thiszone, int snaplen)
+sf_write_header(pcap_t *p, FILE *fp, int linktype, int thiszone, int snaplen)
{
struct pcap_file_header hdr;
- hdr.magic = TCPDUMP_MAGIC;
+ hdr.magic = p->opt.tstamp_precision == PCAP_TSTAMP_PRECISION_NANO ? NSEC_TCPDUMP_MAGIC : TCPDUMP_MAGIC;
hdr.version_major = PCAP_VERSION_MAJOR;
hdr.version_minor = PCAP_VERSION_MINOR;
@@ -507,7 +636,7 @@
else
setbuf(f, NULL);
#endif
- if (sf_write_header(f, linktype, p->tzoff, p->snapshot) == -1) {
+ if (sf_write_header(p, f, linktype, p->tzoff, p->snapshot) == -1) {
snprintf(p->errbuf, PCAP_ERRBUF_SIZE, "Can't write to %s: %s",
fname, pcap_strerror(errno));
if (f != stdout)
Index: libpcap/sf-pcap.h
===================================================================
--- libpcap/sf-pcap.h (revision 32783)
+++ libpcap/sf-pcap.h (working copy)
@@ -31,6 +31,7 @@
#ifndef sf_pcap_h
#define sf_pcap_h
-extern int pcap_check_header(pcap_t *, bpf_u_int32, FILE *, char *);
+extern pcap_t *pcap_check_header(bpf_u_int32 magic, FILE *fp,
+ u_int precision, char *errbuf, int *err);
#endif
Index: libpcap/pcap/bpf.h
===================================================================
--- libpcap/pcap/bpf.h (revision 32783)
+++ libpcap/pcap/bpf.h (working copy)
@@ -177,11 +177,37 @@
#endif
/*
- * 17 is used for DLT_OLD_PFLOG in OpenBSD;
- * OBSOLETE: DLT_PFLOG is 117 in OpenBSD now as well. See below.
- * 18 is used for DLT_PFSYNC in OpenBSD; don't use it for anything else.
+ * 17 was used for DLT_PFLOG in OpenBSD; it no longer is.
+ *
+ * It was DLT_LANE8023 in SuSE 6.3, so we defined LINKTYPE_PFLOG
+ * as 117 so that pflog captures would use a link-layer header type
+ * value that didn't collide with any other values. On all
+ * platforms other than OpenBSD, we defined DLT_PFLOG as 117,
+ * and we mapped between LINKTYPE_PFLOG and DLT_PFLOG.
+ *
+ * OpenBSD eventually switched to using 117 for DLT_PFLOG as well.
+ *
+ * Don't use 17 for anything else.
*/
+/*
+ * 18 is used for DLT_PFSYNC in OpenBSD, NetBSD, DragonFly BSD and
+ * Mac OS X; don't use it for anything else. (FreeBSD uses 121,
+ * which collides with DLT_HHDLC, even though it doesn't use 18
+ * for anything and doesn't appear to have ever used it for anything.)
+ *
+ * We define it as 18 on those platforms; it is, unfortunately, used
+ * for DLT_CIP in Suse 6.3, so we don't define it as DLT_PFSYNC
+ * in general. As the packet format for it, like that for
+ * DLT_PFLOG, is not only OS-dependent but OS-version-dependent,
+ * we don't support printing it in tcpdump except on OSes that
+ * have the relevant header files, so it's not that useful on
+ * other platforms.
+ */
+#if defined(__OpenBSD__) || defined(__NetBSD__) || defined(__DragonFly__) || defined(__APPLE__)
+#define DLT_PFSYNC 18
+#endif
+
#define DLT_ATM_CLIP 19 /* Linux Classical-IP over ATM */
/*
@@ -312,15 +338,8 @@
#define DLT_IPFILTER 116
/*
- * OpenBSD DLT_PFLOG; DLT_PFLOG is 17 in OpenBSD, but that's DLT_LANE8023
- * in SuSE 6.3, so we can't use 17 for it in capture-file headers.
- *
- * XXX: is there a conflict with DLT_PFSYNC 18 as well?
+ * OpenBSD DLT_PFLOG.
*/
-#ifdef __OpenBSD__
-#define DLT_OLD_PFLOG 17
-#define DLT_PFSYNC 18
-#endif
#define DLT_PFLOG 117
/*
@@ -342,9 +361,48 @@
#define DLT_AIRONET_HEADER 120
/*
- * Reserved for Siemens HiPath HDLC.
+ * Sigh.
+ *
+ * This was reserved for Siemens HiPath HDLC on 2002-01-25, as
+ * requested by Tomas Kukosa.
+ *
+ * On 2004-02-25, a FreeBSD checkin to sys/net/bpf.h was made that
+ * assigned 121 as DLT_PFSYNC. Its libpcap does DLT_ <-> LINKTYPE_
+ * mapping, so it probably supports capturing on the pfsync device
+ * but not saving the captured data to a pcap file.
+ *
+ * OpenBSD, from which pf came, however, uses 18 for DLT_PFSYNC;
+ * their libpcap does no DLT_ <-> LINKTYPE_ mapping, so it would
+ * use 18 in pcap files as well.
+ *
+ * NetBSD and DragonFly BSD also use 18 for DLT_PFSYNC; their
+ * libpcaps do DLT_ <-> LINKTYPE_ mapping, and neither has an entry
+ * for DLT_PFSYNC, so it might not be able to write out dump files
+ * with 18 as the link-layer header type. (Earlier versions might
+ * not have done mapping, in which case they'd work the same way
+ * OpenBSD does.)
+ *
+ * Mac OS X defines it as 18, but doesn't appear to use it as of
+ * Mac OS X 10.7.3. Its libpcap does DLT_ <-> LINKTYPE_ mapping.
+ *
+ * We'll define DLT_PFSYNC as 121 on FreeBSD and define it as 18 on
+ * all other platforms. We'll define DLT_HHDLC as 121 on everything
+ * except for FreeBSD; anybody who wants to compile, on FreeBSD, code
+ * that uses DLT_HHDLC is out of luck.
+ *
+ * We'll define LINKTYPE_PFSYNC as 18, *even on FreeBSD*, and map
+ * it, so that savefiles won't use 121 for PFSYNC - they'll all
+ * use 18. Code that uses pcap_datalink() to determine the link-layer
+ * header type of a savefile won't, when built and run on FreeBSD,
+ * be able to distinguish between LINKTYPE_PFSYNC and LINKTYPE_HHDLC
+ * capture files; code that doesn't, such as the code in Wireshark,
+ * will be able to distinguish between them.
*/
+#ifdef __FreeBSD__
+#define DLT_PFSYNC 121
+#else
#define DLT_HHDLC 121
+#endif
/*
* This is for RFC 2625 IP-over-Fibre Channel.
@@ -542,7 +600,7 @@
#define DLT_JUNIPER_MONITOR 164
/*
- * Reserved for BACnet MS/TP.
+ * BACnet MS/TP frames.
*/
#define DLT_BACNET_MS_TP 165
@@ -1075,15 +1133,100 @@
#define DLT_NETANALYZER_TRANSPARENT 241
/*
- * IP-over-Infiniband, as specified by RFC 4391.
+ * IP-over-InfiniBand, as specified by RFC 4391.
*
* Requested by Petr Sumbera <petr.sumbera@oracle.com>.
*/
#define DLT_IPOIB 242
-#define DLT_MATCHING_MAX 242 /* highest value in the "matching" range */
+/*
+ * MPEG-2 transport stream (ISO 13818-1/ITU-T H.222.0).
+ *
+ * Requested by Guy Martin <gmsoft@tuxicoman.be>.
+ */
+#define DLT_MPEG_2_TS 243
/*
+ * ng4T GmbH's UMTS Iub/Iur-over-ATM and Iub/Iur-over-IP format as
+ * used by their ng40 protocol tester.
+ *
+ * Requested by Jens Grimmer <jens.grimmer@ng4t.com>.
+ */
+#define DLT_NG40 244
+
+/*
+ * Pseudo-header giving adapter number and flags, followed by an NFC
+ * (Near-Field Communications) Logical Link Control Protocol (LLCP) PDU,
+ * as specified by NFC Forum Logical Link Control Protocol Technical
+ * Specification LLCP 1.1.
+ *
+ * Requested by Mike Wakerly <mikey@google.com>.
+ */
+#define DLT_NFC_LLCP 245
+
+/*
+ * 245 is used as LINKTYPE_PFSYNC; do not use it for any other purpose.
+ *
+ * DLT_PFSYNC has different values on different platforms, and all of
+ * them collide with something used elsewhere. On platforms that
+ * don't already define it, define it as 245.
+ */
+#if !defined(__FreeBSD__) && !defined(__OpenBSD__) && !defined(__NetBSD__) && !defined(__DragonFly__) && !defined(__APPLE__)
+#define DLT_PFSYNC 246
+#endif
+
+/*
+ * Raw InfiniBand packets, starting with the Local Routing Header.
+ *
+ * Requested by Oren Kladnitsky <orenk@mellanox.com>.
+ */
+#define DLT_INFINIBAND 247
+
+/*
+ * SCTP, with no lower-level protocols (i.e., no IPv4 or IPv6).
+ *
+ * Requested by Michael Tuexen <Michael.Tuexen@lurchi.franken.de>.
+ */
+#define DLT_SCTP 248
+
+/*
+ * USB packets, beginning with a USBPcap header.
+ *
+ * Requested by Tomasz Mon <desowin@gmail.com>
+ */
+#define DLT_USBPCAP 249
+
+/*
+ * Schweitzer Engineering Laboratories "RTAC" product serial-line
+ * packets.
+ *
+ * Requested by Chris Bontje <chris_bontje@selinc.com>.
+ */
+#define DLT_RTAC_SERIAL 250
+
+/*
+ * Bluetooth Low Energy air interface link-layer packets.
+ *
+ * Requested by Mike Kershaw <dragorn@kismetwireless.net>.
+ */
+#define DLT_BLUETOOTH_LE_LL 251
+
+/*
+ * DLT type for upper-protocol layer PDU saves from wireshark.
+ *
+ * the actual contents are determined by two TAGs stored with each
+ * packet:
+ * EXP_PDU_TAG_LINKTYPE the link type (LINKTYPE_ value) of the
+ * original packet.
+ *
+ * EXP_PDU_TAG_PROTO_NAME the name of the wireshark dissector
+ * that can make sense of the data stored.
+ */
+#define DLT_WIRESHARK_UPPER_PDU 252
+
+#define DLT_MATCHING_MAX 252 /* highest value in the "matching" range */
+
+/*
* DLT and savefile link type values are split into a class and
* a member of that class. A class value of 0 indicates a regular
* DLT_/LINKTYPE_ value.
Index: libpcap/pcap/pcap.h
===================================================================
--- libpcap/pcap/pcap.h (revision 32783)
+++ libpcap/pcap/pcap.h (working copy)
@@ -113,12 +113,13 @@
* the old file header as well as files with the new file header
* (using the magic number to determine the header format).
*
- * Then supply the changes as a patch at
+ * Then supply the changes by forking the branch at
*
- * http://sourceforge.net/projects/libpcap/
+ * https://github.com/the-tcpdump-group/libpcap/issues
*
- * so that future versions of libpcap and programs that use it (such as
- * tcpdump) will be able to read your new capture file format.
+ * and issuing a pull request, so that future versions of libpcap and
+ * programs that use it (such as tcpdump) will be able to read your new
+ * capture file format.
*/
struct pcap_file_header {
bpf_u_int32 magic;
@@ -253,6 +254,7 @@
#define PCAP_ERROR_IFACE_NOT_UP -9 /* interface isn't up */
#define PCAP_ERROR_CANTSET_TSTAMP_TYPE -10 /* this device doesn't support setting the time stamp type */
#define PCAP_ERROR_PROMISC_PERM_DENIED -11 /* you don't have permission to capture in promiscuous mode */
+#define PCAP_ERROR_TSTAMP_PRECISION_NOTSUP -12 /* the requested time stamp precision is not supported */
/*
* Warning codes for the pcap API.
@@ -279,7 +281,10 @@
int pcap_set_rfmon(pcap_t *, int);
int pcap_set_timeout(pcap_t *, int);
int pcap_set_tstamp_type(pcap_t *, int);
+int pcap_set_immediate_mode(pcap_t *, int);
int pcap_set_buffer_size(pcap_t *, int);
+int pcap_set_tstamp_precision(pcap_t *, int);
+int pcap_get_tstamp_precision(pcap_t *);
int pcap_activate(pcap_t *);
int pcap_list_tstamp_types(pcap_t *, int **);
@@ -332,18 +337,34 @@
#define PCAP_TSTAMP_ADAPTER 3 /* device-provided, synced with the system clock */
#define PCAP_TSTAMP_ADAPTER_UNSYNCED 4 /* device-provided, not synced with the system clock */
+/*
+ * Time stamp resolution types.
+ * Not all systems and interfaces will necessarily support all of these
+ * resolutions when doing live captures; all of them can be requested
+ * when reading a savefile.
+ */
+#define PCAP_TSTAMP_PRECISION_MICRO 0 /* use timestamps with microsecond precision, default */
+#define PCAP_TSTAMP_PRECISION_NANO 1 /* use timestamps with nanosecond precision */
+
pcap_t *pcap_open_live(const char *, int, int, int, char *);
pcap_t *pcap_open_dead(int, int);
+pcap_t *pcap_open_dead_with_tstamp_precision(int, int, u_int);
+pcap_t *pcap_open_offline_with_tstamp_precision(const char *, u_int, char *);
pcap_t *pcap_open_offline(const char *, char *);
#if defined(WIN32)
+pcap_t *pcap_hopen_offline_with_tstamp_precision(intptr_t, u_int, char *);
pcap_t *pcap_hopen_offline(intptr_t, char *);
#if !defined(LIBPCAP_EXPORTS)
+#define pcap_fopen_offline_with_tstamp_precision(f,p,b) \
+ pcap_hopen_offline_with_tstamp_precision(_get_osfhandle(_fileno(f)), p, b)
#define pcap_fopen_offline(f,b) \
pcap_hopen_offline(_get_osfhandle(_fileno(f)), b)
#else /*LIBPCAP_EXPORTS*/
+static pcap_t *pcap_fopen_offline_with_tstamp_precision(FILE *, u_int, char *);
static pcap_t *pcap_fopen_offline(FILE *, char *);
#endif
#else /*WIN32*/
+pcap_t *pcap_fopen_offline_with_tstamp_precision(FILE *, u_int, char *);
pcap_t *pcap_fopen_offline(FILE *, char *);
#endif /*WIN32*/
@@ -370,8 +391,8 @@
int pcap_compile_nopcap(int, int, struct bpf_program *,
const char *, int, bpf_u_int32);
void pcap_freecode(struct bpf_program *);
-int pcap_offline_filter(struct bpf_program *, const struct pcap_pkthdr *,
- const u_char *);
+int pcap_offline_filter(const struct bpf_program *,
+ const struct pcap_pkthdr *, const u_char *);
int pcap_datalink(pcap_t *);
int pcap_datalink_ext(pcap_t *);
int pcap_list_datalinks(pcap_t *, int **);
@@ -425,6 +446,7 @@
int pcap_setbuff(pcap_t *p, int dim);
int pcap_setmode(pcap_t *p, int mode);
int pcap_setmintocopy(pcap_t *p, int size);
+Adapter *pcap_get_adapter(pcap_t *p);
#ifdef WPCAP
/* Include file with the wpcap-specific extensions */
Index: libpcap/pcap-dos.c
===================================================================
--- libpcap/pcap-dos.c (revision 32783)
+++ libpcap/pcap-dos.c (working copy)
@@ -143,11 +143,19 @@
return handle_to_device [fd-1];
}
-pcap_t *pcap_create (const char *device, char *ebuf)
+/*
+ * Private data for capturing on MS-DOS.
+ */
+struct pcap_dos {
+ void (*wait_proc)(void); /* call proc while waiting */
+ struct pcap_stat stat;
+};
+
+pcap_t *pcap_create_interface (const char *device, char *ebuf)
{
pcap_t *p;
- p = pcap_create_common(device, ebuf);
+ p = pcap_create_common(device, ebuf, sizeof (struct pcap_dos));
if (p == NULL)
return (NULL);
@@ -161,6 +169,8 @@
*/
static int pcap_activate_dos (pcap_t *pcap)
{
+ struct pcap_dos *pcapd = pcap->priv;
+
if (pcap->opt.rfmon) {
/*
* No monitor mode on DOS.
@@ -210,15 +220,16 @@
static int
pcap_read_one (pcap_t *p, pcap_handler callback, u_char *data)
{
+ struct pcap_dos *pd = p->priv;
struct pcap_pkthdr pcap;
- struct timeval now, expiry;
+ struct timeval now, expiry = { 0,0 };
BYTE *rx_buf;
int rx_len = 0;
- if (p->md.timeout > 0)
+ if (p->opt.timeout > 0)
{
gettimeofday2 (&now, NULL);
- expiry.tv_usec = now.tv_usec + 1000UL * p->md.timeout;
+ expiry.tv_usec = now.tv_usec + 1000UL * p->opt.timeout;
expiry.tv_sec = now.tv_sec;
while (expiry.tv_usec >= 1000000L)
{
@@ -287,10 +298,10 @@
return (1);
}
- /* If not to wait for a packet or pcap_close() called from
+ /* If not to wait for a packet or pcap_cleanup_dos() called from
* e.g. SIGINT handler, exit loop now.
*/
- if (p->md.timeout <= 0 || (volatile int)p->fd <= 0)
+ if (p->opt.timeout <= 0 || (volatile int)p->fd <= 0)
break;
gettimeofday2 (&now, NULL);
@@ -308,7 +319,7 @@
if (rx_len < 0) /* receive error */
{
- p->md.stat.ps_drop++;
+ pd->stat.ps_drop++;
#ifdef USE_32BIT_DRIVERS
if (pcap_pkt_debug > 1)
printk ("pkt-err %s\n", pktInfo.error);
@@ -321,9 +332,10 @@
static int
pcap_read_dos (pcap_t *p, int cnt, pcap_handler callback, u_char *data)
{
+ struct pcap_dos *pd = p->priv;
int rc, num = 0;
- while (num <= cnt || (cnt < 0))
+ while (num <= cnt || PACKET_COUNT_IS_UNLIMITED(cnt))
{
if (p->fd <= 0)
return (-1);
@@ -343,6 +355,7 @@
static int pcap_stats_dos (pcap_t *p, struct pcap_stat *ps)
{
struct net_device_stats *stats;
+ struct pcap_dos *pd;
struct device *dev = p ? get_device(p->fd) : NULL;
if (!dev)
@@ -359,12 +372,13 @@
FLUSHK();
- p->md.stat.ps_recv = stats->rx_packets;
- p->md.stat.ps_drop += stats->rx_missed_errors;
- p->md.stat.ps_ifdrop = stats->rx_dropped + /* queue full */
+ pd = p->priv;
+ pd->stat.ps_recv = stats->rx_packets;
+ pd->stat.ps_drop += stats->rx_missed_errors;
+ pd->stat.ps_ifdrop = stats->rx_dropped + /* queue full */
stats->rx_errors; /* HW errors */
if (ps)
- *ps = p->md.stat;
+ *ps = pd->stat;
return (0);
}
@@ -428,10 +442,13 @@
*/
static void pcap_cleanup_dos (pcap_t *p)
{
+ struct pcap_dos *pd;
+
if (p && !exc_occured)
{
+ pd = p->priv;
if (pcap_stats(p,NULL) < 0)
- p->md.stat.ps_drop = 0;
+ pd->stat.ps_drop = 0;
if (!get_device(p->fd))
return;
@@ -590,10 +607,12 @@
*/
void pcap_set_wait (pcap_t *p, void (*yield)(void), int wait)
{
+ struct pcap_dos *pd;
if (p)
{
- p->wait_proc = yield;
- p->md.timeout = wait;
+ pd = p->priv;
+ pd->wait_proc = yield;
+ p->opt.timeout = wait;
}
}
Index: libpcap/pcap-usb-linux.c
===================================================================
--- libpcap/pcap-usb-linux.c (revision 32783)
+++ libpcap/pcap-usb-linux.c (working copy)
@@ -121,6 +121,16 @@
#define MON_BIN_DATA_ZERO 0x4 /* data buffer is not available */
#define MON_BIN_ERROR 0x8
+/*
+ * Private data for capturing on Linux USB.
+ */
+struct pcap_usb_linux {
+ u_char *mmapbuf; /* memory-mapped region pointer */
+ size_t mmapbuflen; /* size of region */
+ int bus_index;
+ u_int packets_read;
+};
+
/* forward declaration */
static int usb_activate(pcap_t *);
static int usb_stats_linux(pcap_t *, struct pcap_stat *);
@@ -148,7 +158,7 @@
}
int
-usb_platform_finddevs(pcap_if_t **alldevsp, char *err_str)
+usb_findalldevs(pcap_if_t **alldevsp, char *err_str)
{
struct dirent* data;
int ret = 0;
@@ -204,14 +214,15 @@
static
int usb_mmap(pcap_t* handle)
{
+ struct pcap_usb_linux *handlep = handle->priv;
int len = ioctl(handle->fd, MON_IOCQ_RING_SIZE);
if (len < 0)
return 0;
- handle->md.mmapbuflen = len;
- handle->md.mmapbuf = mmap(0, handle->md.mmapbuflen, PROT_READ,
+ handlep->mmapbuflen = len;
+ handlep->mmapbuf = mmap(0, handlep->mmapbuflen, PROT_READ,
MAP_SHARED, handle->fd, 0);
- return handle->md.mmapbuf != MAP_FAILED;
+ return handlep->mmapbuf != MAP_FAILED;
}
#define CTRL_TIMEOUT (5*1000) /* milliseconds */
@@ -284,11 +295,41 @@
}
pcap_t *
-usb_create(const char *device, char *ebuf)
+usb_create(const char *device, char *ebuf, int *is_ours)
{
+ const char *cp;
+ char *cpend;
+ long devnum;
pcap_t *p;
- p = pcap_create_common(device, ebuf);
+ /* Does this look like a USB monitoring device? */
+ cp = strrchr(device, '/');
+ if (cp == NULL)
+ cp = device;
+ /* Does it begin with USB_IFACE? */
+ if (strncmp(cp, USB_IFACE, sizeof USB_IFACE - 1) != 0) {
+ /* Nope, doesn't begin with USB_IFACE */
+ *is_ours = 0;
+ return NULL;
+ }
+ /* Yes - is USB_IFACE followed by a number? */
+ cp += sizeof USB_IFACE - 1;
+ devnum = strtol(cp, &cpend, 10);
+ if (cpend == cp || *cpend != '\0') {
+ /* Not followed by a number. */
+ *is_ours = 0;
+ return NULL;
+ }
+ if (devnum < 0) {
+ /* Followed by a non-valid number. */
+ *is_ours = 0;
+ return NULL;
+ }
+
+ /* OK, it's probably ours. */
+ *is_ours = 1;
+
+ p = pcap_create_common(device, ebuf, sizeof (struct pcap_usb_linux));
if (p == NULL)
return (NULL);
@@ -299,6 +340,7 @@
static int
usb_activate(pcap_t* handle)
{
+ struct pcap_usb_linux *handlep = handle->priv;
char full_path[USB_LINE_LEN];
/* Initialize some components of the pcap structure. */
@@ -314,7 +356,7 @@
handle->setnonblock_op = pcap_setnonblock_fd;
/*get usb bus index from device name */
- if (sscanf(handle->opt.source, USB_IFACE"%d", &handle->md.ifindex) != 1)
+ if (sscanf(handle->opt.source, USB_IFACE"%d", &handlep->bus_index) != 1)
{
snprintf(handle->errbuf, PCAP_ERRBUF_SIZE,
"Can't get USB bus index from %s", handle->opt.source);
@@ -322,7 +364,7 @@
}
/*now select the read method: try to open binary interface */
- snprintf(full_path, USB_LINE_LEN, LINUX_USB_MON_DEV"%d", handle->md.ifindex);
+ snprintf(full_path, USB_LINE_LEN, LINUX_USB_MON_DEV"%d", handlep->bus_index);
handle->fd = open(full_path, O_RDONLY, 0);
if (handle->fd >= 0)
{
@@ -340,7 +382,7 @@
handle->stats_op = usb_stats_linux_bin;
handle->read_op = usb_read_linux_mmap;
handle->cleanup_op = usb_cleanup_linux_mmap;
- probe_devices(handle->md.ifindex);
+ probe_devices(handlep->bus_index);
/*
* "handle->fd" is a real file, so "select()" and
@@ -353,11 +395,11 @@
/* can't mmap, use plain binary interface access */
handle->stats_op = usb_stats_linux_bin;
handle->read_op = usb_read_linux_bin;
- probe_devices(handle->md.ifindex);
+ probe_devices(handlep->bus_index);
}
else {
/*Binary interface not available, try open text interface */
- snprintf(full_path, USB_LINE_LEN, USB_TEXT_DIR"/%dt", handle->md.ifindex);
+ snprintf(full_path, USB_LINE_LEN, USB_TEXT_DIR"/%dt", handlep->bus_index);
handle->fd = open(full_path, O_RDONLY, 0);
if (handle->fd < 0)
{
@@ -367,7 +409,7 @@
* Not found at the new location; try
* the old location.
*/
- snprintf(full_path, USB_LINE_LEN, USB_TEXT_DIR_OLD"/%dt", handle->md.ifindex);
+ snprintf(full_path, USB_LINE_LEN, USB_TEXT_DIR_OLD"/%dt", handlep->bus_index);
handle->fd = open(full_path, O_RDONLY, 0);
}
if (handle->fd < 0) {
@@ -426,6 +468,7 @@
* /usr/src/linux/Documentation/usb/usbmon.txt
* for message format
*/
+ struct pcap_usb_linux *handlep = handle->priv;
unsigned timestamp;
int tag, cnt, ep_num, dev_addr, dummy, ret, urb_len, data_len;
char etype, pipeid1, pipeid2, status[16], urb_tag, line[USB_LINE_LEN];
@@ -470,7 +513,7 @@
}
uhdr->id = tag;
uhdr->device_address = dev_addr;
- uhdr->bus_id = handle->md.ifindex;
+ uhdr->bus_id = handlep->bus_index;
uhdr->status = 0;
string += cnt;
@@ -609,7 +652,7 @@
if (handle->fcode.bf_insns == NULL ||
bpf_filter(handle->fcode.bf_insns, handle->buffer,
pkth.len, pkth.caplen)) {
- handle->md.packets_read++;
+ handlep->packets_read++;
callback(user, &pkth, handle->buffer);
return 1;
}
@@ -627,13 +670,14 @@
static int
usb_stats_linux(pcap_t *handle, struct pcap_stat *stats)
{
+ struct pcap_usb_linux *handlep = handle->priv;
int dummy, ret, consumed, cnt;
char string[USB_LINE_LEN];
char token[USB_LINE_LEN];
char * ptr = string;
int fd;
- snprintf(string, USB_LINE_LEN, USB_TEXT_DIR"/%ds", handle->md.ifindex);
+ snprintf(string, USB_LINE_LEN, USB_TEXT_DIR"/%ds", handlep->bus_index);
fd = open(string, O_RDONLY, 0);
if (fd < 0)
{
@@ -643,7 +687,7 @@
* Not found at the new location; try the old
* location.
*/
- snprintf(string, USB_LINE_LEN, USB_TEXT_DIR_OLD"/%ds", handle->md.ifindex);
+ snprintf(string, USB_LINE_LEN, USB_TEXT_DIR_OLD"/%ds", handlep->bus_index);
fd = open(string, O_RDONLY, 0);
}
if (fd < 0) {
@@ -694,7 +738,7 @@
ptr += cnt;
}
- stats->ps_recv = handle->md.packets_read;
+ stats->ps_recv = handlep->packets_read;
stats->ps_ifdrop = 0;
return 0;
}
@@ -710,6 +754,7 @@
static int
usb_stats_linux_bin(pcap_t *handle, struct pcap_stat *stats)
{
+ struct pcap_usb_linux *handlep = handle->priv;
int ret;
struct mon_bin_stats st;
ret = ioctl(handle->fd, MON_IOCG_STATS, &st);
@@ -720,7 +765,7 @@
return -1;
}
- stats->ps_recv = handle->md.packets_read + st.queued;
+ stats->ps_recv = handlep->packets_read + st.queued;
stats->ps_drop = st.dropped;
stats->ps_ifdrop = 0;
return 0;
@@ -733,6 +778,7 @@
static int
usb_read_linux_bin(pcap_t *handle, int max_packets, pcap_handler callback, u_char *user)
{
+ struct pcap_usb_linux *handlep = handle->priv;
struct mon_bin_get info;
int ret;
struct pcap_pkthdr pkth;
@@ -775,7 +821,7 @@
if (handle->fcode.bf_insns == NULL ||
bpf_filter(handle->fcode.bf_insns, handle->buffer,
pkth.len, pkth.caplen)) {
- handle->md.packets_read++;
+ handlep->packets_read++;
callback(user, &pkth, handle->buffer);
return 1;
}
@@ -791,6 +837,7 @@
static int
usb_read_linux_mmap(pcap_t *handle, int max_packets, pcap_handler callback, u_char *user)
{
+ struct pcap_usb_linux *handlep = handle->priv;
struct mon_bin_mfetch fetch;
int32_t vec[VEC_SIZE];
struct pcap_pkthdr pkth;
@@ -836,7 +883,7 @@
nflush = fetch.nfetch;
for (i=0; i<fetch.nfetch; ++i) {
/* discard filler */
- hdr = (pcap_usb_header*) &handle->md.mmapbuf[vec[i]];
+ hdr = (pcap_usb_header*) &handlep->mmapbuf[vec[i]];
if (hdr->event_type == '@')
continue;
@@ -855,14 +902,14 @@
if (handle->fcode.bf_insns == NULL ||
bpf_filter(handle->fcode.bf_insns, (u_char*) hdr,
pkth.len, pkth.caplen)) {
- handle->md.packets_read++;
+ handlep->packets_read++;
callback(user, &pkth, (u_char*) hdr);
packets++;
}
}
- /* with max_packets <= 0 we stop afer the first chunk*/
- if ((max_packets <= 0) || (packets == max_packets))
+ /* with max_packets specifying "unlimited" we stop afer the first chunk*/
+ if (PACKET_COUNT_IS_UNLIMITED(max_packets) || (packets == max_packets))
break;
}
@@ -874,10 +921,12 @@
static void
usb_cleanup_linux_mmap(pcap_t* handle)
{
+ struct pcap_usb_linux *handlep = handle->priv;
+
/* if we have a memory-mapped buffer, unmap it */
- if (handle->md.mmapbuf != NULL) {
- munmap(handle->md.mmapbuf, handle->md.mmapbuflen);
- handle->md.mmapbuf = NULL;
+ if (handlep->mmapbuf != NULL) {
+ munmap(handlep->mmapbuf, handlep->mmapbuflen);
+ handlep->mmapbuf = NULL;
}
pcap_cleanup_live_common(handle);
}
Index: libpcap/pcap-dlpi.c
===================================================================
--- libpcap/pcap-dlpi.c (revision 32783)
+++ libpcap/pcap-dlpi.c (working copy)
@@ -245,6 +245,9 @@
static int
pcap_inject_dlpi(pcap_t *p, const void *buf, size_t size)
{
+#ifdef DL_HP_RAWDLS
+ struct pcap_dlpi *pd = p->priv;
+#endif
int ret;
#if defined(DLIOCRAW)
@@ -255,12 +258,12 @@
return (-1);
}
#elif defined(DL_HP_RAWDLS)
- if (p->send_fd < 0) {
+ if (pd->send_fd < 0) {
snprintf(p->errbuf, PCAP_ERRBUF_SIZE,
"send: Output FD couldn't be opened");
return (-1);
}
- ret = dlrawdatareq(p->send_fd, buf, size);
+ ret = dlrawdatareq(pd->send_fd, buf, size);
if (ret == -1) {
snprintf(p->errbuf, PCAP_ERRBUF_SIZE, "send: %s",
pcap_strerror(errno));
@@ -321,16 +324,23 @@
static void
pcap_cleanup_dlpi(pcap_t *p)
{
- if (p->send_fd >= 0) {
- close(p->send_fd);
- p->send_fd = -1;
+#ifdef DL_HP_RAWDLS
+ struct pcap_dlpi *pd = p->priv;
+
+ if (pd->send_fd >= 0) {
+ close(pd->send_fd);
+ pd->send_fd = -1;
}
+#endif
pcap_cleanup_live_common(p);
}
static int
pcap_activate_dlpi(pcap_t *p)
{
+#ifdef DL_HP_RAWDLS
+ struct pcap_dlpi *pd = p->priv;
+#endif
register char *cp;
int ppa;
#ifdef HAVE_SOLARIS
@@ -398,13 +408,13 @@
* receiving packets on the same descriptor - you need separate
* descriptors for sending and receiving, bound to different SAPs.
*
- * If the open fails, we just leave -1 in "p->send_fd" and reject
+ * If the open fails, we just leave -1 in "pd->send_fd" and reject
* attempts to send packets, just as if, in pcap-bpf.c, we fail
* to open the BPF device for reading and writing, we just try
* to open it for reading only and, if that succeeds, just let
* the send attempts fail.
*/
- p->send_fd = open(cp, O_RDWR);
+ pd->send_fd = open(cp, O_RDWR);
#endif
/*
@@ -513,8 +523,8 @@
if (status < 0)
goto bad;
#ifdef DL_HP_RAWDLS
- if (p->send_fd >= 0) {
- if (dl_doattach(p->send_fd, ppa, p->errbuf) < 0)
+ if (pd->send_fd >= 0) {
+ if (dl_doattach(pd->send_fd, ppa, p->errbuf) < 0)
goto bad;
}
#endif
@@ -570,13 +580,13 @@
*/
if (dl_dohpuxbind(p->fd, p->errbuf) < 0)
goto bad;
- if (p->send_fd >= 0) {
+ if (pd->send_fd >= 0) {
/*
** XXX - if this fails, just close send_fd and
** set it to -1, so that you can't send but can
** still receive?
*/
- if (dl_dohpuxbind(p->send_fd, p->errbuf) < 0)
+ if (dl_dohpuxbind(pd->send_fd, p->errbuf) < 0)
goto bad;
}
#else /* neither AIX nor HP-UX */
@@ -669,13 +679,13 @@
** binding it anyway, just to keep the HP-UX 9/10.20 or later
** code together.
*/
- if (p->send_fd >= 0) {
+ if (pd->send_fd >= 0) {
/*
** XXX - if this fails, just close send_fd and
** set it to -1, so that you can't send but can
** still receive?
*/
- if (dl_dohpuxbind(p->send_fd, p->errbuf) < 0)
+ if (dl_dohpuxbind(pd->send_fd, p->errbuf) < 0)
goto bad;
}
#endif
@@ -729,7 +739,7 @@
#endif
/* Push and configure bufmod. */
- if (pcap_conf_bufmod(p, ss, p->md.timeout) != 0)
+ if (pcap_conf_bufmod(p, ss) != 0)
goto bad;
#endif
@@ -1693,15 +1703,21 @@
#endif
pcap_t *
-pcap_create(const char *device, char *ebuf)
+pcap_create_interface(const char *device, char *ebuf)
{
pcap_t *p;
+#ifdef DL_HP_RAWDLS
+ struct pcap_dlpi *pd;
+#endif
- p = pcap_create_common(device, ebuf);
+ p = pcap_create_common(device, ebuf, sizeof (struct pcap_dlpi));
if (p == NULL)
return (NULL);
- p->send_fd = -1; /* it hasn't been opened yet */
+#ifdef DL_HP_RAWDLS
+ pd = p->priv;
+ pd->send_fd = -1; /* it hasn't been opened yet */
+#endif
p->activate_op = pcap_activate_dlpi;
return (p);
Index: libpcap/pcap_open_dead.3pcap.in
===================================================================
--- libpcap/pcap_open_dead.3pcap.in (revision 32783)
+++ libpcap/pcap_open_dead.3pcap.in (working copy)
@@ -19,10 +19,10 @@
.\" WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
.\" MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
.\"
-.TH PCAP_OPEN_DEAD 3PCAP "5 April 2008"
+.TH PCAP_OPEN_DEAD 3PCAP "1 July 2013"
.SH NAME
-pcap_open_dead \- open a fake pcap_t for compiling filters or opening a
-capture for output
+pcap_open_dead, pcap_open_dead_with_tstamp_precision \- open a fake
+pcap_t for compiling filters or opening a capture for output
.SH SYNOPSIS
.nf
.ft B
@@ -31,15 +31,27 @@
.LP
.ft B
pcap_t *pcap_open_dead(int linktype, int snaplen);
+pcap_t *pcap_open_dead_with_tstamp_precision(int linktype, int snaplen,
+ u_int precision);
.ft
.fi
.SH DESCRIPTION
.PP
.B pcap_open_dead()
-is used for creating a
+and
+.B pcap_open_dead_with_tstamp_precision()
+are used for creating a
.B pcap_t
structure to use when calling the other functions in libpcap. It is
-typically used when just using libpcap for compiling BPF code.
+typically used when just using libpcap for compiling BPF code; it can
+also be used if using
+.BR pcap_dump_open() ,
+.BR pcap_dump() ,
+and
+.B pcap_dump_close()
+to write a savefile if there is no
+.B pcap_t
+that supplies the packets to be written.
.PP
.I linktype
specifies the link-layer type for the
@@ -48,5 +60,22 @@
.I snaplen
specifies the snapshot length for the
.BR pcap_t .
+.PP
+When
+.BR pcap_open_dead_with_tstamp_precision() ,
+is used to create a
+.B pcap_t
+for use with
+.BR pcap_dump_open() ,
+.I precision
+specifies the time stamp precision for packets;
+.B PCAP_TSTAMP_PRECISION_MICRO
+should be specified if the packets to be written have time stamps in
+seconds and microseconds, and
+.B PCAP_TSTAMP_PRECISION_NANO
+should be specified if the packets to be written have time stamps in
+seconds and nanoseconds. Its value does not affect
+.BR pcap_compile() .
.SH SEE ALSO
-pcap(3PCAP), pcap-linktype(@MAN_MISC_INFO@)
+pcap(3PCAP), pcap_compile(3PCAP), pcap_dump_open(3PCAP),
+pcap-linktype(@MAN_MISC_INFO@)
Index: libpcap/pcap-usb-linux.h
===================================================================
--- libpcap/pcap-usb-linux.h (revision 32783)
+++ libpcap/pcap-usb-linux.h (working copy)
@@ -36,5 +36,5 @@
/*
* Prototypes for USB-related functions
*/
-int usb_platform_finddevs(pcap_if_t **alldevsp, char *err_str);
-pcap_t *usb_create(const char *device, char *ebuf);
+int usb_findalldevs(pcap_if_t **alldevsp, char *err_str);
+pcap_t *usb_create(const char *device, char *ebuf, int *is_ours);
Index: libpcap/pcap-win32.c
===================================================================
--- libpcap/pcap-win32.c (revision 32783)
+++ libpcap/pcap-win32.c (working copy)
@@ -72,6 +72,17 @@
#define SWAPS(_X) ((_X & 0xff) << 8) | (_X >> 8)
/*
+ * Private data for capturing on WinPcap devices.
+ */
+struct pcap_win {
+ int nonblock;
+
+#ifdef HAVE_DAG_API
+ int dag_fcs_bits; /* Number of checksum bits from link layer */
+#endif
+};
+
+/*
* Header that the WinPcap driver associates to the packets.
* Once was in bpf.h
*/
@@ -165,6 +176,13 @@
return 0;
}
+/*return the Adapter for a pcap_t*/
+static Adapter *
+pcap_getadapter_win32(pcap_t *p)
+{
+ return p->adapter;
+}
+
static int
pcap_read_win32_npf(pcap_t *p, int cnt, pcap_handler callback, u_char *user)
{
@@ -238,7 +256,7 @@
*/
(*callback)(user, (struct pcap_pkthdr*)bp, bp + hdrlen);
bp += Packet_WORDALIGN(caplen + hdrlen);
- if (++n >= cnt && cnt > 0) {
+ if (++n >= cnt && !PACKET_COUNT_IS_UNLIMITED(cnt)) {
p->bp = bp;
p->cc = ep - bp;
return (n);
@@ -253,6 +271,7 @@
static int
pcap_read_win32_dag(pcap_t *p, int cnt, pcap_handler callback, u_char *user)
{
+ struct pcap_win *pw = p->priv;
u_char *dp = NULL;
int packet_len = 0, caplen = 0;
struct pcap_pkthdr pcap_header;
@@ -295,7 +314,7 @@
break;
/* Increase the number of captured packets */
- p->md.stat.ps_recv++;
+ pw->stat.ps_recv++;
/* Find the beginning of the packet */
dp = ((u_char *)header) + dag_record_size;
@@ -312,7 +331,7 @@
case TYPE_ETH:
swt = SWAPS(header->wlen);
- packet_len = swt - (p->md.dag_fcs_bits);
+ packet_len = swt - (pw->dag_fcs_bits);
caplen = erf_record_len - dag_record_size - 2;
if (caplen > packet_len)
{
@@ -324,7 +343,7 @@
case TYPE_HDLC_POS:
swt = SWAPS(header->wlen);
- packet_len = swt - (p->md.dag_fcs_bits);
+ packet_len = swt - (pw->dag_fcs_bits);
caplen = erf_record_len - dag_record_size;
if (caplen > packet_len)
{
@@ -397,7 +416,7 @@
header = (dag_record_t*)((char*)header + erf_record_len);
/* Stop if the number of packets requested by user has been reached*/
- if (++n >= cnt && cnt > 0)
+ if (++n >= cnt && !PACKET_COUNT_IS_UNLIMITED(cnt))
{
p->bp = (char*)header;
p->cc = endofbuf - (char*)header;
@@ -457,6 +476,7 @@
static int
pcap_activate_win32(pcap_t *p)
{
+ struct pcap_win *pw = p->priv;
NetType type;
if (p->opt.rfmon) {
@@ -622,12 +642,24 @@
PacketInitPacket(p->Packet,(BYTE*)p->buffer,p->bufsize);
- /* tell the driver to copy the buffer only if it contains at least 16K */
- if(PacketSetMinToCopy(p->adapter,16000)==FALSE)
+ if (p-opt.immediate)
{
- snprintf(p->errbuf, PCAP_ERRBUF_SIZE,"Error calling PacketSetMinToCopy: %s", pcap_win32strerror());
- goto bad;
+ /* tell the driver to copy the buffer as soon as data arrives */
+ if(PacketSetMinToCopy(p->adapter,0)==FALSE)
+ {
+ snprintf(p->errbuf, PCAP_ERRBUF_SIZE,"Error calling PacketSetMinToCopy: %s", pcap_win32strerror());
+ goto bad;
+ }
}
+ else
+ {
+ /* tell the driver to copy the buffer only if it contains at least 16K */
+ if(PacketSetMinToCopy(p->adapter,16000)==FALSE)
+ {
+ snprintf(p->errbuf, PCAP_ERRBUF_SIZE,"Error calling PacketSetMinToCopy: %s", pcap_win32strerror());
+ goto bad;
+ }
+ }
}
else
#ifdef HAVE_DAG_API
@@ -672,13 +704,13 @@
/* Set the length of the FCS associated to any packet. This value
* will be subtracted to the packet length */
- p->md.dag_fcs_bits = p->adapter->DagFcsLen;
+ pw->dag_fcs_bits = p->adapter->DagFcsLen;
}
#else
goto bad;
#endif /* HAVE_DAG_API */
- PacketSetReadTimeout(p->adapter, p->md.timeout);
+ PacketSetReadTimeout(p->adapter, p->opt.timeout);
#ifdef HAVE_DAG_API
if(p->adapter->Flags & INFO_FLAG_DAG_CARD)
@@ -706,6 +738,7 @@
p->setbuff_op = pcap_setbuff_win32;
p->setmode_op = pcap_setmode_win32;
p->setmintocopy_op = pcap_setmintocopy_win32;
+ p->getadapter_op = pcap_getadapter_win32;
p->cleanup_op = pcap_cleanup_win32;
return (0);
@@ -715,7 +748,7 @@
}
pcap_t *
-pcap_create(const char *device, char *ebuf)
+pcap_create_interface(const char *device, char *ebuf)
{
pcap_t *p;
@@ -743,12 +776,12 @@
}
snprintf(deviceAscii, length + 1, "%ws", (wchar_t*)device);
- p = pcap_create_common(deviceAscii, ebuf);
+ p = pcap_create_common(deviceAscii, ebuf, sizeof (struct pcap_win));
free(deviceAscii);
}
else
{
- p = pcap_create_common(device, ebuf);
+ p = pcap_create_common(device, ebuf, sizeof (struct pcap_win));
}
if (p == NULL)
@@ -801,25 +834,26 @@
return -1;
}
- p->md.use_bpf = 0;
-
return (0);
}
static int
pcap_getnonblock_win32(pcap_t *p, char *errbuf)
{
+ struct pcap_win *pw = p->priv;
+
/*
* XXX - if there were a PacketGetReadTimeout() call, we
* would use it, and return 1 if the timeout is -1
* and 0 otherwise.
*/
- return (p->nonblock);
+ return (pw->nonblock);
}
static int
pcap_setnonblock_win32(pcap_t *p, int nonblock, char *errbuf)
{
+ struct pcap_win *pw = p->priv;
int newtimeout;
if (nonblock) {
@@ -833,14 +867,14 @@
* (Note that this may be -1, in which case we're not
* really leaving non-blocking mode.)
*/
- newtimeout = p->md.timeout;
+ newtimeout = p->opt.timeout;
}
if (!PacketSetReadTimeout(p->adapter, newtimeout)) {
- snprintf(p->errbuf, PCAP_ERRBUF_SIZE,
+ snprintf(errbuf, PCAP_ERRBUF_SIZE,
"PacketSetReadTimeout: %s", pcap_win32strerror());
return (-1);
}
- p->nonblock = (newtimeout == -1);
+ pw->nonblock = (newtimeout == -1);
return (0);
}
Index: libpcap/pcap-bpf.c
===================================================================
--- libpcap/pcap-bpf.c (revision 32783)
+++ libpcap/pcap-bpf.c (working copy)
@@ -122,18 +122,60 @@
#include "pcap-int.h"
-#ifdef HAVE_DAG_API
-#include "pcap-dag.h"
-#endif /* HAVE_DAG_API */
-
-#ifdef HAVE_SNF_API
-#include "pcap-snf.h"
-#endif /* HAVE_SNF_API */
-
#ifdef HAVE_OS_PROTO_H
#include "os-proto.h"
#endif
+/*
+ * Later versions of NetBSD stick padding in front of FDDI frames
+ * to align the IP header on a 4-byte boundary.
+ */
+#if defined(__NetBSD__) && __NetBSD_Version__ > 106000000
+#define PCAP_FDDIPAD 3
+#endif
+
+/*
+ * Private data for capturing on BPF devices.
+ */
+struct pcap_bpf {
+#ifdef PCAP_FDDIPAD
+ int fddipad;
+#endif
+
+#ifdef HAVE_ZEROCOPY_BPF
+ /*
+ * Zero-copy read buffer -- for zero-copy BPF. 'buffer' above will
+ * alternative between these two actual mmap'd buffers as required.
+ * As there is a header on the front size of the mmap'd buffer, only
+ * some of the buffer is exposed to libpcap as a whole via bufsize;
+ * zbufsize is the true size. zbuffer tracks the current zbuf
+ * assocated with buffer so that it can be used to decide which the
+ * next buffer to read will be.
+ */
+ u_char *zbuf1, *zbuf2, *zbuffer;
+ u_int zbufsize;
+ u_int zerocopy;
+ u_int interrupted;
+ struct timespec firstsel;
+ /*
+ * If there's currently a buffer being actively processed, then it is
+ * referenced here; 'buffer' is also pointed at it, but offset by the
+ * size of the header.
+ */
+ struct bpf_zbuf_header *bzh;
+ int nonblock; /* true if in nonblocking mode */
+#endif /* HAVE_ZEROCOPY_BPF */
+
+ char *device; /* device name */
+ int filtering_in_kernel; /* using kernel filter */
+ int must_do_on_close; /* stuff we must do when we close */
+};
+
+/*
+ * Stuff to do when we close.
+ */
+#define MUST_CLEAR_RFMON 0x00000001 /* clear rfmon (monitor) mode */
+
#ifdef BIOCGDLTLIST
# if (defined(HAVE_NET_IF_MEDIA_H) && defined(IFM_IEEE80211)) && !defined(__APPLE__)
#define HAVE_BSD_IEEE80211
@@ -155,6 +197,10 @@
#endif /* BIOCGDLTLIST */
+#if defined(sun) && defined(LIFNAMSIZ) && defined(lifr_zoneid)
+#include <zone.h>
+#endif
+
/*
* We include the OS's <net/bpf.h>, not our "pcap/bpf.h", so we probably
* don't get DLT_DOCSIS defined.
@@ -188,22 +234,17 @@
/*
* For zerocopy bpf, the setnonblock/getnonblock routines need to modify
- * p->md.timeout so we don't call select(2) if the pcap handle is in non-
- * blocking mode. We preserve the timeout supplied by pcap_open functions
- * to make sure it does not get clobbered if the pcap handle moves between
- * blocking and non-blocking mode.
+ * pb->nonblock so we don't call select(2) if the pcap handle is in non-
+ * blocking mode.
*/
static int
pcap_getnonblock_bpf(pcap_t *p, char *errbuf)
{
#ifdef HAVE_ZEROCOPY_BPF
- if (p->md.zerocopy) {
- /*
- * Use a negative value for the timeout to represent that the
- * pcap handle is in non-blocking mode.
- */
- return (p->md.timeout < 0);
- }
+ struct pcap_bpf *pb = p->priv;
+
+ if (pb->zerocopy)
+ return (pb->nonblock);
#endif
return (pcap_getnonblock_fd(p, errbuf));
}
@@ -212,34 +253,10 @@
pcap_setnonblock_bpf(pcap_t *p, int nonblock, char *errbuf)
{
#ifdef HAVE_ZEROCOPY_BPF
- if (p->md.zerocopy) {
- /*
- * Map each value to the corresponding 2's complement, to
- * preserve the timeout value provided with pcap_set_timeout.
- * (from pcap-linux.c).
- */
- if (nonblock) {
- if (p->md.timeout >= 0) {
- /*
- * Timeout is non-negative, so we're not
- * currently in non-blocking mode; set it
- * to the 2's complement, to make it
- * negative, as an indication that we're
- * in non-blocking mode.
- */
- p->md.timeout = p->md.timeout * -1 - 1;
- }
- } else {
- if (p->md.timeout < 0) {
- /*
- * Timeout is negative, so we're currently
- * in blocking mode; reverse the previous
- * operation, to make the timeout non-negative
- * again.
- */
- p->md.timeout = (p->md.timeout + 1) * -1;
- }
- }
+ struct pcap_bpf *pb = p->priv;
+
+ if (pb->zerocopy) {
+ pb->nonblock = nonblock;
return (0);
}
#endif
@@ -259,25 +276,26 @@
static int
pcap_next_zbuf_shm(pcap_t *p, int *cc)
{
+ struct pcap_bpf *pb = p->priv;
struct bpf_zbuf_header *bzh;
- if (p->md.zbuffer == p->md.zbuf2 || p->md.zbuffer == NULL) {
- bzh = (struct bpf_zbuf_header *)p->md.zbuf1;
+ if (pb->zbuffer == pb->zbuf2 || pb->zbuffer == NULL) {
+ bzh = (struct bpf_zbuf_header *)pb->zbuf1;
if (bzh->bzh_user_gen !=
atomic_load_acq_int(&bzh->bzh_kernel_gen)) {
- p->md.bzh = bzh;
- p->md.zbuffer = (u_char *)p->md.zbuf1;
- p->buffer = p->md.zbuffer + sizeof(*bzh);
+ pb->bzh = bzh;
+ pb->zbuffer = (u_char *)pb->zbuf1;
+ p->buffer = pb->zbuffer + sizeof(*bzh);
*cc = bzh->bzh_kernel_len;
return (1);
}
- } else if (p->md.zbuffer == p->md.zbuf1) {
- bzh = (struct bpf_zbuf_header *)p->md.zbuf2;
+ } else if (pb->zbuffer == pb->zbuf1) {
+ bzh = (struct bpf_zbuf_header *)pb->zbuf2;
if (bzh->bzh_user_gen !=
atomic_load_acq_int(&bzh->bzh_kernel_gen)) {
- p->md.bzh = bzh;
- p->md.zbuffer = (u_char *)p->md.zbuf2;
- p->buffer = p->md.zbuffer + sizeof(*bzh);
+ pb->bzh = bzh;
+ pb->zbuffer = (u_char *)pb->zbuf2;
+ p->buffer = pb->zbuffer + sizeof(*bzh);
*cc = bzh->bzh_kernel_len;
return (1);
}
@@ -296,6 +314,7 @@
static int
pcap_next_zbuf(pcap_t *p, int *cc)
{
+ struct pcap_bpf *pb = p->priv;
struct bpf_zbuf bz;
struct timeval tv;
struct timespec cur;
@@ -319,15 +338,15 @@
* our timeout is less then or equal to zero, handle it like a
* regular timeout.
*/
- tmout = p->md.timeout;
+ tmout = p->opt.timeout;
if (tmout)
(void) clock_gettime(CLOCK_MONOTONIC, &cur);
- if (p->md.interrupted && p->md.timeout) {
- expire = TSTOMILLI(&p->md.firstsel) + p->md.timeout;
+ if (pb->interrupted && p->opt.timeout) {
+ expire = TSTOMILLI(&pb->firstsel) + p->opt.timeout;
tmout = expire - TSTOMILLI(&cur);
#undef TSTOMILLI
if (tmout <= 0) {
- p->md.interrupted = 0;
+ pb->interrupted = 0;
data = pcap_next_zbuf_shm(p, cc);
if (data)
return (data);
@@ -344,7 +363,7 @@
* the next timeout. Note that we only call select if the handle
* is in blocking mode.
*/
- if (p->md.timeout >= 0) {
+ if (!pb->nonblock) {
FD_ZERO(&r_set);
FD_SET(p->fd, &r_set);
if (tmout != 0) {
@@ -352,11 +371,11 @@
tv.tv_usec = (tmout * 1000) % 1000000;
}
r = select(p->fd + 1, &r_set, NULL, NULL,
- p->md.timeout != 0 ? &tv : NULL);
+ p->opt.timeout != 0 ? &tv : NULL);
if (r < 0 && errno == EINTR) {
- if (!p->md.interrupted && p->md.timeout) {
- p->md.interrupted = 1;
- p->md.firstsel = cur;
+ if (!pb->interrupted && p->opt.timeout) {
+ pb->interrupted = 1;
+ pb->firstsel = cur;
}
return (0);
} else if (r < 0) {
@@ -365,7 +384,7 @@
return (PCAP_ERROR);
}
}
- p->md.interrupted = 0;
+ pb->interrupted = 0;
/*
* Check again for data, which may exist now that we've either been
* woken up as a result of data or timed out. Try the "there's data"
@@ -393,30 +412,22 @@
static int
pcap_ack_zbuf(pcap_t *p)
{
+ struct pcap_bpf *pb = p->priv;
- atomic_store_rel_int(&p->md.bzh->bzh_user_gen,
- p->md.bzh->bzh_kernel_gen);
- p->md.bzh = NULL;
+ atomic_store_rel_int(&pb->bzh->bzh_user_gen,
+ pb->bzh->bzh_kernel_gen);
+ pb->bzh = NULL;
p->buffer = NULL;
return (0);
}
#endif /* HAVE_ZEROCOPY_BPF */
pcap_t *
-pcap_create(const char *device, char *ebuf)
+pcap_create_interface(const char *device, char *ebuf)
{
pcap_t *p;
-#ifdef HAVE_DAG_API
- if (strstr(device, "dag"))
- return (dag_create(device, ebuf));
-#endif /* HAVE_DAG_API */
-#ifdef HAVE_SNF_API
- if (strstr(device, "snf"))
- return (snf_create(device, ebuf));
-#endif /* HAVE_SNF_API */
-
- p = pcap_create_common(device, ebuf);
+ p = pcap_create_common(device, ebuf, sizeof (struct pcap_bpf));
if (p == NULL)
return (NULL);
@@ -812,6 +823,7 @@
static int
pcap_read_bpf(pcap_t *p, int cnt, pcap_handler callback, u_char *user)
{
+ struct pcap_bpf *pb = p->priv;
int cc;
int n = 0;
register u_char *bp, *ep;
@@ -847,7 +859,7 @@
* buffer.
*/
#ifdef HAVE_ZEROCOPY_BPF
- if (p->md.zerocopy) {
+ if (pb->zerocopy) {
if (p->buffer != NULL)
pcap_ack_zbuf(p);
i = pcap_next_zbuf(p, &cc);
@@ -995,7 +1007,7 @@
* skipping that padding.
#endif
*/
- if (p->md.use_bpf ||
+ if (pb->filtering_in_kernel ||
bpf_filter(p->fcode.bf_insns, datap, bhp->bh_datalen, caplen)) {
struct pcap_pkthdr pkthdr;
@@ -1025,7 +1037,7 @@
#endif
(*callback)(user, &pkthdr, datap);
bp += BPF_WORDALIGN(caplen + hdrlen);
- if (++n >= cnt && cnt > 0) {
+ if (++n >= cnt && !PACKET_COUNT_IS_UNLIMITED(cnt)) {
p->bp = bp;
p->cc = ep - bp;
/*
@@ -1262,19 +1274,20 @@
static void
pcap_cleanup_bpf(pcap_t *p)
{
+ struct pcap_bpf *pb = p->priv;
#ifdef HAVE_BSD_IEEE80211
int sock;
struct ifmediareq req;
struct ifreq ifr;
#endif
- if (p->md.must_do_on_close != 0) {
+ if (pb->must_do_on_close != 0) {
/*
* There's something we have to do when closing this
* pcap_t.
*/
#ifdef HAVE_BSD_IEEE80211
- if (p->md.must_do_on_close & MUST_CLEAR_RFMON) {
+ if (pb->must_do_on_close & MUST_CLEAR_RFMON) {
/*
* We put the interface into rfmon mode;
* take it out of rfmon mode.
@@ -1291,7 +1304,7 @@
strerror(errno));
} else {
memset(&req, 0, sizeof(req));
- strncpy(req.ifm_name, p->md.device,
+ strncpy(req.ifm_name, pb->device,
sizeof(req.ifm_name));
if (ioctl(sock, SIOCGIFMEDIA, &req) < 0) {
fprintf(stderr,
@@ -1306,7 +1319,7 @@
*/
memset(&ifr, 0, sizeof(ifr));
(void)strncpy(ifr.ifr_name,
- p->md.device,
+ pb->device,
sizeof(ifr.ifr_name));
ifr.ifr_media =
req.ifm_current & ~IFM_IEEE80211_MONITOR;
@@ -1329,11 +1342,11 @@
* have to take the interface out of some mode.
*/
pcap_remove_from_pcaps_to_close(p);
- p->md.must_do_on_close = 0;
+ pb->must_do_on_close = 0;
}
#ifdef HAVE_ZEROCOPY_BPF
- if (p->md.zerocopy) {
+ if (pb->zerocopy) {
/*
* Delete the mappings. Note that p->buffer gets
* initialized to one of the mmapped regions in
@@ -1341,16 +1354,16 @@
* null it out so that pcap_cleanup_live_common()
* doesn't try to free it.
*/
- if (p->md.zbuf1 != MAP_FAILED && p->md.zbuf1 != NULL)
- (void) munmap(p->md.zbuf1, p->md.zbufsize);
- if (p->md.zbuf2 != MAP_FAILED && p->md.zbuf2 != NULL)
- (void) munmap(p->md.zbuf2, p->md.zbufsize);
+ if (pb->zbuf1 != MAP_FAILED && pb->zbuf1 != NULL)
+ (void) munmap(pb->zbuf1, pb->zbufsize);
+ if (pb->zbuf2 != MAP_FAILED && pb->zbuf2 != NULL)
+ (void) munmap(pb->zbuf2, pb->zbufsize);
p->buffer = NULL;
}
#endif
- if (p->md.device != NULL) {
- free(p->md.device);
- p->md.device = NULL;
+ if (pb->device != NULL) {
+ free(pb->device);
+ pb->device = NULL;
}
pcap_cleanup_live_common(p);
}
@@ -1451,15 +1464,25 @@
* Default capture buffer size.
* 32K isn't very much for modern machines with fast networks; we
* pick .5M, as that's the maximum on at least some systems with BPF.
+ *
+ * However, on AIX 3.5, the larger buffer sized caused unrecoverable
+ * read failures under stress, so we leave it as 32K; yet another
+ * place where AIX's BPF is broken.
*/
+#ifdef _AIX
+#define DEFAULT_BUFSIZE 32768
+#else
#define DEFAULT_BUFSIZE 524288
+#endif
static int
pcap_activate_bpf(pcap_t *p)
{
+ struct pcap_bpf *pb = p->priv;
int status = 0;
int fd;
#ifdef LIFNAMSIZ
+ char *zonesep;
struct lifreq ifr;
char *ifrname = ifr.lifr_name;
const size_t ifnamsiz = sizeof(ifr.lifr_name);
@@ -1514,8 +1537,31 @@
goto bad;
}
- p->md.device = strdup(p->opt.source);
- if (p->md.device == NULL) {
+#if defined(LIFNAMSIZ) && defined(ZONENAME_MAX) && defined(lifr_zoneid)
+ /*
+ * Check if the given source network device has a '/' separated
+ * zonename prefix string. The zonename prefixed source device
+ * can be used by libpcap consumers to capture network traffic
+ * in non-global zones from the global zone on Solaris 11 and
+ * above. If the zonename prefix is present then we strip the
+ * prefix and pass the zone ID as part of lifr_zoneid.
+ */
+ if ((zonesep = strchr(p->opt.source, '/')) != NULL) {
+ char zonename[ZONENAME_MAX];
+ int znamelen;
+ char *lnamep;
+
+ znamelen = zonesep - p->opt.source;
+ (void) strlcpy(zonename, p->opt.source, znamelen + 1);
+ lnamep = strdup(zonesep + 1);
+ ifr.lifr_zoneid = getzoneidbyname(zonename);
+ free(p->opt.source);
+ p->opt.source = lnamep;
+ }
+#endif
+
+ pb->device = strdup(p->opt.source);
+ if (pb->device == NULL) {
snprintf(p->errbuf, PCAP_ERRBUF_SIZE, "strdup: %s",
pcap_strerror(errno));
status = PCAP_ERROR;
@@ -1623,7 +1669,7 @@
/*
* We have zerocopy BPF; use it.
*/
- p->md.zerocopy = 1;
+ pb->zerocopy = 1;
/*
* How to pick a buffer size: first, query the maximum buffer
@@ -1653,22 +1699,22 @@
#ifndef roundup
#define roundup(x, y) ((((x)+((y)-1))/(y))*(y)) /* to any y */
#endif
- p->md.zbufsize = roundup(v, getpagesize());
- if (p->md.zbufsize > zbufmax)
- p->md.zbufsize = zbufmax;
- p->md.zbuf1 = mmap(NULL, p->md.zbufsize, PROT_READ | PROT_WRITE,
+ pb->zbufsize = roundup(v, getpagesize());
+ if (pb->zbufsize > zbufmax)
+ pb->zbufsize = zbufmax;
+ pb->zbuf1 = mmap(NULL, pb->zbufsize, PROT_READ | PROT_WRITE,
MAP_ANON, -1, 0);
- p->md.zbuf2 = mmap(NULL, p->md.zbufsize, PROT_READ | PROT_WRITE,
+ pb->zbuf2 = mmap(NULL, pb->zbufsize, PROT_READ | PROT_WRITE,
MAP_ANON, -1, 0);
- if (p->md.zbuf1 == MAP_FAILED || p->md.zbuf2 == MAP_FAILED) {
+ if (pb->zbuf1 == MAP_FAILED || pb->zbuf2 == MAP_FAILED) {
snprintf(p->errbuf, PCAP_ERRBUF_SIZE, "mmap: %s",
pcap_strerror(errno));
goto bad;
}
- bzero(&bz, sizeof(bz));
- bz.bz_bufa = p->md.zbuf1;
- bz.bz_bufb = p->md.zbuf2;
- bz.bz_buflen = p->md.zbufsize;
+ memset(&bz, 0, sizeof(bz)); /* bzero() deprecated, replaced with memset() */
+ bz.bz_bufa = pb->zbuf1;
+ bz.bz_bufb = pb->zbuf2;
+ bz.bz_buflen = pb->zbufsize;
if (ioctl(fd, BIOCSETZBUF, (caddr_t)&bz) < 0) {
snprintf(p->errbuf, PCAP_ERRBUF_SIZE, "BIOCSETZBUF: %s",
pcap_strerror(errno));
@@ -1680,7 +1726,7 @@
p->opt.source, pcap_strerror(errno));
goto bad;
}
- v = p->md.zbufsize - sizeof(struct bpf_zbuf_header);
+ v = pb->zbufsize - sizeof(struct bpf_zbuf_header);
} else
#endif
{
@@ -1992,8 +2038,8 @@
if (v == DLT_FDDI)
p->fddipad = PCAP_FDDIPAD;
else
+#endif
p->fddipad = 0;
-#endif
p->linktype = v;
#if defined(BIOCGHDRCMPLT) && defined(BIOCSHDRCMPLT)
@@ -2015,9 +2061,14 @@
#endif
/* set timeout */
#ifdef HAVE_ZEROCOPY_BPF
- if (p->md.timeout != 0 && !p->md.zerocopy) {
+ /*
+ * In zero-copy mode, we just use the timeout in select().
+ * XXX - what if we're in non-blocking mode and the *application*
+ * is using select() or poll() or kqueues or....?
+ */
+ if (p->opt.timeout && !pb->zerocopy) {
#else
- if (p->md.timeout) {
+ if (p->opt.timeout) {
#endif
/*
* XXX - is this seconds/nanoseconds in AIX?
@@ -2041,8 +2092,8 @@
struct BPF_TIMEVAL bpf_to;
if (IOCPARM_LEN(BIOCSRTIMEOUT) != sizeof(struct timeval)) {
- bpf_to.tv_sec = p->md.timeout / 1000;
- bpf_to.tv_usec = (p->md.timeout * 1000) % 1000000;
+ bpf_to.tv_sec = p->opt.timeout / 1000;
+ bpf_to.tv_usec = (p->opt.timeout * 1000) % 1000000;
if (ioctl(p->fd, BIOCSRTIMEOUT, (caddr_t)&bpf_to) < 0) {
snprintf(p->errbuf, PCAP_ERRBUF_SIZE,
"BIOCSRTIMEOUT: %s", pcap_strerror(errno));
@@ -2051,8 +2102,8 @@
}
} else {
#endif
- to.tv_sec = p->md.timeout / 1000;
- to.tv_usec = (p->md.timeout * 1000) % 1000000;
+ to.tv_sec = p->opt.timeout / 1000;
+ to.tv_usec = (p->opt.timeout * 1000) % 1000000;
if (ioctl(p->fd, BIOCSRTIMEOUT, (caddr_t)&to) < 0) {
snprintf(p->errbuf, PCAP_ERRBUF_SIZE,
"BIOCSRTIMEOUT: %s", pcap_strerror(errno));
@@ -2064,7 +2115,6 @@
#endif
}
-#ifdef _AIX
#ifdef BIOCIMMEDIATE
/*
* Darren Reed notes that
@@ -2076,51 +2126,38 @@
* is reducing things to only a few packets (i.e. one every
* second or so).
*
- * so we turn BIOCIMMEDIATE mode on if this is AIX.
+ * so we always turn BIOCIMMEDIATE mode on if this is AIX.
*
- * We don't turn it on for other platforms, as that means we
- * get woken up for every packet, which may not be what we want;
- * in the Winter 1993 USENIX paper on BPF, they say:
+ * For other platforms, we don't turn immediate mode on by default,
+ * as that would mean we get woken up for every packet, which
+ * probably isn't what you want for a packet sniffer.
*
- * Since a process might want to look at every packet on a
- * network and the time between packets can be only a few
- * microseconds, it is not possible to do a read system call
- * per packet and BPF must collect the data from several
- * packets and return it as a unit when the monitoring
- * application does a read.
- *
- * which I infer is the reason for the timeout - it means we
- * wait that amount of time, in the hopes that more packets
- * will arrive and we'll get them all with one read.
- *
- * Setting BIOCIMMEDIATE mode on FreeBSD (and probably other
- * BSDs) causes the timeout to be ignored.
- *
- * On the other hand, some platforms (e.g., Linux) don't support
- * timeouts, they just hand stuff to you as soon as it arrives;
- * if that doesn't cause a problem on those platforms, it may
- * be OK to have BIOCIMMEDIATE mode on BSD as well.
- *
- * (Note, though, that applications may depend on the read
- * completing, even if no packets have arrived, when the timeout
- * expires, e.g. GUI applications that have to check for input
- * while waiting for packets to arrive; a non-zero timeout
- * prevents "select()" from working right on FreeBSD and
- * possibly other BSDs, as the timer doesn't start until a
- * "read()" is done, so the timer isn't in effect if the
- * application is blocked on a "select()", and the "select()"
- * doesn't get woken up for a BPF device until the buffer
- * fills up.)
+ * We set immediate mode if the caller requested it by calling
+ * pcap_set_immediate() before calling pcap_activate().
*/
- v = 1;
- if (ioctl(p->fd, BIOCIMMEDIATE, &v) < 0) {
- snprintf(p->errbuf, PCAP_ERRBUF_SIZE, "BIOCIMMEDIATE: %s",
- pcap_strerror(errno));
+#ifndef _AIX
+ if (p->opt.immediate) {
+#endif /* _AIX */
+ v = 1;
+ if (ioctl(p->fd, BIOCIMMEDIATE, &v) < 0) {
+ snprintf(p->errbuf, PCAP_ERRBUF_SIZE,
+ "BIOCIMMEDIATE: %s", pcap_strerror(errno));
+ status = PCAP_ERROR;
+ goto bad;
+ }
+#ifndef _AIX
+ }
+#endif /* _AIX */
+#else /* BIOCIMMEDIATE */
+ if (p->opt.immediate) {
+ /*
+ * We don't support immediate mode. Fail.
+ */
+ snprintf(p->errbuf, PCAP_ERRBUF_SIZE, "Immediate mode not supported");
status = PCAP_ERROR;
goto bad;
}
-#endif /* BIOCIMMEDIATE */
-#endif /* _AIX */
+#endif /* BIOCIMMEDIATE */
if (p->opt.promisc) {
/* set promiscuous mode, just warn if it fails */
@@ -2139,7 +2176,7 @@
}
p->bufsize = v;
#ifdef HAVE_ZEROCOPY_BPF
- if (!p->md.zerocopy) {
+ if (!pb->zerocopy) {
#endif
p->buffer = (u_char *)malloc(p->bufsize);
if (p->buffer == NULL) {
@@ -2240,22 +2277,13 @@
return (status);
bad:
- pcap_cleanup_bpf(p);
+ pcap_cleanup_bpf(p);
return (status);
}
int
pcap_platform_finddevs(pcap_if_t **alldevsp, char *errbuf)
{
-#ifdef HAVE_DAG_API
- if (dag_platform_finddevs(alldevsp, errbuf) < 0)
- return (-1);
-#endif /* HAVE_DAG_API */
-#ifdef HAVE_SNF_API
- if (snf_platform_finddevs(alldevsp, errbuf) < 0)
- return (-1);
-#endif /* HAVE_SNF_API */
-
return (0);
}
@@ -2263,6 +2291,7 @@
static int
monitor_mode(pcap_t *p, int set)
{
+ struct pcap_bpf *pb = p->priv;
int sock;
struct ifmediareq req;
int *media_list;
@@ -2400,7 +2429,7 @@
return (PCAP_ERROR);
}
- p->md.must_do_on_close |= MUST_CLEAR_RFMON;
+ pb->must_do_on_close |= MUST_CLEAR_RFMON;
/*
* Add this to the list of pcaps to close when we exit.
@@ -2577,6 +2606,8 @@
static int
pcap_setfilter_bpf(pcap_t *p, struct bpf_program *fp)
{
+ struct pcap_bpf *pb = p->priv;
+
/*
* Free any user-mode filter we might happen to have installed.
*/
@@ -2589,7 +2620,7 @@
/*
* It worked.
*/
- p->md.use_bpf = 1; /* filtering in the kernel */
+ pb->filtering_in_kernel = 1; /* filtering in the kernel */
/*
* Discard any previously-received packets, as they might
@@ -2629,7 +2660,7 @@
*/
if (install_bpf_program(p, fp) < 0)
return (-1);
- p->md.use_bpf = 0; /* filtering in userland */
+ pb->filtering_in_kernel = 0; /* filtering in userland */
return (0);
}
Index: libpcap/pcap-null.c
===================================================================
--- libpcap/pcap-null.c (revision 32783)
+++ libpcap/pcap-null.c (working copy)
@@ -40,7 +40,7 @@
static char nosup[] = "live packet capture not supported on this system";
pcap_t *
-pcap_create(const char *device, char *ebuf)
+pcap_create_interface(const char *device, char *ebuf)
{
(void)strlcpy(ebuf, nosup, PCAP_ERRBUF_SIZE);
return (NULL);
Index: libpcap/bpf_image.c
===================================================================
--- libpcap/bpf_image.c (revision 32783)
+++ libpcap/bpf_image.c (working copy)
@@ -292,11 +292,14 @@
break;
}
(void)snprintf(operand, sizeof operand, fmt, v);
- (void)snprintf(image, sizeof image,
- (BPF_CLASS(p->code) == BPF_JMP &&
- BPF_OP(p->code) != BPF_JA) ?
- "(%03d) %-8s %-16s jt %d\tjf %d"
- : "(%03d) %-8s %s",
- n, op, operand, n + 1 + p->jt, n + 1 + p->jf);
+ if (BPF_CLASS(p->code) == BPF_JMP && BPF_OP(p->code) != BPF_JA) {
+ (void)snprintf(image, sizeof image,
+ "(%03d) %-8s %-16s jt %d\tjf %d",
+ n, op, operand, n + 1 + p->jt, n + 1 + p->jf);
+ } else {
+ (void)snprintf(image, sizeof image,
+ "(%03d) %-8s %s",
+ n, op, operand);
+ }
return image;
}
Index: libpcap/README
===================================================================
--- libpcap/README (revision 32783)
+++ libpcap/README (working copy)
@@ -10,15 +10,15 @@
Anonymous Git is available via:
git clone git://bpf.tcpdump.org/libpcap
-Version 1.x.y of LIBPCAP can be retrieved with the CVS tag "libpcap_1_{x}rel{y}":
- cvs -d :pserver:tcpdump@cvs.tcpdump.org:/tcpdump/master checkout -r libpcap_1_{x}rel{y} libpcap
+Please submit patches by forking the branch on GitHub at
-Please submit patches against the master copy to the libpcap project on
-sourceforge.net.
+ http://github.com/the-tcpdump-group/libpcap/tree/master
+and issuing a pull request.
+
formerly from Lawrence Berkeley National Laboratory
Network Research Group <libpcap@ee.lbl.gov>
- ftp://ftp.ee.lbl.gov/libpcap.tar.Z (0.4)
+ ftp://ftp.ee.lbl.gov/old/libpcap-0.4a7.tar.Z
This directory contains source code for libpcap, a system-independent
interface for user-level packet capture. libpcap provides a portable
@@ -91,15 +91,18 @@
Problems, bugs, questions, desirable enhancements, etc. should be sent
to the address "tcpdump-workers@lists.tcpdump.org". Bugs, support
-requests, and feature requests may also be submitted on the SourceForge
-site for libpcap at
+requests, and feature requests may also be submitted on the GitHub issue
+tracker for libpcap at
- http://sourceforge.net/projects/libpcap/
+ https://github.com/the-tcpdump-group/libpcap/issues
Source code contributions, etc. should be sent to the email address
-submitted as patches on the SourceForge site for libpcap.
+above or submitted by forking the branch on GitHub at
-Current versions can be found at www.tcpdump.org, or the SourceForge
-site for libpcap.
+ http://github.com/the-tcpdump-group/libpcap/tree/master
+and issuing a pull request.
+
+Current versions can be found at www.tcpdump.org.
+
- The TCPdump team
Index: libpcap/pcap_datalink.3pcap.in
===================================================================
--- libpcap/pcap_datalink.3pcap.in (revision 32783)
+++ libpcap/pcap_datalink.3pcap.in (working copy)
@@ -37,5 +37,34 @@
returns the link-layer header type for the live capture or ``savefile''
specified by
.IR p .
+.PP
+It must not be called on a pcap descriptor created by
+.B pcap_create()
+that has not yet been activated by
+.BR pcap_activate() .
+.PP
+.I http://www.tcpdump.org/linktypes.html
+lists the values
+.B pcap_datalink()
+can return and describes the packet formats that
+correspond to those values.
+.PP
+Do
+.B NOT
+assume that the packets for a given capture or ``savefile`` will have
+any given link-layer header type, such as
+.B DLT_EN10MB
+for Ethernet. For example, the "any" device on Linux will have a
+link-layer header type of
+.B DLT_LINUX_SLL
+even if all devices on the system at the time the "any" device is opened
+have some other data link type, such as
+.B DLT_EN10MB
+for Ethernet.
+.SH RETURN VALUE
+.B pcap_datalink()
+returns the link-layer header type on success and
+.B PCAP_ERROR_NOT_ACTIVATED
+if called on a capture handle that has been created but not activated.
.SH SEE ALSO
pcap(3PCAP), pcap-linktype(@MAN_MISC_INFO@)
Index: libpcap/CHANGES
===================================================================
--- libpcap/CHANGES (revision 32783)
+++ libpcap/CHANGES (working copy)
@@ -1,3 +1,90 @@
+Wednesday December 18, 2013 guy@alum.mit.edu
+Summary for 1.5.3 libpcap release
+ Don't let packets that don't match the current filter get to the
+ application when TPACKET_V3 is used. (GitHub issue #331)
+ Fix handling of pcap_loop()/pcap_dispatch() with a packet count
+ of 0 on some platforms (including Linux with TPACKET_V3).
+ (GitHub issue #333)
+ Work around TPACKET_V3 deficiency that causes packets to be lost
+ when a timeout of 0 is specified. (GitHub issue #335)
+ Man page formatting fixes.
+
+Wednesday December 4, 2013 guy@alum.mit.edu
+Summary for 1.5.2 libpcap release
+ Fix libpcap to work when compiled with TPACKET_V3 support and
+ running on a kernel without TPACKET_V3 support. (GitHub
+ issue #329)
+
+Wednesday November 20, 2013 guy@alum.mit.edu
+Summary for 1.5.1 libpcap release
+ Report an error, rather than crashing, if an IPv6 address is
+ used for link-layer filtering. (Wireshark bug 9376)
+
+Wednesday October 30, 2013 guy@alum.mit.edu
+Summary for 1.5.0 libpcap release
+ TPACKET_V3 support added for Linux
+ Point users to the the-tcpdump-group repository on GitHub rather
+ than the mcr repository
+ Checks added for malloc()/realloc()/etc. failures
+ Fixed build on Solaris 11
+ Support filtering filtering E1 SS7 traffic on MTP2 layer Annex A
+ Use "ln -s" to link man pages by default
+ Add support for getting nanosecond-resolution time stamps when
+ capturing and reading capture files
+ Many changes to autoconf to deal better with non-GCC compilers
+ added many new DLT types
+
+Saturday April 6, 2013 guy@alum.mit.edu
+Summary for 1.4.0 libpcap release
+ Add netfilter/nfqueue interface.
+ If we don't have support for IPv6 address resolution, support,
+ in filter expressions, what IPv6 stuff we can.
+ Fix pcap-config to include -lpthread if canusb support is
+ present
+ Try to fix "pcap_parse not defined" problems when --without-flex
+ and --without-bison are used when you have Flex and Bison
+ Fix some issues with the pcap_loop man page.
+ Fix pcap_getnonblock() and pcap_setnonblock() to fill in the
+ supplied error message buffer
+ Fix typo that, it appeared, would cause pcap-libdlpi.c not to
+ compile (perhaps systems with libdlpi also have BPF and use
+ that instead)
+ Catch attempts to call pcap_compile() on a non-activated pcap_t
+ Fix crash on Linux with CAN-USB support without usbfs
+ Fix addition of VLAN tags for Linux cooked captures
+ Check for both EOPNOTSUPP and EINVAL after SIOCETHTOOL ioctl, so
+ that the driver can report either one if it doesn't support
+ SIOCETHTOOL
+ Add DLT_INFINIBAND and DLT_SCTP
+ Describe "proto XXX" and "protochain XXX" in the pcap-filter man
+ page
+ Handle either directories, or symlinks to directories, that
+ correspond to interfaces in /sys/class/net
+ Fix handling of VLAN tag insertion to check, on Linux 3.x
+ kernels, for VLAN tag valid flag
+ Clean up some man pages
+ Support libnl3 as well as libnl1 and libnl2 on Linux
+ Fix handling of Bluetooth devices on 3.x Linux kernels
+
+Friday March 30, 2012. mcr@sandelman.ca
+Summary for 1.3.0 libpcap release
+ Handle DLT_PFSYNC in {FreeBSD, other *BSD+Mac OS X, other}.
+ Linux: Don't fail if netfilter isn't enabled in the kernel.
+ Add new link-layer type for NFC Forum LLCP.
+ Put the CANUSB stuff into EXTRA_DIST, so it shows up in the release tarball.
+ Add LINKTYPE_NG40/DLT_NG40.
+ Add DLT_MPEG_2_TS/LINKTYPE_MPEG_2_TS for MPEG-2 transport streams.
+ [PATCH] Fix AIX-3.5 crash with read failure during stress
+ AIX fixes.
+ Introduce --disable-shared configure option.
+ Added initial support for canusb devices.
+ Include the pcap(3PCAP) additions as 1.2.1 changes.
+ many updates to documentation: pcap.3pcap.in
+ Improve 'inbound'/'outbound' capture filters under Linux.
+ Note the cleanup of handling of new DLT_/LINKTYPE_ values.
+ On Lion, don't build for PPC.
+ For mac80211 devices we need to clean up monitor mode on exit.
+
Friday December 9, 2011. guy@alum.mit.edu.
Summary for 1.2.1 libpcap release
Update README file.
Index: libpcap/fad-win32.c
===================================================================
--- libpcap/fad-win32.c (revision 32783)
+++ libpcap/fad-win32.c (working copy)
@@ -216,7 +216,7 @@
* Win32 implementation, based on WinPcap
*/
int
-pcap_findalldevs(pcap_if_t **alldevsp, char *errbuf)
+pcap_findalldevs_interfaces(pcap_if_t **alldevsp, char *errbuf)
{
pcap_if_t *devlist = NULL;
int ret = 0;
@@ -225,6 +225,24 @@
ULONG NameLength;
char *name;
+ /*
+ * Find out how big a buffer we need.
+ *
+ * This call should always return FALSE; if the error is
+ * ERROR_INSUFFICIENT_BUFFER, NameLength will be set to
+ * the size of the buffer we need, otherwise there's a
+ * problem, and NameLength should be set to 0.
+ *
+ * It shouldn't require NameLength to be set, but,
+ * at least as of WinPcap 4.1.3, it checks whether
+ * NameLength is big enough before it checks for a
+ * NULL buffer argument, so, while it'll still do
+ * the right thing if NameLength is uninitialized and
+ * whatever junk happens to be there is big enough
+ * (because the pointer argument will be null), it's
+ * still reading an uninitialized variable.
+ */
+ NameLength = 0;
if (!PacketGetAdapterNames(NULL, &NameLength))
{
DWORD last_error = GetLastError();
Index: libpcap/gencode.c
===================================================================
--- libpcap/gencode.c (revision 32783)
+++ libpcap/gencode.c (working copy)
@@ -84,6 +84,11 @@
#include "pcap/sll.h"
#include "pcap/ipnet.h"
#include "arcnet.h"
+#if defined(linux) && defined(PF_PACKET) && defined(SO_ATTACH_FILTER)
+#include <linux/types.h>
+#include <linux/if_packet.h>
+#include <linux/filter.h>
+#endif
#ifdef HAVE_NET_PFVAR_H
#include <sys/socket.h>
#include <net/if.h>
@@ -102,6 +107,18 @@
#define ETHERMTU 1500
+#ifndef IPPROTO_HOPOPTS
+#define IPPROTO_HOPOPTS 0
+#endif
+#ifndef IPPROTO_ROUTING
+#define IPPROTO_ROUTING 43
+#endif
+#ifndef IPPROTO_FRAGMENT
+#define IPPROTO_FRAGMENT 44
+#endif
+#ifndef IPPROTO_DSTOPTS
+#define IPPROTO_DSTOPTS 60
+#endif
#ifndef IPPROTO_SCTP
#define IPPROTO_SCTP 132
#endif
@@ -124,9 +141,7 @@
#endif
/* XXX */
-#ifdef PCAP_FDDIPAD
static int pcap_fddipad;
-#endif
/* VARARGS */
void
@@ -256,20 +271,16 @@
static struct block *gen_ipfrag(void);
static struct block *gen_portatom(int, bpf_int32);
static struct block *gen_portrangeatom(int, bpf_int32, bpf_int32);
-#ifdef INET6
static struct block *gen_portatom6(int, bpf_int32);
static struct block *gen_portrangeatom6(int, bpf_int32, bpf_int32);
-#endif
struct block *gen_portop(int, int, int);
static struct block *gen_port(int, int, int);
struct block *gen_portrangeop(int, int, int, int);
static struct block *gen_portrange(int, int, int, int);
-#ifdef INET6
struct block *gen_portop6(int, int, int);
static struct block *gen_port6(int, int, int);
struct block *gen_portrangeop6(int, int, int, int);
static struct block *gen_portrange6(int, int, int, int);
-#endif
static int lookup_proto(const char *, int);
static struct block *gen_protochain(int, int, int);
static struct block *gen_proto(int, int, int);
@@ -418,8 +429,17 @@
{
extern int n_errors;
const char * volatile xbuf = buf;
- int len;
+ u_int len;
+ /*
+ * If this pcap_t hasn't been activated, it doesn't have a
+ * link-layer type, so we can't use it.
+ */
+ if (!p->activated) {
+ snprintf(p->errbuf, PCAP_ERRBUF_SIZE,
+ "not-yet-activated pcap_t passed to pcap_compile");
+ return (-1);
+ }
no_optimize = 0;
n_errors = 0;
root = NULL;
@@ -854,6 +874,7 @@
* These are offsets for the MTP2 fields.
*/
static u_int off_li;
+static u_int off_li_hsl;
/*
* These are offsets for the MTP3 fields.
@@ -903,9 +924,7 @@
pcap_t *p;
{
linktype = pcap_datalink(p);
-#ifdef PCAP_FDDIPAD
pcap_fddipad = p->fddipad;
-#endif
/*
* Assume it's not raw ATM with a pseudo-header, for now.
@@ -927,6 +946,7 @@
* And assume we're not doing SS7.
*/
off_li = -1;
+ off_li_hsl = -1;
off_sio = -1;
off_opc = -1;
off_dpc = -1;
@@ -1042,13 +1062,9 @@
* XXX - should we generate code to check for SNAP?
*/
off_linktype = 13;
-#ifdef PCAP_FDDIPAD
off_linktype += pcap_fddipad;
-#endif
off_macpl = 13; /* FDDI MAC header length */
-#ifdef PCAP_FDDIPAD
off_macpl += pcap_fddipad;
-#endif
off_nl = 8; /* 802.2+SNAP */
off_nl_nosnap = 3; /* 802.2 */
return;
@@ -1319,6 +1335,13 @@
off_nl_nosnap = -1; /* no 802.2 LLC */
return;
+ case DLT_BACNET_MS_TP:
+ off_linktype = -1;
+ off_macpl = -1;
+ off_nl = -1;
+ off_nl_nosnap = -1;
+ return;
+
case DLT_JUNIPER_SERVICES:
off_linktype = 12;
off_macpl = -1; /* L3 proto location dep. on cookie type */
@@ -1359,6 +1382,7 @@
case DLT_MTP2:
off_li = 2;
+ off_li_hsl = 4;
off_sio = 3;
off_opc = 4;
off_dpc = 4;
@@ -1371,6 +1395,7 @@
case DLT_MTP2_WITH_PHDR:
off_li = 6;
+ off_li_hsl = 8;
off_sio = 7;
off_opc = 8;
off_dpc = 8;
@@ -1383,6 +1408,7 @@
case DLT_ERF:
off_li = 22;
+ off_li_hsl = 24;
off_sio = 23;
off_opc = 24;
off_dpc = 24;
@@ -1393,14 +1419,12 @@
off_nl_nosnap = -1;
return;
-#ifdef DLT_PFSYNC
case DLT_PFSYNC:
off_linktype = -1;
off_macpl = 4;
off_nl = 0;
off_nl_nosnap = 0;
return;
-#endif
case DLT_AX25_KISS:
/*
@@ -2829,11 +2853,9 @@
proto = PPP_IP;
break;
-#ifdef INET6
case ETHERTYPE_IPV6:
proto = PPP_IPV6;
break;
-#endif
case ETHERTYPE_DN:
proto = PPP_DECNET;
@@ -3041,11 +3063,10 @@
case ETHERTYPE_IP:
/* Check for a version number of 4. */
return gen_mcmp(OR_LINK, 0, BPF_B, 0x40, 0xF0);
-#ifdef INET6
+
case ETHERTYPE_IPV6:
/* Check for a version number of 6. */
return gen_mcmp(OR_LINK, 0, BPF_B, 0x60, 0xF0);
-#endif
default:
return gen_false(); /* always false */
@@ -3069,10 +3090,8 @@
/*
* Raw IPv6, so no type field.
*/
-#ifdef INET6
if (proto == ETHERTYPE_IPV6)
return gen_true(); /* always true */
-#endif
/* Checking for something other than IPv6; always false */
return gen_false();
@@ -3178,8 +3197,7 @@
* Then we run it through "htonl()", and
* generate code to compare against the result.
*/
- if (bpf_pcap->sf.rfile != NULL &&
- bpf_pcap->sf.swapped)
+ if (bpf_pcap->rfile != NULL && bpf_pcap->swapped)
proto = SWAPLONG(proto);
proto = htonl(proto);
}
@@ -3194,11 +3212,9 @@
if (proto == ETHERTYPE_IP)
return (gen_cmp(OR_LINK, offsetof(struct pfloghdr, af),
BPF_B, (bpf_int32)AF_INET));
-#ifdef INET6
else if (proto == ETHERTYPE_IPV6)
return (gen_cmp(OR_LINK, offsetof(struct pfloghdr, af),
BPF_B, (bpf_int32)AF_INET6));
-#endif /* INET6 */
else
return gen_false();
/*NOTREACHED*/
@@ -3216,11 +3232,9 @@
default:
return gen_false();
-#ifdef INET6
case ETHERTYPE_IPV6:
return (gen_cmp(OR_LINK, off_linktype, BPF_B,
(bpf_int32)ARCTYPE_INET6));
-#endif /* INET6 */
case ETHERTYPE_IP:
b0 = gen_cmp(OR_LINK, off_linktype, BPF_B,
@@ -3272,13 +3286,11 @@
*/
return gen_cmp(OR_LINK, 2, BPF_H, (0x03<<8) | 0xcc);
-#ifdef INET6
case ETHERTYPE_IPV6:
/*
* Check for the special NLPID for IPv6.
*/
return gen_cmp(OR_LINK, 2, BPF_H, (0x03<<8) | 0x8e);
-#endif
case LLCSAP_ISONS:
/*
@@ -3340,6 +3352,9 @@
*/
return gen_mcmp(OR_LINK, 0, BPF_W, 0x4d474300, 0xffffff00); /* compare the magic number */
+ case DLT_BACNET_MS_TP:
+ return gen_mcmp(OR_LINK, 0, BPF_W, 0x55FF0000, 0xffff0000);
+
case DLT_IPNET:
return gen_ipnet_linktype(proto);
@@ -3356,10 +3371,8 @@
case DLT_ERF:
bpf_error("ERF link-layer type filtering not implemented");
-#ifdef DLT_PFSYNC
case DLT_PFSYNC:
bpf_error("PFSYNC link-layer type filtering not implemented");
-#endif
case DLT_LINUX_LAPD:
bpf_error("LAPD link-layer type filtering not implemented");
@@ -3627,7 +3640,7 @@
gen_and(b0, b1);
return b1;
}
-#endif /*INET6*/
+#endif
static struct block *
gen_ehostop(eaddr, dir)
@@ -3696,18 +3709,10 @@
switch (dir) {
case Q_SRC:
-#ifdef PCAP_FDDIPAD
return gen_bcmp(OR_LINK, 6 + 1 + pcap_fddipad, 6, eaddr);
-#else
- return gen_bcmp(OR_LINK, 6 + 1, 6, eaddr);
-#endif
case Q_DST:
-#ifdef PCAP_FDDIPAD
return gen_bcmp(OR_LINK, 0 + 1 + pcap_fddipad, 6, eaddr);
-#else
- return gen_bcmp(OR_LINK, 0 + 1, 6, eaddr);
-#endif
case Q_AND:
b0 = gen_fhostop(eaddr, Q_SRC);
@@ -4505,13 +4510,11 @@
case Q_MOPRC:
bpf_error("MOPRC host filtering not implemented");
-#ifdef INET6
case Q_IPV6:
bpf_error("'ip6' modifier applied to ip host");
case Q_ICMPV6:
bpf_error("'icmp6' modifier applied to %s", typestr);
-#endif /* INET6 */
case Q_AH:
bpf_error("'ah' modifier applied to %s", typestr);
@@ -4570,6 +4573,9 @@
case Q_DEFAULT:
return gen_host6(addr, mask, Q_IPV6, dir, type);
+ case Q_LINK:
+ bpf_error("link-layer modifier applied to ip6 %s", typestr);
+
case Q_IP:
bpf_error("'ip' modifier applied to ip6 %s", typestr);
@@ -4668,7 +4674,7 @@
}
/* NOTREACHED */
}
-#endif /*INET6*/
+#endif
#ifndef INET6
static struct block *
@@ -4760,26 +4766,20 @@
case Q_SCTP:
b1 = gen_proto(IPPROTO_SCTP, Q_IP, Q_DEFAULT);
-#ifdef INET6
b0 = gen_proto(IPPROTO_SCTP, Q_IPV6, Q_DEFAULT);
gen_or(b0, b1);
-#endif
break;
case Q_TCP:
b1 = gen_proto(IPPROTO_TCP, Q_IP, Q_DEFAULT);
-#ifdef INET6
b0 = gen_proto(IPPROTO_TCP, Q_IPV6, Q_DEFAULT);
gen_or(b0, b1);
-#endif
break;
case Q_UDP:
b1 = gen_proto(IPPROTO_UDP, Q_IP, Q_DEFAULT);
-#ifdef INET6
b0 = gen_proto(IPPROTO_UDP, Q_IPV6, Q_DEFAULT);
gen_or(b0, b1);
-#endif
break;
case Q_ICMP:
@@ -4807,10 +4807,8 @@
case Q_PIM:
b1 = gen_proto(IPPROTO_PIM, Q_IP, Q_DEFAULT);
-#ifdef INET6
b0 = gen_proto(IPPROTO_PIM, Q_IPV6, Q_DEFAULT);
gen_or(b0, b1);
-#endif
break;
#ifndef IPPROTO_VRRP
@@ -4872,7 +4870,6 @@
b1 = gen_linktype(ETHERTYPE_MOPRC);
break;
-#ifdef INET6
case Q_IPV6:
b1 = gen_linktype(ETHERTYPE_IPV6);
break;
@@ -4883,17 +4880,14 @@
case Q_ICMPV6:
b1 = gen_proto(IPPROTO_ICMPV6, Q_IPV6, Q_DEFAULT);
break;
-#endif /* INET6 */
#ifndef IPPROTO_AH
#define IPPROTO_AH 51
#endif
case Q_AH:
b1 = gen_proto(IPPROTO_AH, Q_IP, Q_DEFAULT);
-#ifdef INET6
b0 = gen_proto(IPPROTO_AH, Q_IPV6, Q_DEFAULT);
gen_or(b0, b1);
-#endif
break;
#ifndef IPPROTO_ESP
@@ -4901,10 +4895,8 @@
#endif
case Q_ESP:
b1 = gen_proto(IPPROTO_ESP, Q_IP, Q_DEFAULT);
-#ifdef INET6
b0 = gen_proto(IPPROTO_ESP, Q_IPV6, Q_DEFAULT);
gen_or(b0, b1);
-#endif
break;
case Q_ISO:
@@ -5037,7 +5029,6 @@
return gen_cmp(OR_TRAN_IPV4, off, BPF_H, v);
}
-#ifdef INET6
static struct block *
gen_portatom6(off, v)
int off;
@@ -5045,7 +5036,6 @@
{
return gen_cmp(OR_TRAN_IPV6, off, BPF_H, v);
}
-#endif/*INET6*/
struct block *
gen_portop(port, proto, dir)
@@ -5137,7 +5127,6 @@
return b1;
}
-#ifdef INET6
struct block *
gen_portop6(port, proto, dir)
int port, proto, dir;
@@ -5210,7 +5199,6 @@
gen_and(b0, b1);
return b1;
}
-#endif /* INET6 */
/* gen_portrange code */
static struct block *
@@ -5315,7 +5303,6 @@
return b1;
}
-#ifdef INET6
static struct block *
gen_portrangeatom6(off, v1, v2)
int off;
@@ -5416,7 +5403,6 @@
gen_and(b0, b1);
return b1;
}
-#endif /* INET6 */
static int
lookup_proto(name, proto)
@@ -5551,7 +5537,7 @@
s[i]->s.k = off_macpl + off_nl;
i++;
break;
-#ifdef INET6
+
case Q_IPV6:
b0 = gen_linktype(ETHERTYPE_IPV6);
@@ -5564,7 +5550,7 @@
s[i]->s.k = 40;
i++;
break;
-#endif
+
default:
bpf_error("unsupported proto to gen_protochain");
/*NOTREACHED*/
@@ -5591,7 +5577,6 @@
fix2 = i;
i++;
-#ifdef INET6
if (proto == Q_IPV6) {
int v6start, v6end, v6advance, j;
@@ -5673,9 +5658,7 @@
/* fixup */
for (j = v6start; j <= v6end; j++)
s[j]->s.jt = s[v6advance];
- } else
-#endif
- {
+ } else {
/* nop */
s[i] = new_stmt(BPF_ALU|BPF_ADD|BPF_K);
s[i]->s.k = 0;
@@ -5819,20 +5802,20 @@
int dir;
{
struct block *b0, *b1;
+#ifndef CHASE_CHAIN
+ struct block *b2;
+#endif
if (dir != Q_DEFAULT)
bpf_error("direction applied to 'proto'");
switch (proto) {
case Q_DEFAULT:
-#ifdef INET6
b0 = gen_proto(v, Q_IP, dir);
b1 = gen_proto(v, Q_IPV6, dir);
gen_or(b0, b1);
return b1;
-#else
- /*FALLTHROUGH*/
-#endif
+
case Q_IP:
/*
* For FDDI, RFC 1188 says that SNAP encapsulation is used,
@@ -5983,11 +5966,18 @@
bpf_error("'carp proto' is bogus");
/* NOTREACHED */
-#ifdef INET6
case Q_IPV6:
b0 = gen_linktype(ETHERTYPE_IPV6);
#ifndef CHASE_CHAIN
- b1 = gen_cmp(OR_NET, 6, BPF_B, (bpf_int32)v);
+ /*
+ * Also check for a fragment header before the final
+ * header.
+ */
+ b2 = gen_cmp(OR_NET, 6, BPF_B, IPPROTO_FRAGMENT);
+ b1 = gen_cmp(OR_NET, 40, BPF_B, (bpf_int32)v);
+ gen_and(b2, b1);
+ b2 = gen_cmp(OR_NET, 6, BPF_B, (bpf_int32)v);
+ gen_or(b2, b1);
#else
b1 = gen_protochain(v, Q_IPV6);
#endif
@@ -5996,7 +5986,6 @@
case Q_ICMPV6:
bpf_error("'icmp6 proto' is bogus");
-#endif /* INET6 */
case Q_AH:
bpf_error("'ah proto' is bogus");
@@ -6253,13 +6242,9 @@
bpf_error("illegal port number %d < 0", port);
if (port > 65535)
bpf_error("illegal port number %d > 65535", port);
-#ifndef INET6
- return gen_port(port, real_proto, dir);
-#else
b = gen_port(port, real_proto, dir);
gen_or(gen_port6(port, real_proto, dir), b);
return b;
-#endif /* INET6 */
case Q_PORTRANGE:
if (proto != Q_DEFAULT &&
@@ -6303,13 +6288,9 @@
if (port2 > 65535)
bpf_error("illegal port number %d > 65535", port2);
-#ifndef INET6
- return gen_portrange(port1, port2, real_proto, dir);
-#else
b = gen_portrange(port1, port2, real_proto, dir);
gen_or(gen_portrange6(port1, port2, real_proto, dir), b);
return b;
-#endif /* INET6 */
case Q_GATEWAY:
#ifndef INET6
@@ -6457,16 +6438,12 @@
if (v > 65535)
bpf_error("illegal port number %u > 65535", v);
-#ifndef INET6
- return gen_port((int)v, proto, dir);
-#else
{
struct block *b;
b = gen_port((int)v, proto, dir);
gen_or(gen_port6((int)v, proto, dir), b);
return b;
}
-#endif /* INET6 */
case Q_PORTRANGE:
if (proto == Q_UDP)
@@ -6483,16 +6460,12 @@
if (v > 65535)
bpf_error("illegal port number %u > 65535", v);
-#ifndef INET6
- return gen_portrange((int)v, (int)v, proto, dir);
-#else
{
struct block *b;
b = gen_portrange((int)v, (int)v, proto, dir);
gen_or(gen_portrange6((int)v, (int)v, proto, dir), b);
return b;
}
-#endif /* INET6 */
case Q_GATEWAY:
bpf_error("'gateway' requires a name");
@@ -6782,9 +6755,7 @@
case Q_LAT:
case Q_MOPRC:
case Q_MOPDL:
-#ifdef INET6
case Q_IPV6:
-#endif
/*
* The offset is relative to the beginning of
* the network-layer header.
@@ -6893,16 +6864,12 @@
gen_and(gen_proto_abbrev(proto), b = gen_ipfrag());
if (inst->b)
gen_and(inst->b, b);
-#ifdef INET6
gen_and(gen_proto_abbrev(Q_IP), b);
-#endif
inst->b = b;
break;
-#ifdef INET6
case Q_ICMPV6:
bpf_error("IPv6 upper-layer protocol is not supported by proto[x]");
/*NOTREACHED*/
-#endif
}
inst->regno = regno;
s = new_stmt(BPF_ST);
@@ -7454,13 +7421,11 @@
gen_and(b0, b1);
return b1;
-#ifdef INET6
case Q_IPV6:
b0 = gen_linktype(ETHERTYPE_IPV6);
b1 = gen_cmp(OR_NET, 24, BPF_B, (bpf_int32)255);
gen_and(b0, b1);
return b1;
-#endif /* INET6 */
}
bpf_error("link-layer multicast filters supported only on ethernet/FDDI/token ring/ARCNET/802.11/ATM LANE/Fibre Channel");
/* NOTREACHED */
@@ -7468,9 +7433,13 @@
}
/*
- * generate command for inbound/outbound. It's here so we can
- * make it link-type specific. 'dir' = 0 implies "inbound",
- * = 1 implies "outbound".
+ * Filter on inbound (dir == 0) or outbound (dir == 1) traffic.
+ * Outbound traffic is sent by this machine, while inbound traffic is
+ * sent by a remote machine (and may include packets destined for a
+ * unicast or multicast link-layer address we are not subscribing to).
+ * These are the same definitions implemented by pcap_setdirection().
+ * Capturing only unicast traffic destined for this host is probably
+ * better accomplished using a higher-layer filter.
*/
struct block *
gen_inbound(dir)
@@ -7500,23 +7469,11 @@
break;
case DLT_LINUX_SLL:
- if (dir) {
- /*
- * Match packets sent by this machine.
- */
- b0 = gen_cmp(OR_LINK, 0, BPF_H, LINUX_SLL_OUTGOING);
- } else {
- /*
- * Match packets sent to this machine.
- * (No broadcast or multicast packets, or
- * packets sent to some other machine and
- * received promiscuously.)
- *
- * XXX - packets sent to other machines probably
- * shouldn't be matched, but what about broadcast
- * or multicast packets we received?
- */
- b0 = gen_cmp(OR_LINK, 0, BPF_H, LINUX_SLL_HOST);
+ /* match outgoing packets */
+ b0 = gen_cmp(OR_LINK, 0, BPF_H, LINUX_SLL_OUTGOING);
+ if (!dir) {
+ /* to filter on inbound traffic, invert the match */
+ gen_not(b0);
}
break;
@@ -7572,10 +7529,38 @@
break;
default:
+ /*
+ * If we have packet meta-data indicating a direction,
+ * check it, otherwise give up as this link-layer type
+ * has nothing in the packet data.
+ */
+#if defined(linux) && defined(PF_PACKET) && defined(SO_ATTACH_FILTER)
+ /*
+ * This is Linux with PF_PACKET support.
+ * If this is a *live* capture, we can look at
+ * special meta-data in the filter expression;
+ * if it's a savefile, we can't.
+ */
+ if (bpf_pcap->rfile != NULL) {
+ /* We have a FILE *, so this is a savefile */
+ bpf_error("inbound/outbound not supported on linktype %d when reading savefiles",
+ linktype);
+ b0 = NULL;
+ /* NOTREACHED */
+ }
+ /* match outgoing packets */
+ b0 = gen_cmp(OR_LINK, SKF_AD_OFF + SKF_AD_PKTTYPE, BPF_H,
+ PACKET_OUTGOING);
+ if (!dir) {
+ /* to filter on inbound traffic, invert the match */
+ gen_not(b0);
+ }
+#else /* defined(linux) && defined(PF_PACKET) && defined(SO_ATTACH_FILTER) */
bpf_error("inbound/outbound not supported on linktype %d",
linktype);
b0 = NULL;
/* NOTREACHED */
+#endif /* defined(linux) && defined(PF_PACKET) && defined(SO_ATTACH_FILTER) */
}
return (b0);
}
@@ -8035,9 +8020,10 @@
}
struct block *
-gen_pppoes()
+gen_pppoes(sess_num)
+ int sess_num;
{
- struct block *b0;
+ struct block *b0, *b1;
/*
* Test against the PPPoE session link-layer type.
@@ -8077,6 +8063,14 @@
orig_nl = off_nl;
is_pppoes = 1;
+ /* If a specific session is requested, check PPPoE session id */
+ if (sess_num >= 0) {
+ b1 = gen_mcmp(OR_MACPL, orig_nl, BPF_W,
+ (bpf_int32)sess_num, 0x0000ffff);
+ gen_and(b0, b1);
+ b0 = b1;
+ }
+
/*
* The "network-layer" protocol is PPPoE, which has a 6-byte
* PPPoE header, followed by a PPP packet.
@@ -8266,6 +8260,7 @@
* FISU, length is null
* LSSU, length is 1 or 2
* MSU, length is 3 or more
+ * For MTP2_HSL, sequences are on 2 bytes, and length on 9 bits
*/
struct block *
gen_mtp2type_abbrev(type)
@@ -8302,6 +8297,33 @@
b0 = gen_ncmp(OR_PACKET, off_li, BPF_B, 0x3f, BPF_JGT, 0, 2);
break;
+ case MH_FISU:
+ if ( (linktype != DLT_MTP2) &&
+ (linktype != DLT_ERF) &&
+ (linktype != DLT_MTP2_WITH_PHDR) )
+ bpf_error("'hfisu' supported only on MTP2_HSL");
+ /* gen_ncmp(offrel, offset, size, mask, jtype, reverse, value) */
+ b0 = gen_ncmp(OR_PACKET, off_li_hsl, BPF_H, 0xff80, BPF_JEQ, 0, 0);
+ break;
+
+ case MH_LSSU:
+ if ( (linktype != DLT_MTP2) &&
+ (linktype != DLT_ERF) &&
+ (linktype != DLT_MTP2_WITH_PHDR) )
+ bpf_error("'hlssu' supported only on MTP2_HSL");
+ b0 = gen_ncmp(OR_PACKET, off_li_hsl, BPF_H, 0xff80, BPF_JGT, 1, 0x0100);
+ b1 = gen_ncmp(OR_PACKET, off_li_hsl, BPF_H, 0xff80, BPF_JGT, 0, 0);
+ gen_and(b1, b0);
+ break;
+
+ case MH_MSU:
+ if ( (linktype != DLT_MTP2) &&
+ (linktype != DLT_ERF) &&
+ (linktype != DLT_MTP2_WITH_PHDR) )
+ bpf_error("'hmsu' supported only on MTP2_HSL");
+ b0 = gen_ncmp(OR_PACKET, off_li_hsl, BPF_H, 0xff80, BPF_JGT, 0, 0x0100);
+ break;
+
default:
abort();
}
@@ -8317,9 +8339,17 @@
{
struct block *b0;
bpf_u_int32 val1 , val2 , val3;
+ u_int newoff_sio=off_sio;
+ u_int newoff_opc=off_opc;
+ u_int newoff_dpc=off_dpc;
+ u_int newoff_sls=off_sls;
switch (mtp3field) {
+ case MH_SIO:
+ newoff_sio += 3; /* offset for MTP2_HSL */
+ /* FALLTHROUGH */
+
case M_SIO:
if (off_sio == (u_int)-1)
bpf_error("'sio' supported only on SS7");
@@ -8327,10 +8357,12 @@
if(jvalue > 255)
bpf_error("sio value %u too big; max value = 255",
jvalue);
- b0 = gen_ncmp(OR_PACKET, off_sio, BPF_B, 0xffffffff,
+ b0 = gen_ncmp(OR_PACKET, newoff_sio, BPF_B, 0xffffffff,
(u_int)jtype, reverse, (u_int)jvalue);
break;
+ case MH_OPC:
+ newoff_opc+=3;
case M_OPC:
if (off_opc == (u_int)-1)
bpf_error("'opc' supported only on SS7");
@@ -8347,10 +8379,14 @@
val3 = jvalue & 0x00000003;
val3 = val3 <<22;
jvalue = val1 + val2 + val3;
- b0 = gen_ncmp(OR_PACKET, off_opc, BPF_W, 0x00c0ff0f,
+ b0 = gen_ncmp(OR_PACKET, newoff_opc, BPF_W, 0x00c0ff0f,
(u_int)jtype, reverse, (u_int)jvalue);
break;
+ case MH_DPC:
+ newoff_dpc += 3;
+ /* FALLTHROUGH */
+
case M_DPC:
if (off_dpc == (u_int)-1)
bpf_error("'dpc' supported only on SS7");
@@ -8365,10 +8401,12 @@
val2 = jvalue & 0x00003f00;
val2 = val2 << 8;
jvalue = val1 + val2;
- b0 = gen_ncmp(OR_PACKET, off_dpc, BPF_W, 0xff3f0000,
+ b0 = gen_ncmp(OR_PACKET, newoff_dpc, BPF_W, 0xff3f0000,
(u_int)jtype, reverse, (u_int)jvalue);
break;
+ case MH_SLS:
+ newoff_sls+=3;
case M_SLS:
if (off_sls == (u_int)-1)
bpf_error("'sls' supported only on SS7");
@@ -8379,7 +8417,7 @@
/* the following instruction is made to convert jvalue
* to the forme used to write sls in an ss7 message*/
jvalue = jvalue << 4;
- b0 = gen_ncmp(OR_PACKET, off_sls, BPF_B, 0xf0,
+ b0 = gen_ncmp(OR_PACKET, newoff_sls, BPF_B, 0xf0,
(u_int)jtype,reverse, (u_int)jvalue);
break;
Index: libpcap/gencode.h
===================================================================
--- libpcap/gencode.h (revision 32783)
+++ libpcap/gencode.h (working copy)
@@ -186,13 +186,24 @@
#define M_LSSU 23 /* LSSU */
#define M_MSU 24 /* MSU */
+/* MTP2 HSL types */
+#define MH_FISU 25 /* FISU for HSL */
+#define MH_LSSU 26 /* LSSU */
+#define MH_MSU 27 /* MSU */
+
/* MTP3 field types */
#define M_SIO 1
#define M_OPC 2
#define M_DPC 3
#define M_SLS 4
+/* MTP3 field types in case of MTP2 HSL */
+#define MH_SIO 5
+#define MH_OPC 6
+#define MH_DPC 7
+#define MH_SLS 8
+
struct slist;
struct stmt {
@@ -240,8 +251,8 @@
struct slist *stmts; /* side effect stmts */
struct stmt s; /* branch stmt */
int mark;
- int longjt; /* jt branch requires long jump */
- int longjf; /* jf branch requires long jump */
+ u_int longjt; /* jt branch requires long jump */
+ u_int longjf; /* jf branch requires long jump */
int level;
int offset;
int sense;
@@ -303,7 +314,7 @@
struct block *gen_mpls(int);
struct block *gen_pppoed(void);
-struct block *gen_pppoes(void);
+struct block *gen_pppoes(int);
struct block *gen_atmfield_code(int atmfield, bpf_int32 jvalue, bpf_u_int32 jtype, int reverse);
struct block *gen_atmtype_abbrev(int type);
@@ -325,12 +336,16 @@
void bpf_optimize(struct block **);
void bpf_error(const char *, ...)
- __attribute__((noreturn, format (printf, 1, 2)));
+ __attribute__((noreturn))
+#ifdef __ATTRIBUTE___FORMAT_OK
+ __attribute__((format (printf, 1, 2)))
+#endif /* __ATTRIBUTE___FORMAT_OK */
+ ;
void finish_parse(struct block *);
char *sdup(const char *);
-struct bpf_insn *icode_to_fcode(struct block *, int *);
+struct bpf_insn *icode_to_fcode(struct block *, u_int *);
int pcap_parse(void);
void lex_init(const char *);
void lex_cleanup(void);
Index: libpcap/pcap-common.c
===================================================================
--- libpcap/pcap-common.c (revision 32783)
+++ libpcap/pcap-common.c (working copy)
@@ -118,7 +118,7 @@
#define LINKTYPE_AX25 DLT_AX25
#define LINKTYPE_PRONET DLT_PRONET
#define LINKTYPE_CHAOS DLT_CHAOS
-#define LINKTYPE_TOKEN_RING DLT_IEEE802 /* DLT_IEEE802 is used for Token Ring */
+#define LINKTYPE_IEEE802_5 DLT_IEEE802 /* DLT_IEEE802 is used for 802.5 Token Ring */
#define LINKTYPE_ARCNET_BSD DLT_ARCNET /* BSD-style headers */
#define LINKTYPE_SLIP DLT_SLIP
#define LINKTYPE_PPP DLT_PPP
@@ -193,8 +193,8 @@
#define LINKTYPE_PFLOG 117 /* OpenBSD DLT_PFLOG */
#define LINKTYPE_CISCO_IOS 118 /* For Cisco-internal use */
-#define LINKTYPE_PRISM_HEADER 119 /* 802.11+Prism II monitor mode */
-#define LINKTYPE_AIRONET_HEADER 120 /* FreeBSD Aironet driver stuff */
+#define LINKTYPE_IEEE802_11_PRISM 119 /* 802.11 plus Prism II monitor mode radio metadata header */
+#define LINKTYPE_IEEE802_11_AIRONET 120 /* 802.11 plus FreeBSD Aironet driver radio metadata header */
/*
* Reserved for Siemens HiPath HDLC.
@@ -212,7 +212,7 @@
#define LINKTYPE_PCI_EXP 125 /* PCI Express */
#define LINKTYPE_AURORA 126 /* Xilinx Aurora link layer */
-#define LINKTYPE_IEEE802_11_RADIO 127 /* 802.11 plus BSD radio header */
+#define LINKTYPE_IEEE802_11_RADIOTAP 127 /* 802.11 plus radiotap radio metadata header */
/*
* Reserved for the TZSP encapsulation, as per request from
@@ -307,11 +307,8 @@
* including radio information:
*
* http://www.shaftnet.org/~pizza/software/capturefrm.txt
- *
- * but could and arguably should also be used by non-AVS Linux
- * 802.11 drivers; that may happen in the future.
*/
-#define LINKTYPE_IEEE802_11_RADIO_AVS 163 /* 802.11 plus AVS radio header */
+#define LINKTYPE_IEEE802_11_AVS 163 /* 802.11 plus AVS radio metadata header */
/*
* Juniper-private data link type, as per request from
@@ -322,7 +319,7 @@
#define LINKTYPE_JUNIPER_MONITOR 164
/*
- * Reserved for BACnet MS/TP.
+ * BACnet MS/TP frames.
*/
#define LINKTYPE_BACNET_MS_TP 165
@@ -844,14 +841,99 @@
#define LINKTYPE_NETANALYZER_TRANSPARENT 241
/*
- * IP-over-Infiniband, as specified by RFC 4391.
+ * IP-over-InfiniBand, as specified by RFC 4391.
*
* Requested by Petr Sumbera <petr.sumbera@oracle.com>.
*/
#define LINKTYPE_IPOIB 242
-#define LINKTYPE_MATCHING_MAX 242 /* highest value in the "matching" range */
+/*
+ * MPEG-2 transport stream (ISO 13818-1/ITU-T H.222.0).
+ *
+ * Requested by Guy Martin <gmsoft@tuxicoman.be>.
+ */
+#define LINKTYPE_MPEG_2_TS 243
+/*
+ * ng4T GmbH's UMTS Iub/Iur-over-ATM and Iub/Iur-over-IP format as
+ * used by their ng40 protocol tester.
+ *
+ * Requested by Jens Grimmer <jens.grimmer@ng4t.com>.
+ */
+#define LINKTYPE_NG40 244
+
+/*
+ * Pseudo-header giving adapter number and flags, followed by an NFC
+ * (Near-Field Communications) Logical Link Control Protocol (LLCP) PDU,
+ * as specified by NFC Forum Logical Link Control Protocol Technical
+ * Specification LLCP 1.1.
+ *
+ * Requested by Mike Wakerly <mikey@google.com>.
+ */
+#define LINKTYPE_NFC_LLCP 245
+
+/*
+ * pfsync output; DLT_PFSYNC is 18, which collides with DLT_CIP in
+ * SuSE 6.3, on OpenBSD, NetBSD, DragonFly BSD, and Mac OS X, and
+ * is 121, which collides with DLT_HHDLC, in FreeBSD. We pick a
+ * shiny new link-layer header type value that doesn't collide with
+ * anything, in the hopes that future pfsync savefiles, if any,
+ * won't require special hacks to distinguish from other savefiles.
+ *
+ */
+#define LINKTYPE_PFSYNC 246
+
+/*
+ * Raw InfiniBand packets, starting with the Local Routing Header.
+ *
+ * Requested by Oren Kladnitsky <orenk@mellanox.com>.
+ */
+#define LINKTYPE_INFINIBAND 247
+
+/*
+ * SCTP, with no lower-level protocols (i.e., no IPv4 or IPv6).
+ *
+ * Requested by Michael Tuexen <Michael.Tuexen@lurchi.franken.de>.
+ */
+#define LINKTYPE_SCTP 248
+
+/*
+ * USB packets, beginning with a USBPcap header.
+ *
+ * Requested by Tomasz Mon <desowin@gmail.com>
+ */
+#define LINKTYPE_USBPCAP 249
+
+/*
+ * Schweitzer Engineering Laboratories "RTAC" product serial-line
+ * packets.
+ *
+ * Requested by Chris Bontje <chris_bontje@selinc.com>.
+ */
+#define DLT_RTAC_SERIAL 250
+
+/*
+ * Bluetooth Low Energy air interface link-layer packets.
+ *
+ * Requested by Mike Kershaw <dragorn@kismetwireless.net>.
+ */
+#define LINKTYPE_BLUETOOTH_LE_LL 251
+
+/*
+ * Link-layer header type for upper-protocol layer PDU saves from wireshark.
+ *
+ * the actual contents are determined by two TAGs stored with each
+ * packet:
+ * EXP_PDU_TAG_LINKTYPE the link type (LINKTYPE_ value) of the
+ * original packet.
+ *
+ * EXP_PDU_TAG_PROTO_NAME the name of the wireshark dissector
+ * that can make sense of the data stored.
+ */
+#define LINKTYPE_WIRESHARK_UPPER_PDU 252
+
+#define LINKTYPE_MATCHING_MAX 252 /* highest value in the "matching" range */
+
static struct linktype_map {
int dlt;
int linktype;
@@ -866,11 +948,12 @@
{ DLT_AX25, LINKTYPE_AX25 },
{ DLT_PRONET, LINKTYPE_PRONET },
{ DLT_CHAOS, LINKTYPE_CHAOS },
- { DLT_IEEE802, LINKTYPE_TOKEN_RING },
+ { DLT_IEEE802, LINKTYPE_IEEE802_5 },
{ DLT_ARCNET, LINKTYPE_ARCNET_BSD },
{ DLT_SLIP, LINKTYPE_SLIP },
{ DLT_PPP, LINKTYPE_PPP },
{ DLT_FDDI, LINKTYPE_FDDI },
+ { DLT_SYMANTEC_FIREWALL, LINKTYPE_SYMANTEC_FIREWALL },
/*
* These DLT_* codes have different values on different
@@ -883,7 +966,6 @@
{ DLT_FR, LINKTYPE_FRELAY },
#endif
- { DLT_SYMANTEC_FIREWALL, LINKTYPE_SYMANTEC_FIREWALL },
{ DLT_ATM_RFC1483, LINKTYPE_ATM_RFC1483 },
{ DLT_RAW, LINKTYPE_RAW },
{ DLT_SLIP_BSDOS, LINKTYPE_SLIP_BSDOS },
@@ -923,6 +1005,12 @@
int i;
/*
+ * Map DLT_PFSYNC, whatever it might be, to LINKTYPE_PFSYNC.
+ */
+ if (dlt == DLT_PFSYNC)
+ return (LINKTYPE_PFSYNC);
+
+ /*
* Map the values in the matching range.
*/
if (dlt >= DLT_MATCHING_MIN && dlt <= DLT_MATCHING_MAX)
@@ -950,6 +1038,15 @@
int i;
/*
+ * Map LINKTYPE_PFSYNC to DLT_PFSYNC, whatever it might be.
+ * LINKTYPE_PFSYNC is in the matching range, to make sure
+ * it's as safe from reuse as we can arrange, so we do
+ * this test first.
+ */
+ if (linktype == LINKTYPE_PFSYNC)
+ return (DLT_PFSYNC);
+
+ /*
* Map the values in the matching range.
*/
if (linktype >= LINKTYPE_MATCHING_MIN &&
Index: libpcap/pcap-filter.manmisc.in
===================================================================
--- libpcap/pcap-filter.manmisc.in (revision 32783)
+++ libpcap/pcap-filter.manmisc.in (working copy)
@@ -45,6 +45,7 @@
There are three
different kinds of qualifier:
.IP \fItype\fP
+.I type
qualifiers say what kind of thing the id name or number refers to.
Possible types are
.BR host ,
@@ -58,6 +59,7 @@
.B host
is assumed.
.IP \fIdir\fP
+.I dir
qualifiers specify a particular transfer direction to and/or from
.IR id .
Possible directions are
@@ -93,6 +95,7 @@
.B outbound
qualifiers can be used to specify a desired direction.
.IP \fIproto\fP
+.I proto
qualifiers restrict the match to a particular protocol.
Possible
protos are:
@@ -159,7 +162,7 @@
which may be either an address or a name.
.IP "\fBsrc host \fIhost\fR"
True if the IPv4/v6 source field of the packet is \fIhost\fP.
-.IP "\fBhost \fIhost\fP
+.IP "\fBhost \fIhost\fP"
True if either the IPv4/v6 source or destination of the packet is \fIhost\fP.
.IP
Any of the above host expressions can be prepended with the keywords,
@@ -177,17 +180,17 @@
.in -.5i
If \fIhost\fR is a name with multiple IP addresses, each address will
be checked for a match.
-.IP "\fBether dst \fIehost\fP
+.IP "\fBether dst \fIehost\fP"
True if the Ethernet destination address is \fIehost\fP.
\fIEhost\fP
may be either a name from /etc/ethers or a number (see
.IR ethers (3N)
for numeric format).
-.IP "\fBether src \fIehost\fP
+.IP "\fBether src \fIehost\fP"
True if the Ethernet source address is \fIehost\fP.
-.IP "\fBether host \fIehost\fP
+.IP "\fBether host \fIehost\fP"
True if either the Ethernet source or destination address is \fIehost\fP.
-.IP "\fBgateway\fP \fIhost\fP
+.IP "\fBgateway\fP \fIhost\fP"
True if the packet used \fIhost\fP as a gateway.
I.e., the Ethernet
source or destination address was \fIhost\fP but neither the IP source
@@ -302,6 +305,18 @@
.IP "\fBip6 proto \fIprotocol\fR"
True if the packet is an IPv6 packet of protocol type \fIprotocol\fP.
Note that this primitive does not chase the protocol header chain.
+.IP "\fBproto \fIprotocol\fR"
+True if the packet is an IPv4 or IPv6 packet of protocol type
+\fIprotocol\fP. Note that this primitive does not chase the protocol
+header chain.
+.IP "\fBtcp\fR, \fBudp\fR, \fBicmp\fR"
+Abbreviations for:
+.in +.5i
+.nf
+\fBproto \fIp\fR\fB
+.fi
+.in -.5i
+where \fIp\fR is one of the above protocols.
.IP "\fBip6 protochain \fIprotocol\fR"
True if the packet is IPv6 packet,
and contains protocol header with type \fIprotocol\fR
@@ -321,6 +336,10 @@
slow.
.IP "\fBip protochain \fIprotocol\fR"
Equivalent to \fBip6 protochain \fIprotocol\fR, but this is for IPv4.
+.IP "\fBprotochain \fIprotocol\fR"
+True if the packet is an IPv4 or IPv6 packet of protocol type
+\fIprotocol\fP. Note that this primitive chases the protocol
+header chain.
.IP "\fBether broadcast\fR"
True if the packet is an Ethernet broadcast packet.
The \fIether\fP
@@ -402,6 +421,25 @@
DSAP in the LLC header, the 802.3-with-no-LLC-header encapsulation of
IPX, and the IPX etype in a SNAP frame.
.RE
+.IP "\fBip\fR, \fBip6\fR, \fBarp\fR, \fBrarp\fR, \fBatalk\fR, \fBaarp\fR, \fBdecnet\fR, \fBiso\fR, \fBstp\fR, \fBipx\fR, \fBnetbeui\fP"
+Abbreviations for:
+.in +.5i
+.nf
+\fBether proto \fIp\fR
+.fi
+.in -.5i
+where \fIp\fR is one of the above protocols.
+.IP "\fBlat\fR, \fBmoprc\fR, \fBmopdl\fR"
+Abbreviations for:
+.in +.5i
+.nf
+\fBether proto \fIp\fR
+.fi
+.in -.5i
+where \fIp\fR is one of the above protocols.
+Note that not all applications using
+.BR pcap (3PCAP)
+currently know how to parse these protocols.
.IP "\fBdecnet src \fIhost\fR"
True if the DECNET source address is
.IR host ,
@@ -503,25 +541,6 @@
.IR ehost .
The fourth address field is only used for
WDS (Wireless Distribution System) frames.
-.IP "\fBip\fR, \fBip6\fR, \fBarp\fR, \fBrarp\fR, \fBatalk\fR, \fBaarp\fR, \fBdecnet\fR, \fBiso\fR, \fBstp\fR, \fBipx\fR, \fBnetbeui\fP"
-Abbreviations for:
-.in +.5i
-.nf
-\fBether proto \fIp\fR
-.fi
-.in -.5i
-where \fIp\fR is one of the above protocols.
-.IP "\fBlat\fR, \fBmoprc\fR, \fBmopdl\fR"
-Abbreviations for:
-.in +.5i
-.nf
-\fBether proto \fIp\fR
-.fi
-.in -.5i
-where \fIp\fR is one of the above protocols.
-Note that not all applications using
-.BR pcap (3)
-currently know how to parse these protocols.
.IP "\fBtype \fIwlan_type\fR"
True if the IEEE 802.11 frame type matches the specified \fIwlan_type\fR.
Valid \fIwlan_type\fRs are:
@@ -638,9 +657,11 @@
.IP \fBpppoed\fP
True if the packet is a PPP-over-Ethernet Discovery packet (Ethernet
type 0x8863).
-.IP \fBpppoes\fP
+.IP "\fBpppoes \fI[session_id]\fR"
True if the packet is a PPP-over-Ethernet Session packet (Ethernet
type 0x8864).
+If \fI[session_id]\fR is specified, only true if the packet has the specified
+\fIsession_id\fR.
Note that the first \fBpppoes\fR keyword encountered in \fIexpression\fR
changes the decoding offsets for the remainder of \fIexpression\fR on
the assumption that the packet is a PPPoE session packet.
@@ -648,18 +669,10 @@
For example:
.in +.5i
.nf
-\fBpppoes && ip\fR
+\fBpppoes 0x27 && ip\fR
.fi
.in -.5i
-filters IPv4 protocols encapsulated in PPPoE.
-.IP "\fBtcp\fR, \fBudp\fR, \fBicmp\fR"
-Abbreviations for:
-.in +.5i
-.nf
-\fBip proto \fIp\fR\fB or ip6 proto \fIp\fR
-.fi
-.in -.5i
-where \fIp\fR is one of the above protocols.
+filters IPv4 protocols encapsulated in PPPoE session id 0x27.
.IP "\fBiso proto \fIprotocol\fR"
True if the packet is an OSI packet of protocol type \fIprotocol\fP.
\fIProtocol\fP can be a number or one of the names
@@ -674,11 +687,11 @@
where \fIp\fR is one of the above protocols.
.IP "\fBl1\fR, \fBl2\fR, \fBiih\fR, \fBlsp\fR, \fBsnp\fR, \fBcsnp\fR, \fBpsnp\fR"
Abbreviations for IS-IS PDU types.
-.IP "\fBvpi\fP \fIn\fR
+.IP "\fBvpi\fP \fIn\fR"
True if the packet is an ATM packet, for SunATM on Solaris, with a
virtual path identifier of
.IR n .
-.IP "\fBvci\fP \fIn\fR
+.IP "\fBvci\fP \fIn\fR"
True if the packet is an ATM packet, for SunATM on Solaris, with a
virtual channel identifier of
.IR n .
@@ -918,27 +931,6 @@
.RE
.SH "SEE ALSO"
pcap(3PCAP)
-.SH AUTHORS
-The original authors are:
-.LP
-Van Jacobson,
-Craig Leres and
-Steven McCanne, all of the
-Lawrence Berkeley National Laboratory, University of California, Berkeley, CA.
-.LP
-It is currently being maintained by tcpdump.org.
-.LP
-The current version of libpcap is available via http:
-.LP
-.RS
-.I http://www.tcpdump.org/
-.RE
-.LP
-The original distribution is available via anonymous ftp:
-.LP
-.RS
-.I ftp://ftp.ee.lbl.gov/tcpdump.tar.Z
-.RE
.SH BUGS
Please send problems, bugs, questions, desirable enhancements, etc. to:
.LP
Index: libpcap/pcap_snapshot.3pcap
===================================================================
--- libpcap/pcap_snapshot.3pcap (revision 32783)
+++ libpcap/pcap_snapshot.3pcap (working copy)
@@ -40,5 +40,15 @@
.B pcap_open_live()
was called, for a live capture, or the snapshot length from the capture
file, for a ``savefile''.
+.PP
+It must not be called on a pcap descriptor created by
+.B pcap_create()
+that has not yet been activated by
+.BR pcap_activate() .
+.SH RETURN VALUE
+.B pcap_snapshot()
+returns the snapshot length on success and
+.B PCAP_ERROR_NOT_ACTIVATED
+if called on a capture handle that has been created but not activated.
.SH SEE ALSO
pcap(3PCAP)
Index: libpcap/pcap-libdlpi.c
===================================================================
--- libpcap/pcap-libdlpi.c (revision 32783)
+++ libpcap/pcap-libdlpi.c (working copy)
@@ -52,7 +52,6 @@
static int dlpromiscon(pcap_t *, bpf_u_int32);
static int pcap_read_libdlpi(pcap_t *, int, pcap_handler, u_char *);
static int pcap_inject_libdlpi(pcap_t *, const void *, size_t);
-static void pcap_close_libdlpi(pcap_t *);
static void pcap_libdlpi_err(const char *, const char *, int, char *);
static void pcap_cleanup_libdlpi(pcap_t *);
@@ -101,6 +100,7 @@
static int
pcap_activate_libdlpi(pcap_t *p)
{
+ struct pcap_dlpi *pd = p->priv;
int retv;
dlpi_handle_t dh;
dlpi_info_t dlinfo;
@@ -122,7 +122,7 @@
p->errbuf);
return (err);
}
- p->dlpi_hd = dh;
+ pd->dlpi_hd = dh;
if (p->opt.rfmon) {
/*
@@ -134,7 +134,7 @@
}
/* Bind with DLPI_ANY_SAP. */
- if ((retv = dlpi_bind(p->dlpi_hd, DLPI_ANY_SAP, 0)) != DLPI_SUCCESS) {
+ if ((retv = dlpi_bind(pd->dlpi_hd, DLPI_ANY_SAP, 0)) != DLPI_SUCCESS) {
pcap_libdlpi_err(p->opt.source, "dlpi_bind", retv, p->errbuf);
goto bad;
}
@@ -181,7 +181,7 @@
}
/* Determine link type. */
- if ((retv = dlpi_info(p->dlpi_hd, &dlinfo, 0)) != DLPI_SUCCESS) {
+ if ((retv = dlpi_info(pd->dlpi_hd, &dlinfo, 0)) != DLPI_SUCCESS) {
pcap_libdlpi_err(p->opt.source, "dlpi_info", retv, p->errbuf);
goto bad;
}
@@ -189,10 +189,10 @@
if (pcap_process_mactype(p, dlinfo.di_mactype) != 0)
goto bad;
- p->fd = dlpi_fd(p->dlpi_hd);
+ p->fd = dlpi_fd(pd->dlpi_hd);
/* Push and configure bufmod. */
- if (pcap_conf_bufmod(p, p->snapshot, p->md.timeout) != 0)
+ if (pcap_conf_bufmod(p, p->snapshot) != 0)
goto bad;
/*
@@ -235,9 +235,11 @@
static int
dlpromiscon(pcap_t *p, bpf_u_int32 level)
{
+ struct pcap_dlpi *pd = p->priv;
+ int retv;
int err;
- retv = dlpi_promiscon(p->hd, level);
+ retv = dlpi_promiscon(pd->dlpi_hd, level);
if (retv != DLPI_SUCCESS) {
if (retv == DL_SYSERR &&
(errno == EPERM || errno == EACCES))
@@ -299,6 +301,7 @@
static int
pcap_read_libdlpi(pcap_t *p, int count, pcap_handler callback, u_char *user)
{
+ struct pcap_dlpi *pd = p->priv;
int len;
u_char *bufp;
size_t msglen;
@@ -324,7 +327,7 @@
msglen = p->bufsize;
bufp = p->buffer + p->offset;
- retv = dlpi_recv(p->dlpi_hd, NULL, NULL, bufp,
+ retv = dlpi_recv(pd->dlpi_hd, NULL, NULL, bufp,
&msglen, -1, NULL);
if (retv != DLPI_SUCCESS) {
/*
@@ -336,7 +339,7 @@
len = 0;
continue;
}
- pcap_libdlpi_err(dlpi_linkname(p->dlpi_hd),
+ pcap_libdlpi_err(dlpi_linkname(pd->dlpi_hd),
"dlpi_recv", retv, p->errbuf);
return (-1);
}
@@ -350,11 +353,12 @@
static int
pcap_inject_libdlpi(pcap_t *p, const void *buf, size_t size)
{
+ struct pcap_dlpi *pd = p->priv;
int retv;
- retv = dlpi_send(p->dlpi_hd, NULL, 0, buf, size, NULL);
+ retv = dlpi_send(pd->dlpi_hd, NULL, 0, buf, size, NULL);
if (retv != DLPI_SUCCESS) {
- pcap_libdlpi_err(dlpi_linkname(p->dlpi_hd), "dlpi_send", retv,
+ pcap_libdlpi_err(dlpi_linkname(pd->dlpi_hd), "dlpi_send", retv,
p->errbuf);
return (-1);
}
@@ -372,9 +376,11 @@
static void
pcap_cleanup_libdlpi(pcap_t *p)
{
- if (p->dlpi_hd != NULL) {
- dlpi_close(p->dlpi_hd);
- p->dlpi_hd = NULL;
+ struct pcap_dlpi *pd = p->priv;
+
+ if (pd->dlpi_hd != NULL) {
+ dlpi_close(pd->dlpi_hd);
+ pd->dlpi_hd = NULL;
p->fd = -1;
}
pcap_cleanup_live_common(p);
@@ -391,11 +397,11 @@
}
pcap_t *
-pcap_create(const char *device, char *ebuf)
+pcap_create_interface(const char *device, char *ebuf)
{
pcap_t *p;
- p = pcap_create_common(device, ebuf);
+ p = pcap_create_common(device, ebuf, sizeof (struct pcap_dlpi));
if (p == NULL)
return (NULL);
Index: libpcap/fad-gifc.c
===================================================================
--- libpcap/fad-gifc.c (revision 32783)
+++ libpcap/fad-gifc.c (working copy)
@@ -133,10 +133,11 @@
*
* XXX - or platforms that have other, better mechanisms but for which
* we don't yet have code to use that mechanism; I think there's a better
- * way on Linux, for example.
+ * way on Linux, for example, but if that better way is "getifaddrs()",
+ * we already have that.
*/
int
-pcap_findalldevs(pcap_if_t **alldevsp, char *errbuf)
+pcap_findalldevs_interfaces(pcap_if_t **alldevsp, char *errbuf)
{
pcap_if_t *devlist = NULL;
register int fd;
@@ -409,15 +410,6 @@
free(buf);
(void)close(fd);
- if (ret != -1) {
- /*
- * We haven't had any errors yet; do any platform-specific
- * operations to add devices.
- */
- if (pcap_platform_finddevs(&devlist, errbuf) < 0)
- ret = -1;
- }
-
if (ret == -1) {
/*
* We had an error; free the list we've been constructing.
Index: libpcap/pcap_breakloop.3pcap
===================================================================
--- libpcap/pcap_breakloop.3pcap (revision 32783)
+++ libpcap/pcap_breakloop.3pcap (working copy)
@@ -58,20 +58,15 @@
when your signal handler returns after calling pcap_breakloop(), the
call will be restarted, and the loop will not terminate until more
packets arrive and the call completes.
+.ft R
.PP
+.ft B
Note also that, in a multi-threaded application, if one thread is
-blocked in
-.BR pcap_dispatch() ,
-.BR pcap_loop() ,
-.BR pcap_next() ,
-or
-.BR pcap_next_ex() ,
-a call to
-.B pcap_breakloop()
-in a different thread will not unblock that thread; you will need to use
-whatever mechanism the OS provides for breaking a thread out of blocking
-calls in order to unblock the thread, such as thread cancellation in
-systems that support POSIX threads.
+blocked in pcap_dispatch(), pcap_loop(), pcap_next(), or pcap_next_ex(),
+a call to pcap_breakloop() in a different thread will not unblock that
+thread; you will need to use whatever mechanism the OS provides for
+breaking a thread out of blocking calls in order to unblock the thread,
+such as thread cancellation in systems that support POSIX threads.
.ft R
.PP
Note that
Index: libpcap/nametoaddr.c
===================================================================
--- libpcap/nametoaddr.c (revision 32783)
+++ libpcap/nametoaddr.c (working copy)
@@ -247,6 +247,7 @@
free(cpy);
return 0;
}
+ free(cpy);
if (*proto != save_proto)
*proto = PROTO_UNDEF;
@@ -414,6 +415,8 @@
register u_int d;
e = ep = (u_char *)malloc(6);
+ if (e == NULL)
+ return (NULL);
while (*s) {
if (*s == ':' || *s == '.' || *s == '-')
Index: libpcap/pcap-int.h
===================================================================
--- libpcap/pcap-int.h (revision 32783)
+++ libpcap/pcap-int.h (working copy)
@@ -42,10 +42,6 @@
extern "C" {
#endif
-#ifdef HAVE_LIBDLPI
-#include <libdlpi.h>
-#endif
-
#ifdef WIN32
#include <Packet32.h>
extern CRITICAL_SECTION g_PcapCompileCriticalSection;
@@ -56,10 +52,6 @@
#include <io.h>
#endif
-#ifdef HAVE_SNF_API
-#include <snf.h>
-#endif
-
#if (defined(_MSC_VER) && (_MSC_VER <= 1200)) /* we are compiling with Visual Studio 6, that doesn't support the LL suffix*/
/*
@@ -92,139 +84,17 @@
#endif /* _MSC_VER */
-/*
- * Savefile
- */
-typedef enum {
- NOT_SWAPPED,
- SWAPPED,
- MAYBE_SWAPPED
-} swapped_type_t;
-
-/*
- * Used when reading a savefile.
- */
-struct pcap_sf {
- FILE *rfile;
- int (*next_packet_op)(pcap_t *, struct pcap_pkthdr *, u_char **);
- int swapped;
- size_t hdrsize;
- swapped_type_t lengths_swapped;
- int version_major;
- int version_minor;
- bpf_u_int32 ifcount; /* number of interfaces seen in this capture */
- u_int tsresol; /* time stamp resolution */
- u_int tsscale; /* scaling factor for resolution -> microseconds */
- u_int64_t tsoffset; /* time stamp offset */
-};
-
-/*
- * Used when doing a live capture.
- */
-struct pcap_md {
- struct pcap_stat stat;
- /*XXX*/
- int use_bpf; /* using kernel filter */
- u_long TotPkts; /* can't oflow for 79 hrs on ether */
- u_long TotAccepted; /* count accepted by filter */
- u_long TotDrops; /* count of dropped packets */
- long TotMissed; /* missed by i/f during this run */
- long OrigMissed; /* missed by i/f before this run */
- char *device; /* device name */
+struct pcap_opt {
+ char *source;
int timeout; /* timeout for buffering */
- int must_do_on_close; /* stuff we must do when we close */
- struct pcap *next; /* list of open pcaps that need stuff cleared on close */
-#ifdef linux
- int sock_packet; /* using Linux 2.0 compatible interface */
- int cooked; /* using SOCK_DGRAM rather than SOCK_RAW */
- int ifindex; /* interface index of device we're bound to */
- int lo_ifindex; /* interface index of the loopback device */
- u_int packets_read; /* count of packets read with recvfrom() */
- bpf_u_int32 oldmode; /* mode to restore when turning monitor mode off */
- char *mondevice; /* mac80211 monitor device we created */
- u_char *mmapbuf; /* memory-mapped region pointer */
- size_t mmapbuflen; /* size of region */
- u_int tp_version; /* version of tpacket_hdr for mmaped ring */
- u_int tp_hdrlen; /* hdrlen of tpacket_hdr for mmaped ring */
- u_char *oneshot_buffer; /* buffer for copy of packet */
- long proc_dropped; /* packets reported dropped by /proc/net/dev */
-#endif /* linux */
-
-#ifdef HAVE_DAG_API
-#ifdef HAVE_DAG_STREAMS_API
- u_char *dag_mem_bottom; /* DAG card current memory bottom pointer */
- u_char *dag_mem_top; /* DAG card current memory top pointer */
-#else /* HAVE_DAG_STREAMS_API */
- void *dag_mem_base; /* DAG card memory base address */
- u_int dag_mem_bottom; /* DAG card current memory bottom offset */
- u_int dag_mem_top; /* DAG card current memory top offset */
-#endif /* HAVE_DAG_STREAMS_API */
- int dag_fcs_bits; /* Number of checksum bits from link layer */
- int dag_offset_flags; /* Flags to pass to dag_offset(). */
- int dag_stream; /* DAG stream number */
- int dag_timeout; /* timeout specified to pcap_open_live.
- * Same as in linux above, introduce
- * generally? */
-#endif /* HAVE_DAG_API */
-#ifdef HAVE_SNF_API
- snf_handle_t snf_handle; /* opaque device handle */
- snf_ring_t snf_ring; /* opaque device ring handle */
- int snf_timeout;
- int snf_boardnum;
-#endif /*HAVE_SNF_API*/
-
-#ifdef HAVE_ZEROCOPY_BPF
- /*
- * Zero-copy read buffer -- for zero-copy BPF. 'buffer' above will
- * alternative between these two actual mmap'd buffers as required.
- * As there is a header on the front size of the mmap'd buffer, only
- * some of the buffer is exposed to libpcap as a whole via bufsize;
- * zbufsize is the true size. zbuffer tracks the current zbuf
- * assocated with buffer so that it can be used to decide which the
- * next buffer to read will be.
- */
- u_char *zbuf1, *zbuf2, *zbuffer;
- u_int zbufsize;
- u_int zerocopy;
- u_int interrupted;
- struct timespec firstsel;
- /*
- * If there's currently a buffer being actively processed, then it is
- * referenced here; 'buffer' is also pointed at it, but offset by the
- * size of the header.
- */
- struct bpf_zbuf_header *bzh;
-#endif /* HAVE_ZEROCOPY_BPF */
-};
-
-/*
- * Stuff to do when we close.
- */
-#define MUST_CLEAR_PROMISC 0x00000001 /* clear promiscuous mode */
-#define MUST_CLEAR_RFMON 0x00000002 /* clear rfmon (monitor) mode */
-#define MUST_DELETE_MONIF 0x00000004 /* delete monitor-mode interface */
-
-struct pcap_opt {
int buffer_size;
- char *source;
int promisc;
- int rfmon;
+ int rfmon; /* monitor mode */
+ int immediate; /* immediate mode - deliver packets as soon as they arrive */
int tstamp_type;
+ int tstamp_precision;
};
-/*
- * Ultrix, DEC OSF/1^H^H^H^H^H^H^H^H^HDigital UNIX^H^H^H^H^H^H^H^H^H^H^H^H
- * Tru64 UNIX, and some versions of NetBSD pad FDDI packets to make everything
- * line up on a nice boundary.
- */
-#ifdef __NetBSD__
-#include <sys/param.h> /* needed to declare __NetBSD_Version__ */
-#endif
-
-#if defined(ultrix) || defined(__osf__) || (defined(__NetBSD__) && __NetBSD_Version__ > 106000000)
-#define PCAP_FDDIPAD 3
-#endif
-
typedef int (*activate_op_t)(pcap_t *);
typedef int (*can_set_rfmon_op_t)(pcap_t *);
typedef int (*read_op_t)(pcap_t *, int cnt, pcap_handler, u_char *);
@@ -239,10 +109,25 @@
typedef int (*setbuff_op_t)(pcap_t *, int);
typedef int (*setmode_op_t)(pcap_t *, int);
typedef int (*setmintocopy_op_t)(pcap_t *, int);
+typedef Adapter *(*getadapter_op_t)(pcap_t *);
#endif
typedef void (*cleanup_op_t)(pcap_t *);
+/*
+ * We put all the stuff used in the read code path at the beginning,
+ * to try to keep it together in the same cache line or lines.
+ */
struct pcap {
+ /*
+ * Method to call to read packets on a live capture.
+ */
+ read_op_t read_op;
+
+ /*
+ * Method to call to read to read packets from a savefile.
+ */
+ int (*next_packet_op)(pcap_t *, struct pcap_pkthdr *, u_char **);
+
#ifdef WIN32
ADAPTER *adapter;
LPPACKET Packet;
@@ -250,12 +135,34 @@
#else
int fd;
int selectable_fd;
- int send_fd;
#endif /* WIN32 */
-#ifdef HAVE_LIBDLPI
- dlpi_handle_t dlpi_hd;
-#endif
+ /*
+ * Read buffer.
+ */
+ int bufsize;
+ u_char *buffer;
+ u_char *bp;
+ int cc;
+
+ int break_loop; /* flag set to force break from packet-reading loop */
+
+ void *priv; /* private data for methods */
+
+ int swapped;
+ FILE *rfile; /* null if live capture, non-null if savefile */
+ int fddipad;
+ struct pcap *next; /* list of open pcaps that need stuff cleared on close */
+
+ /*
+ * File version number; meaningful only for a savefile, but we
+ * keep it here so that apps that (mistakenly) ask for the
+ * version numbers will get the same zero values that they
+ * always did.
+ */
+ int version_major;
+ int version_minor;
+
int snapshot;
int linktype; /* Network linktype */
int linktype_ext; /* Extended information stored in the linktype field of a file */
@@ -264,29 +171,9 @@
int activated; /* true if the capture is really started */
int oldstyle; /* if we're opening with pcap_open_live() */
- int break_loop; /* flag set to force break from packet-reading loop */
-
-#ifdef PCAP_FDDIPAD
- int fddipad;
-#endif
-
-#ifdef MSDOS
- void (*wait_proc)(void); /* call proc while waiting */
-#endif
-
- struct pcap_sf sf;
- struct pcap_md md;
struct pcap_opt opt;
/*
- * Read buffer.
- */
- int bufsize;
- u_char *buffer;
- u_char *bp;
- int cc;
-
- /*
* Place holder for pcap_next().
*/
u_char *pkt;
@@ -295,11 +182,25 @@
pcap_direction_t direction;
/*
- * Methods.
+ * Placeholder for filter code if bpf not in kernel.
*/
+ struct bpf_program fcode;
+
+ char errbuf[PCAP_ERRBUF_SIZE + 1];
+ int dlt_count;
+ u_int *dlt_list;
+ int tstamp_type_count;
+ u_int *tstamp_type_list;
+ int tstamp_precision_count;
+ u_int *tstamp_precision_list;
+
+ struct pcap_pkthdr pcap_header; /* This is needed for the pcap_next_ex() to work */
+
+ /*
+ * More methods.
+ */
activate_op_t activate_op;
can_set_rfmon_op_t can_set_rfmon_op;
- read_op_t read_op;
inject_op_t inject_op;
setfilter_op_t setfilter_op;
setdirection_op_t setdirection_op;
@@ -321,21 +222,9 @@
setbuff_op_t setbuff_op;
setmode_op_t setmode_op;
setmintocopy_op_t setmintocopy_op;
+ getadapter_op_t getadapter_op;
#endif
cleanup_op_t cleanup_op;
-
- /*
- * Placeholder for filter code if bpf not in kernel.
- */
- struct bpf_program fcode;
-
- char errbuf[PCAP_ERRBUF_SIZE + 1];
- int dlt_count;
- u_int *dlt_list;
- int tstamp_type_count;
- u_int *tstamp_type_list;
-
- struct pcap_pkthdr pcap_header; /* This is needed for the pcap_next_ex() to work */
};
/*
@@ -374,12 +263,13 @@
* the old record header as well as files with the new record header
* (using the magic number to determine the header format).
*
- * Then supply the changes as a patch at
+ * Then supply the changes by forking the branch at
*
- * http://sourceforge.net/projects/libpcap/
+ * https://github.com/the-tcpdump-group/libpcap/issues
*
- * so that future versions of libpcap and programs that use it (such as
- * tcpdump) will be able to read your new capture file format.
+ * and issuing a pull request, so that future versions of libpcap and
+ * programs that use it (such as tcpdump) will be able to read your new
+ * capture file format.
*/
struct pcap_sf_pkthdr {
@@ -447,6 +337,12 @@
#endif
/*
+ * Does the packet count argument to a module's read routine say
+ * "supply packets until you run out of packets"?
+ */
+#define PACKET_COUNT_IS_UNLIMITED(count) ((count) <= 0)
+
+/*
* Routines that most pcap implementations can use for non-blocking mode.
*/
#if !defined(WIN32) && !defined(MSDOS)
@@ -454,7 +350,19 @@
int pcap_setnonblock_fd(pcap_t *p, int, char *);
#endif
-pcap_t *pcap_create_common(const char *, char *);
+/*
+ * Internal interfaces for "pcap_create()".
+ *
+ * "pcap_create_interface()" is the routine to do a pcap_create on
+ * a regular network interface. There are multiple implementations
+ * of this, one for each platform type (Linux, BPF, DLPI, etc.),
+ * with the one used chosen by the configure script.
+ *
+ * "pcap_create_common()" allocates and fills in a pcap_t, for use
+ * by pcap_create routines.
+ */
+pcap_t *pcap_create_interface(const char *, char *);
+pcap_t *pcap_create_common(const char *, char *, size_t);
int pcap_do_addexit(pcap_t *);
void pcap_add_to_pcaps_to_close(pcap_t *);
void pcap_remove_from_pcaps_to_close(pcap_t *);
@@ -465,12 +373,16 @@
/*
* Internal interfaces for "pcap_findalldevs()".
*
+ * "pcap_findalldevs_interfaces()" finds interfaces using the
+ * "standard" mechanisms (SIOCGIFCONF, "getifaddrs()", etc.).
+ *
* "pcap_platform_finddevs()" is a platform-dependent routine to
- * add devices not found by the "standard" mechanisms (SIOCGIFCONF,
- * "getifaddrs()", etc..
+ * add devices not found by the "standard" mechanisms.
*
- * "pcap_add_if()" adds an interface to the list of interfaces.
+ * "pcap_add_if()" adds an interface to the list of interfaces, for
+ * use by various "find interfaces" routines.
*/
+int pcap_findalldevs_interfaces(pcap_if_t **, char *);
int pcap_platform_finddevs(pcap_if_t **, char *);
int add_addr_to_iflist(pcap_if_t **, const char *, u_int, struct sockaddr *,
size_t, struct sockaddr *, size_t, struct sockaddr *, size_t,
@@ -480,6 +392,28 @@
int add_or_find_if(pcap_if_t **, pcap_if_t **, const char *, u_int,
const char *, char *);
+/*
+ * Internal interfaces for "pcap_open_offline()".
+ *
+ * "pcap_open_offline_common()" allocates and fills in a pcap_t, for use
+ * by pcap_open_offline routines.
+ *
+ * "sf_cleanup()" closes the file handle associated with a pcap_t, if
+ * appropriate, and frees all data common to all modules for handling
+ * savefile types.
+ */
+pcap_t *pcap_open_offline_common(char *ebuf, size_t size);
+void sf_cleanup(pcap_t *p);
+
+/*
+ * Internal interfaces for both "pcap_create()" and routines that
+ * open savefiles.
+ *
+ * "pcap_oneshot()" is the standard one-shot callback for "pcap_next()"
+ * and "pcap_next_ex()".
+ */
+void pcap_oneshot(u_char *, const struct pcap_pkthdr *, const u_char *);
+
#ifdef WIN32
char *pcap_win32strerror(void);
#endif
Index: libpcap/pcap_datalink_val_to_name.3pcap
===================================================================
--- libpcap/pcap_datalink_val_to_name.3pcap (revision 32783)
+++ libpcap/pcap_datalink_val_to_name.3pcap (working copy)
@@ -37,8 +37,12 @@
.SH DESCRIPTION
.B pcap_datalink_val_to_name()
translates a link-layer header type value to the corresponding
-link-layer header type name. NULL is returned on failure.
+link-layer header type name.
+.B NULL
+is returned on failure.
.PP
.B pcap_datalink_val_to_description()
translates a link-layer header type value to a short description of that
-link-layer header type. NULL is returned on failure.
+link-layer header type.
+.B NULL
+is returned on failure.
Index: libpcap/pcap_set_immediate_mode.3pcap
===================================================================
--- libpcap/pcap_set_immediate_mode.3pcap (revision 0)
+++ libpcap/pcap_set_immediate_mode.3pcap (working copy)
@@ -0,0 +1,47 @@
+.\"
+.\" Copyright (c) 1994, 1996, 1997
+.\" 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.
+.\"
+.TH PCAP_SET_IMMEDIATE_MODE 3PCAP "8 May 2013"
+.SH NAME
+pcap_set_immediate_mode \- set immediate mode for a not-yet-activated capture
+handle
+.SH SYNOPSIS
+.nf
+.ft B
+#include <pcap/pcap.h>
+.LP
+.ft B
+int pcap_set_immediate_mode(pcap_t *p, int immediate_mode);
+.ft
+.fi
+.SH DESCRIPTION
+.B pcap_set_immediate_mode()
+sets whether immediate mode should be set on a capture handle when
+the handle is activated.
+If
+.I immediate_mode
+is non-zero, immediate mode will be set, otherwise it will not be set.
+.SH RETURN VALUE
+.B pcap_set_immediate_mode()
+returns 0 on success or
+.B PCAP_ERROR_ACTIVATED
+if called on a capture handle that has been activated.
+.SH SEE ALSO
+pcap(3PCAP), pcap_create(3PCAP), pcap_activate(3PCAP)
Index: libpcap/pcap-linux.c
===================================================================
--- libpcap/pcap-linux.c (revision 32783)
+++ libpcap/pcap-linux.c (working copy)
@@ -26,6 +26,8 @@
*
* Modifications: Added PACKET_MMAP support
* Paolo Abeni <paolo.abeni@email.it>
+ * Added TPACKET_V3 support
+ * Gabor Tatarka <gabor.tatarka@ericsson.com>
*
* based on previous works of:
* Simon Patarin <patarin@cs.unibo.it>
@@ -127,11 +129,14 @@
#include <fcntl.h>
#include <string.h>
#include <limits.h>
+#include <sys/stat.h>
#include <sys/socket.h>
#include <sys/ioctl.h>
#include <sys/utsname.h>
#include <sys/mman.h>
#include <linux/if.h>
+#include <linux/if_packet.h>
+#include <linux/sockios.h>
#include <netinet/in.h>
#include <linux/if_ether.h>
#include <net/if_arp.h>
@@ -142,34 +147,6 @@
#include "pcap/sll.h"
#include "pcap/vlan.h"
-#ifdef HAVE_DAG_API
-#include "pcap-dag.h"
-#endif /* HAVE_DAG_API */
-
-#ifdef HAVE_SEPTEL_API
-#include "pcap-septel.h"
-#endif /* HAVE_SEPTEL_API */
-
-#ifdef HAVE_SNF_API
-#include "pcap-snf.h"
-#endif /* HAVE_SNF_API */
-
-#ifdef PCAP_SUPPORT_USB
-#include "pcap-usb-linux.h"
-#endif
-
-#ifdef PCAP_SUPPORT_BT
-#include "pcap-bt-linux.h"
-#endif
-
-#ifdef PCAP_SUPPORT_CAN
-#include "pcap-can-linux.h"
-#endif
-
-#ifdef PCAP_SUPPORT_NETFILTER
-#include "pcap-netfilter-linux.h"
-#endif
-
/*
* If PF_PACKET is defined, we can use {SOCK_RAW,SOCK_DGRAM}/PF_PACKET
* sockets rather than SOCK_PACKET sockets.
@@ -222,10 +199,13 @@
# ifdef PCAP_SUPPORT_PACKET_RING
# ifdef TPACKET_HDRLEN
# define HAVE_PACKET_RING
+# ifdef TPACKET3_HDRLEN
+# define HAVE_TPACKET3
+# endif /* TPACKET3_HDRLEN */
# ifdef TPACKET2_HDRLEN
# define HAVE_TPACKET2
-# else
-# define TPACKET_V1 0
+# else /* TPACKET2_HDRLEN */
+# define TPACKET_V1 0 /* Old kernel with only V1, so no TPACKET_Vn defined */
# endif /* TPACKET2_HDRLEN */
# endif /* TPACKET_HDRLEN */
# endif /* PCAP_SUPPORT_PACKET_RING */
@@ -236,15 +216,6 @@
#include <linux/filter.h>
#endif
-/*
- * We need linux/sockios.h if we have linux/net_tstamp.h (for time stamp
- * specification) or linux/ethtool.h (for ethtool ioctls to get offloading
- * information).
- */
-#if defined(HAVE_LINUX_NET_TSTAMP_H) || defined(HAVE_LINUX_ETHTOOL_H)
-#include <linux/sockios.h>
-#endif
-
#ifdef HAVE_LINUX_NET_TSTAMP_H
#include <linux/net_tstamp.h>
#endif
@@ -312,6 +283,44 @@
#define BIGGER_THAN_ALL_MTUS (64*1024)
/*
+ * Private data for capturing on Linux SOCK_PACKET or PF_PACKET sockets.
+ */
+struct pcap_linux {
+ u_int packets_read; /* count of packets read with recvfrom() */
+ long proc_dropped; /* packets reported dropped by /proc/net/dev */
+ struct pcap_stat stat;
+
+ char *device; /* device name */
+ int filter_in_userland; /* must filter in userland */
+ int blocks_to_filter_in_userland;
+ int must_do_on_close; /* stuff we must do when we close */
+ int timeout; /* timeout for buffering */
+ int sock_packet; /* using Linux 2.0 compatible interface */
+ int cooked; /* using SOCK_DGRAM rather than SOCK_RAW */
+ int ifindex; /* interface index of device we're bound to */
+ int lo_ifindex; /* interface index of the loopback device */
+ bpf_u_int32 oldmode; /* mode to restore when turning monitor mode off */
+ char *mondevice; /* mac80211 monitor device we created */
+ u_char *mmapbuf; /* memory-mapped region pointer */
+ size_t mmapbuflen; /* size of region */
+ int vlan_offset; /* offset at which to insert vlan tags; if -1, don't insert */
+ u_int tp_version; /* version of tpacket_hdr for mmaped ring */
+ u_int tp_hdrlen; /* hdrlen of tpacket_hdr for mmaped ring */
+ u_char *oneshot_buffer; /* buffer for copy of packet */
+#ifdef HAVE_TPACKET3
+ unsigned char *current_packet; /* Current packet within the TPACKET_V3 block. Move to next block if NULL. */
+ int packets_left; /* Unhandled packets left within the block from previous call to pcap_read_linux_mmap_v3 in case of TPACKET_V3. */
+#endif
+};
+
+/*
+ * Stuff to do when we close.
+ */
+#define MUST_CLEAR_PROMISC 0x00000001 /* clear promiscuous mode */
+#define MUST_CLEAR_RFMON 0x00000002 /* clear rfmon (monitor) mode */
+#define MUST_DELETE_MONIF 0x00000004 /* delete monitor-mode interface */
+
+/*
* Prototypes for internal functions and methods.
*/
static void map_arphrd_to_dlt(pcap_t *, int, int);
@@ -329,12 +338,18 @@
static int pcap_stats_linux(pcap_t *, struct pcap_stat *);
static int pcap_setfilter_linux(pcap_t *, struct bpf_program *);
static int pcap_setdirection_linux(pcap_t *, pcap_direction_t);
+static int pcap_set_datalink_linux(pcap_t *, int);
static void pcap_cleanup_linux(pcap_t *);
union thdr {
- struct tpacket_hdr *h1;
- struct tpacket2_hdr *h2;
- void *raw;
+ struct tpacket_hdr *h1;
+#ifdef HAVE_TPACKET2
+ struct tpacket2_hdr *h2;
+#endif
+#ifdef HAVE_TPACKET3
+ struct tpacket_block_desc *h3;
+#endif
+ void *raw;
};
#ifdef HAVE_PACKET_RING
@@ -344,7 +359,13 @@
static int create_ring(pcap_t *handle, int *status);
static int prepare_tpacket_socket(pcap_t *handle);
static void pcap_cleanup_linux_mmap(pcap_t *);
-static int pcap_read_linux_mmap(pcap_t *, int, pcap_handler , u_char *);
+static int pcap_read_linux_mmap_v1(pcap_t *, int, pcap_handler , u_char *);
+#ifdef HAVE_TPACKET2
+static int pcap_read_linux_mmap_v2(pcap_t *, int, pcap_handler , u_char *);
+#endif
+#ifdef HAVE_TPACKET3
+static int pcap_read_linux_mmap_v3(pcap_t *, int, pcap_handler , u_char *);
+#endif
static int pcap_setfilter_linux_mmap(pcap_t *, struct bpf_program *);
static int pcap_setnonblock_mmap(pcap_t *p, int nonblock, char *errbuf);
static int pcap_getnonblock_mmap(pcap_t *p, char *errbuf);
@@ -385,60 +406,11 @@
#endif /* SO_ATTACH_FILTER */
pcap_t *
-pcap_create(const char *device, char *ebuf)
+pcap_create_interface(const char *device, char *ebuf)
{
pcap_t *handle;
- /*
- * A null device name is equivalent to the "any" device.
- */
- if (device == NULL)
- device = "any";
-
-#ifdef HAVE_DAG_API
- if (strstr(device, "dag")) {
- return dag_create(device, ebuf);
- }
-#endif /* HAVE_DAG_API */
-
-#ifdef HAVE_SEPTEL_API
- if (strstr(device, "septel")) {
- return septel_create(device, ebuf);
- }
-#endif /* HAVE_SEPTEL_API */
-
-#ifdef HAVE_SNF_API
- handle = snf_create(device, ebuf);
- if (strstr(device, "snf") || handle != NULL)
- return handle;
-
-#endif /* HAVE_SNF_API */
-
-#ifdef PCAP_SUPPORT_BT
- if (strstr(device, "bluetooth")) {
- return bt_create(device, ebuf);
- }
-#endif
-
-#ifdef PCAP_SUPPORT_CAN
- if (strstr(device, "can") || strstr(device, "vcan")) {
- return can_create(device, ebuf);
- }
-#endif
-
-#ifdef PCAP_SUPPORT_USB
- if (strstr(device, "usbmon")) {
- return usb_create(device, ebuf);
- }
-#endif
-
-#ifdef PCAP_SUPPORT_NETFILTER
- if (strncmp(device, "nflog", strlen("nflog")) == 0) {
- return nflog_create(device, ebuf);
- }
-#endif
-
- handle = pcap_create_common(device, ebuf);
+ handle = pcap_create_common(device, ebuf, sizeof (struct pcap_linux));
if (handle == NULL)
return NULL;
@@ -466,6 +438,27 @@
handle->tstamp_type_list[2] = PCAP_TSTAMP_ADAPTER_UNSYNCED;
#endif
+#if defined(SIOCGSTAMPNS) && defined(SO_TIMESTAMPNS)
+ /*
+ * We claim that we support microsecond and nanosecond time
+ * stamps.
+ *
+ * XXX - with adapter-supplied time stamps, can we choose
+ * microsecond or nanosecond time stamps on arbitrary
+ * adapters?
+ */
+ handle->tstamp_precision_count = 2;
+ handle->tstamp_precision_list = malloc(2 * sizeof(u_int));
+ if (handle->tstamp_precision_list == NULL) {
+ if (handle->tstamp_type_list != NULL)
+ free(handle->tstamp_type_list);
+ free(handle);
+ return NULL;
+ }
+ handle->tstamp_precision_list[0] = PCAP_TSTAMP_PRECISION_MICRO;
+ handle->tstamp_precision_list[1] = PCAP_TSTAMP_PRECISION_NANO;
+#endif /* defined(SIOCGSTAMPNS) && defined(SO_TIMESTAMPNS) */
+
return handle;
}
@@ -555,7 +548,7 @@
return 1;
}
-#ifdef HAVE_LIBNL_2_x
+#ifdef HAVE_LIBNL_SOCKETS
#define get_nl_errmsg nl_geterror
#else
/* libnl 2.x compatibility code */
@@ -586,7 +579,7 @@
return 0;
}
#define genl_ctrl_alloc_cache __genl_ctrl_alloc_cache
-#endif /* !HAVE_LIBNL_2_x */
+#endif /* !HAVE_LIBNL_SOCKETS */
struct nl80211_state {
struct nl_sock *nl_sock;
@@ -671,7 +664,7 @@
err = nl_send_auto_complete(state->nl_sock, msg);
if (err < 0) {
-#ifdef HAVE_LIBNL_2_x
+#if defined HAVE_LIBNL_NLE
if (err == -NLE_FAILURE) {
#else
if (err == -ENFILE) {
@@ -699,7 +692,7 @@
}
err = nl_wait_for_ack(state->nl_sock);
if (err < 0) {
-#ifdef HAVE_LIBNL_2_x
+#if defined HAVE_LIBNL_NLE
if (err == -NLE_FAILURE) {
#else
if (err == -ENFILE) {
@@ -797,6 +790,7 @@
static int
enter_rfmon_mode_mac80211(pcap_t *handle, int sock_fd, const char *device)
{
+ struct pcap_linux *handlep = handle->priv;
int ret;
char phydev_path[PATH_MAX+1];
struct nl80211_state nlstate;
@@ -834,7 +828,7 @@
snprintf(mondevice, sizeof mondevice, "mon%u", n);
ret = add_mon_if(handle, sock_fd, &nlstate, device, mondevice);
if (ret == 1) {
- handle->md.mondevice = strdup(mondevice);
+ handlep->mondevice = strdup(mondevice);
goto added;
}
if (ret < 0) {
@@ -879,13 +873,13 @@
* Now configure the monitor interface up.
*/
memset(&ifr, 0, sizeof(ifr));
- strncpy(ifr.ifr_name, handle->md.mondevice, sizeof(ifr.ifr_name));
+ strncpy(ifr.ifr_name, handlep->mondevice, sizeof(ifr.ifr_name));
if (ioctl(sock_fd, SIOCGIFFLAGS, &ifr) == -1) {
snprintf(handle->errbuf, PCAP_ERRBUF_SIZE,
"%s: Can't get flags for %s: %s", device,
- handle->md.mondevice, strerror(errno));
+ handlep->mondevice, strerror(errno));
del_mon_if(handle, sock_fd, &nlstate, device,
- handle->md.mondevice);
+ handlep->mondevice);
nl80211_cleanup(&nlstate);
return PCAP_ERROR;
}
@@ -893,9 +887,9 @@
if (ioctl(sock_fd, SIOCSIFFLAGS, &ifr) == -1) {
snprintf(handle->errbuf, PCAP_ERRBUF_SIZE,
"%s: Can't set flags for %s: %s", device,
- handle->md.mondevice, strerror(errno));
+ handlep->mondevice, strerror(errno));
del_mon_if(handle, sock_fd, &nlstate, device,
- handle->md.mondevice);
+ handlep->mondevice);
nl80211_cleanup(&nlstate);
return PCAP_ERROR;
}
@@ -909,7 +903,7 @@
* Note that we have to delete the monitor device when we close
* the handle.
*/
- handle->md.must_do_on_close |= MUST_DELETE_MONIF;
+ handlep->must_do_on_close |= MUST_DELETE_MONIF;
/*
* Add this to the list of pcaps to close when we exit.
@@ -1078,6 +1072,7 @@
static void pcap_cleanup_linux( pcap_t *handle )
{
+ struct pcap_linux *handlep = handle->priv;
struct ifreq ifr;
#ifdef HAVE_LIBNL
struct nl80211_state nlstate;
@@ -1088,12 +1083,12 @@
struct iwreq ireq;
#endif /* IW_MODE_MONITOR */
- if (handle->md.must_do_on_close != 0) {
+ if (handlep->must_do_on_close != 0) {
/*
* There's something we have to do when closing this
* pcap_t.
*/
- if (handle->md.must_do_on_close & MUST_CLEAR_PROMISC) {
+ if (handlep->must_do_on_close & MUST_CLEAR_PROMISC) {
/*
* We put the interface into promiscuous mode;
* take it out of promiscuous mode.
@@ -1104,14 +1099,14 @@
* in 2.0[.x] kernels.
*/
memset(&ifr, 0, sizeof(ifr));
- strncpy(ifr.ifr_name, handle->md.device,
+ strncpy(ifr.ifr_name, handlep->device,
sizeof(ifr.ifr_name));
if (ioctl(handle->fd, SIOCGIFFLAGS, &ifr) == -1) {
fprintf(stderr,
"Can't restore interface %s flags (SIOCGIFFLAGS failed: %s).\n"
"Please adjust manually.\n"
"Hint: This can't happen with Linux >= 2.2.0.\n",
- handle->md.device, strerror(errno));
+ handlep->device, strerror(errno));
} else {
if (ifr.ifr_flags & IFF_PROMISC) {
/*
@@ -1125,7 +1120,7 @@
"Can't restore interface %s flags (SIOCSIFFLAGS failed: %s).\n"
"Please adjust manually.\n"
"Hint: This can't happen with Linux >= 2.2.0.\n",
- handle->md.device,
+ handlep->device,
strerror(errno));
}
}
@@ -1133,24 +1128,24 @@
}
#ifdef HAVE_LIBNL
- if (handle->md.must_do_on_close & MUST_DELETE_MONIF) {
- ret = nl80211_init(handle, &nlstate, handle->md.device);
+ if (handlep->must_do_on_close & MUST_DELETE_MONIF) {
+ ret = nl80211_init(handle, &nlstate, handlep->device);
if (ret >= 0) {
ret = del_mon_if(handle, handle->fd, &nlstate,
- handle->md.device, handle->md.mondevice);
+ handlep->device, handlep->mondevice);
nl80211_cleanup(&nlstate);
}
if (ret < 0) {
fprintf(stderr,
"Can't delete monitor interface %s (%s).\n"
"Please delete manually.\n",
- handle->md.mondevice, handle->errbuf);
+ handlep->mondevice, handle->errbuf);
}
}
#endif /* HAVE_LIBNL */
#ifdef IW_MODE_MONITOR
- if (handle->md.must_do_on_close & MUST_CLEAR_RFMON) {
+ if (handlep->must_do_on_close & MUST_CLEAR_RFMON) {
/*
* We put the interface into rfmon mode;
* take it out of rfmon mode.
@@ -1168,7 +1163,7 @@
*/
oldflags = 0;
memset(&ifr, 0, sizeof(ifr));
- strncpy(ifr.ifr_name, handle->md.device,
+ strncpy(ifr.ifr_name, handlep->device,
sizeof(ifr.ifr_name));
if (ioctl(handle->fd, SIOCGIFFLAGS, &ifr) != -1) {
if (ifr.ifr_flags & IFF_UP) {
@@ -1182,11 +1177,11 @@
/*
* Now restore the mode.
*/
- strncpy(ireq.ifr_ifrn.ifrn_name, handle->md.device,
+ strncpy(ireq.ifr_ifrn.ifrn_name, handlep->device,
sizeof ireq.ifr_ifrn.ifrn_name);
ireq.ifr_ifrn.ifrn_name[sizeof ireq.ifr_ifrn.ifrn_name - 1]
= 0;
- ireq.u.mode = handle->md.oldmode;
+ ireq.u.mode = handlep->oldmode;
if (ioctl(handle->fd, SIOCSIWMODE, &ireq) == -1) {
/*
* Scientist, you've failed.
@@ -1194,7 +1189,7 @@
fprintf(stderr,
"Can't restore interface %s wireless mode (SIOCSIWMODE failed: %s).\n"
"Please adjust manually.\n",
- handle->md.device, strerror(errno));
+ handlep->device, strerror(errno));
}
/*
@@ -1207,7 +1202,7 @@
fprintf(stderr,
"Can't bring interface %s back up (SIOCSIFFLAGS failed: %s).\n"
"Please adjust manually.\n",
- handle->md.device, strerror(errno));
+ handlep->device, strerror(errno));
}
}
}
@@ -1220,13 +1215,13 @@
pcap_remove_from_pcaps_to_close(handle);
}
- if (handle->md.mondevice != NULL) {
- free(handle->md.mondevice);
- handle->md.mondevice = NULL;
+ if (handlep->mondevice != NULL) {
+ free(handlep->mondevice);
+ handlep->mondevice = NULL;
}
- if (handle->md.device != NULL) {
- free(handle->md.device);
- handle->md.device = NULL;
+ if (handlep->device != NULL) {
+ free(handlep->device);
+ handlep->device = NULL;
}
pcap_cleanup_live_common(handle);
}
@@ -1242,6 +1237,7 @@
static int
pcap_activate_linux(pcap_t *handle)
{
+ struct pcap_linux *handlep = handle->priv;
const char *device;
int status = 0;
@@ -1250,7 +1246,7 @@
handle->inject_op = pcap_inject_linux;
handle->setfilter_op = pcap_setfilter_linux;
handle->setdirection_op = pcap_setdirection_linux;
- handle->set_datalink_op = NULL; /* can't change data link type */
+ handle->set_datalink_op = pcap_set_datalink_linux;
handle->getnonblock_op = pcap_getnonblock_fd;
handle->setnonblock_op = pcap_setnonblock_fd;
handle->cleanup_op = pcap_cleanup_linux;
@@ -1272,20 +1268,23 @@
}
}
- handle->md.device = strdup(device);
- if (handle->md.device == NULL) {
+ handlep->device = strdup(device);
+ if (handlep->device == NULL) {
snprintf(handle->errbuf, PCAP_ERRBUF_SIZE, "strdup: %s",
pcap_strerror(errno) );
return PCAP_ERROR;
}
+ /* copy timeout value */
+ handlep->timeout = handle->opt.timeout;
+
/*
* If we're in promiscuous mode, then we probably want
* to see when the interface drops packets too, so get an
* initial count from /proc/net/dev
*/
if (handle->opt.promisc)
- handle->md.proc_dropped = linux_if_drops(handle->md.device);
+ handlep->proc_dropped = linux_if_drops(handlep->device);
/*
* Current Linux kernels use the protocol family PF_PACKET to
@@ -1407,7 +1406,50 @@
return pcap_read_packet(handle, callback, user);
}
+static int
+pcap_set_datalink_linux(pcap_t *handle, int dlt)
+{
+ handle->linktype = dlt;
+ return 0;
+}
+
/*
+ * linux_check_direction()
+ *
+ * Do checks based on packet direction.
+ */
+static inline int
+linux_check_direction(const pcap_t *handle, const struct sockaddr_ll *sll)
+{
+ struct pcap_linux *handlep = handle->priv;
+
+ if (sll->sll_pkttype == PACKET_OUTGOING) {
+ /*
+ * Outgoing packet.
+ * If this is from the loopback device, reject it;
+ * we'll see the packet as an incoming packet as well,
+ * and we don't want to see it twice.
+ */
+ if (sll->sll_ifindex == handlep->lo_ifindex)
+ return 0;
+
+ /*
+ * If the user only wants incoming packets, reject it.
+ */
+ if (handle->direction == PCAP_D_IN)
+ return 0;
+ } else {
+ /*
+ * Incoming packet.
+ * If the user only wants outgoing packets, reject it.
+ */
+ if (handle->direction == PCAP_D_OUT)
+ return 0;
+ }
+ return 1;
+}
+
+/*
* Read a packet from the socket calling the handler provided by
* the user. Returns the number of packets received or -1 if an
* error occured.
@@ -1415,6 +1457,7 @@
static int
pcap_read_packet(pcap_t *handle, pcap_handler callback, u_char *userdata)
{
+ struct pcap_linux *handlep = handle->priv;
u_char *bp;
int offset;
#ifdef HAVE_PF_PACKET_SOCKETS
@@ -1442,7 +1485,7 @@
* If this is a cooked device, leave extra room for a
* fake packet header.
*/
- if (handle->md.cooked)
+ if (handlep->cooked)
offset = SLL_HDR_LEN;
else
offset = 0;
@@ -1537,7 +1580,7 @@
}
#ifdef HAVE_PF_PACKET_SOCKETS
- if (!handle->md.sock_packet) {
+ if (!handlep->sock_packet) {
/*
* Unfortunately, there is a window between socket() and
* bind() where the kernel may queue packets from any
@@ -1550,8 +1593,8 @@
* filter support, and it's a bit more complicated.
* It would save some instructions per packet, however.)
*/
- if (handle->md.ifindex != -1 &&
- from.sll_ifindex != handle->md.ifindex)
+ if (handlep->ifindex != -1 &&
+ from.sll_ifindex != handlep->ifindex)
return 0;
/*
@@ -1560,29 +1603,8 @@
* address returned for SOCK_PACKET is a "sockaddr_pkt"
* which lacks the relevant packet type information.
*/
- if (from.sll_pkttype == PACKET_OUTGOING) {
- /*
- * Outgoing packet.
- * If this is from the loopback device, reject it;
- * we'll see the packet as an incoming packet as well,
- * and we don't want to see it twice.
- */
- if (from.sll_ifindex == handle->md.lo_ifindex)
- return 0;
-
- /*
- * If the user only wants incoming packets, reject it.
- */
- if (handle->direction == PCAP_D_IN)
- return 0;
- } else {
- /*
- * Incoming packet.
- * If the user only wants outgoing packets, reject it.
- */
- if (handle->direction == PCAP_D_OUT)
- return 0;
- }
+ if (!linux_check_direction(handle, &from))
+ return 0;
}
#endif
@@ -1590,7 +1612,7 @@
/*
* If this is a cooked device, fill in the fake packet header.
*/
- if (handle->md.cooked) {
+ if (handlep->cooked) {
/*
* Add the length of the fake header to the length
* of packet data we read.
@@ -1609,32 +1631,40 @@
}
#if defined(HAVE_PACKET_AUXDATA) && defined(HAVE_LINUX_TPACKET_AUXDATA_TP_VLAN_TCI)
- for (cmsg = CMSG_FIRSTHDR(&msg); cmsg; cmsg = CMSG_NXTHDR(&msg, cmsg)) {
- struct tpacket_auxdata *aux;
- unsigned int len;
- struct vlan_tag *tag;
+ if (handlep->vlan_offset != -1) {
+ for (cmsg = CMSG_FIRSTHDR(&msg); cmsg; cmsg = CMSG_NXTHDR(&msg, cmsg)) {
+ struct tpacket_auxdata *aux;
+ unsigned int len;
+ struct vlan_tag *tag;
- if (cmsg->cmsg_len < CMSG_LEN(sizeof(struct tpacket_auxdata)) ||
- cmsg->cmsg_level != SOL_PACKET ||
- cmsg->cmsg_type != PACKET_AUXDATA)
- continue;
+ if (cmsg->cmsg_len < CMSG_LEN(sizeof(struct tpacket_auxdata)) ||
+ cmsg->cmsg_level != SOL_PACKET ||
+ cmsg->cmsg_type != PACKET_AUXDATA)
+ continue;
- aux = (struct tpacket_auxdata *)CMSG_DATA(cmsg);
- if (aux->tp_vlan_tci == 0)
- continue;
+ aux = (struct tpacket_auxdata *)CMSG_DATA(cmsg);
+#if defined(TP_STATUS_VLAN_VALID)
+ if ((aux->tp_vlan_tci == 0) && !(aux->tp_status & TP_STATUS_VLAN_VALID))
+#else
+ if (aux->tp_vlan_tci == 0) /* this is ambigious but without the
+ TP_STATUS_VLAN_VALID flag, there is
+ nothing that we can do */
+#endif
+ continue;
- len = packet_len > iov.iov_len ? iov.iov_len : packet_len;
- if (len < 2 * ETH_ALEN)
- break;
+ len = packet_len > iov.iov_len ? iov.iov_len : packet_len;
+ if (len < (unsigned int) handlep->vlan_offset)
+ break;
- bp -= VLAN_TAG_LEN;
- memmove(bp, bp + VLAN_TAG_LEN, 2 * ETH_ALEN);
+ bp -= VLAN_TAG_LEN;
+ memmove(bp, bp + VLAN_TAG_LEN, handlep->vlan_offset);
- tag = (struct vlan_tag *)(bp + 2 * ETH_ALEN);
- tag->vlan_tpid = htons(ETH_P_8021Q);
- tag->vlan_tci = htons(aux->tp_vlan_tci);
+ tag = (struct vlan_tag *)(bp + handlep->vlan_offset);
+ tag->vlan_tpid = htons(ETH_P_8021Q);
+ tag->vlan_tci = htons(aux->tp_vlan_tci);
- packet_len += VLAN_TAG_LEN;
+ packet_len += VLAN_TAG_LEN;
+ }
}
#endif /* defined(HAVE_PACKET_AUXDATA) && defined(HAVE_LINUX_TPACKET_AUXDATA_TP_VLAN_TCI) */
#endif /* HAVE_PF_PACKET_SOCKETS */
@@ -1676,7 +1706,7 @@
caplen = handle->snapshot;
/* Run the packet filter if not using kernel filter */
- if (!handle->md.use_bpf && handle->fcode.bf_insns) {
+ if (handlep->filter_in_userland && handle->fcode.bf_insns) {
if (bpf_filter(handle->fcode.bf_insns, bp,
packet_len, caplen) == 0)
{
@@ -1687,11 +1717,24 @@
/* Fill in our own header data */
- if (ioctl(handle->fd, SIOCGSTAMP, &pcap_header.ts) == -1) {
- snprintf(handle->errbuf, PCAP_ERRBUF_SIZE,
- "SIOCGSTAMP: %s", pcap_strerror(errno));
- return PCAP_ERROR;
- }
+ /* get timestamp for this packet */
+#if defined(SIOCGSTAMPNS) && defined(SO_TIMESTAMPNS)
+ if (handle->opt.tstamp_precision == PCAP_TSTAMP_PRECISION_NANO) {
+ if (ioctl(handle->fd, SIOCGSTAMPNS, &pcap_header.ts) == -1) {
+ snprintf(handle->errbuf, PCAP_ERRBUF_SIZE,
+ "SIOCGSTAMPNS: %s", pcap_strerror(errno));
+ return PCAP_ERROR;
+ }
+ } else
+#endif
+ {
+ if (ioctl(handle->fd, SIOCGSTAMP, &pcap_header.ts) == -1) {
+ snprintf(handle->errbuf, PCAP_ERRBUF_SIZE,
+ "SIOCGSTAMP: %s", pcap_strerror(errno));
+ return PCAP_ERROR;
+ }
+ }
+
pcap_header.caplen = caplen;
pcap_header.len = packet_len;
@@ -1728,17 +1771,18 @@
* the count is more expensive than always testing a flag
* in memory.
*
- * We keep the count in "md.packets_read", and use that for
- * "ps_recv" if we can't get the statistics from the kernel.
+ * We keep the count in "handlep->packets_read", and use that
+ * for "ps_recv" if we can't get the statistics from the kernel.
* We do that because, if we *can* get the statistics from
- * the kernel, we use "md.stat.ps_recv" and "md.stat.ps_drop"
- * as running counts, as reading the statistics from the
- * kernel resets the kernel statistics, and if we directly
- * increment "md.stat.ps_recv" here, that means it will
- * count packets *twice* on systems where we can get kernel
- * statistics - once here, and once in pcap_stats_linux().
+ * the kernel, we use "handlep->stat.ps_recv" and
+ * "handlep->stat.ps_drop" as running counts, as reading the
+ * statistics from the kernel resets the kernel statistics,
+ * and if we directly increment "handlep->stat.ps_recv" here,
+ * that means it will count packets *twice* on systems where
+ * we can get kernel statistics - once here, and once in
+ * pcap_stats_linux().
*/
- handle->md.packets_read++;
+ handlep->packets_read++;
/* Call the user supplied callback function */
callback(userdata, &pcap_header, bp);
@@ -1749,12 +1793,13 @@
static int
pcap_inject_linux(pcap_t *handle, const void *buf, size_t size)
{
+ struct pcap_linux *handlep = handle->priv;
int ret;
#ifdef HAVE_PF_PACKET_SOCKETS
- if (!handle->md.sock_packet) {
+ if (!handlep->sock_packet) {
/* PF_PACKET socket */
- if (handle->md.ifindex == -1) {
+ if (handlep->ifindex == -1) {
/*
* We don't support sending on the "any" device.
*/
@@ -1764,7 +1809,7 @@
return (-1);
}
- if (handle->md.cooked) {
+ if (handlep->cooked) {
/*
* We don't support sending on the "any" device.
*
@@ -1800,10 +1845,29 @@
static int
pcap_stats_linux(pcap_t *handle, struct pcap_stat *stats)
{
+ struct pcap_linux *handlep = handle->priv;
#ifdef HAVE_TPACKET_STATS
+#ifdef HAVE_TPACKET3
+ /*
+ * For sockets using TPACKET_V1 or TPACKET_V2, the extra
+ * stuff at the end of a struct tpacket_stats_v3 will not
+ * be filled in, and we don't look at it so this is OK even
+ * for those sockets. In addition, the PF_PACKET socket
+ * code in the kernel only uses the length parameter to
+ * compute how much data to copy out and to indicate how
+ * much data was copied out, so it's OK to base it on the
+ * size of a struct tpacket_stats.
+ *
+ * XXX - it's probably OK, in fact, to just use a
+ * struct tpacket_stats for V3 sockets, as we don't
+ * care about the tp_freeze_q_cnt stat.
+ */
+ struct tpacket_stats_v3 kstats;
+#else /* HAVE_TPACKET3 */
struct tpacket_stats kstats;
+#endif /* HAVE_TPACKET3 */
socklen_t len = sizeof (struct tpacket_stats);
-#endif
+#endif /* HAVE_TPACKET_STATS */
long if_dropped = 0;
@@ -1812,9 +1876,9 @@
*/
if (handle->opt.promisc)
{
- if_dropped = handle->md.proc_dropped;
- handle->md.proc_dropped = linux_if_drops(handle->md.device);
- handle->md.stat.ps_ifdrop += (handle->md.proc_dropped - if_dropped);
+ if_dropped = handlep->proc_dropped;
+ handlep->proc_dropped = linux_if_drops(handlep->device);
+ handlep->stat.ps_ifdrop += (handlep->proc_dropped - if_dropped);
}
#ifdef HAVE_TPACKET_STATS
@@ -1870,9 +1934,9 @@
* getsockopt(handle->fd, SOL_PACKET, PACKET_STATISTICS, ....
* resets the counters to zero.
*/
- handle->md.stat.ps_recv += kstats.tp_packets;
- handle->md.stat.ps_drop += kstats.tp_drops;
- *stats = handle->md.stat;
+ handlep->stat.ps_recv += kstats.tp_packets;
+ handlep->stat.ps_drop += kstats.tp_drops;
+ *stats = handlep->stat;
return 0;
}
else
@@ -1910,15 +1974,15 @@
* the kernel by libpcap.
*
* We maintain the count of packets processed by libpcap in
- * "md.packets_read", for reasons described in the comment
+ * "handlep->packets_read", for reasons described in the comment
* at the end of pcap_read_packet(). We have no idea how many
* packets were dropped by the kernel buffers -- but we know
* how many the interface dropped, so we can return that.
*/
- stats->ps_recv = handle->md.packets_read;
+ stats->ps_recv = handlep->packets_read;
stats->ps_drop = 0;
- stats->ps_ifdrop = handle->md.stat.ps_ifdrop;
+ stats->ps_ifdrop = handlep->stat.ps_ifdrop;
return 0;
}
@@ -1942,6 +2006,8 @@
DIR *sys_class_net_d;
int fd;
struct dirent *ent;
+ char subsystem_path[PATH_MAX+1];
+ struct stat statb;
char *p;
char name[512]; /* XXX - pick a size */
char *q, *saveq;
@@ -1986,12 +2052,43 @@
}
/*
- * Ignore directories (".", "..", and any subdirectories).
+ * Ignore "." and "..".
*/
- if (ent->d_type == DT_DIR)
+ if (strcmp(ent->d_name, ".") == 0 ||
+ strcmp(ent->d_name, "..") == 0)
continue;
/*
+ * Ignore plain files; they do not have subdirectories
+ * and thus have no attributes.
+ */
+ if (ent->d_type == DT_REG)
+ continue;
+
+ /*
+ * Is there an "ifindex" file under that name?
+ * (We don't care whether it's a directory or
+ * a symlink; older kernels have directories
+ * for devices, newer kernels have symlinks to
+ * directories.)
+ */
+ snprintf(subsystem_path, sizeof subsystem_path,
+ "/sys/class/net/%s/ifindex", ent->d_name);
+ if (lstat(subsystem_path, &statb) != 0) {
+ /*
+ * Stat failed. Either there was an error
+ * other than ENOENT, and we don't know if
+ * this is an interface, or it's ENOENT,
+ * and either some part of "/sys/class/net/{if}"
+ * disappeared, in which case it probably means
+ * the interface disappeared, or there's no
+ * "ifindex" file, which means it's not a
+ * network interface.
+ */
+ continue;
+ }
+
+ /*
* Get the interface name.
*/
p = &ent->d_name[0];
@@ -2256,51 +2353,6 @@
if (pcap_add_if(alldevsp, "any", 0, any_descr, errbuf) < 0)
return (-1);
-#ifdef HAVE_DAG_API
- /*
- * Add DAG devices.
- */
- if (dag_platform_finddevs(alldevsp, errbuf) < 0)
- return (-1);
-#endif /* HAVE_DAG_API */
-
-#ifdef HAVE_SEPTEL_API
- /*
- * Add Septel devices.
- */
- if (septel_platform_finddevs(alldevsp, errbuf) < 0)
- return (-1);
-#endif /* HAVE_SEPTEL_API */
-
-#ifdef HAVE_SNF_API
- if (snf_platform_finddevs(alldevsp, errbuf) < 0)
- return (-1);
-#endif /* HAVE_SNF_API */
-
-#ifdef PCAP_SUPPORT_BT
- /*
- * Add Bluetooth devices.
- */
- if (bt_platform_finddevs(alldevsp, errbuf) < 0)
- return (-1);
-#endif
-
-#ifdef PCAP_SUPPORT_USB
- /*
- * Add USB devices.
- */
- if (usb_platform_finddevs(alldevsp, errbuf) < 0)
- return (-1);
-#endif
-
-#ifdef PCAP_SUPPORT_NETFILTER
- /*
- * Add netfilter devices.
- */
- if (netfilter_platform_finddevs(alldevsp, errbuf) < 0)
- return (-1);
-#endif
-
return (0);
}
@@ -2311,6 +2363,7 @@
pcap_setfilter_linux_common(pcap_t *handle, struct bpf_program *filter,
int is_mmapped)
{
+ struct pcap_linux *handlep;
#ifdef SO_ATTACH_FILTER
struct sock_fprog fcode;
int can_filter_in_kernel;
@@ -2326,6 +2379,8 @@
return -1;
}
+ handlep = handle->priv;
+
/* Make our private copy of the filter */
if (install_bpf_program(handle, filter) < 0)
@@ -2336,7 +2391,7 @@
* Run user level packet filter by default. Will be overriden if
* installing a kernel filter succeeds.
*/
- handle->md.use_bpf = 0;
+ handlep->filter_in_userland = 1;
/* Install kernel level filter if possible */
@@ -2424,8 +2479,11 @@
if (can_filter_in_kernel) {
if ((err = set_kernel_filter(handle, &fcode)) == 0)
{
- /* Installation succeded - using kernel filter. */
- handle->md.use_bpf = 1;
+ /*
+ * Installation succeded - using kernel filter,
+ * so userland filtering not needed.
+ */
+ handlep->filter_in_userland = 0;
}
else if (err == -1) /* Non-fatal error */
{
@@ -2450,7 +2508,7 @@
* calling "pcap_setfilter()". Otherwise, the kernel filter may
* filter out packets that would pass the new userland filter.
*/
- if (!handle->md.use_bpf)
+ if (handlep->filter_in_userland)
reset_kernel_filter(handle);
/*
@@ -2482,7 +2540,9 @@
pcap_setdirection_linux(pcap_t *handle, pcap_direction_t d)
{
#ifdef HAVE_PF_PACKET_SOCKETS
- if (!handle->md.sock_packet) {
+ struct pcap_linux *handlep = handle->priv;
+
+ if (!handlep->sock_packet) {
handle->direction = d;
return 0;
}
@@ -2786,6 +2846,25 @@
handle->linktype = DLT_LTALK;
break;
+ case 18:
+ /*
+ * RFC 4338 defines an encapsulation for IP and ARP
+ * packets that's compatible with the RFC 2625
+ * encapsulation, but that uses a different ARP
+ * hardware type and hardware addresses. That
+ * ARP hardware type is 18; Linux doesn't define
+ * any ARPHRD_ value as 18, but if it ever officially
+ * supports RFC 4338-style IP-over-FC, it should define
+ * one.
+ *
+ * For now, we map it to DLT_IP_OVER_FC, in the hopes
+ * that this will encourage its use in the future,
+ * should Linux ever officially support RFC 4338-style
+ * IP-over-FC.
+ */
+ handle->linktype = DLT_IP_OVER_FC;
+ break;
+
#ifndef ARPHRD_FCPP
#define ARPHRD_FCPP 784
#endif
@@ -2803,11 +2882,62 @@
#endif
case ARPHRD_FCFABRIC:
/*
- * We assume that those all mean RFC 2625 IP-over-
- * Fibre Channel, with the RFC 2625 header at
- * the beginning of the packet.
+ * Back in 2002, Donald Lee at Cray wanted a DLT_ for
+ * IP-over-FC:
+ *
+ * http://www.mail-archive.com/tcpdump-workers@sandelman.ottawa.on.ca/msg01043.html
+ *
+ * and one was assigned.
+ *
+ * In a later private discussion (spun off from a message
+ * on the ethereal-users list) on how to get that DLT_
+ * value in libpcap on Linux, I ended up deciding that
+ * the best thing to do would be to have him tweak the
+ * driver to set the ARPHRD_ value to some ARPHRD_FCxx
+ * type, and map all those types to DLT_IP_OVER_FC:
+ *
+ * I've checked into the libpcap and tcpdump CVS tree
+ * support for DLT_IP_OVER_FC. In order to use that,
+ * you'd have to modify your modified driver to return
+ * one of the ARPHRD_FCxxx types, in "fcLINUXfcp.c" -
+ * change it to set "dev->type" to ARPHRD_FCFABRIC, for
+ * example (the exact value doesn't matter, it can be
+ * any of ARPHRD_FCPP, ARPHRD_FCAL, ARPHRD_FCPL, or
+ * ARPHRD_FCFABRIC).
+ *
+ * 11 years later, Christian Svensson wanted to map
+ * various ARPHRD_ values to DLT_FC_2 and
+ * DLT_FC_2_WITH_FRAME_DELIMS for raw Fibre Channel
+ * frames:
+ *
+ * https://github.com/mcr/libpcap/pull/29
+ *
+ * There doesn't seem to be any network drivers that uses
+ * any of the ARPHRD_FC* values for IP-over-FC, and
+ * it's not exactly clear what the "Dummy types for non
+ * ARP hardware" are supposed to mean (link-layer
+ * header type? Physical network type?), so it's
+ * not exactly clear why the ARPHRD_FC* types exist
+ * in the first place.
+ *
+ * For now, we map them to DLT_FC_2, and provide an
+ * option of DLT_FC_2_WITH_FRAME_DELIMS, as well as
+ * DLT_IP_OVER_FC just in case there's some old
+ * driver out there that uses one of those types for
+ * IP-over-FC on which somebody wants to capture
+ * packets.
*/
- handle->linktype = DLT_IP_OVER_FC;
+ handle->dlt_list = (u_int *) malloc(sizeof(u_int) * 2);
+ /*
+ * If that fails, just leave the list empty.
+ */
+ if (handle->dlt_list != NULL) {
+ handle->dlt_list[0] = DLT_FC_2;
+ handle->dlt_list[1] = DLT_FC_2_WITH_FRAME_DELIMS;
+ handle->dlt_list[2] = DLT_IP_OVER_FC;
+ handle->dlt_count = 3;
+ }
+ handle->linktype = DLT_FC_2;
break;
#ifndef ARPHRD_IRDA
@@ -2818,7 +2948,7 @@
handle->linktype = DLT_LINUX_IRDA;
/* We need to save packet direction for IrDA decoding,
* so let's use "Linux-cooked" mode. Jean II */
- //handle->md.cooked = 1;
+ //handlep->cooked = 1;
break;
/* ARPHRD_LAPD is unofficial and randomly allocated, if reallocation
@@ -2868,6 +2998,7 @@
activate_new(pcap_t *handle)
{
#ifdef HAVE_PF_PACKET_SOCKETS
+ struct pcap_linux *handlep = handle->priv;
const char *device = handle->opt.source;
int is_any_device = (strcmp(device, "any") == 0);
int sock_fd = -1, arptype;
@@ -2913,12 +3044,12 @@
}
/* It seems the kernel supports the new interface. */
- handle->md.sock_packet = 0;
+ handlep->sock_packet = 0;
/*
* Get the interface index of the loopback device.
* If the attempt fails, don't fail, just set the
- * "md.lo_ifindex" to -1.
+ * "handlep->lo_ifindex" to -1.
*
* XXX - can there be more than one device that loops
* packets back, i.e. devices other than "lo"? If so,
@@ -2926,7 +3057,7 @@
* indices for them, and check all of them in
* "pcap_read_packet()".
*/
- handle->md.lo_ifindex = iface_get_id(sock_fd, "lo", handle->errbuf);
+ handlep->lo_ifindex = iface_get_id(sock_fd, "lo", handle->errbuf);
/*
* Default value for offset to align link-layer payload
@@ -2941,7 +3072,7 @@
*/
if (!is_any_device) {
/* Assume for now we don't need cooked mode. */
- handle->md.cooked = 0;
+ handlep->cooked = 0;
if (handle->opt.rfmon) {
/*
@@ -2971,8 +3102,8 @@
* device to open for monitor mode. If we've
* been given a different device, use it.
*/
- if (handle->md.mondevice != NULL)
- device = handle->md.mondevice;
+ if (handlep->mondevice != NULL)
+ device = handlep->mondevice;
}
arptype = iface_get_arptype(sock_fd, device, handle->errbuf);
if (arptype < 0) {
@@ -3019,7 +3150,7 @@
return PCAP_ERROR;
}
}
- handle->md.cooked = 1;
+ handlep->cooked = 1;
/*
* Get rid of any link-layer type list
@@ -3057,14 +3188,14 @@
handle->linktype = DLT_LINUX_SLL;
}
- handle->md.ifindex = iface_get_id(sock_fd, device,
+ handlep->ifindex = iface_get_id(sock_fd, device,
handle->errbuf);
- if (handle->md.ifindex == -1) {
+ if (handlep->ifindex == -1) {
close(sock_fd);
return PCAP_ERROR;
}
- if ((err = iface_bind(sock_fd, handle->md.ifindex,
+ if ((err = iface_bind(sock_fd, handlep->ifindex,
handle->errbuf)) != 1) {
close(sock_fd);
if (err < 0)
@@ -3086,7 +3217,7 @@
/*
* It uses cooked mode.
*/
- handle->md.cooked = 1;
+ handlep->cooked = 1;
handle->linktype = DLT_LINUX_SLL;
/*
@@ -3096,7 +3227,7 @@
* if we figure out how to transmit in cooked
* mode.
*/
- handle->md.ifindex = -1;
+ handlep->ifindex = -1;
}
/*
@@ -3123,7 +3254,7 @@
if (!is_any_device && handle->opt.promisc) {
memset(&mr, 0, sizeof(mr));
- mr.mr_ifindex = handle->md.ifindex;
+ mr.mr_ifindex = handlep->ifindex;
mr.mr_type = PACKET_MR_PROMISC;
if (setsockopt(sock_fd, SOL_PACKET, PACKET_ADD_MEMBERSHIP,
&mr, sizeof(mr)) == -1) {
@@ -3162,22 +3293,51 @@
* 1 byte of packet data (so we don't pass a byte
* count of 0 to "recvfrom()").
*/
- if (handle->md.cooked) {
+ if (handlep->cooked) {
if (handle->snapshot < SLL_HDR_LEN + 1)
handle->snapshot = SLL_HDR_LEN + 1;
}
handle->bufsize = handle->snapshot;
+ /*
+ * Set the offset at which to insert VLAN tags.
+ */
+ switch (handle->linktype) {
+
+ case DLT_EN10MB:
+ handlep->vlan_offset = 2 * ETH_ALEN;
+ break;
+
+ case DLT_LINUX_SLL:
+ handlep->vlan_offset = 14;
+ break;
+
+ default:
+ handlep->vlan_offset = -1; /* unknown */
+ break;
+ }
+
/* Save the socket FD in the pcap structure */
handle->fd = sock_fd;
+#if defined(SIOCGSTAMPNS) && defined(SO_TIMESTAMPNS)
+ if (handle->opt.tstamp_precision == PCAP_TSTAMP_PRECISION_NANO) {
+ int nsec_tstamps = 1;
+
+ if (setsockopt(handle->fd, SOL_SOCKET, SO_TIMESTAMPNS, &nsec_tstamps, sizeof(nsec_tstamps)) < 0) {
+ snprintf(handle->errbuf, PCAP_ERRBUF_SIZE, "setsockopt: unable to set SO_TIMESTAMPNS");
+ return PCAP_ERROR;
+ }
+ }
+#endif /* defined(SIOCGSTAMPNS) && defined(SO_TIMESTAMPNS) */
+
return 1;
-#else
+#else /* HAVE_PF_PACKET_SOCKETS */
strncpy(ebuf,
"New packet capturing interface not supported by build "
"environment", PCAP_ERRBUF_SIZE);
return 0;
-#endif
+#endif /* HAVE_PF_PACKET_SOCKETS */
}
#ifdef HAVE_PACKET_RING
@@ -3196,14 +3356,15 @@
static int
activate_mmap(pcap_t *handle, int *status)
{
+ struct pcap_linux *handlep = handle->priv;
int ret;
/*
* Attempt to allocate a buffer to hold the contents of one
* packet, for use by the oneshot callback.
*/
- handle->md.oneshot_buffer = malloc(handle->snapshot);
- if (handle->md.oneshot_buffer == NULL) {
+ handlep->oneshot_buffer = malloc(handle->snapshot);
+ if (handlep->oneshot_buffer == NULL) {
snprintf(handle->errbuf, PCAP_ERRBUF_SIZE,
"can't allocate oneshot buffer: %s",
pcap_strerror(errno));
@@ -3217,7 +3378,7 @@
}
ret = prepare_tpacket_socket(handle);
if (ret == -1) {
- free(handle->md.oneshot_buffer);
+ free(handlep->oneshot_buffer);
*status = PCAP_ERROR;
return ret;
}
@@ -3227,7 +3388,7 @@
* We don't support memory-mapped capture; our caller
* will fall back on reading from the socket.
*/
- free(handle->md.oneshot_buffer);
+ free(handlep->oneshot_buffer);
return 0;
}
if (ret == -1) {
@@ -3235,7 +3396,7 @@
* Error attempting to enable memory-mapped capture;
* fail. create_ring() has set *status.
*/
- free(handle->md.oneshot_buffer);
+ free(handlep->oneshot_buffer);
return -1;
}
@@ -3248,7 +3409,22 @@
* handle->offset is used to get the current position into the rx ring.
* handle->cc is used to store the ring size.
*/
- handle->read_op = pcap_read_linux_mmap;
+
+ switch (handlep->tp_version) {
+ case TPACKET_V1:
+ handle->read_op = pcap_read_linux_mmap_v1;
+ break;
+#ifdef HAVE_TPACKET2
+ case TPACKET_V2:
+ handle->read_op = pcap_read_linux_mmap_v2;
+ break;
+#endif
+#ifdef HAVE_TPACKET3
+ case TPACKET_V3:
+ handle->read_op = pcap_read_linux_mmap_v3;
+ break;
+#endif
+ }
handle->cleanup_op = pcap_cleanup_linux_mmap;
handle->setfilter_op = pcap_setfilter_linux_mmap;
handle->setnonblock_op = pcap_setnonblock_mmap;
@@ -3266,59 +3442,114 @@
#endif /* HAVE_PACKET_RING */
#ifdef HAVE_PACKET_RING
+
+#if defined(HAVE_TPACKET2) || defined(HAVE_TPACKET3)
/*
- * Attempt to set the socket to version 2 of the memory-mapped header.
- * Return 1 if we succeed or if we fail because version 2 isn't
+ * Attempt to set the socket to the specified version of the memory-mapped
+ * header.
+ *
+ * Return 0 if we succeed; return 1 if we fail because that version isn't
* supported; return -1 on any other error, and set handle->errbuf.
*/
static int
-prepare_tpacket_socket(pcap_t *handle)
+init_tpacket(pcap_t *handle, int version, const char *version_str)
{
-#ifdef HAVE_TPACKET2
- socklen_t len;
- int val;
-#endif
+ struct pcap_linux *handlep = handle->priv;
+ int val = version;
+ socklen_t len = sizeof(val);
- handle->md.tp_version = TPACKET_V1;
- handle->md.tp_hdrlen = sizeof(struct tpacket_hdr);
-
-#ifdef HAVE_TPACKET2
- /* Probe whether kernel supports TPACKET_V2 */
- val = TPACKET_V2;
- len = sizeof(val);
+ /* Probe whether kernel supports the specified TPACKET version */
if (getsockopt(handle->fd, SOL_PACKET, PACKET_HDRLEN, &val, &len) < 0) {
- if (errno == ENOPROTOOPT)
- return 1; /* no - just drive on */
+ if (errno == ENOPROTOOPT || errno == EINVAL)
+ return 1; /* no */
- /* Yes - treat as a failure. */
+ /* Failed to even find out; this is a fatal error. */
snprintf(handle->errbuf, PCAP_ERRBUF_SIZE,
- "can't get TPACKET_V2 header len on packet socket: %s",
- pcap_strerror(errno));
+ "can't get %s header len on packet socket: %s",
+ version_str,
+ pcap_strerror(errno));
return -1;
}
- handle->md.tp_hdrlen = val;
+ handlep->tp_hdrlen = val;
- val = TPACKET_V2;
+ val = version;
if (setsockopt(handle->fd, SOL_PACKET, PACKET_VERSION, &val,
- sizeof(val)) < 0) {
+ sizeof(val)) < 0) {
snprintf(handle->errbuf, PCAP_ERRBUF_SIZE,
- "can't activate TPACKET_V2 on packet socket: %s",
- pcap_strerror(errno));
+ "can't activate %s on packet socket: %s",
+ version_str,
+ pcap_strerror(errno));
return -1;
}
- handle->md.tp_version = TPACKET_V2;
+ handlep->tp_version = version;
/* Reserve space for VLAN tag reconstruction */
val = VLAN_TAG_LEN;
if (setsockopt(handle->fd, SOL_PACKET, PACKET_RESERVE, &val,
- sizeof(val)) < 0) {
+ sizeof(val)) < 0) {
snprintf(handle->errbuf, PCAP_ERRBUF_SIZE,
- "can't set up reserve on packet socket: %s",
- pcap_strerror(errno));
+ "can't set up reserve on packet socket: %s",
+ pcap_strerror(errno));
return -1;
}
+ return 0;
+}
+#endif /* defined HAVE_TPACKET2 || defined HAVE_TPACKET3 */
+
+/*
+ * Attempt to set the socket to version 3 of the memory-mapped header and,
+ * if that fails because version 3 isn't supported, attempt to fall
+ * back to version 2. If version 2 isn't supported, just leave it at
+ * version 1.
+ *
+ * Return 1 if we succeed or if we fail because neither version 2 nor 3 is
+ * supported; return -1 on any other error, and set handle->errbuf.
+ */
+static int
+prepare_tpacket_socket(pcap_t *handle)
+{
+ struct pcap_linux *handlep = handle->priv;
+#if defined(HAVE_TPACKET2) || defined(HAVE_TPACKET3)
+ int ret;
+#endif
+
+ handlep->tp_version = TPACKET_V1;
+ handlep->tp_hdrlen = sizeof(struct tpacket_hdr);
+
+#ifdef HAVE_TPACKET3
+ /*
+ * The only mode in which buffering is done on PF_PACKET
+ * sockets, so that packets might not be delivered
+ * immediately, is TPACKET_V3 mode.
+ *
+ * The buffering cannot be disabled in that mode, so
+ * if the user has requested immediate mode, we don't
+ * use TPACKET_V3.
+ */
+ if (handle->opt.immediate)
+ ret = 1; /* pretend TPACKET_V3 couldn't be set */
+ else
+ ret = init_tpacket(handle, TPACKET_V3, "TPACKET_V3");
+ if (-1 == ret) {
+ /* Error during setting up TPACKET_V3. */
+ return -1;
+ } else if (1 == ret) {
+ /* TPACKET_V3 not supported - fall back to TPACKET_V2. */
+#endif /* HAVE_TPACKET3 */
+
+#ifdef HAVE_TPACKET2
+ ret = init_tpacket(handle, TPACKET_V2, "TPACKET_V2");
+ if (-1 == ret) {
+ /* Error during setting up TPACKET_V2. */
+ return -1;
+ }
#endif /* HAVE_TPACKET2 */
+
+#ifdef HAVE_TPACKET3
+ }
+#endif /* HAVE_TPACKET3 */
+
return 1;
}
@@ -3337,8 +3568,18 @@
static int
create_ring(pcap_t *handle, int *status)
{
+ struct pcap_linux *handlep = handle->priv;
unsigned i, j, frames_per_block;
+#ifdef HAVE_TPACKET3
+ /*
+ * For sockets using TPACKET_V1 or TPACKET_V2, the extra
+ * stuff at the end of a struct tpacket_req3 will be
+ * ignored, so this is OK even for those sockets.
+ */
+ struct tpacket_req3 req;
+#else
struct tpacket_req req;
+#endif
socklen_t len;
unsigned int sk_type, tp_reserve, maclen, tp_hdrlen, netoff, macoff;
unsigned int frame_size;
@@ -3348,116 +3589,142 @@
*/
*status = 0;
- /* Note that with large snapshot length (say 64K, which is the default
- * for recent versions of tcpdump, the value that "-s 0" has given
- * for a long time with tcpdump, and the default in Wireshark/TShark),
- * if we use the snapshot length to calculate the frame length,
- * only a few frames will be available in the ring even with pretty
- * large ring size (and a lot of memory will be unused).
- *
- * Ideally, we should choose a frame length based on the
- * minimum of the specified snapshot length and the maximum
- * packet size. That's not as easy as it sounds; consider, for
- * example, an 802.11 interface in monitor mode, where the
- * frame would include a radiotap header, where the maximum
- * radiotap header length is device-dependent.
- *
- * So, for now, we just do this for Ethernet devices, where
- * there's no metadata header, and the link-layer header is
- * fixed length. We can get the maximum packet size by
- * adding 18, the Ethernet header length plus the CRC length
- * (just in case we happen to get the CRC in the packet), to
- * the MTU of the interface; we fetch the MTU in the hopes
- * that it reflects support for jumbo frames. (Even if the
- * interface is just being used for passive snooping, the driver
- * might set the size of buffers in the receive ring based on
- * the MTU, so that the MTU limits the maximum size of packets
- * that we can receive.)
- *
- * We don't do that if segmentation/fragmentation or receive
- * offload are enabled, so we don't get rudely surprised by
- * "packets" bigger than the MTU. */
- frame_size = handle->snapshot;
- if (handle->linktype == DLT_EN10MB) {
- int mtu;
- int offload;
+ switch (handlep->tp_version) {
- offload = iface_get_offload(handle);
- if (offload == -1) {
+ case TPACKET_V1:
+#ifdef HAVE_TPACKET2
+ case TPACKET_V2:
+#endif
+ /* Note that with large snapshot length (say 64K, which is
+ * the default for recent versions of tcpdump, the value that
+ * "-s 0" has given for a long time with tcpdump, and the
+ * default in Wireshark/TShark/dumpcap), if we use the snapshot
+ * length to calculate the frame length, only a few frames
+ * will be available in the ring even with pretty
+ * large ring size (and a lot of memory will be unused).
+ *
+ * Ideally, we should choose a frame length based on the
+ * minimum of the specified snapshot length and the maximum
+ * packet size. That's not as easy as it sounds; consider,
+ * for example, an 802.11 interface in monitor mode, where
+ * the frame would include a radiotap header, where the
+ * maximum radiotap header length is device-dependent.
+ *
+ * So, for now, we just do this for Ethernet devices, where
+ * there's no metadata header, and the link-layer header is
+ * fixed length. We can get the maximum packet size by
+ * adding 18, the Ethernet header length plus the CRC length
+ * (just in case we happen to get the CRC in the packet), to
+ * the MTU of the interface; we fetch the MTU in the hopes
+ * that it reflects support for jumbo frames. (Even if the
+ * interface is just being used for passive snooping, the
+ * driver might set the size of buffers in the receive ring
+ * based on the MTU, so that the MTU limits the maximum size
+ * of packets that we can receive.)
+ *
+ * We don't do that if segmentation/fragmentation or receive
+ * offload are enabled, so we don't get rudely surprised by
+ * "packets" bigger than the MTU. */
+ frame_size = handle->snapshot;
+ if (handle->linktype == DLT_EN10MB) {
+ int mtu;
+ int offload;
+
+ offload = iface_get_offload(handle);
+ if (offload == -1) {
+ *status = PCAP_ERROR;
+ return -1;
+ }
+ if (!offload) {
+ mtu = iface_get_mtu(handle->fd, handle->opt.source,
+ handle->errbuf);
+ if (mtu == -1) {
+ *status = PCAP_ERROR;
+ return -1;
+ }
+ if (frame_size > mtu + 18)
+ frame_size = mtu + 18;
+ }
+ }
+
+ /* NOTE: calculus matching those in tpacket_rcv()
+ * in linux-2.6/net/packet/af_packet.c
+ */
+ len = sizeof(sk_type);
+ if (getsockopt(handle->fd, SOL_SOCKET, SO_TYPE, &sk_type,
+ &len) < 0) {
+ snprintf(handle->errbuf, PCAP_ERRBUF_SIZE,
+ "getsockopt: %s", pcap_strerror(errno));
*status = PCAP_ERROR;
return -1;
}
- if (!offload) {
- mtu = iface_get_mtu(handle->fd, handle->opt.source,
- handle->errbuf);
- if (mtu == -1) {
+#ifdef PACKET_RESERVE
+ len = sizeof(tp_reserve);
+ if (getsockopt(handle->fd, SOL_PACKET, PACKET_RESERVE,
+ &tp_reserve, &len) < 0) {
+ if (errno != ENOPROTOOPT) {
+ /*
+ * ENOPROTOOPT means "kernel doesn't support
+ * PACKET_RESERVE", in which case we fall back
+ * as best we can.
+ */
+ snprintf(handle->errbuf, PCAP_ERRBUF_SIZE,
+ "getsockopt: %s", pcap_strerror(errno));
*status = PCAP_ERROR;
return -1;
}
- if (frame_size > mtu + 18)
- frame_size = mtu + 18;
+ tp_reserve = 0; /* older kernel, reserve not supported */
}
- }
-
- /* NOTE: calculus matching those in tpacket_rcv()
- * in linux-2.6/net/packet/af_packet.c
- */
- len = sizeof(sk_type);
- if (getsockopt(handle->fd, SOL_SOCKET, SO_TYPE, &sk_type, &len) < 0) {
- snprintf(handle->errbuf, PCAP_ERRBUF_SIZE, "getsockopt: %s", pcap_strerror(errno));
- *status = PCAP_ERROR;
- return -1;
- }
-#ifdef PACKET_RESERVE
- len = sizeof(tp_reserve);
- if (getsockopt(handle->fd, SOL_PACKET, PACKET_RESERVE, &tp_reserve, &len) < 0) {
- if (errno != ENOPROTOOPT) {
- /*
- * ENOPROTOOPT means "kernel doesn't support
- * PACKET_RESERVE", in which case we fall back
- * as best we can.
- */
- snprintf(handle->errbuf, PCAP_ERRBUF_SIZE, "getsockopt: %s", pcap_strerror(errno));
- *status = PCAP_ERROR;
- return -1;
- }
+#else
tp_reserve = 0; /* older kernel, reserve not supported */
- }
-#else
- tp_reserve = 0; /* older kernel, reserve not supported */
#endif
- maclen = (sk_type == SOCK_DGRAM) ? 0 : MAX_LINKHEADER_SIZE;
- /* XXX: in the kernel maclen is calculated from
- * LL_ALLOCATED_SPACE(dev) and vnet_hdr.hdr_len
- * in: packet_snd() in linux-2.6/net/packet/af_packet.c
- * then packet_alloc_skb() in linux-2.6/net/packet/af_packet.c
- * then sock_alloc_send_pskb() in linux-2.6/net/core/sock.c
- * but I see no way to get those sizes in userspace,
- * like for instance with an ifreq ioctl();
- * the best thing I've found so far is MAX_HEADER in the kernel
- * part of linux-2.6/include/linux/netdevice.h
- * which goes up to 128+48=176; since pcap-linux.c defines
- * a MAX_LINKHEADER_SIZE of 256 which is greater than that,
- * let's use it.. maybe is it even large enough to directly
- * replace macoff..
- */
- tp_hdrlen = TPACKET_ALIGN(handle->md.tp_hdrlen) + sizeof(struct sockaddr_ll) ;
- netoff = TPACKET_ALIGN(tp_hdrlen + (maclen < 16 ? 16 : maclen)) + tp_reserve;
- /* NOTE: AFAICS tp_reserve may break the TPACKET_ALIGN of
- * netoff, which contradicts
- * linux-2.6/Documentation/networking/packet_mmap.txt
- * documenting that:
- * "- Gap, chosen so that packet data (Start+tp_net)
- * aligns to TPACKET_ALIGNMENT=16"
- */
- /* NOTE: in linux-2.6/include/linux/skbuff.h:
- * "CPUs often take a performance hit
- * when accessing unaligned memory locations"
- */
- macoff = netoff - maclen;
- req.tp_frame_size = TPACKET_ALIGN(macoff + frame_size);
- req.tp_frame_nr = handle->opt.buffer_size/req.tp_frame_size;
+ maclen = (sk_type == SOCK_DGRAM) ? 0 : MAX_LINKHEADER_SIZE;
+ /* XXX: in the kernel maclen is calculated from
+ * LL_ALLOCATED_SPACE(dev) and vnet_hdr.hdr_len
+ * in: packet_snd() in linux-2.6/net/packet/af_packet.c
+ * then packet_alloc_skb() in linux-2.6/net/packet/af_packet.c
+ * then sock_alloc_send_pskb() in linux-2.6/net/core/sock.c
+ * but I see no way to get those sizes in userspace,
+ * like for instance with an ifreq ioctl();
+ * the best thing I've found so far is MAX_HEADER in
+ * the kernel part of linux-2.6/include/linux/netdevice.h
+ * which goes up to 128+48=176; since pcap-linux.c
+ * defines a MAX_LINKHEADER_SIZE of 256 which is
+ * greater than that, let's use it.. maybe is it even
+ * large enough to directly replace macoff..
+ */
+ tp_hdrlen = TPACKET_ALIGN(handlep->tp_hdrlen) + sizeof(struct sockaddr_ll) ;
+ netoff = TPACKET_ALIGN(tp_hdrlen + (maclen < 16 ? 16 : maclen)) + tp_reserve;
+ /* NOTE: AFAICS tp_reserve may break the TPACKET_ALIGN
+ * of netoff, which contradicts
+ * linux-2.6/Documentation/networking/packet_mmap.txt
+ * documenting that:
+ * "- Gap, chosen so that packet data (Start+tp_net)
+ * aligns to TPACKET_ALIGNMENT=16"
+ */
+ /* NOTE: in linux-2.6/include/linux/skbuff.h:
+ * "CPUs often take a performance hit
+ * when accessing unaligned memory locations"
+ */
+ macoff = netoff - maclen;
+ req.tp_frame_size = TPACKET_ALIGN(macoff + frame_size);
+ req.tp_frame_nr = handle->opt.buffer_size/req.tp_frame_size;
+ break;
+#ifdef HAVE_TPACKET3
+ case TPACKET_V3:
+ /* The "frames" for this are actually buffers that
+ * contain multiple variable-sized frames.
+ *
+ * We pick a "frame" size of 128K to leave enough
+ * room for at least one reasonably-sized packet
+ * in the "frame". */
+ req.tp_frame_size = 131072;
+ req.tp_frame_nr = handle->opt.buffer_size/req.tp_frame_size;
+ break;
+#endif
+ }
+
/* compute the minumum block size that will handle this frame.
* The block has to be page size aligned.
* The max block size allowed by the kernel is arch-dependent and
@@ -3578,6 +3845,15 @@
/* req.tp_frame_nr is requested to match frames_per_block*req.tp_block_nr */
req.tp_frame_nr = req.tp_block_nr * frames_per_block;
+#ifdef HAVE_TPACKET3
+ /* timeout value to retire block - use the configured buffering timeout, or default if <0. */
+ req.tp_retire_blk_tov = (handlep->timeout>=0)?handlep->timeout:0;
+ /* private data not used */
+ req.tp_sizeof_priv = 0;
+ /* Rx ring - feature request bits - none (rxhash will not be filled) */
+ req.tp_feature_req_word = 0;
+#endif
+
if (setsockopt(handle->fd, SOL_PACKET, PACKET_RX_RING,
(void *) &req, sizeof(req))) {
if ((errno == ENOMEM) && (req.tp_block_nr > 1)) {
@@ -3610,10 +3886,10 @@
}
/* memory map the rx ring */
- handle->md.mmapbuflen = req.tp_block_nr * req.tp_block_size;
- handle->md.mmapbuf = mmap(0, handle->md.mmapbuflen,
+ handlep->mmapbuflen = req.tp_block_nr * req.tp_block_size;
+ handlep->mmapbuf = mmap(0, handlep->mmapbuflen,
PROT_READ|PROT_WRITE, MAP_SHARED, handle->fd, 0);
- if (handle->md.mmapbuf == MAP_FAILED) {
+ if (handlep->mmapbuf == MAP_FAILED) {
snprintf(handle->errbuf, PCAP_ERRBUF_SIZE,
"can't mmap rx ring: %s", pcap_strerror(errno));
@@ -3639,7 +3915,7 @@
/* fill the header ring with proper frame ptr*/
handle->offset = 0;
for (i=0; i<req.tp_block_nr; ++i) {
- void *base = &handle->md.mmapbuf[i*req.tp_block_size];
+ void *base = &handlep->mmapbuf[i*req.tp_block_size];
for (j=0; j<frames_per_block; ++j, ++handle->offset) {
RING_GET_FRAME(handle) = base;
base += req.tp_frame_size;
@@ -3655,6 +3931,8 @@
static void
destroy_ring(pcap_t *handle)
{
+ struct pcap_linux *handlep = handle->priv;
+
/* tell the kernel to destroy the ring*/
struct tpacket_req req;
memset(&req, 0, sizeof(req));
@@ -3662,10 +3940,10 @@
(void *) &req, sizeof(req));
/* if ring is mapped, unmap it*/
- if (handle->md.mmapbuf) {
+ if (handlep->mmapbuf) {
/* do not test for mmap failure, as we can't recover from any error */
- munmap(handle->md.mmapbuf, handle->md.mmapbuflen);
- handle->md.mmapbuf = NULL;
+ munmap(handlep->mmapbuf, handlep->mmapbuflen);
+ handlep->mmapbuf = NULL;
}
}
@@ -3691,19 +3969,23 @@
const u_char *bytes)
{
struct oneshot_userdata *sp = (struct oneshot_userdata *)user;
+ pcap_t *handle = sp->pd;
+ struct pcap_linux *handlep = handle->priv;
*sp->hdr = *h;
- memcpy(sp->pd->md.oneshot_buffer, bytes, h->caplen);
- *sp->pkt = sp->pd->md.oneshot_buffer;
+ memcpy(handlep->oneshot_buffer, bytes, h->caplen);
+ *sp->pkt = handlep->oneshot_buffer;
}
static void
pcap_cleanup_linux_mmap( pcap_t *handle )
{
+ struct pcap_linux *handlep = handle->priv;
+
destroy_ring(handle);
- if (handle->md.oneshot_buffer != NULL) {
- free(handle->md.oneshot_buffer);
- handle->md.oneshot_buffer = NULL;
+ if (handlep->oneshot_buffer != NULL) {
+ free(handlep->oneshot_buffer);
+ handlep->oneshot_buffer = NULL;
}
pcap_cleanup_linux(handle);
}
@@ -3712,34 +3994,32 @@
static int
pcap_getnonblock_mmap(pcap_t *p, char *errbuf)
{
+ struct pcap_linux *handlep = p->priv;
+
/* use negative value of timeout to indicate non blocking ops */
- return (p->md.timeout<0);
+ return (handlep->timeout<0);
}
static int
pcap_setnonblock_mmap(pcap_t *p, int nonblock, char *errbuf)
{
- /* map each value to the corresponding 2's complement, to
- * preserve the timeout value provided with pcap_set_timeout */
+ struct pcap_linux *handlep = p->priv;
+
+ /*
+ * Map each value to their corresponding negation to
+ * preserve the timeout value provided with pcap_set_timeout.
+ */
if (nonblock) {
- if (p->md.timeout >= 0) {
+ if (handlep->timeout >= 0) {
/*
- * Timeout is non-negative, so we're not already
- * in non-blocking mode; set it to the 2's
- * complement, to make it negative, as an
- * indication that we're in non-blocking mode.
+ * Indicate that we're switching to
+ * non-blocking mode.
*/
- p->md.timeout = p->md.timeout*-1 - 1;
+ handlep->timeout = ~handlep->timeout;
}
} else {
- if (p->md.timeout < 0) {
- /*
- * Timeout is negative, so we're not already
- * in blocking mode; reverse the previous
- * operation, to make the timeout non-negative
- * again.
- */
- p->md.timeout = (p->md.timeout+1)*-1;
+ if (handlep->timeout < 0) {
+ handlep->timeout = ~handlep->timeout;
}
}
return 0;
@@ -3748,10 +4028,11 @@
static inline union thdr *
pcap_get_ring_frame(pcap_t *handle, int status)
{
+ struct pcap_linux *handlep = handle->priv;
union thdr h;
h.raw = RING_GET_FRAME(handle);
- switch (handle->md.tp_version) {
+ switch (handlep->tp_version) {
case TPACKET_V1:
if (status != (h.h1->tp_status ? TP_STATUS_USER :
TP_STATUS_KERNEL))
@@ -3764,6 +4045,13 @@
return NULL;
break;
#endif
+#ifdef HAVE_TPACKET3
+ case TPACKET_V3:
+ if (status != (h.h3->hdr.bh1.block_status ? TP_STATUS_USER :
+ TP_STATUS_KERNEL))
+ return NULL;
+ break;
+#endif
}
return h.raw;
}
@@ -3772,37 +4060,56 @@
#define POLLRDHUP 0
#endif
-static int
-pcap_read_linux_mmap(pcap_t *handle, int max_packets, pcap_handler callback,
- u_char *user)
+/* wait for frames availability.*/
+static int pcap_wait_for_frames_mmap(pcap_t *handle)
{
- int timeout;
- int pkts = 0;
- char c;
-
- /* wait for frames availability.*/
if (!pcap_get_ring_frame(handle, TP_STATUS_USER)) {
+ struct pcap_linux *handlep = handle->priv;
+ int timeout;
+ char c;
struct pollfd pollinfo;
int ret;
pollinfo.fd = handle->fd;
pollinfo.events = POLLIN;
- if (handle->md.timeout == 0)
- timeout = -1; /* block forever */
- else if (handle->md.timeout > 0)
- timeout = handle->md.timeout; /* block for that amount of time */
+ if (handlep->timeout == 0) {
+#ifdef HAVE_TPACKET3
+ /*
+ * XXX - due to a set of (mis)features in the
+ * TPACKET_V3 kernel code, blocking forever with
+ * a TPACKET_V3 socket can, if few packets
+ * are arriving and passing the socket filter,
+ * cause most packets to be dropped. See
+ * libpcap issue #335 for the full painful
+ * story. The workaround is to have poll()
+ * time out very quickly, so we grab the
+ * frames handed to us, and return them to
+ * the kernel, ASAP.
+ *
+ * If those issues are ever fixed, we might
+ * want to check the kernel version and block
+ * forever with TPACKET_V3 if we're running
+ * with a kernel that has the fix.
+ */
+ if (handlep->tp_version == TPACKET_V3)
+ timeout = 1; /* don't block for very long */
+ else
+#endif
+ timeout = -1; /* block forever */
+ } else if (handlep->timeout > 0)
+ timeout = handlep->timeout; /* block for that amount of time */
else
timeout = 0; /* non-blocking mode - poll to pick up errors */
do {
ret = poll(&pollinfo, 1, timeout);
if (ret < 0 && errno != EINTR) {
- snprintf(handle->errbuf, PCAP_ERRBUF_SIZE,
+ snprintf(handle->errbuf, PCAP_ERRBUF_SIZE,
"can't poll on packet socket: %s",
pcap_strerror(errno));
return PCAP_ERROR;
} else if (ret > 0 &&
- (pollinfo.revents & (POLLHUP|POLLRDHUP|POLLERR|POLLNVAL))) {
+ (pollinfo.revents & (POLLHUP|POLLRDHUP|POLLERR|POLLNVAL))) {
/*
* There's some indication other than
* "you can read on this descriptor" on
@@ -3822,7 +4129,7 @@
* XXX - make the socket non-blocking?
*/
if (recv(handle->fd, &c, sizeof c,
- MSG_PEEK) != -1)
+ MSG_PEEK) != -1)
continue; /* what, no error? */
if (errno == ENETDOWN) {
/*
@@ -3840,7 +4147,7 @@
"The interface went down");
} else {
snprintf(handle->errbuf,
- PCAP_ERRBUF_SIZE,
+ PCAP_ERRBUF_SIZE,
"Error condition on packet socket: %s",
strerror(errno));
}
@@ -3848,11 +4155,11 @@
}
if (pollinfo.revents & POLLNVAL) {
snprintf(handle->errbuf,
- PCAP_ERRBUF_SIZE,
+ PCAP_ERRBUF_SIZE,
"Invalid polling request on packet socket");
return PCAP_ERROR;
}
- }
+ }
/* check for break loop condition on interrupted syscall*/
if (handle->break_loop) {
handle->break_loop = 0;
@@ -3860,200 +4167,388 @@
}
} while (ret < 0);
}
+ return 0;
+}
- /* non-positive values of max_packets are used to require all
+/* handle a single memory mapped packet */
+static int pcap_handle_packet_mmap(
+ pcap_t *handle,
+ pcap_handler callback,
+ u_char *user,
+ unsigned char *frame,
+ unsigned int tp_len,
+ unsigned int tp_mac,
+ unsigned int tp_snaplen,
+ unsigned int tp_sec,
+ unsigned int tp_usec,
+ int tp_vlan_tci_valid,
+ __u16 tp_vlan_tci)
+{
+ struct pcap_linux *handlep = handle->priv;
+ unsigned char *bp;
+ struct sockaddr_ll *sll;
+ struct pcap_pkthdr pcaphdr;
+
+ /* perform sanity check on internal offset. */
+ if (tp_mac + tp_snaplen > handle->bufsize) {
+ snprintf(handle->errbuf, PCAP_ERRBUF_SIZE,
+ "corrupted frame on kernel ring mac "
+ "offset %d + caplen %d > frame len %d",
+ tp_mac, tp_snaplen, handle->bufsize);
+ return -1;
+ }
+
+ /* run filter on received packet
+ * If the kernel filtering is enabled we need to run the
+ * filter until all the frames present into the ring
+ * at filter creation time are processed.
+ * In this case, blocks_to_filter_in_userland is used
+ * as a counter for the packet we need to filter.
+ * Note: alternatively it could be possible to stop applying
+ * the filter when the ring became empty, but it can possibly
+ * happen a lot later... */
+ bp = frame + tp_mac;
+ if (handlep->filter_in_userland && handle->fcode.bf_insns &&
+ (bpf_filter(handle->fcode.bf_insns, bp,
+ tp_len, tp_snaplen) == 0))
+ return 0;
+
+ sll = (void *)frame + TPACKET_ALIGN(handlep->tp_hdrlen);
+ if (!linux_check_direction(handle, sll))
+ return 0;
+
+ /* get required packet info from ring header */
+ pcaphdr.ts.tv_sec = tp_sec;
+ pcaphdr.ts.tv_usec = tp_usec;
+ pcaphdr.caplen = tp_snaplen;
+ pcaphdr.len = tp_len;
+
+ /* if required build in place the sll header*/
+ if (handlep->cooked) {
+ struct sll_header *hdrp;
+
+ /*
+ * The kernel should have left us with enough
+ * space for an sll header; back up the packet
+ * data pointer into that space, as that'll be
+ * the beginning of the packet we pass to the
+ * callback.
+ */
+ bp -= SLL_HDR_LEN;
+
+ /*/*
+ * Let's make sure that's past the end of
+ * the tpacket header, i.e. >=
+ * ((u_char *)thdr + TPACKET_HDRLEN), so we
+ * don't step on the header when we construct
+ * the sll header.
+ */
+ if (bp < (u_char *)frame +
+ TPACKET_ALIGN(handlep->tp_hdrlen) +
+ sizeof(struct sockaddr_ll)) {
+ snprintf(handle->errbuf, PCAP_ERRBUF_SIZE,
+ "cooked-mode frame doesn't have room for sll header");
+ return -1;
+ }
+
+ /*
+ * OK, that worked; construct the sll header.
+ */
+ hdrp = (struct sll_header *)bp;
+ hdrp->sll_pkttype = map_packet_type_to_sll_type(
+ sll->sll_pkttype);
+ hdrp->sll_hatype = htons(sll->sll_hatype);
+ hdrp->sll_halen = htons(sll->sll_halen);
+ memcpy(hdrp->sll_addr, sll->sll_addr, SLL_ADDRLEN);
+ hdrp->sll_protocol = sll->sll_protocol;
+
+ /* update packet len */
+ pcaphdr.caplen += SLL_HDR_LEN;
+ pcaphdr.len += SLL_HDR_LEN;
+ }
+
+#if defined(HAVE_TPACKET2) || defined(HAVE_TPACKET3)
+ if (tp_vlan_tci_valid &&
+ handlep->vlan_offset != -1 &&
+ tp_snaplen >= (unsigned int) handlep->vlan_offset)
+ {
+ struct vlan_tag *tag;
+
+ bp -= VLAN_TAG_LEN;
+ memmove(bp, bp + VLAN_TAG_LEN, handlep->vlan_offset);
+
+ tag = (struct vlan_tag *)(bp + handlep->vlan_offset);
+ tag->vlan_tpid = htons(ETH_P_8021Q);
+ tag->vlan_tci = htons(tp_vlan_tci);
+
+ pcaphdr.caplen += VLAN_TAG_LEN;
+ pcaphdr.len += VLAN_TAG_LEN;
+ }
+#endif
+
+ /*
+ * The only way to tell the kernel to cut off the
+ * packet at a snapshot length is with a filter program;
+ * if there's no filter program, the kernel won't cut
+ * the packet off.
+ *
+ * Trim the snapshot length to be no longer than the
+ * specified snapshot length.
+ */
+ if (pcaphdr.caplen > handle->snapshot)
+ pcaphdr.caplen = handle->snapshot;
+
+ /* pass the packet to the user */
+ callback(user, &pcaphdr, bp);
+
+ return 1;
+}
+
+static int
+pcap_read_linux_mmap_v1(pcap_t *handle, int max_packets, pcap_handler callback,
+ u_char *user)
+{
+ struct pcap_linux *handlep = handle->priv;
+ int pkts = 0;
+ int ret;
+
+ /* wait for frames availability.*/
+ ret = pcap_wait_for_frames_mmap(handle);
+ if (ret) {
+ return ret;
+ }
+
+ /* non-positive values of max_packets are used to require all
* packets currently available in the ring */
- while ((pkts < max_packets) || (max_packets <= 0)) {
- int run_bpf;
- struct sockaddr_ll *sll;
- struct pcap_pkthdr pcaphdr;
- unsigned char *bp;
+ while ((pkts < max_packets) || PACKET_COUNT_IS_UNLIMITED(max_packets)) {
union thdr h;
- unsigned int tp_len;
- unsigned int tp_mac;
- unsigned int tp_snaplen;
- unsigned int tp_sec;
- unsigned int tp_usec;
h.raw = pcap_get_ring_frame(handle, TP_STATUS_USER);
if (!h.raw)
break;
- switch (handle->md.tp_version) {
- case TPACKET_V1:
- tp_len = h.h1->tp_len;
- tp_mac = h.h1->tp_mac;
- tp_snaplen = h.h1->tp_snaplen;
- tp_sec = h.h1->tp_sec;
- tp_usec = h.h1->tp_usec;
- break;
-#ifdef HAVE_TPACKET2
- case TPACKET_V2:
- tp_len = h.h2->tp_len;
- tp_mac = h.h2->tp_mac;
- tp_snaplen = h.h2->tp_snaplen;
- tp_sec = h.h2->tp_sec;
- tp_usec = h.h2->tp_nsec / 1000;
- break;
-#endif
- default:
- snprintf(handle->errbuf, PCAP_ERRBUF_SIZE,
- "unsupported tpacket version %d",
- handle->md.tp_version);
- return -1;
+ ret = pcap_handle_packet_mmap(
+ handle,
+ callback,
+ user,
+ h.raw,
+ h.h1->tp_len,
+ h.h1->tp_mac,
+ h.h1->tp_snaplen,
+ h.h1->tp_sec,
+ h.h1->tp_usec,
+ 0,
+ 0);
+ if (ret == 1) {
+ pkts++;
+ handlep->packets_read++;
+ } else if (ret < 0) {
+ return ret;
}
- /* perform sanity check on internal offset. */
- if (tp_mac + tp_snaplen > handle->bufsize) {
- snprintf(handle->errbuf, PCAP_ERRBUF_SIZE,
- "corrupted frame on kernel ring mac "
- "offset %d + caplen %d > frame len %d",
- tp_mac, tp_snaplen, handle->bufsize);
- return -1;
- }
- /* run filter on received packet
- * If the kernel filtering is enabled we need to run the
- * filter until all the frames present into the ring
- * at filter creation time are processed.
- * In such case md.use_bpf is used as a counter for the
- * packet we need to filter.
- * Note: alternatively it could be possible to stop applying
- * the filter when the ring became empty, but it can possibly
- * happen a lot later... */
- bp = (unsigned char*)h.raw + tp_mac;
- run_bpf = (!handle->md.use_bpf) ||
- ((handle->md.use_bpf>1) && handle->md.use_bpf--);
- if (run_bpf && handle->fcode.bf_insns &&
- (bpf_filter(handle->fcode.bf_insns, bp,
- tp_len, tp_snaplen) == 0))
- goto skip;
-
/*
- * Do checks based on packet direction.
+ * Hand this block back to the kernel, and, if we're
+ * counting blocks that need to be filtered in userland
+ * after having been filtered by the kernel, count
+ * the one we've just processed.
*/
- sll = (void *)h.raw + TPACKET_ALIGN(handle->md.tp_hdrlen);
- if (sll->sll_pkttype == PACKET_OUTGOING) {
- /*
- * Outgoing packet.
- * If this is from the loopback device, reject it;
- * we'll see the packet as an incoming packet as well,
- * and we don't want to see it twice.
- */
- if (sll->sll_ifindex == handle->md.lo_ifindex)
- goto skip;
+ h.h1->tp_status = TP_STATUS_KERNEL;
+ if (handlep->blocks_to_filter_in_userland > 0) {
+ handlep->blocks_to_filter_in_userland--;
+ if (handlep->blocks_to_filter_in_userland == 0) {
+ /*
+ * No more blocks need to be filtered
+ * in userland.
+ */
+ handlep->filter_in_userland = 0;
+ }
+ }
- /*
- * If the user only wants incoming packets, reject it.
- */
- if (handle->direction == PCAP_D_IN)
- goto skip;
- } else {
- /*
- * Incoming packet.
- * If the user only wants outgoing packets, reject it.
- */
- if (handle->direction == PCAP_D_OUT)
- goto skip;
+ /* next block */
+ if (++handle->offset >= handle->cc)
+ handle->offset = 0;
+
+ /* check for break loop condition*/
+ if (handle->break_loop) {
+ handle->break_loop = 0;
+ return PCAP_ERROR_BREAK;
}
+ }
+ return pkts;
+}
- /* get required packet info from ring header */
- pcaphdr.ts.tv_sec = tp_sec;
- pcaphdr.ts.tv_usec = tp_usec;
- pcaphdr.caplen = tp_snaplen;
- pcaphdr.len = tp_len;
+#ifdef HAVE_TPACKET2
+static int
+pcap_read_linux_mmap_v2(pcap_t *handle, int max_packets, pcap_handler callback,
+ u_char *user)
+{
+ struct pcap_linux *handlep = handle->priv;
+ int pkts = 0;
+ int ret;
- /* if required build in place the sll header*/
- if (handle->md.cooked) {
- struct sll_header *hdrp;
+ /* wait for frames availability.*/
+ ret = pcap_wait_for_frames_mmap(handle);
+ if (ret) {
+ return ret;
+ }
- /*
- * The kernel should have left us with enough
- * space for an sll header; back up the packet
- * data pointer into that space, as that'll be
- * the beginning of the packet we pass to the
- * callback.
- */
- bp -= SLL_HDR_LEN;
+ /* non-positive values of max_packets are used to require all
+ * packets currently available in the ring */
+ while ((pkts < max_packets) || PACKET_COUNT_IS_UNLIMITED(max_packets)) {
+ union thdr h;
- /*
- * Let's make sure that's past the end of
- * the tpacket header, i.e. >=
- * ((u_char *)thdr + TPACKET_HDRLEN), so we
- * don't step on the header when we construct
- * the sll header.
- */
- if (bp < (u_char *)h.raw +
- TPACKET_ALIGN(handle->md.tp_hdrlen) +
- sizeof(struct sockaddr_ll)) {
- snprintf(handle->errbuf, PCAP_ERRBUF_SIZE,
- "cooked-mode frame doesn't have room for sll header");
- return -1;
+ h.raw = pcap_get_ring_frame(handle, TP_STATUS_USER);
+ if (!h.raw)
+ break;
+
+ ret = pcap_handle_packet_mmap(
+ handle,
+ callback,
+ user,
+ h.raw,
+ h.h2->tp_len,
+ h.h2->tp_mac,
+ h.h2->tp_snaplen,
+ h.h2->tp_sec,
+ handle->opt.tstamp_precision == PCAP_TSTAMP_PRECISION_NANO ? h.h2->tp_nsec : h.h2->tp_nsec / 1000,
+#if defined(TP_STATUS_VLAN_VALID)
+ (h.h2->tp_vlan_tci || (h.h2->tp_status & TP_STATUS_VLAN_VALID)),
+#else
+ h.h2->tp_vlan_tci != 0,
+#endif
+ h.h2->tp_vlan_tci);
+ if (ret == 1) {
+ pkts++;
+ handlep->packets_read++;
+ } else if (ret < 0) {
+ return ret;
+ }
+
+ /*
+ * Hand this block back to the kernel, and, if we're
+ * counting blocks that need to be filtered in userland
+ * after having been filtered by the kernel, count
+ * the one we've just processed.
+ */
+ h.h2->tp_status = TP_STATUS_KERNEL;
+ if (handlep->blocks_to_filter_in_userland > 0) {
+ handlep->blocks_to_filter_in_userland--;
+ if (handlep->blocks_to_filter_in_userland == 0) {
+ /*
+ * No more blocks need to be filtered
+ * in userland.
+ */
+ handlep->filter_in_userland = 0;
}
+ }
- /*
- * OK, that worked; construct the sll header.
- */
- hdrp = (struct sll_header *)bp;
- hdrp->sll_pkttype = map_packet_type_to_sll_type(
- sll->sll_pkttype);
- hdrp->sll_hatype = htons(sll->sll_hatype);
- hdrp->sll_halen = htons(sll->sll_halen);
- memcpy(hdrp->sll_addr, sll->sll_addr, SLL_ADDRLEN);
- hdrp->sll_protocol = sll->sll_protocol;
+ /* next block */
+ if (++handle->offset >= handle->cc)
+ handle->offset = 0;
- /* update packet len */
- pcaphdr.caplen += SLL_HDR_LEN;
- pcaphdr.len += SLL_HDR_LEN;
+ /* check for break loop condition*/
+ if (handle->break_loop) {
+ handle->break_loop = 0;
+ return PCAP_ERROR_BREAK;
}
+ }
+ return pkts;
+}
+#endif /* HAVE_TPACKET2 */
-#ifdef HAVE_TPACKET2
- if (handle->md.tp_version == TPACKET_V2 && h.h2->tp_vlan_tci &&
- tp_snaplen >= 2 * ETH_ALEN) {
- struct vlan_tag *tag;
+#ifdef HAVE_TPACKET3
+static int
+pcap_read_linux_mmap_v3(pcap_t *handle, int max_packets, pcap_handler callback,
+ u_char *user)
+{
+ struct pcap_linux *handlep = handle->priv;
+ union thdr h;
+ int pkts = 0;
+ int ret;
- bp -= VLAN_TAG_LEN;
- memmove(bp, bp + VLAN_TAG_LEN, 2 * ETH_ALEN);
+ if (handlep->current_packet == NULL) {
+ /* wait for frames availability.*/
+ ret = pcap_wait_for_frames_mmap(handle);
+ if (ret) {
+ return ret;
+ }
+ }
+ h.raw = pcap_get_ring_frame(handle, TP_STATUS_USER);
+ if (!h.raw)
+ return pkts;
- tag = (struct vlan_tag *)(bp + 2 * ETH_ALEN);
- tag->vlan_tpid = htons(ETH_P_8021Q);
- tag->vlan_tci = htons(h.h2->tp_vlan_tci);
+ /* non-positive values of max_packets are used to require all
+ * packets currently available in the ring */
+ while ((pkts < max_packets) || PACKET_COUNT_IS_UNLIMITED(max_packets)) {
+ if (handlep->current_packet == NULL) {
+ h.raw = pcap_get_ring_frame(handle, TP_STATUS_USER);
+ if (!h.raw)
+ break;
- pcaphdr.caplen += VLAN_TAG_LEN;
- pcaphdr.len += VLAN_TAG_LEN;
+ handlep->current_packet = h.raw + h.h3->hdr.bh1.offset_to_first_pkt;
+ handlep->packets_left = h.h3->hdr.bh1.num_pkts;
}
+ int packets_to_read = handlep->packets_left;
+
+ if (!PACKET_COUNT_IS_UNLIMITED(max_packets) && packets_to_read > max_packets) {
+ packets_to_read = max_packets;
+ }
+
+ while(packets_to_read--) {
+ struct tpacket3_hdr* tp3_hdr = (struct tpacket3_hdr*) handlep->current_packet;
+ ret = pcap_handle_packet_mmap(
+ handle,
+ callback,
+ user,
+ handlep->current_packet,
+ tp3_hdr->tp_len,
+ tp3_hdr->tp_mac,
+ tp3_hdr->tp_snaplen,
+ tp3_hdr->tp_sec,
+ handle->opt.tstamp_precision == PCAP_TSTAMP_PRECISION_NANO ? tp3_hdr->tp_nsec : tp3_hdr->tp_nsec / 1000,
+#if defined(TP_STATUS_VLAN_VALID)
+ (tp3_hdr->hv1.tp_vlan_tci || (tp3_hdr->tp_status & TP_STATUS_VLAN_VALID)),
+#else
+ tp3_hdr->hv1.tp_vlan_tci != 0,
#endif
+ tp3_hdr->hv1.tp_vlan_tci);
+ if (ret == 1) {
+ pkts++;
+ handlep->packets_read++;
+ } else if (ret < 0) {
+ handlep->current_packet = NULL;
+ return ret;
+ }
+ handlep->current_packet += tp3_hdr->tp_next_offset;
+ handlep->packets_left--;
+ }
- /*
- * The only way to tell the kernel to cut off the
- * packet at a snapshot length is with a filter program;
- * if there's no filter program, the kernel won't cut
- * the packet off.
- *
- * Trim the snapshot length to be no longer than the
- * specified snapshot length.
- */
- if (pcaphdr.caplen > handle->snapshot)
- pcaphdr.caplen = handle->snapshot;
+ if (handlep->packets_left <= 0) {
+ /*
+ * Hand this block back to the kernel, and, if
+ * we're counting blocks that need to be
+ * filtered in userland after having been
+ * filtered by the kernel, count the one we've
+ * just processed.
+ */
+ h.h3->hdr.bh1.block_status = TP_STATUS_KERNEL;
+ if (handlep->blocks_to_filter_in_userland > 0) {
+ handlep->blocks_to_filter_in_userland--;
+ if (handlep->blocks_to_filter_in_userland == 0) {
+ /*
+ * No more blocks need to be filtered
+ * in userland.
+ */
+ handlep->filter_in_userland = 0;
+ }
+ }
- /* pass the packet to the user */
- pkts++;
- callback(user, &pcaphdr, bp);
- handle->md.packets_read++;
+ /* next block */
+ if (++handle->offset >= handle->cc)
+ handle->offset = 0;
-skip:
- /* next packet */
- switch (handle->md.tp_version) {
- case TPACKET_V1:
- h.h1->tp_status = TP_STATUS_KERNEL;
- break;
-#ifdef HAVE_TPACKET2
- case TPACKET_V2:
- h.h2->tp_status = TP_STATUS_KERNEL;
- break;
-#endif
+ handlep->current_packet = NULL;
}
- if (++handle->offset >= handle->cc)
- handle->offset = 0;
/* check for break loop condition*/
if (handle->break_loop) {
@@ -4063,10 +4558,12 @@
}
return pkts;
}
+#endif /* HAVE_TPACKET3 */
static int
pcap_setfilter_linux_mmap(pcap_t *handle, struct bpf_program *filter)
{
+ struct pcap_linux *handlep = handle->priv;
int n, offset;
int ret;
@@ -4080,13 +4577,22 @@
if (ret < 0)
return ret;
- /* if the kernel filter is enabled, we need to apply the filter on
- * all packets present into the ring. Get an upper bound of their number
+ /*
+ * If we're filtering in userland, there's nothing to do;
+ * the new filter will be used for the next packet.
*/
- if (!handle->md.use_bpf)
+ if (handlep->filter_in_userland)
return ret;
- /* walk the ring backward and count the free slot */
+ /*
+ * We're filtering in the kernel; the packets present in
+ * all blocks currently in the ring were already filtered
+ * by the old filter, and so will need to be filtered in
+ * userland by the new filter.
+ *
+ * Get an upper bound for the number of such blocks; first,
+ * walk the ring backward and count the free blocks.
+ */
offset = handle->offset;
if (--handle->offset < 0)
handle->offset = handle->cc - 1;
@@ -4097,11 +4603,39 @@
break;
}
+ /*
+ * If we found free blocks, decrement the count of free
+ * blocks by 1, just in case we lost a race with another
+ * thread of control that was adding a packet while
+ * we were counting and that had run the filter before
+ * we changed it.
+ *
+ * XXX - could there be more than one block added in
+ * this fashion?
+ *
+ * XXX - is there a way to avoid that race, e.g. somehow
+ * wait for all packets that passed the old filter to
+ * be added to the ring?
+ */
+ if (n != 0)
+ n--;
+
/* be careful to not change current ring position */
handle->offset = offset;
- /* store the number of packets currently present in the ring */
- handle->md.use_bpf = 1 + (handle->cc - n);
+ /*
+ * Set the count of blocks worth of packets to filter
+ * in userland to the total number of blocks in the
+ * ring minus the number of free blocks we found, and
+ * turn on userland filtering. (The count of blocks
+ * worth of packets to filter in userland is guaranteed
+ * not to be zero - n, above, couldn't be set to a
+ * value > handle->cc, and if it were equal to
+ * handle->cc, it wouldn't be zero, and thus would
+ * be decremented to handle->cc - 1.)
+ */
+ handlep->blocks_to_filter_in_userland = handle->cc - n;
+ handlep->filter_in_userland = 1;
return ret;
}
@@ -4303,6 +4837,7 @@
* value of -ENFILE. (Return values are negative errnos.) We
* could probably use that to find an unused device.
*/
+ struct pcap_linux *handlep = handle->priv;
int err;
struct iwreq ireq;
struct iw_priv_args *priv;
@@ -4583,7 +5118,7 @@
/*
* Save the old mode.
*/
- handle->md.oldmode = ireq.u.mode;
+ handlep->oldmode = ireq.u.mode;
/*
* Put the adapter in rfmon mode. How we do this depends
@@ -4610,7 +5145,7 @@
* Note that we have to put the old mode back
* when we close the device.
*/
- handle->md.must_do_on_close |= MUST_CLEAR_RFMON;
+ handlep->must_do_on_close |= MUST_CLEAR_RFMON;
/*
* Add this to the list of pcaps to close
@@ -4857,7 +5392,7 @@
* Note that we have to put the old mode back when we
* close the device.
*/
- handle->md.must_do_on_close |= MUST_CLEAR_RFMON;
+ handlep->must_do_on_close |= MUST_CLEAR_RFMON;
/*
* Add this to the list of pcaps to close when we exit.
@@ -4920,9 +5455,10 @@
memset(&ifr, 0, sizeof(ifr));
strncpy(ifr.ifr_name, handle->opt.source, sizeof(ifr.ifr_name));
eval.cmd = cmd;
+ eval.data = 0;
ifr.ifr_data = (caddr_t)&eval;
if (ioctl(handle->fd, SIOCETHTOOL, &ifr) == -1) {
- if (errno == EOPNOTSUPP) {
+ if (errno == EOPNOTSUPP || errno == EINVAL) {
/*
* OK, let's just return 0, which, in our
* case, either means "no, what we're asking
@@ -5019,6 +5555,7 @@
static int
activate_old(pcap_t *handle)
{
+ struct pcap_linux *handlep = handle->priv;
int arptype;
struct ifreq ifr;
const char *device = handle->opt.source;
@@ -5046,10 +5583,10 @@
}
/* It worked - we are using the old interface */
- handle->md.sock_packet = 1;
+ handlep->sock_packet = 1;
/* ...which means we get the link-layer header. */
- handle->md.cooked = 0;
+ handlep->cooked = 0;
/* Bind to the given device */
@@ -5118,7 +5655,7 @@
pcap_strerror(errno));
return PCAP_ERROR;
}
- handle->md.must_do_on_close |= MUST_CLEAR_PROMISC;
+ handlep->must_do_on_close |= MUST_CLEAR_PROMISC;
/*
* Add this to the list of pcaps
@@ -5200,6 +5737,12 @@
*/
handle->offset = 0;
+ /*
+ * SOCK_PACKET sockets don't supply information from
+ * stripped VLAN tags.
+ */
+ handlep->vlan_offset = -1; /* unknown */
+
return 1;
}
@@ -5295,6 +5838,7 @@
static int
fix_program(pcap_t *handle, struct sock_fprog *fcode, int is_mmapped)
{
+ struct pcap_linux *handlep = handle->priv;
size_t prog_size;
register int i;
register struct bpf_insn *p;
@@ -5370,7 +5914,7 @@
/*
* Yes; are we in cooked mode?
*/
- if (handle->md.cooked) {
+ if (handlep->cooked) {
/*
* Yes, so we need to fix this
* instruction.
@@ -5406,13 +5950,19 @@
* header.
*/
p->k -= SLL_HDR_LEN;
+ } else if (p->k == 0) {
+ /*
+ * It's the packet type field; map it to the special magic
+ * kernel offset for that field.
+ */
+ p->k = SKF_AD_OFF + SKF_AD_PKTTYPE;
} else if (p->k == 14) {
/*
* It's the protocol field; map it to the special magic
* kernel offset for that field.
*/
p->k = SKF_AD_OFF + SKF_AD_PROTOCOL;
- } else {
+ } else if ((bpf_int32)(p->k) > 0) {
/*
* It's within the header, but it's not one of those
* fields; we can't do that in the kernel, so punt
Index: libpcap/pcap_is_swapped.3pcap
===================================================================
--- libpcap/pcap_is_swapped.3pcap (revision 32783)
+++ libpcap/pcap_is_swapped.3pcap (working copy)
@@ -34,9 +34,20 @@
.fi
.SH DESCRIPTION
.B pcap_is_swapped()
-returns true if
+returns true (1) if
.I p
refers to a ``savefile'' that uses a different byte order
-than the current system. For a live capture, it always returns false.
+than the current system. For a live capture, it always returns false
+(0).
+.PP
+It must not be called on a pcap descriptor created by
+.B pcap_create()
+that has not yet been activated by
+.BR pcap_activate() .
+.SH RETURN VALUE
+.B pcap_datalink()
+returns true (1) or false (0) on success and
+.B PCAP_ERROR_NOT_ACTIVATED
+if called on a capture handle that has been created but not activated.
.SH SEE ALSO
pcap(3PCAP)
Index: libpcap/pcap-canusb-linux.c
===================================================================
--- libpcap/pcap-canusb-linux.c (revision 0)
+++ libpcap/pcap-canusb-linux.c (working copy)
@@ -0,0 +1,472 @@
+/*
+ * Copyright (c) 2009 Felix Obenhuber
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * 3. The name of the author may not be used to endorse or promote
+ * products derived from this software without specific prior written
+ * permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * Sockettrace sniffing API implementation for Linux platform
+ * By Felix Obenhuber <felix@obenhuber.de>
+ *
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <libusb-1.0/libusb.h>
+
+#include <stdlib.h>
+#include <unistd.h>
+#include <fcntl.h>
+#include <string.h>
+#include <pthread.h>
+
+#include "pcap-int.h"
+#include "pcap-canusb-linux.h"
+
+#define CANUSB_IFACE "canusb"
+
+#define CANUSB_VID 0x0403
+#define CANUSB_PID 0x8990
+
+#define USE_THREAD 1
+
+#if USE_THREAD == 0
+#include <signal.h>
+#endif
+
+
+/* forward declaration */
+static int canusb_activate(pcap_t *);
+static int canusb_read_linux(pcap_t *, int , pcap_handler , u_char *);
+static int canusb_inject_linux(pcap_t *, const void *, size_t);
+static int canusb_setfilter_linux(pcap_t *, struct bpf_program *);
+static int canusb_setdirection_linux(pcap_t *, pcap_direction_t);
+static int canusb_stats_linux(pcap_t *, struct pcap_stat *);
+
+struct CAN_Msg
+{
+ uint32_t timestamp;
+ uint32_t id;
+ uint32_t length;
+ uint8_t data[8];
+};
+
+/*
+ * Private data for capturing on Linux CANbus USB devices.
+ */
+struct pcap_canusb {
+ libusb_context *ctx;
+ libusb_device_handle *dev;
+ pthread_t worker;
+ int rdpipe, wrpipe;
+ volatile int loop;
+};
+
+int canusb_findalldevs(pcap_if_t **alldevsp, char *err_str)
+{
+ libusb_context *fdctx;
+ libusb_device** devs;
+ unsigned char sernum[65];
+ int cnt, i;
+
+ if (libusb_init(&fdctx) != 0) {
+ /*
+ * XXX - if this doesn't just mean "no USB file system mounted",
+ * perhaps we should report a real error rather than just
+ * saying "no CANUSB devices".
+ */
+ return 0;
+ }
+
+ cnt = libusb_get_device_list(fdctx,&devs);
+
+ for(i=0;i<cnt;i++)
+ {
+ int ret;
+ // Check if this device is interesting.
+ struct libusb_device_descriptor desc;
+ libusb_get_device_descriptor(devs[i],&desc);
+
+ if ((desc.idVendor != CANUSB_VID) || (desc.idProduct != CANUSB_PID))
+ continue; //It is not, check next device
+
+ //It is!
+ libusb_device_handle *dh = NULL;
+
+ if ((ret = libusb_open(devs[i],&dh)) == 0)
+ {
+ char dev_name[30];
+ char dev_descr[50];
+ int n = libusb_get_string_descriptor_ascii(dh,desc.iSerialNumber,sernum,64);
+ sernum[n] = 0;
+
+ snprintf(dev_name, 30, CANUSB_IFACE"%s", sernum);
+ snprintf(dev_descr, 50, "CanUSB [%s]", sernum);
+
+ libusb_close(dh);
+
+ if (pcap_add_if(alldevsp, dev_name, 0, dev_descr, err_str) < 0)
+ {
+ libusb_free_device_list(devs,1);
+ libusb_exit(fdctx);
+ return -1;
+ }
+ }
+ }
+
+ libusb_free_device_list(devs,1);
+ libusb_exit(fdctx);
+ return 0;
+}
+
+static libusb_device_handle* canusb_opendevice(struct libusb_context *ctx, char* devserial)
+{
+ libusb_device** devs;
+ unsigned char serial[65];
+ int cnt,i,n;
+
+ cnt = libusb_get_device_list(ctx,&devs);
+
+ for(i=0;i<cnt;i++)
+ {
+ // Check if this device is interesting.
+ struct libusb_device_descriptor desc;
+ libusb_get_device_descriptor(devs[i],&desc);
+
+ if ((desc.idVendor != CANUSB_VID) || (desc.idProduct != CANUSB_PID))
+ continue;
+
+ //Found one!
+ libusb_device_handle *dh = NULL;
+
+ if (libusb_open(devs[i],&dh) != 0) continue;
+
+ n = libusb_get_string_descriptor_ascii(dh,desc.iSerialNumber,serial,64);
+ serial[n] = 0;
+
+ if ((devserial) && (strcmp((char *)serial,devserial) != 0))
+ {
+ libusb_close(dh);
+ continue;
+ }
+
+ if ((libusb_kernel_driver_active(dh,0)) && (libusb_detach_kernel_driver(dh,0) != 0))
+ {
+ libusb_close(dh);
+ continue;
+ }
+
+ if (libusb_set_configuration(dh,1) != 0)
+ {
+ libusb_close(dh);
+ continue;
+ }
+
+ if (libusb_claim_interface(dh,0) != 0)
+ {
+ libusb_close(dh);
+ continue;
+ }
+
+ //Fount it!
+ libusb_free_device_list(devs,1);
+ return dh;
+ }
+
+ libusb_free_device_list(devs,1);
+ return NULL;
+}
+
+
+pcap_t *
+canusb_create(const char *device, char *ebuf, int *is_ours)
+{
+ const char *cp;
+ char *cpend;
+ long devnum;
+ pcap_t* p;
+ struct pcap_canusb *canusb;
+
+ /* Does this look like a DAG device? */
+ cp = strrchr(device, '/');
+ if (cp == NULL)
+ cp = device;
+ /* Does it begin with "canusb"? */
+ if (strncmp(cp, "canusb", 6) != 0) {
+ /* Nope, doesn't begin with "canusb" */
+ *is_ours = 0;
+ return NULL;
+ }
+ /* Yes - is "canusb" followed by a number? */
+ cp += 6;
+ devnum = strtol(cp, &cpend, 10);
+ if (cpend == cp || *cpend != '\0') {
+ /* Not followed by a number. */
+ *is_ours = 0;
+ return NULL;
+ }
+ if (devnum < 0) {
+ /* Followed by a non-valid number. */
+ *is_ours = 0;
+ return NULL;
+ }
+
+ /* OK, it's probably ours. */
+ *is_ours = 1;
+
+ p = pcap_create_common(device, ebuf, sizeof (struct pcap_canusb));
+ if (p == NULL)
+ return (NULL);
+
+ canusb = p->priv;
+ canusb->ctx = NULL;
+ canusb->dev = NULL;
+ canusb->rdpipe = -1;
+ canusb->wrpipe = -1;
+
+ p->activate_op = canusb_activate;
+
+ return (p);
+}
+
+
+static void* canusb_capture_thread(void *arg)
+{
+ struct pcap_canusb *canusb = arg;
+ int i;
+ struct
+ {
+ uint8_t rxsz, txsz;
+ } status;
+
+ fcntl(canusb->wrpipe, F_SETFL, O_NONBLOCK);
+
+ while(canusb->loop)
+ {
+ int sz;
+ struct CAN_Msg msg;
+
+ libusb_interrupt_transfer(canusb->dev, 0x81, (unsigned char*)&status, sizeof(status), &sz, 100);
+ //HACK!!!!! -> drop buffered data, read new one by reading twice.
+ libusb_interrupt_transfer(canusb->dev, 0x81, (unsigned char*)&status, sizeof(status), &sz, 100);
+
+ for(i = 0; i<status.rxsz; i++)
+ {
+ libusb_bulk_transfer(canusb->dev, 0x85, (unsigned char*)&msg, sizeof(msg), &sz, 100);
+ write(canusb->wrpipe, &msg, sizeof(msg));
+ }
+
+ }
+
+ return NULL;
+}
+
+static int canusb_startcapture(struct pcap_canusb* this)
+{
+ int pipefd[2];
+
+ if (pipe(pipefd) == -1)
+ return -1;
+
+ this->rdpipe = pipefd[0];
+ this->wrpipe = pipefd[1];
+
+ this->loop = 1;
+ pthread_create(&this->worker, NULL, canusb_capture_thread, this);
+
+ return this->rdpipe;
+}
+
+static void canusb_clearbufs(struct pcap_canusb* this)
+{
+ unsigned char cmd[16];
+ int al;
+
+ cmd[0] = 1; //Empty incoming buffer
+ cmd[1] = 1; //Empty outgoing buffer
+ cmd[3] = 0; //Not a write to serial number
+ memset(&cmd[4],0,16-4);
+
+ libusb_interrupt_transfer(this->dev, 0x1,cmd,16,&al,100);
+}
+
+
+static void canusb_close(pcap_t* handle)
+{
+ struct pcap_canusb *canusb = handle->priv;
+
+ canusb->loop = 0;
+ pthread_join(canusb->worker, NULL);
+
+ if (canusb->dev)
+ {
+ libusb_close(canusb->dev);
+ canusb->dev = NULL;
+ }
+ if (canusb->ctx)
+ {
+ libusb_exit(canusb->ctx);
+ canusb->ctx = NULL;
+ }
+}
+
+
+
+static int canusb_activate(pcap_t* handle)
+{
+ struct pcap_canusb *canusb = handle->priv;
+ char *serial;
+
+ if (libusb_init(&canusb->ctx) != 0) {
+ /*
+ * XXX - what causes this to fail?
+ */
+ snprintf(handle->errbuf, PCAP_ERRBUF_SIZE, "libusb_init() failed");
+ return PCAP_ERROR;
+ }
+
+ handle->read_op = canusb_read_linux;
+
+ handle->inject_op = canusb_inject_linux;
+ handle->setfilter_op = canusb_setfilter_linux;
+ handle->setdirection_op = canusb_setdirection_linux;
+ handle->getnonblock_op = pcap_getnonblock_fd;
+ handle->setnonblock_op = pcap_setnonblock_fd;
+ handle->stats_op = canusb_stats_linux;
+ handle->cleanup_op = canusb_close;
+
+ /* Initialize some components of the pcap structure. */
+ handle->bufsize = 32;
+ handle->offset = 8;
+ handle->linktype = DLT_CAN_SOCKETCAN;
+ handle->set_datalink_op = NULL;
+
+ serial = handle->opt.source + strlen(CANUSB_IFACE);
+
+ canusb->dev = canusb_opendevice(canusb->ctx, serial);
+ if (!canusb->dev)
+ {
+ libusb_exit(canusb->ctx);
+ snprintf(handle->errbuf, PCAP_ERRBUF_SIZE, "Can't open USB Device");
+ return PCAP_ERROR;
+ }
+
+ canusb_clearbufs(canusb);
+
+ handle->fd = canusb_startcapture(canusb);
+ handle->selectable_fd = handle->fd;
+
+ return 0;
+}
+
+
+
+
+static int
+canusb_read_linux(pcap_t *handle, int max_packets, pcap_handler callback, u_char *user)
+{
+ static struct timeval firstpacket = { -1, -1};
+ int i = 0;
+ struct CAN_Msg msg;
+ struct pcap_pkthdr pkth;
+
+ while(i < max_packets)
+ {
+ int n;
+ usleep(10 * 1000);
+ n = read(handle->fd, &msg, sizeof(msg));
+ if (n <= 0)
+ break;
+ pkth.caplen = pkth.len = n;
+ pkth.caplen -= 4;
+ pkth.caplen -= 8 - msg.length;
+
+ if ((firstpacket.tv_sec == -1) && (firstpacket.tv_usec == -1))
+ gettimeofday(&firstpacket, NULL);
+
+ pkth.ts.tv_usec = firstpacket.tv_usec + (msg.timestamp % 100) * 10000;
+ pkth.ts.tv_sec = firstpacket.tv_usec + (msg.timestamp / 100);
+ if (pkth.ts.tv_usec > 1000000)
+ {
+ pkth.ts.tv_usec -= 1000000;
+ pkth.ts.tv_sec++;
+ }
+
+ callback(user, &pkth, (void*)&msg.id);
+ i++;
+ }
+
+ return i;
+}
+
+
+static int
+canusb_inject_linux(pcap_t *handle, const void *buf, size_t size)
+{
+ /* not yet implemented */
+ snprintf(handle->errbuf, PCAP_ERRBUF_SIZE, "inject not supported on canusb devices");
+ return (-1);
+}
+
+
+static int
+canusb_stats_linux(pcap_t *handle, struct pcap_stat *stats)
+{
+ /* not yet implemented */
+ stats->ps_recv = 0; /* number of packets received */
+ stats->ps_drop = 0; /* number of packets dropped */
+ stats->ps_ifdrop = 0; /* drops by interface -- only supported on some platforms */
+ return 0;
+}
+
+
+static int
+canusb_setfilter_linux(pcap_t *p, struct bpf_program *fp)
+{
+ /* not yet implemented */
+ return 0;
+}
+
+
+static int
+canusb_setdirection_linux(pcap_t *p, pcap_direction_t d)
+{
+ /* no support for PCAP_D_OUT */
+ if (d == PCAP_D_OUT)
+ {
+ snprintf(p->errbuf, sizeof(p->errbuf),
+ "Setting direction to PCAP_D_OUT is not supported on this interface");
+ return -1;
+ }
+
+ p->direction = d;
+
+ return 0;
+}
+
+
+/* eof */
Index: libpcap/pcap-canusb-linux.h
===================================================================
--- libpcap/pcap-canusb-linux.h (revision 0)
+++ libpcap/pcap-canusb-linux.h (working copy)
@@ -0,0 +1,37 @@
+/*
+ * Copyright (c) 2009 Felix Obenhuber
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * 3. The name of the author may not be used to endorse or promote
+ * products derived from this software without specific prior written
+ * permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ */
+
+/*
+ * Prototypes for SocketCAN related functions
+ */
+pcap_t* canusb_create(const char *device, char *ebuf, int *is_ours);
+int canusb_findalldevs(pcap_if_t **pdevlist, char* errbuf);
+
Index: libpcap/pcap-snit.c
===================================================================
--- libpcap/pcap-snit.c (revision 32783)
+++ libpcap/pcap-snit.c (working copy)
@@ -84,9 +84,17 @@
/* Forwards */
static int nit_setflags(int, int, int, char *);
+/*
+ * Private data for capturing on STREAMS NIT devices.
+ */
+struct pcap_snit {
+ struct pcap_stat stat;
+};
+
static int
pcap_stats_snit(pcap_t *p, struct pcap_stat *ps)
{
+ struct pcap_snit *psn = p->priv;
/*
* "ps_recv" counts packets handed to the filter, not packets
@@ -105,13 +113,14 @@
* kernel by libpcap or packets not yet read from libpcap by the
* application.
*/
- *ps = p->md.stat;
+ *ps = psn->stat;
return (0);
}
static int
pcap_read_snit(pcap_t *p, int cnt, pcap_handler callback, u_char *user)
{
+ struct pcap_snit *psn = p->priv;
register int cc, n;
register u_char *bp, *cp, *ep;
register struct nit_bufhdr *hdrp;
@@ -160,7 +169,7 @@
}
}
- ++p->md.stat.ps_recv;
+ ++psn->stat.ps_recv;
cp = bp;
/* get past NIT buffer */
@@ -172,7 +181,7 @@
cp += sizeof(*ntp);
ndp = (struct nit_ifdrops *)cp;
- p->md.stat.ps_drop = ndp->nh_drops;
+ psn->stat.ps_drop = ndp->nh_drops;
cp += sizeof *ndp;
/* get past packet len */
@@ -192,7 +201,7 @@
h.len = nlp->nh_pktlen;
h.caplen = caplen;
(*callback)(user, &h, cp);
- if (++n >= cnt && cnt > 0) {
+ if (++n >= cnt && !PACKET_COUNT_IS_UNLIMITED(cnt)) {
p->cc = ep - bp;
p->bp = bp;
return (n);
@@ -227,33 +236,48 @@
}
static int
-nit_setflags(int fd, int promisc, int to_ms, char *ebuf)
+nit_setflags(pcap_t *p)
{
bpf_u_int32 flags;
struct strioctl si;
+ u_int zero = 0;
struct timeval timeout;
+ if (p->opt.immediate) {
+ /*
+ * Set the chunk size to zero, so that chunks get sent
+ * up immediately.
+ */
+ si.ic_cmd = NIOCSCHUNK;
+ si.ic_len = sizeof(zero);
+ si.ic_dp = (char *)&zero;
+ if (ioctl(p->fd, I_STR, (char *)&si) < 0) {
+ snprintf(p->errbuf, PCAP_ERRBUF_SIZE, "NIOCSCHUNK: %s",
+ pcap_strerror(errno));
+ return (-1);
+ }
+ }
si.ic_timout = INFTIM;
- if (to_ms != 0) {
- timeout.tv_sec = to_ms / 1000;
- timeout.tv_usec = (to_ms * 1000) % 1000000;
+ if (p->opt.timeout != 0) {
+ timeout.tv_sec = p->opt.timeout / 1000;
+ timeout.tv_usec = (p->opt.timeout * 1000) % 1000000;
si.ic_cmd = NIOCSTIME;
si.ic_len = sizeof(timeout);
si.ic_dp = (char *)&timeout;
- if (ioctl(fd, I_STR, (char *)&si) < 0) {
- snprintf(ebuf, PCAP_ERRBUF_SIZE, "NIOCSTIME: %s",
+ if (ioctl(p->fd, I_STR, (char *)&si) < 0) {
+ snprintf(p->errbuf, PCAP_ERRBUF_SIZE, "NIOCSTIME: %s",
pcap_strerror(errno));
return (-1);
}
}
flags = NI_TIMESTAMP | NI_LEN | NI_DROPS;
- if (promisc)
+ if (p->opt.promisc)
flags |= NI_PROMISC;
si.ic_cmd = NIOCSFLAGS;
si.ic_len = sizeof(flags);
si.ic_dp = (char *)&flags;
- if (ioctl(fd, I_STR, (char *)&si) < 0) {
- snprintf(ebuf, PCAP_ERRBUF_SIZE, "NIOCSFLAGS: %s",
+ if (ioctl(p->fd, I_STR, (char *)&si) < 0) {
+ snprintf(p->errbuf, PCAP_ERRBUF_SIZE, "NIOCSFLAGS: %s",
pcap_strerror(errno));
return (-1);
}
@@ -349,7 +373,7 @@
pcap_strerror(errno));
goto bad;
}
- if (nit_setflags(p->fd, p->opt.promisc, p->md.timeout, p->errbuf) < 0)
+ if (nit_setflags(p) < 0)
goto bad;
(void)ioctl(fd, I_FLUSH, (char *)FLUSHR);
@@ -407,11 +431,11 @@
}
pcap_t *
-pcap_create(const char *device, char *ebuf)
+pcap_create_interface(const char *device, char *ebuf)
{
pcap_t *p;
- p = pcap_create_common(device, ebuf);
+ p = pcap_create_common(device, ebuf, sizeof (struct pcap_snit));
if (p == NULL)
return (NULL);
Index: libpcap/pcap_set_timeout.3pcap
===================================================================
--- libpcap/pcap_set_timeout.3pcap (revision 32783)
+++ libpcap/pcap_set_timeout.3pcap (working copy)
@@ -38,6 +38,9 @@
the handle is activated to
.IR to_ms ,
which is in units of milliseconds.
+.LP
+The behavior, if the timeout isn't specified, is undefined. We
+recommend always setting the timeout to a non-zero value.
.SH RETURN VALUE
.B pcap_set_timeout()
returns 0 on success or
Index: libpcap/fad-sita.c
===================================================================
--- libpcap/fad-sita.c (revision 32783)
+++ libpcap/fad-sita.c (working copy)
@@ -37,7 +37,7 @@
extern pcap_if_t *acn_if_list; /* pcap's list of available interfaces */
-int pcap_findalldevs(pcap_if_t **alldevsp, char *errbuf) {
+int pcap_findalldevs_interfaces(pcap_if_t **alldevsp, char *errbuf) {
//printf("pcap_findalldevs()\n"); // fulko
Index: libpcap/optimize.c
===================================================================
--- libpcap/optimize.c (revision 32783)
+++ libpcap/optimize.c (working copy)
@@ -112,51 +112,9 @@
static void opt_init(struct block *);
static void opt_cleanup(void);
-static void make_marks(struct block *);
-static void mark_code(struct block *);
-
static void intern_blocks(struct block *);
-static int eq_slist(struct slist *, struct slist *);
-
-static void find_levels_r(struct block *);
-
-static void find_levels(struct block *);
-static void find_dom(struct block *);
-static void propedom(struct edge *);
-static void find_edom(struct block *);
-static void find_closure(struct block *);
-static int atomuse(struct stmt *);
-static int atomdef(struct stmt *);
-static void compute_local_ud(struct block *);
-static void find_ud(struct block *);
-static void init_val(void);
-static int F(int, int, int);
-static inline void vstore(struct stmt *, int *, int, int);
-static void opt_blk(struct block *, int);
-static int use_conflict(struct block *, struct block *);
-static void opt_j(struct edge *);
-static void or_pullup(struct block *);
-static void and_pullup(struct block *);
-static void opt_blks(struct block *, int);
-static inline void link_inedge(struct edge *, struct block *);
static void find_inedges(struct block *);
-static void opt_root(struct block **);
-static void opt_loop(struct block *, int);
-static void fold_op(struct stmt *, int, int);
-static inline struct slist *this_op(struct slist *);
-static void opt_not(struct block *);
-static void opt_peep(struct block *);
-static void opt_stmt(struct stmt *, int[], int);
-static void deadstmt(struct stmt *, struct stmt *[]);
-static void opt_deadstores(struct block *);
-static struct block *fold_edge(struct block *, struct edge *);
-static inline int eq_blk(struct block *, struct block *);
-static int slength(struct slist *);
-static int count_blocks(struct block *);
-static void number_blks_r(struct block *);
-static int count_stmts(struct block *);
-static int convert_code_r(struct block *);
#ifdef BDEBUG
static void opt_dump(struct block *);
#endif
@@ -232,8 +190,7 @@
#endif
static void
-find_levels_r(b)
- struct block *b;
+find_levels_r(struct block *b)
{
int level;
@@ -261,8 +218,7 @@
* with the 'link' field of the struct block.
*/
static void
-find_levels(root)
- struct block *root;
+find_levels(struct block *root)
{
memset((char *)levels, 0, n_blocks * sizeof(*levels));
unMarkAll();
@@ -274,8 +230,7 @@
* Assumes graph has been leveled.
*/
static void
-find_dom(root)
- struct block *root;
+find_dom(struct block *root)
{
int i;
struct block *b;
@@ -305,8 +260,7 @@
}
static void
-propedom(ep)
- struct edge *ep;
+propedom(struct edge *ep)
{
SET_INSERT(ep->edom, ep->id);
if (ep->succ) {
@@ -320,8 +274,7 @@
* Assumes graph has been leveled and predecessors established.
*/
static void
-find_edom(root)
- struct block *root;
+find_edom(struct block *root)
{
int i;
uset x;
@@ -350,8 +303,7 @@
* Assumes graph has been leveled.
*/
static void
-find_closure(root)
- struct block *root;
+find_closure(struct block *root)
{
int i;
struct block *b;
@@ -381,8 +333,7 @@
* The implementation should probably change to an array access.
*/
static int
-atomuse(s)
- struct stmt *s;
+atomuse(struct stmt *s)
{
register int c = s->code;
@@ -427,8 +378,7 @@
* The implementation should probably change to an array access.
*/
static int
-atomdef(s)
- struct stmt *s;
+atomdef(struct stmt *s)
{
if (s->code == NOP)
return -1;
@@ -464,8 +414,7 @@
* register by a predecessor block of this block.
*/
static void
-compute_local_ud(b)
- struct block *b;
+compute_local_ud(struct block *b)
{
struct slist *s;
atomset def = 0, use = 0, kill = 0;
@@ -526,8 +475,7 @@
* Assume graph is already leveled.
*/
static void
-find_ud(root)
- struct block *root;
+find_ud(struct block *root)
{
int i, maxlevel;
struct block *p;
@@ -582,7 +530,7 @@
struct valnode *next_vnode;
static void
-init_val()
+init_val(void)
{
curval = 0;
next_vnode = vnode_base;
@@ -592,9 +540,7 @@
/* Because we really don't have an IR, this stuff is a little messy. */
static int
-F(code, v0, v1)
- int code;
- int v0, v1;
+F(int code, int v0, int v1)
{
u_int hash;
int val;
@@ -625,11 +571,7 @@
}
static inline void
-vstore(s, valp, newval, alter)
- struct stmt *s;
- int *valp;
- int newval;
- int alter;
+vstore(struct stmt *s, int *valp, int newval, int alter)
{
if (alter && *valp == newval)
s->code = NOP;
@@ -637,10 +579,12 @@
*valp = newval;
}
+/*
+ * Do constant-folding on binary operators.
+ * (Unary operators are handled elsewhere.)
+ */
static void
-fold_op(s, v0, v1)
- struct stmt *s;
- int v0, v1;
+fold_op(struct stmt *s, int v0, int v1)
{
bpf_u_int32 a, b;
@@ -682,10 +626,6 @@
a >>= b;
break;
- case BPF_NEG:
- a = -a;
- break;
-
default:
abort();
}
@@ -695,8 +635,7 @@
}
static inline struct slist *
-this_op(s)
- struct slist *s;
+this_op(struct slist *s)
{
while (s != 0 && s->s.code == NOP)
s = s->next;
@@ -704,8 +643,7 @@
}
static void
-opt_not(b)
- struct block *b;
+opt_not(struct block *b)
{
struct block *tmp = JT(b);
@@ -714,8 +652,7 @@
}
static void
-opt_peep(b)
- struct block *b;
+opt_peep(struct block *b)
{
struct slist *s;
struct slist *next, *last;
@@ -978,10 +915,7 @@
* evaluation and code transformations weren't folded together.
*/
static void
-opt_stmt(s, val, alter)
- struct stmt *s;
- int val[];
- int alter;
+opt_stmt(struct stmt *s, int val[], int alter)
{
int op;
int v;
@@ -1166,9 +1100,7 @@
}
static void
-deadstmt(s, last)
- register struct stmt *s;
- register struct stmt *last[];
+deadstmt(register struct stmt *s, register struct stmt *last[])
{
register int atom;
@@ -1192,8 +1124,7 @@
}
static void
-opt_deadstores(b)
- register struct block *b;
+opt_deadstores(register struct block *b)
{
register struct slist *s;
register int atom;
@@ -1213,9 +1144,7 @@
}
static void
-opt_blk(b, do_stmts)
- struct block *b;
- int do_stmts;
+opt_blk(struct block *b, int do_stmts)
{
struct slist *s;
struct edge *p;
@@ -1319,8 +1248,7 @@
* from 'b'.
*/
static int
-use_conflict(b, succ)
- struct block *b, *succ;
+use_conflict(struct block *b, struct block *succ)
{
int atom;
atomset use = succ->out_use;
@@ -1336,9 +1264,7 @@
}
static struct block *
-fold_edge(child, ep)
- struct block *child;
- struct edge *ep;
+fold_edge(struct block *child, struct edge *ep)
{
int sense;
int aval0, aval1, oval0, oval1;
@@ -1390,8 +1316,7 @@
}
static void
-opt_j(ep)
- struct edge *ep;
+opt_j(struct edge *ep)
{
register int i, k;
register struct block *target;
@@ -1446,8 +1371,7 @@
static void
-or_pullup(b)
- struct block *b;
+or_pullup(struct block *b)
{
int val, at_top;
struct block *pull;
@@ -1539,8 +1463,7 @@
}
static void
-and_pullup(b)
- struct block *b;
+and_pullup(struct block *b)
{
int val, at_top;
struct block *pull;
@@ -1631,9 +1554,7 @@
}
static void
-opt_blks(root, do_stmts)
- struct block *root;
- int do_stmts;
+opt_blks(struct block *root, int do_stmts)
{
int i, maxlevel;
struct block *p;
@@ -1670,17 +1591,14 @@
}
static inline void
-link_inedge(parent, child)
- struct edge *parent;
- struct block *child;
+link_inedge(struct edge *parent, struct block *child)
{
parent->next = child->in_edges;
child->in_edges = parent;
}
static void
-find_inedges(root)
- struct block *root;
+find_inedges(struct block *root)
{
int i;
struct block *b;
@@ -1701,8 +1619,7 @@
}
static void
-opt_root(b)
- struct block **b;
+opt_root(struct block **b)
{
struct slist *tmp, *s;
@@ -1726,9 +1643,7 @@
}
static void
-opt_loop(root, do_stmts)
- struct block *root;
- int do_stmts;
+opt_loop(struct block *root, int do_stmts)
{
#ifdef BDEBUG
@@ -1758,8 +1673,7 @@
* Optimize the filter code in its dag representation.
*/
void
-bpf_optimize(rootp)
- struct block **rootp;
+bpf_optimize(struct block **rootp)
{
struct block *root;
@@ -1786,8 +1700,7 @@
}
static void
-make_marks(p)
- struct block *p;
+make_marks(struct block *p)
{
if (!isMarked(p)) {
Mark(p);
@@ -1803,8 +1716,7 @@
* only for nodes that are alive.
*/
static void
-mark_code(p)
- struct block *p;
+mark_code(struct block *p)
{
cur_mark += 1;
make_marks(p);
@@ -1815,8 +1727,7 @@
* the accumulator.
*/
static int
-eq_slist(x, y)
- struct slist *x, *y;
+eq_slist(struct slist *x, struct slist *y)
{
while (1) {
while (x && x->s.code == NOP)
@@ -1835,8 +1746,7 @@
}
static inline int
-eq_blk(b0, b1)
- struct block *b0, *b1;
+eq_blk(struct block *b0, struct block *b1)
{
if (b0->s.code == b1->s.code &&
b0->s.k == b1->s.k &&
@@ -1847,8 +1757,7 @@
}
static void
-intern_blocks(root)
- struct block *root;
+intern_blocks(struct block *root)
{
struct block *p;
int i, j;
@@ -1891,7 +1800,7 @@
}
static void
-opt_cleanup()
+opt_cleanup(void)
{
free((void *)vnode_base);
free((void *)vmap);
@@ -1904,11 +1813,10 @@
/*
* Return the number of stmts in 's'.
*/
-static int
-slength(s)
- struct slist *s;
+static u_int
+slength(struct slist *s)
{
- int n = 0;
+ u_int n = 0;
for (; s; s = s->next)
if (s->s.code != NOP)
@@ -1921,8 +1829,7 @@
* All nodes should be initially unmarked.
*/
static int
-count_blocks(p)
- struct block *p;
+count_blocks(struct block *p)
{
if (p == 0 || isMarked(p))
return 0;
@@ -1935,8 +1842,7 @@
* the basic blocks, and entering them into the 'blocks' array.`
*/
static void
-number_blks_r(p)
- struct block *p;
+number_blks_r(struct block *p)
{
int n;
@@ -1970,11 +1876,10 @@
*
* an extra long jump if the false branch requires it (p->longjf).
*/
-static int
-count_stmts(p)
- struct block *p;
+static u_int
+count_stmts(struct block *p)
{
- int n;
+ u_int n;
if (p == 0 || isMarked(p))
return 0;
@@ -1989,8 +1894,7 @@
* from the total number of blocks and/or statements.
*/
static void
-opt_init(root)
- struct block *root;
+opt_init(struct block *root)
{
bpf_u_int32 *p;
int i, n, max_stmts;
@@ -2088,8 +1992,7 @@
* properly.
*/
static int
-convert_code_r(p)
- struct block *p;
+convert_code_r(struct block *p)
{
struct bpf_insn *dst;
struct slist *src;
@@ -2261,11 +2164,9 @@
* done with the filter program. See the pcap man page.
*/
struct bpf_insn *
-icode_to_fcode(root, lenp)
- struct block *root;
- int *lenp;
+icode_to_fcode(struct block *root, u_int *lenp)
{
- int n;
+ u_int n;
struct bpf_insn *fp;
/*
@@ -2333,8 +2234,7 @@
#ifdef BDEBUG
static void
-opt_dump(root)
- struct block *root;
+opt_dump(struct block *root)
{
struct bpf_program f;
Index: libpcap/fad-getad.c
===================================================================
--- libpcap/fad-getad.c (revision 32783)
+++ libpcap/fad-getad.c (working copy)
@@ -54,9 +54,15 @@
#include <string.h>
#include <ifaddrs.h>
-#ifdef AF_PACKET
+/*
+ * We don't do this on Solaris 11 and later, as it appears there aren't
+ * any AF_PACKET addresses on interfaces, so we don't need this, and
+ * we end up including both the OS's <net/bpf.h> and our <pcap/bpf.h>,
+ * and their definitions of some data structures collide.
+ */
+#if (defined(linux) || defined(__Lynx__)) && defined(AF_PACKET)
# ifdef HAVE_NETPACKET_PACKET_H
-/* Solaris 11 and later, Linux distributions with newer glibc */
+/* Linux distributions with newer glibc */
# include <netpacket/packet.h>
# else /* HAVE_NETPACKET_PACKET_H */
/* LynxOS, Linux distributions with older glibc */
@@ -69,7 +75,7 @@
# include <linux/if_packet.h>
# endif /* __Lynx__ */
# endif /* HAVE_NETPACKET_PACKET_H */
-#endif /* AF_PACKET */
+#endif /* (defined(linux) || defined(__Lynx__)) && defined(AF_PACKET) */
#include "pcap-int.h"
@@ -120,7 +126,7 @@
return (sizeof (struct sockaddr_in6));
#endif
-#ifdef AF_PACKET
+#if (defined(linux) || defined(__Lynx__)) && defined(AF_PACKET)
case AF_PACKET:
return (sizeof (struct sockaddr_ll));
#endif
@@ -141,11 +147,9 @@
* Returns -1 on error, 0 otherwise.
* The list, as returned through "alldevsp", may be null if no interfaces
* were up and could be opened.
- *
- * This is the implementation used on platforms that have "getifaddrs()".
*/
int
-pcap_findalldevs(pcap_if_t **alldevsp, char *errbuf)
+pcap_findalldevs_interfaces(pcap_if_t **alldevsp, char *errbuf)
{
pcap_if_t *devlist = NULL;
struct ifaddrs *ifap, *ifa;
@@ -273,15 +277,6 @@
freeifaddrs(ifap);
- if (ret != -1) {
- /*
- * We haven't had any errors yet; do any platform-specific
- * operations to add devices.
- */
- if (pcap_platform_finddevs(&devlist, errbuf) < 0)
- ret = -1;
- }
-
if (ret == -1) {
/*
* We had an error; free the list we've been constructing.
Index: libpcap/scanner.c
===================================================================
--- libpcap/scanner.c (revision 32783)
+++ libpcap/scanner.c (working copy)
@@ -395,8 +395,8 @@
*yy_cp = '\0'; \
(yy_c_buf_p) = yy_cp;
-#define YY_NUM_RULES 147
-#define YY_END_OF_BUFFER 148
+#define YY_NUM_RULES 154
+#define YY_END_OF_BUFFER 155
/* This struct is not used in this scanner,
but its presence is necessary. */
struct yy_trans_info
@@ -404,166 +404,168 @@
flex_int32_t yy_verify;
flex_int32_t yy_nxt;
};
-static yyconst flex_int16_t yy_accept[1438] =
+static yyconst flex_int16_t yy_accept[1459] =
{ 0,
- 0, 0, 148, 145, 105, 105, 105, 106, 145, 106,
- 106, 106, 146, 115, 115, 106, 106, 106, 106, 143,
- 143, 145, 143, 143, 143, 143, 143, 143, 143, 143,
- 143, 143, 143, 143, 143, 143, 143, 143, 143, 143,
- 143, 143, 106, 145, 109, 113, 67, 0, 143, 115,
- 0, 143, 143, 143, 0, 117, 111, 108, 110, 107,
- 112, 143, 144, 144, 143, 143, 143, 20, 143, 143,
- 143, 143, 143, 143, 143, 143, 143, 143, 143, 143,
- 143, 143, 143, 143, 143, 143, 143, 143, 143, 143,
- 143, 143, 143, 143, 143, 7, 143, 34, 35, 143,
+ 0, 0, 155, 152, 112, 112, 112, 113, 152, 113,
+ 113, 113, 153, 122, 122, 113, 113, 113, 113, 150,
+ 150, 152, 150, 150, 150, 150, 150, 150, 150, 150,
+ 150, 150, 150, 150, 150, 150, 150, 150, 150, 150,
+ 150, 150, 113, 152, 116, 120, 67, 0, 150, 122,
+ 0, 150, 150, 150, 0, 124, 118, 115, 117, 114,
+ 119, 150, 151, 151, 150, 150, 150, 20, 150, 150,
+ 150, 150, 150, 150, 150, 150, 150, 150, 150, 150,
+ 150, 150, 150, 150, 150, 150, 150, 150, 150, 150,
+ 150, 150, 150, 150, 150, 150, 150, 150, 150, 150,
- 143, 143, 143, 143, 143, 143, 143, 143, 143, 143,
- 143, 143, 143, 91, 143, 68, 143, 143, 143, 143,
- 143, 143, 60, 143, 143, 143, 143, 85, 143, 143,
- 143, 143, 143, 143, 61, 143, 4, 143, 143, 143,
- 143, 143, 143, 143, 68, 113, 143, 116, 116, 143,
- 115, 143, 0, 117, 115, 117, 117, 117, 143, 143,
- 143, 67, 5, 143, 80, 143, 143, 143, 143, 143,
- 143, 143, 55, 103, 1, 0, 143, 21, 143, 143,
- 143, 143, 143, 143, 143, 143, 143, 143, 36, 143,
- 143, 18, 43, 0, 143, 29, 143, 25, 70, 143,
+ 7, 150, 34, 35, 150, 150, 150, 150, 150, 150,
+ 150, 150, 150, 150, 150, 150, 150, 150, 91, 150,
+ 68, 150, 150, 150, 150, 150, 150, 60, 150, 150,
+ 150, 150, 85, 150, 150, 150, 150, 150, 150, 61,
+ 150, 4, 150, 150, 150, 150, 150, 150, 150, 68,
+ 120, 150, 123, 123, 150, 122, 150, 0, 124, 122,
+ 124, 124, 124, 150, 150, 150, 67, 5, 150, 80,
+ 150, 150, 150, 150, 150, 150, 150, 55, 106, 1,
+ 0, 150, 21, 150, 150, 150, 150, 150, 150, 150,
+ 150, 150, 150, 150, 150, 150, 150, 150, 150, 150,
- 143, 78, 37, 143, 99, 143, 143, 143, 143, 100,
- 143, 46, 69, 81, 102, 143, 14, 143, 3, 143,
- 143, 143, 143, 143, 93, 143, 143, 26, 143, 101,
- 143, 104, 38, 2, 143, 42, 143, 9, 143, 10,
- 88, 143, 87, 143, 143, 0, 143, 143, 116, 143,
- 143, 143, 143, 115, 0, 143, 0, 118, 117, 117,
- 0, 117, 0, 117, 0, 117, 0, 23, 143, 143,
- 143, 143, 64, 16, 41, 143, 39, 143, 143, 143,
- 30, 143, 97, 143, 143, 45, 11, 143, 12, 13,
- 143, 143, 143, 32, 77, 143, 62, 3, 98, 47,
+ 36, 150, 150, 18, 43, 0, 150, 29, 150, 25,
+ 70, 150, 150, 78, 37, 150, 99, 150, 150, 150,
+ 150, 100, 150, 46, 69, 81, 105, 150, 14, 150,
+ 3, 150, 150, 150, 150, 150, 93, 150, 150, 26,
+ 150, 104, 150, 107, 38, 2, 150, 42, 150, 9,
+ 150, 10, 88, 150, 87, 150, 150, 0, 150, 150,
+ 123, 150, 150, 150, 150, 122, 0, 150, 0, 125,
+ 124, 124, 0, 124, 0, 124, 0, 124, 0, 23,
+ 150, 150, 150, 150, 64, 16, 41, 150, 39, 150,
+ 150, 150, 30, 150, 97, 150, 150, 110, 150, 150,
- 143, 143, 143, 74, 143, 143, 143, 143, 48, 143,
- 143, 40, 143, 6, 143, 92, 143, 8, 94, 143,
- 143, 0, 143, 53, 73, 15, 143, 116, 116, 143,
- 116, 116, 116, 143, 115, 143, 0, 117, 143, 0,
- 0, 117, 0, 117, 118, 117, 0, 0, 0, 0,
- 117, 117, 117, 117, 117, 0, 143, 56, 57, 58,
- 59, 143, 22, 143, 143, 143, 143, 31, 143, 143,
- 0, 19, 143, 143, 143, 86, 143, 33, 143, 79,
- 28, 27, 143, 143, 82, 143, 143, 143, 50, 17,
- 143, 143, 143, 143, 143, 143, 143, 143, 143, 143,
+ 103, 109, 45, 108, 111, 11, 150, 12, 13, 150,
+ 150, 150, 32, 77, 150, 62, 3, 98, 47, 150,
+ 150, 150, 74, 150, 150, 150, 150, 48, 150, 150,
+ 40, 150, 6, 150, 92, 150, 8, 94, 150, 150,
+ 0, 150, 53, 73, 15, 150, 123, 123, 150, 123,
+ 123, 123, 150, 122, 150, 0, 124, 150, 0, 0,
+ 124, 0, 124, 125, 124, 0, 0, 0, 0, 124,
+ 124, 124, 124, 124, 0, 150, 56, 57, 58, 59,
+ 150, 22, 150, 150, 150, 150, 31, 150, 150, 101,
+ 102, 0, 19, 150, 150, 150, 86, 150, 33, 150,
- 143, 143, 0, 143, 143, 116, 143, 143, 143, 143,
- 116, 116, 143, 115, 143, 0, 0, 117, 117, 117,
- 0, 0, 118, 117, 117, 118, 117, 0, 0, 117,
- 117, 117, 117, 117, 0, 0, 0, 0, 117, 117,
- 0, 117, 0, 117, 0, 96, 143, 143, 143, 24,
- 143, 143, 143, 143, 143, 143, 143, 143, 143, 143,
- 143, 143, 143, 143, 70, 143, 143, 143, 143, 143,
- 143, 143, 75, 76, 143, 95, 143, 143, 143, 143,
- 143, 143, 143, 143, 143, 143, 143, 143, 116, 116,
- 143, 116, 116, 116, 116, 143, 115, 143, 0, 117,
+ 79, 28, 27, 150, 150, 82, 150, 150, 150, 50,
+ 17, 150, 150, 150, 150, 150, 150, 150, 150, 150,
+ 150, 150, 150, 0, 150, 150, 123, 150, 150, 150,
+ 150, 123, 123, 150, 122, 150, 0, 0, 124, 124,
+ 124, 0, 0, 125, 124, 124, 125, 124, 0, 0,
+ 124, 124, 124, 124, 124, 0, 0, 0, 0, 124,
+ 124, 0, 124, 0, 124, 0, 96, 150, 150, 150,
+ 24, 150, 150, 150, 150, 150, 150, 150, 150, 150,
+ 150, 150, 150, 150, 150, 70, 150, 150, 150, 150,
+ 150, 150, 150, 75, 76, 150, 95, 150, 150, 150,
- 117, 0, 117, 0, 0, 117, 0, 117, 118, 117,
- 0, 0, 0, 117, 117, 0, 117, 118, 117, 0,
- 0, 0, 0, 0, 0, 0, 117, 117, 117, 117,
- 117, 0, 143, 143, 143, 143, 52, 63, 143, 143,
- 143, 143, 143, 143, 143, 143, 143, 143, 143, 143,
- 71, 143, 143, 44, 83, 84, 143, 143, 143, 143,
- 54, 141, 137, 143, 139, 138, 142, 143, 0, 143,
- 143, 116, 143, 143, 143, 116, 143, 115, 143, 0,
- 0, 117, 117, 117, 117, 117, 117, 0, 0, 118,
- 117, 117, 117, 0, 0, 117, 117, 117, 117, 117,
+ 150, 150, 150, 150, 150, 150, 150, 150, 150, 123,
+ 123, 150, 123, 123, 123, 123, 150, 122, 150, 0,
+ 124, 124, 0, 124, 0, 0, 124, 0, 124, 125,
+ 124, 0, 0, 0, 124, 124, 0, 124, 125, 124,
+ 0, 0, 0, 0, 0, 0, 0, 124, 124, 124,
+ 124, 124, 0, 150, 150, 150, 150, 52, 63, 150,
+ 150, 150, 150, 150, 150, 150, 150, 150, 150, 150,
+ 150, 71, 150, 150, 44, 83, 84, 150, 150, 150,
+ 150, 54, 148, 144, 150, 146, 145, 149, 150, 0,
+ 150, 150, 123, 150, 150, 150, 123, 150, 122, 150,
- 0, 0, 0, 0, 0, 0, 0, 117, 117, 117,
- 117, 117, 0, 0, 0, 0, 0, 117, 117, 0,
- 117, 0, 117, 0, 143, 143, 143, 143, 143, 143,
- 143, 143, 143, 143, 143, 143, 143, 120, 119, 143,
- 143, 72, 143, 143, 143, 140, 136, 143, 143, 116,
- 116, 116, 116, 143, 115, 143, 0, 117, 117, 0,
- 117, 117, 0, 117, 0, 0, 117, 0, 117, 118,
- 117, 0, 0, 0, 117, 117, 0, 117, 118, 117,
- 0, 0, 0, 0, 0, 117, 117, 0, 117, 118,
- 117, 0, 117, 117, 0, 0, 0, 0, 0, 0,
+ 0, 0, 124, 124, 124, 124, 124, 124, 0, 0,
+ 125, 124, 124, 124, 0, 0, 124, 124, 124, 124,
+ 124, 0, 0, 0, 0, 0, 0, 0, 124, 124,
+ 124, 124, 124, 0, 0, 0, 0, 0, 124, 124,
+ 0, 124, 0, 124, 0, 150, 150, 150, 150, 150,
+ 150, 150, 150, 150, 150, 150, 150, 150, 127, 126,
+ 150, 150, 72, 150, 150, 150, 147, 143, 150, 150,
+ 123, 123, 123, 123, 150, 122, 150, 0, 124, 124,
+ 0, 124, 124, 0, 124, 0, 0, 124, 0, 124,
+ 125, 124, 0, 0, 0, 124, 124, 0, 124, 125,
- 0, 117, 117, 117, 117, 117, 0, 65, 143, 55,
- 125, 132, 143, 143, 143, 143, 143, 143, 143, 143,
- 143, 66, 49, 143, 143, 0, 143, 143, 143, 143,
- 143, 115, 143, 0, 0, 117, 117, 117, 117, 117,
- 117, 117, 117, 117, 0, 0, 118, 117, 117, 117,
- 0, 0, 117, 117, 117, 117, 117, 0, 0, 0,
- 0, 0, 0, 0, 117, 117, 117, 117, 117, 0,
- 117, 117, 0, 0, 0, 0, 0, 0, 0, 117,
- 117, 117, 117, 117, 0, 0, 0, 0, 0, 0,
- 117, 117, 0, 117, 0, 117, 0, 89, 143, 143,
+ 124, 0, 0, 0, 0, 0, 124, 124, 0, 124,
+ 125, 124, 0, 124, 124, 0, 0, 0, 0, 0,
+ 0, 0, 124, 124, 124, 124, 124, 0, 65, 150,
+ 55, 132, 139, 150, 150, 150, 150, 150, 150, 150,
+ 150, 150, 66, 49, 150, 150, 0, 150, 150, 150,
+ 150, 150, 122, 150, 0, 0, 124, 124, 124, 124,
+ 124, 124, 124, 124, 124, 0, 0, 125, 124, 124,
+ 124, 0, 0, 124, 124, 124, 124, 124, 0, 0,
+ 0, 0, 0, 0, 0, 124, 124, 124, 124, 124,
+ 0, 124, 124, 0, 0, 0, 0, 0, 0, 0,
- 143, 143, 143, 143, 143, 143, 143, 143, 143, 51,
- 114, 114, 116, 116, 143, 115, 143, 0, 117, 117,
- 0, 117, 117, 0, 117, 117, 0, 117, 0, 114,
- 117, 0, 117, 118, 117, 0, 0, 0, 117, 117,
- 0, 117, 118, 117, 0, 0, 0, 0, 0, 117,
- 117, 0, 117, 118, 117, 0, 0, 0, 0, 0,
- 0, 117, 117, 0, 117, 118, 117, 0, 117, 117,
- 117, 0, 0, 0, 0, 0, 0, 0, 117, 117,
- 117, 117, 117, 0, 143, 143, 143, 143, 143, 143,
- 143, 143, 130, 143, 90, 114, 114, 116, 143, 114,
+ 124, 124, 124, 124, 124, 0, 0, 0, 0, 0,
+ 0, 124, 124, 0, 124, 0, 124, 0, 89, 150,
+ 150, 150, 150, 150, 150, 150, 150, 150, 150, 150,
+ 51, 121, 121, 123, 123, 150, 122, 150, 0, 124,
+ 124, 0, 124, 124, 0, 124, 124, 0, 124, 0,
+ 121, 124, 0, 124, 125, 124, 0, 0, 0, 124,
+ 124, 0, 124, 125, 124, 0, 0, 0, 0, 0,
+ 124, 124, 0, 124, 125, 124, 0, 0, 0, 0,
+ 0, 0, 124, 124, 0, 124, 125, 124, 0, 124,
+ 124, 124, 0, 0, 0, 0, 0, 0, 0, 124,
- 114, 0, 0, 117, 117, 117, 117, 117, 117, 117,
- 117, 117, 117, 117, 117, 0, 114, 118, 117, 117,
- 117, 0, 0, 117, 117, 117, 117, 117, 0, 0,
- 0, 0, 0, 0, 0, 117, 117, 117, 117, 117,
- 0, 117, 117, 0, 0, 0, 0, 0, 0, 0,
- 117, 117, 117, 117, 117, 0, 117, 117, 117, 0,
- 0, 0, 0, 0, 0, 0, 117, 117, 117, 117,
- 117, 0, 0, 0, 0, 0, 0, 117, 117, 0,
- 117, 0, 117, 0, 143, 143, 143, 134, 143, 143,
- 143, 143, 143, 143, 143, 122, 116, 143, 115, 0,
+ 124, 124, 124, 124, 0, 150, 150, 150, 150, 150,
+ 150, 150, 150, 137, 150, 90, 121, 121, 123, 150,
+ 121, 121, 0, 0, 124, 124, 124, 124, 124, 124,
+ 124, 124, 124, 124, 124, 124, 0, 121, 125, 124,
+ 124, 124, 0, 0, 124, 124, 124, 124, 124, 0,
+ 0, 0, 0, 0, 0, 0, 124, 124, 124, 124,
+ 124, 0, 124, 124, 0, 0, 0, 0, 0, 0,
+ 0, 124, 124, 124, 124, 124, 0, 124, 124, 124,
+ 0, 0, 0, 0, 0, 0, 0, 124, 124, 124,
+ 124, 124, 0, 0, 0, 0, 0, 0, 124, 124,
- 117, 117, 0, 117, 117, 0, 117, 117, 0, 117,
- 117, 0, 117, 0, 0, 0, 117, 0, 0, 117,
- 118, 117, 0, 0, 0, 117, 117, 0, 117, 118,
- 117, 0, 0, 0, 0, 0, 117, 117, 0, 117,
- 118, 117, 0, 0, 0, 0, 0, 0, 117, 117,
- 0, 117, 118, 117, 0, 0, 0, 0, 0, 0,
- 117, 117, 0, 117, 118, 117, 0, 117, 117, 117,
- 0, 0, 0, 0, 0, 0, 0, 117, 117, 117,
- 117, 117, 0, 143, 143, 143, 143, 124, 143, 143,
- 143, 128, 143, 114, 0, 0, 117, 117, 117, 117,
+ 0, 124, 0, 124, 0, 150, 150, 150, 141, 150,
+ 150, 150, 150, 150, 150, 150, 129, 123, 150, 122,
+ 0, 124, 124, 0, 124, 124, 0, 124, 124, 0,
+ 124, 124, 0, 124, 0, 0, 0, 124, 0, 0,
+ 124, 125, 124, 0, 0, 0, 124, 124, 0, 124,
+ 125, 124, 0, 0, 0, 0, 0, 124, 124, 0,
+ 124, 125, 124, 0, 0, 0, 0, 0, 0, 124,
+ 124, 0, 124, 125, 124, 0, 0, 0, 0, 0,
+ 0, 124, 124, 0, 124, 125, 124, 0, 124, 124,
+ 124, 0, 0, 0, 0, 0, 0, 0, 124, 124,
- 117, 117, 117, 117, 117, 117, 117, 117, 117, 117,
- 117, 0, 0, 0, 118, 0, 0, 117, 0, 0,
- 117, 117, 117, 0, 0, 0, 0, 0, 0, 0,
- 117, 117, 117, 0, 117, 117, 0, 0, 0, 0,
- 0, 0, 0, 117, 117, 117, 0, 117, 117, 117,
- 0, 0, 0, 0, 0, 0, 0, 117, 117, 117,
- 0, 117, 117, 117, 0, 0, 0, 0, 0, 0,
- 0, 117, 117, 117, 0, 0, 0, 0, 0, 0,
- 117, 117, 0, 117, 0, 117, 0, 121, 133, 135,
- 129, 143, 143, 143, 143, 0, 0, 117, 0, 117,
+ 124, 124, 124, 0, 150, 150, 150, 150, 131, 150,
+ 150, 150, 135, 150, 121, 0, 0, 124, 124, 124,
+ 124, 124, 124, 124, 124, 124, 124, 124, 124, 124,
+ 124, 124, 0, 0, 0, 125, 0, 0, 124, 0,
+ 0, 124, 124, 124, 0, 0, 0, 0, 0, 0,
+ 0, 124, 124, 124, 0, 124, 124, 0, 0, 0,
+ 0, 0, 0, 0, 124, 124, 124, 0, 124, 124,
+ 124, 0, 0, 0, 0, 0, 0, 0, 124, 124,
+ 124, 0, 124, 124, 124, 0, 0, 0, 0, 0,
+ 0, 0, 124, 124, 124, 0, 0, 0, 0, 0,
- 0, 117, 117, 0, 117, 117, 0, 117, 117, 0,
- 117, 117, 0, 117, 0, 0, 0, 0, 117, 117,
- 0, 117, 0, 0, 117, 117, 117, 0, 0, 0,
- 0, 117, 117, 117, 0, 0, 0, 0, 0, 117,
- 117, 117, 0, 0, 0, 0, 0, 117, 117, 117,
- 0, 0, 0, 0, 0, 117, 117, 117, 117, 117,
- 117, 0, 0, 0, 0, 0, 0, 0, 117, 117,
- 117, 0, 143, 143, 143, 143, 0, 0, 0, 117,
- 117, 117, 117, 117, 117, 0, 0, 0, 0, 117,
- 117, 0, 0, 0, 0, 117, 117, 117, 0, 0,
+ 0, 124, 124, 0, 124, 0, 124, 0, 128, 140,
+ 142, 136, 150, 150, 150, 150, 0, 0, 124, 0,
+ 124, 0, 124, 124, 0, 124, 124, 0, 124, 124,
+ 0, 124, 124, 0, 124, 0, 0, 0, 0, 124,
+ 124, 0, 124, 0, 0, 124, 124, 124, 0, 0,
+ 0, 0, 124, 124, 124, 0, 0, 0, 0, 0,
+ 124, 124, 124, 0, 0, 0, 0, 0, 124, 124,
+ 124, 0, 0, 0, 0, 0, 124, 124, 124, 124,
+ 124, 124, 0, 0, 0, 0, 0, 0, 0, 124,
+ 124, 124, 0, 150, 150, 150, 150, 0, 0, 0,
- 0, 0, 0, 117, 117, 117, 117, 0, 0, 0,
- 0, 0, 117, 117, 117, 117, 0, 0, 0, 0,
- 0, 117, 117, 117, 117, 0, 0, 0, 0, 0,
- 117, 0, 0, 0, 0, 0, 117, 117, 117, 143,
- 143, 143, 131, 117, 117, 117, 117, 117, 117, 117,
- 117, 0, 0, 0, 0, 117, 117, 0, 0, 117,
- 0, 0, 0, 117, 0, 0, 0, 117, 0, 0,
- 0, 117, 0, 0, 0, 117, 117, 117, 117, 0,
- 0, 0, 0, 0, 117, 126, 143, 123, 117, 0,
- 0, 117, 117, 0, 117, 117, 117, 0, 117, 117,
+ 124, 124, 124, 124, 124, 124, 0, 0, 0, 0,
+ 124, 124, 0, 0, 0, 0, 124, 124, 124, 0,
+ 0, 0, 0, 0, 124, 124, 124, 124, 0, 0,
+ 0, 0, 0, 124, 124, 124, 124, 0, 0, 0,
+ 0, 0, 124, 124, 124, 124, 0, 0, 0, 0,
+ 0, 124, 0, 0, 0, 0, 0, 124, 124, 124,
+ 150, 150, 150, 138, 124, 124, 124, 124, 124, 124,
+ 124, 124, 0, 0, 0, 0, 124, 124, 0, 0,
+ 124, 0, 0, 0, 124, 0, 0, 0, 124, 0,
+ 0, 0, 124, 0, 0, 0, 124, 124, 124, 124,
- 117, 0, 117, 117, 117, 0, 117, 117, 117, 0,
- 0, 0, 0, 117, 127, 117, 117, 0, 0, 0,
- 0, 0, 0, 117, 117, 117, 0, 0, 117, 117,
- 117, 117, 117, 0, 117, 117, 0
+ 0, 0, 0, 0, 0, 124, 133, 150, 130, 124,
+ 0, 0, 124, 124, 0, 124, 124, 124, 0, 124,
+ 124, 124, 0, 124, 124, 124, 0, 124, 124, 124,
+ 0, 0, 0, 0, 124, 134, 124, 124, 0, 0,
+ 0, 0, 0, 0, 124, 124, 124, 0, 0, 124,
+ 124, 124, 124, 124, 0, 124, 124, 0
} ;
static yyconst flex_int32_t yy_ec[256] =
@@ -608,228 +610,230 @@
9, 4, 3
} ;
-static yyconst flex_int16_t yy_base[1898] =
+static yyconst flex_int16_t yy_base[1919] =
{ 0,
- 0, 0, 3858, 53, 7396, 7396, 54, 3836, 60, 3849,
- 7396, 82, 7396, 100, 31, 152, 47, 3834, 49, 169,
- 211, 169, 61, 44, 126, 61, 30, 63, 76, 3811,
- 215, 218, 160, 32, 166, 117, 171, 228, 145, 3820,
- 229, 3812, 3782, 276, 7396, 0, 7396, 292, 315, 339,
- 3815, 363, 0, 370, 0, 404, 7396, 7396, 7396, 7396,
- 7396, 274, 292, 0, 3788, 3785, 3799, 0, 3797, 3785,
- 3798, 3781, 3769, 3763, 3764, 3767, 3765, 3764, 3773, 3743,
- 3756, 3739, 324, 3749, 3752, 3736, 3734, 3747, 3719, 3724,
- 3722, 82, 3726, 3721, 3729, 148, 229, 0, 0, 37,
+ 0, 0, 3907, 53, 7401, 7401, 54, 3884, 60, 3897,
+ 7401, 82, 7401, 100, 31, 152, 47, 3882, 49, 169,
+ 211, 169, 61, 44, 126, 61, 30, 63, 76, 158,
+ 215, 218, 160, 32, 166, 117, 230, 236, 208, 3855,
+ 174, 3847, 3832, 281, 7401, 0, 7401, 297, 320, 344,
+ 3865, 368, 0, 375, 0, 409, 7401, 7401, 7401, 7401,
+ 7401, 279, 297, 0, 3838, 3834, 3848, 0, 3847, 3821,
+ 3834, 3831, 3819, 3813, 3813, 3816, 3815, 3799, 3808, 3793,
+ 3806, 3789, 225, 3798, 3801, 3786, 3770, 3783, 3772, 3777,
+ 3767, 3765, 121, 83, 3770, 3768, 129, 3757, 3752, 3761,
- 123, 3717, 3726, 167, 3695, 3693, 3696, 3699, 3689, 3695,
- 3686, 3671, 3677, 0, 3685, 0, 3668, 3674, 3667, 3668,
- 3668, 3653, 160, 3664, 3647, 3658, 3650, 56, 3645, 216,
- 3628, 126, 3627, 3639, 0, 3625, 0, 3624, 3622, 3627,
- 3634, 3610, 3601, 3616, 7396, 7396, 429, 453, 212, 494,
- 518, 542, 3625, 549, 3631, 573, 269, 3621, 3581, 3586,
- 3577, 0, 0, 3582, 0, 3591, 3585, 3574, 3573, 3559,
- 3556, 3557, 3564, 0, 0, 3558, 3548, 0, 3560, 3540,
- 3528, 3542, 3545, 3526, 3528, 3541, 3526, 3525, 0, 3509,
- 3503, 0, 0, 3506, 3496, 0, 3507, 0, 3504, 3492,
+ 148, 228, 0, 0, 37, 169, 3749, 3758, 226, 3741,
+ 3739, 3742, 3731, 3721, 3729, 3720, 3719, 3724, 0, 3732,
+ 0, 3715, 3706, 3700, 3701, 3701, 3701, 234, 3710, 3693,
+ 3690, 3683, 56, 3679, 243, 3677, 160, 3676, 3687, 0,
+ 3673, 0, 3672, 3656, 3661, 3668, 3659, 3649, 3663, 7401,
+ 7401, 434, 458, 274, 499, 523, 547, 3657, 554, 3664,
+ 578, 293, 3655, 3630, 3635, 3625, 0, 0, 3630, 0,
+ 3639, 3619, 3608, 3607, 3608, 3604, 3604, 3596, 0, 0,
+ 3591, 3581, 0, 3593, 3588, 3575, 3589, 3592, 3574, 3558,
+ 3557, 3554, 3569, 3552, 3556, 3536, 3538, 3551, 3536, 3535,
- 3499, 0, 0, 3474, 0, 3483, 3491, 203, 3473, 0,
- 3469, 3485, 0, 3480, 0, 3483, 0, 3456, 3440, 3434,
- 3437, 3441, 3433, 3429, 0, 3427, 3440, 0, 3414, 0,
- 3413, 0, 0, 0, 3410, 0, 171, 167, 3421, 0,
- 0, 3411, 0, 3408, 3409, 613, 3439, 636, 660, 3423,
- 667, 476, 267, 691, 3414, 715, 3412, 3410, 723, 288,
- 3409, 3407, 483, 764, 787, 3391, 0, 0, 3367, 327,
- 3370, 3375, 0, 0, 0, 3371, 0, 3370, 3371, 3340,
- 0, 3340, 0, 3334, 3334, 0, 590, 3328, 0, 0,
- 3334, 3307, 3308, 0, 0, 3298, 0, 0, 0, 0,
+ 0, 3539, 3533, 0, 0, 3537, 3527, 0, 3518, 0,
+ 3515, 3502, 3509, 0, 0, 3497, 0, 3506, 3514, 272,
+ 3496, 0, 3480, 3496, 0, 3491, 0, 3494, 0, 3474,
+ 3478, 3472, 3475, 3471, 3444, 3440, 0, 3438, 3450, 0,
+ 3438, 0, 3437, 0, 0, 0, 3434, 0, 171, 202,
+ 3445, 0, 0, 3421, 0, 3418, 3419, 618, 3449, 641,
+ 665, 3446, 672, 481, 115, 696, 3437, 720, 3436, 3435,
+ 728, 294, 3420, 3419, 488, 769, 792, 3417, 0, 0,
+ 3392, 381, 3395, 3399, 0, 0, 0, 3382, 0, 3381,
+ 3382, 3366, 0, 3364, 0, 3358, 3360, 0, 3343, 3342,
- 3313, 3303, 3291, 0, 3284, 3287, 3303, 3276, 3271, 3268,
- 3248, 0, 3246, 0, 3239, 0, 192, 0, 0, 3232,
- 3227, 715, 3218, 0, 0, 0, 812, 836, 312, 877,
- 3245, 3244, 381, 900, 924, 948, 3235, 955, 597, 3234,
- 3231, 978, 752, 1002, 1025, 3230, 0, 3219, 400, 403,
- 1049, 3197, 1073, 339, 3196, 3203, 3168, 0, 0, 0,
- 0, 3162, 0, 3161, 3159, 3142, 3141, 0, 3156, 3140,
- 1092, 0, 3126, 3115, 3133, 0, 3108, 0, 3111, 3102,
- 0, 0, 3101, 3080, 237, 3079, 3097, 268, 3072, 0,
- 3050, 3039, 3053, 3046, 3041, 3050, 3043, 3031, 3032, 3025,
+ 0, 0, 0, 0, 0, 595, 3349, 0, 0, 3355,
+ 3325, 3324, 0, 0, 3313, 0, 0, 0, 0, 3328,
+ 3311, 3318, 0, 3310, 3294, 3310, 3283, 3279, 3290, 3279,
+ 0, 3278, 0, 3264, 0, 261, 0, 0, 3247, 3241,
+ 720, 3247, 0, 0, 0, 817, 841, 296, 882, 3274,
+ 3273, 405, 905, 929, 953, 3242, 960, 602, 3241, 3240,
+ 983, 757, 1007, 1030, 3239, 0, 3236, 408, 409, 1054,
+ 3235, 1078, 297, 3224, 3210, 3179, 0, 0, 0, 0,
+ 3173, 0, 3183, 3182, 3150, 3148, 0, 3165, 3160, 0,
+ 0, 1097, 0, 3148, 3126, 3140, 0, 3131, 0, 3135,
- 3022, 3036, 1129, 3051, 1152, 1176, 3039, 1183, 859, 305,
- 1207, 340, 1247, 1270, 1294, 3009, 3008, 1302, 364, 3007,
- 3005, 3003, 3002, 1343, 373, 3001, 2976, 491, 607, 1384,
- 2975, 1408, 404, 2974, 2981, 2971, 866, 0, 347, 2970,
- 1096, 1449, 1472, 2969, 0, 0, 2926, 2942, 2923, 0,
- 2931, 2914, 2920, 2933, 2918, 2919, 2918, 407, 2901, 411,
- 2901, 2909, 2897, 2893, 0, 2883, 2893, 2881, 2886, 2853,
- 2842, 2841, 0, 0, 2844, 0, 2838, 2830, 2843, 2827,
- 2821, 2817, 2811, 2809, 2813, 2818, 2817, 1497, 1521, 405,
- 1562, 2825, 2824, 609, 1586, 1610, 1617, 1641, 2815, 1648,
+ 3112, 0, 0, 3121, 3101, 366, 3089, 3104, 371, 3101,
+ 0, 3090, 3060, 3063, 3053, 3048, 3059, 3052, 3038, 3039,
+ 3032, 3038, 3053, 1134, 3062, 1157, 1181, 3059, 1188, 864,
+ 165, 1212, 314, 1252, 1275, 1299, 3047, 3036, 1307, 315,
+ 3014, 3013, 3012, 3010, 1348, 317, 3008, 3007, 496, 612,
+ 1389, 3006, 1413, 321, 2981, 2988, 2979, 871, 0, 352,
+ 2978, 1101, 1454, 1477, 2976, 0, 0, 2948, 2964, 2930,
+ 0, 2939, 2923, 2928, 2940, 2925, 2940, 2939, 369, 2911,
+ 408, 2911, 2916, 2904, 2914, 0, 2904, 2901, 2892, 2896,
+ 2892, 2881, 2848, 0, 0, 2852, 0, 2847, 2838, 2850,
- 1672, 1695, 2814, 2813, 2811, 1718, 1103, 1742, 1765, 2810,
- 0, 1230, 0, 461, 2809, 1237, 1789, 1812, 2794, 0,
- 734, 761, 2801, 462, 781, 812, 1836, 2792, 1860, 428,
- 2791, 2798, 381, 2761, 2766, 2763, 0, 0, 2753, 2755,
- 2741, 2741, 2753, 2735, 2734, 2741, 2719, 2720, 2731, 2730,
- 0, 2721, 2714, 0, 0, 0, 2727, 2723, 2713, 2700,
- 0, 0, 0, 2704, 0, 0, 0, 2693, 1900, 2728,
- 1923, 1947, 2725, 1954, 324, 1978, 2002, 2009, 2033, 2716,
- 2715, 2041, 452, 2700, 2082, 488, 2699, 2698, 2697, 2696,
- 2123, 489, 2694, 874, 894, 2164, 2693, 2188, 493, 2692,
+ 2849, 2843, 2824, 2818, 2816, 2821, 2826, 2824, 1502, 1526,
+ 404, 1567, 2847, 2846, 614, 1591, 1615, 1622, 1646, 2822,
+ 1653, 1677, 1700, 2821, 2820, 2819, 1723, 1108, 1747, 1770,
+ 2818, 0, 1235, 0, 442, 2816, 1242, 1794, 1817, 2815,
+ 0, 739, 766, 2822, 466, 786, 817, 1841, 2799, 1865,
+ 433, 2798, 2805, 510, 2769, 2774, 2770, 0, 0, 2775,
+ 2777, 2748, 2748, 2760, 2743, 2742, 2748, 2740, 2741, 2738,
+ 2737, 0, 2728, 2722, 0, 0, 0, 2735, 2730, 2735,
+ 2722, 0, 0, 0, 2711, 0, 0, 0, 2700, 1905,
+ 2735, 1928, 1952, 2733, 1959, 358, 1983, 2007, 2014, 2038,
- 2684, 1123, 1125, 2683, 2682, 1246, 1312, 2229, 2673, 2253,
- 494, 2672, 2677, 1326, 0, 1333, 0, 527, 2668, 1366,
- 2294, 2317, 2653, 0, 2340, 428, 79, 255, 237, 617,
- 546, 586, 2624, 362, 522, 547, 379, 2623, 2622, 1124,
- 2621, 2619, 1242, 849, 473, 2618, 2617, 2378, 2415, 2451,
- 2487, 546, 2511, 588, 2519, 2543, 2629, 2550, 2574, 2597,
- 2628, 2621, 2644, 2627, 2626, 2624, 2667, 1373, 2691, 2714,
- 2622, 0, 1431, 0, 675, 2606, 1438, 2738, 2761, 2605,
- 0, 1544, 0, 1551, 0, 676, 2604, 1883, 2785, 2808,
- 2603, 0, 637, 1890, 2610, 1381, 1446, 2608, 2607, 1466,
+ 2724, 2722, 2046, 457, 2721, 2087, 493, 2720, 2705, 2704,
+ 2703, 2128, 494, 2702, 879, 899, 2169, 2701, 2193, 523,
+ 2699, 2706, 1128, 1130, 2705, 2689, 1251, 1317, 2234, 2680,
+ 2258, 524, 2679, 2686, 1331, 0, 1338, 0, 467, 2677,
+ 1371, 2299, 2322, 2674, 0, 2345, 354, 390, 534, 535,
+ 622, 276, 591, 2645, 241, 551, 433, 1129, 2630, 2629,
+ 1247, 2628, 2627, 1343, 854, 503, 2626, 2624, 2383, 2420,
+ 2456, 2492, 553, 2516, 650, 2524, 2548, 2651, 2555, 2579,
+ 2602, 2650, 2626, 2649, 2634, 2633, 2632, 2672, 1379, 2696,
+ 2719, 2631, 0, 1436, 0, 680, 2629, 1443, 2743, 2766,
- 1497, 2832, 2598, 2856, 638, 2582, 2589, 567, 682, 591,
- 612, 763, 1246, 2051, 1383, 628, 803, 805, 2078, 683,
- 829, 761, 828, 2076, 2080, 2898, 830, 2921, 892, 2944,
- 2109, 2968, 2992, 2580, 2579, 3000, 737, 2577, 3041, 873,
- 2576, 3082, 876, 2575, 2559, 2558, 2557, 3123, 897, 2556,
- 1559, 1689, 3164, 2555, 3188, 901, 2553, 2560, 1899, 2051,
- 2559, 2558, 2052, 2058, 3229, 2528, 3253, 924, 2527, 2534,
- 925, 2146, 2533, 2118, 2119, 2532, 2530, 2120, 2140, 3294,
- 2521, 3318, 926, 2520, 2527, 0, 2211, 0, 2218, 0,
- 732, 2496, 2276, 3359, 3382, 2495, 0, 918, 970, 971,
+ 2627, 0, 1549, 0, 1556, 0, 681, 2611, 1888, 2790,
+ 2813, 2610, 0, 555, 1895, 2617, 1451, 1471, 2616, 2615,
+ 1502, 1564, 2837, 2605, 2861, 615, 2604, 2611, 617, 688,
+ 634, 768, 1251, 1388, 2056, 1453, 808, 834, 898, 2083,
+ 766, 923, 810, 833, 2081, 2085, 2903, 835, 2926, 921,
+ 2949, 2114, 2973, 2997, 2587, 2586, 3005, 642, 2585, 3046,
+ 643, 2584, 3087, 671, 2582, 2581, 2580, 2564, 3128, 742,
+ 2563, 1694, 1904, 3169, 2562, 3193, 902, 2561, 2568, 2056,
+ 2057, 2566, 2565, 2063, 2123, 3234, 2556, 3258, 930, 2555,
+ 2541, 931, 2151, 2540, 2124, 2125, 2539, 2538, 2145, 2166,
- 972, 1899, 996, 1448, 1017, 1018, 2271, 1042, 1561, 1043,
- 3407, 3430, 3454, 998, 3494, 3518, 3542, 2494, 3549, 3573,
- 3596, 2493, 3620, 3643, 2492, 3667, 3690, 2490, 2489, 2488,
- 3713, 2363, 3737, 3760, 2487, 0, 2401, 0, 1011, 2440,
- 2438, 3784, 3807, 2439, 0, 2458, 0, 2465, 0, 1058,
- 2438, 2472, 3831, 3854, 2424, 0, 0, 2479, 0, 2879,
- 0, 1082, 2423, 2886, 3878, 3901, 2422, 0, 0, 1049,
- 3023, 2429, 2161, 2226, 2378, 2351, 2290, 2291, 3925, 2342,
- 3949, 1072, 2341, 2348, 2293, 2354, 2355, 2122, 1123, 2228,
- 2356, 1066, 2357, 1198, 1121, 1145, 1199, 3991, 4015, 4024,
+ 3299, 2529, 3323, 954, 2527, 2534, 0, 2216, 0, 2223,
+ 0, 737, 2525, 2281, 3364, 3387, 2524, 0, 897, 975,
+ 976, 1000, 1904, 1001, 1566, 1022, 1046, 2276, 1047, 2105,
+ 1048, 3412, 3435, 3459, 1029, 3499, 3523, 3547, 2501, 3554,
+ 3578, 3601, 2500, 3625, 3648, 2499, 3672, 3695, 2498, 2497,
+ 2495, 3718, 2368, 3742, 3765, 2494, 0, 2406, 0, 969,
+ 2493, 2443, 3789, 3812, 2492, 0, 2463, 0, 2470, 0,
+ 1016, 2445, 2477, 3836, 3859, 2443, 0, 0, 2484, 0,
+ 2884, 0, 1087, 2429, 2891, 3883, 3906, 2428, 0, 0,
+ 1077, 3028, 2434, 2231, 2295, 2431, 2397, 2296, 2316, 3930,
- 1200, 2326, 2325, 4042, 1102, 2324, 4083, 1105, 2320, 4124,
- 1152, 2319, 4165, 1153, 2318, 2303, 2301, 4205, 4229, 1154,
- 2300, 2409, 2410, 4270, 2281, 4294, 1182, 2278, 2285, 2591,
- 2638, 2284, 2268, 2894, 2895, 4335, 2256, 4359, 1241, 2254,
- 2244, 1243, 3030, 2243, 2898, 3038, 2242, 2239, 3051, 3057,
- 4400, 2230, 4424, 1244, 2197, 2204, 0, 1247, 3105, 2203,
- 3058, 3079, 2199, 2198, 3099, 3118, 4465, 2170, 4489, 1271,
- 2169, 2174, 0, 3146, 0, 3211, 0, 1161, 2154, 3218,
- 4530, 4553, 2149, 0, 3263, 3264, 3328, 1201, 2394, 2100,
- 1402, 2395, 2270, 1464, 1488, 1342, 4578, 4602, 4611, 2130,
+ 2375, 3954, 1080, 2347, 2354, 2359, 2360, 2361, 2127, 1128,
+ 2233, 2298, 1071, 2362, 1203, 1072, 1126, 1150, 3996, 4020,
+ 4029, 1204, 2345, 2331, 4047, 1107, 2330, 4088, 1110, 2329,
+ 4129, 1157, 2325, 4170, 1158, 2324, 2306, 2305, 4210, 4234,
+ 1159, 2286, 2414, 2415, 4275, 2283, 4299, 1182, 2282, 2289,
+ 2596, 2643, 2273, 2269, 2899, 2900, 4340, 2259, 4364, 1187,
+ 2241, 2248, 1246, 3035, 2247, 2903, 3043, 2244, 2243, 3056,
+ 3062, 4405, 2202, 4429, 1248, 2201, 2208, 0, 1249, 3110,
+ 2204, 3063, 3084, 2203, 2183, 3104, 3123, 4470, 2174, 4494,
+ 1252, 2171, 2167, 0, 3151, 0, 3216, 0, 1166, 2154,
- 4628, 4652, 4675, 2100, 4699, 4722, 2070, 4746, 4769, 2068,
- 4793, 4816, 2065, 2063, 4840, 1384, 2062, 2061, 3281, 4881,
- 2059, 2049, 0, 3345, 0, 1530, 2046, 3477, 4905, 2018,
- 2016, 0, 3484, 0, 3972, 0, 1571, 2015, 3979, 4929,
- 2014, 2011, 0, 0, 4031, 0, 4065, 0, 1594, 1981,
- 4072, 4953, 1980, 1906, 0, 0, 4106, 0, 4113, 0,
- 1595, 1863, 4147, 4977, 1844, 1819, 0, 0, 1385, 4154,
- 1822, 3120, 3140, 1806, 1802, 3159, 3161, 5001, 1771, 5025,
- 1448, 1770, 1756, 1490, 1664, 1665, 1515, 1666, 1736, 4163,
- 1687, 1711, 2396, 5067, 1747, 5084, 5108, 1556, 1725, 5149,
+ 3223, 4535, 4558, 2135, 0, 3268, 3269, 3333, 1206, 2399,
+ 2363, 1407, 3252, 2275, 1469, 1493, 1347, 4583, 4607, 4616,
+ 2105, 4633, 4657, 4680, 2075, 4704, 4727, 2073, 4751, 4774,
+ 2070, 4798, 4821, 2068, 2067, 4845, 1276, 2066, 2064, 3286,
+ 4886, 2054, 2051, 0, 3350, 0, 1535, 2023, 3482, 4910,
+ 2021, 2020, 0, 3489, 0, 3977, 0, 1576, 2019, 3984,
+ 4934, 2017, 2016, 0, 0, 4036, 0, 4070, 0, 1599,
+ 2015, 4077, 4958, 1991, 1989, 0, 0, 4111, 0, 4118,
+ 0, 1630, 1986, 4152, 4982, 1985, 1911, 0, 0, 1386,
+ 4159, 1876, 3125, 3145, 1857, 1832, 3164, 3166, 5006, 1819,
- 1561, 1724, 5190, 1586, 1723, 5231, 1616, 1719, 5272, 1617,
- 1704, 1700, 4191, 5313, 1626, 1620, 0, 1619, 3226, 3264,
- 5337, 1617, 1569, 1576, 3289, 3328, 1572, 1536, 3355, 3376,
- 5361, 1521, 1505, 1512, 1618, 4252, 1508, 3407, 3493, 1483,
- 1464, 3590, 3637, 5385, 1451, 1450, 1418, 0, 1619, 4259,
- 1397, 3684, 4175, 1394, 1393, 4176, 4200, 5409, 1352, 1350,
- 1356, 0, 1647, 4317, 1354, 4204, 4267, 1353, 1319, 4311,
- 4330, 5433, 1310, 1309, 1315, 0, 4382, 0, 4389, 0,
- 1751, 1305, 4447, 5457, 0, 1271, 0, 1735, 1758, 1759,
- 1781, 1782, 1969, 4483, 4499, 5481, 1648, 0, 1254, 5522,
+ 5030, 1389, 1803, 1807, 1495, 1669, 1670, 1520, 1671, 1741,
+ 4168, 1692, 1716, 2401, 5072, 1776, 5089, 5113, 1390, 1775,
+ 5154, 1453, 1753, 5195, 1561, 1752, 5236, 1566, 1730, 5277,
+ 1568, 1729, 1728, 4196, 5318, 1724, 1709, 0, 1708, 3231,
+ 3294, 5342, 1705, 1631, 1633, 3333, 3360, 1632, 1602, 3381,
+ 3412, 5366, 1573, 1569, 1541, 1591, 4257, 1534, 3498, 3595,
+ 1518, 1517, 3642, 3689, 5390, 1505, 1480, 1469, 0, 1621,
+ 4264, 1464, 4180, 4181, 1463, 1423, 4205, 4209, 5414, 1394,
+ 1391, 1398, 0, 1622, 4322, 1363, 4272, 4316, 1361, 1359,
+ 4335, 4337, 5438, 1350, 1316, 1323, 0, 4387, 0, 4394,
- 0, 1248, 5546, 0, 1216, 5570, 0, 1212, 5594, 0,
- 1183, 5618, 0, 1109, 4332, 4397, 5642, 1107, 1103, 1076,
- 1064, 1028, 4454, 0, 1821, 1007, 983, 4516, 0, 4618,
- 0, 1845, 964, 960, 0, 4863, 0, 4870, 0, 1869,
- 955, 925, 0, 5048, 0, 5055, 0, 1909, 924, 902,
- 0, 5074, 0, 5131, 0, 1932, 885, 80, 0, 1671,
- 5138, 180, 4462, 4526, 187, 225, 4547, 4627, 5666, 280,
- 0, 301, 2358, 1783, 1806, 1829, 5690, 299, 340, 0,
- 0, 0, 0, 0, 0, 5172, 0, 1962, 431, 496,
- 0, 4669, 4716, 511, 532, 0, 1811, 5179, 559, 4763,
+ 0, 1756, 1314, 4452, 5462, 0, 1312, 0, 1740, 1763,
+ 1764, 1786, 1787, 1974, 4488, 4504, 5486, 1623, 0, 1310,
+ 5527, 0, 1276, 5551, 0, 1259, 5575, 0, 1253, 5599,
+ 0, 1221, 5623, 0, 1217, 4402, 4446, 5647, 1196, 1114,
+ 1108, 88, 138, 4460, 0, 1826, 214, 229, 4521, 0,
+ 4623, 0, 1850, 322, 345, 0, 4868, 0, 4875, 0,
+ 1874, 416, 460, 0, 5053, 0, 5060, 0, 1914, 501,
+ 508, 0, 5079, 0, 5136, 0, 1937, 524, 580, 0,
+ 1650, 5143, 589, 4531, 4552, 610, 611, 4632, 4674, 5671,
+ 605, 0, 632, 2418, 1788, 1811, 1834, 5695, 627, 696,
- 4810, 563, 605, 0, 0, 1833, 5213, 606, 4878, 5083,
- 628, 630, 0, 0, 1835, 5220, 680, 5228, 5241, 702,
- 704, 0, 0, 1836, 5255, 705, 5269, 5282, 707, 708,
- 0, 0, 5296, 0, 5504, 0, 1963, 728, 0, 3078,
- 2959, 2156, 1916, 0, 7396, 0, 0, 0, 0, 0,
- 0, 5310, 5498, 739, 773, 0, 7396, 5512, 0, 7396,
- 0, 5713, 0, 7396, 0, 5720, 0, 7396, 0, 5727,
- 0, 7396, 0, 5734, 0, 7396, 0, 1894, 5741, 779,
- 5749, 5750, 796, 2017, 0, 1970, 3336, 2057, 0, 5750,
- 0, 1896, 5764, 798, 0, 1897, 5771, 800, 0, 1924,
+ 0, 0, 0, 0, 0, 0, 5177, 0, 1967, 698,
+ 699, 0, 4721, 4768, 709, 710, 0, 1652, 5184, 713,
+ 4815, 4883, 741, 744, 0, 0, 1653, 5218, 778, 5088,
+ 5192, 801, 803, 0, 0, 1816, 5259, 805, 5212, 5231,
+ 808, 828, 0, 0, 1838, 5300, 849, 5233, 5253, 856,
+ 858, 0, 0, 5307, 0, 5509, 0, 1968, 883, 0,
+ 3083, 2964, 2161, 1921, 0, 7401, 0, 0, 0, 0,
+ 0, 0, 5315, 5503, 892, 895, 0, 7401, 5517, 0,
+ 7401, 0, 5718, 0, 7401, 0, 5725, 0, 7401, 0,
+ 5732, 0, 7401, 0, 5739, 0, 7401, 0, 1840, 5746,
- 5778, 803, 0, 1951, 5790, 844, 0, 1953, 5797, 851,
- 0, 5804, 0, 7396, 2180, 1978, 5811, 853, 0, 0,
- 0, 0, 0, 0, 1980, 5818, 886, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 7396, 5836, 5844, 5848,
- 5851, 5854, 5857, 5860, 5863, 5866, 5869, 5872, 5875, 5878,
- 5881, 5884, 5887, 5890, 5893, 5896, 5900, 5904, 5907, 5910,
- 5913, 5916, 5919, 5922, 5925, 5928, 5932, 5936, 5939, 5942,
- 5946, 5948, 5951, 5954, 5957, 5960, 5963, 5966, 5969, 5972,
- 5976, 5978, 5981, 5985, 5990, 5994, 5997, 6001, 6004, 6007,
- 6010, 6013, 6016, 6019, 6022, 6026, 6030, 6033, 6037, 6041,
+ 898, 5754, 5755, 937, 2022, 0, 1975, 3341, 2062, 0,
+ 5755, 0, 1841, 5769, 946, 0, 1899, 5776, 973, 0,
+ 1901, 5783, 976, 0, 1902, 5795, 996, 0, 1929, 5802,
+ 1020, 0, 5809, 0, 7401, 2185, 1956, 5816, 1040, 0,
+ 0, 0, 0, 0, 0, 1958, 5823, 1041, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 7401, 5841, 5849,
+ 5853, 5856, 5859, 5862, 5865, 5868, 5871, 5874, 5877, 5880,
+ 5883, 5886, 5889, 5892, 5895, 5898, 5901, 5905, 5909, 5912,
+ 5915, 5918, 5921, 5924, 5927, 5930, 5933, 5937, 5941, 5944,
+ 5947, 5951, 5953, 5956, 5959, 5962, 5965, 5968, 5971, 5974,
- 6046, 6050, 6052, 6056, 6059, 6063, 6066, 6069, 6073, 6075,
- 6078, 6081, 6084, 6087, 6090, 6093, 6096, 6099, 6102, 6106,
- 6108, 6111, 6114, 6117, 6121, 6123, 6126, 6129, 6134, 6138,
- 6143, 6147, 6149, 6153, 6156, 6160, 6165, 6169, 6172, 6175,
- 6178, 6181, 6184, 6187, 6190, 6194, 6198, 6201, 6205, 6209,
- 6214, 6218, 6220, 6224, 6227, 6231, 6234, 6239, 6243, 6248,
- 6252, 6254, 6258, 6261, 6265, 6268, 6271, 6274, 6278, 6280,
- 6283, 6288, 6292, 6295, 6298, 6301, 6304, 6307, 6310, 6313,
- 6316, 6320, 6322, 6325, 6328, 6331, 6335, 6337, 6340, 6343,
- 6346, 6349, 6353, 6355, 6358, 6361, 6364, 6369, 6373, 6378,
+ 5977, 5981, 5983, 5986, 5990, 5995, 5999, 6002, 6006, 6009,
+ 6012, 6015, 6018, 6021, 6024, 6027, 6031, 6035, 6038, 6042,
+ 6046, 6051, 6055, 6057, 6061, 6064, 6068, 6071, 6074, 6078,
+ 6080, 6083, 6086, 6089, 6092, 6095, 6098, 6101, 6104, 6107,
+ 6111, 6113, 6116, 6119, 6122, 6126, 6128, 6131, 6134, 6139,
+ 6143, 6148, 6152, 6154, 6158, 6161, 6165, 6170, 6174, 6177,
+ 6180, 6183, 6186, 6189, 6192, 6195, 6199, 6203, 6206, 6210,
+ 6214, 6219, 6223, 6225, 6229, 6232, 6236, 6239, 6244, 6248,
+ 6253, 6257, 6259, 6263, 6266, 6270, 6273, 6276, 6279, 6283,
+ 6285, 6288, 6293, 6297, 6300, 6303, 6306, 6309, 6312, 6315,
- 6382, 6384, 6388, 6391, 6395, 6400, 6404, 6407, 6410, 6413,
- 6416, 6419, 6422, 6425, 6429, 6433, 6436, 6440, 6444, 6449,
- 6453, 6455, 6459, 6462, 6466, 6469, 6474, 6478, 6483, 6487,
- 6489, 6493, 6496, 6500, 6503, 6506, 6511, 6515, 6520, 6524,
- 6526, 6530, 6533, 6537, 6540, 6543, 6546, 6550, 6552, 6555,
- 6560, 6564, 6567, 6570, 6573, 6576, 6579, 6582, 6585, 6588,
- 6591, 6594, 6597, 6601, 6603, 6606, 6609, 6612, 6615, 6619,
- 6621, 6624, 6627, 6630, 6633, 6636, 6640, 6642, 6645, 6648,
- 6651, 6654, 6657, 6661, 6663, 6666, 6669, 6672, 6675, 6680,
- 6684, 6689, 6693, 6695, 6699, 6702, 6706, 6711, 6715, 6718,
+ 6318, 6321, 6325, 6327, 6330, 6333, 6336, 6340, 6342, 6345,
+ 6348, 6351, 6354, 6358, 6360, 6363, 6366, 6369, 6374, 6378,
+ 6383, 6387, 6389, 6393, 6396, 6400, 6405, 6409, 6412, 6415,
+ 6418, 6421, 6424, 6427, 6430, 6434, 6438, 6441, 6445, 6449,
+ 6454, 6458, 6460, 6464, 6467, 6471, 6474, 6479, 6483, 6488,
+ 6492, 6494, 6498, 6501, 6505, 6508, 6511, 6516, 6520, 6525,
+ 6529, 6531, 6535, 6538, 6542, 6545, 6548, 6551, 6555, 6557,
+ 6560, 6565, 6569, 6572, 6575, 6578, 6581, 6584, 6587, 6590,
+ 6593, 6596, 6599, 6602, 6606, 6608, 6611, 6614, 6617, 6620,
+ 6624, 6626, 6629, 6632, 6635, 6638, 6641, 6645, 6647, 6650,
- 6721, 6724, 6727, 6730, 6733, 6736, 6739, 6742, 6746, 6750,
- 6753, 6757, 6761, 6766, 6770, 6772, 6776, 6779, 6783, 6786,
- 6791, 6795, 6800, 6804, 6806, 6810, 6813, 6817, 6820, 6823,
- 6828, 6832, 6837, 6841, 6843, 6847, 6850, 6854, 6857, 6860,
- 6865, 6869, 6874, 6878, 6880, 6884, 6887, 6891, 6894, 6897,
- 6900, 6904, 6906, 6909, 6912, 6917, 6921, 6924, 6927, 6930,
- 6933, 6936, 6939, 6942, 6945, 6948, 6951, 6954, 6958, 6962,
- 6965, 6968, 6972, 6975, 6978, 6982, 6984, 6987, 6990, 6994,
- 6996, 6999, 7002, 7005, 7009, 7011, 7014, 7017, 7020, 7024,
- 7026, 7029, 7032, 7035, 7039, 7041, 7044, 7047, 7052, 7056,
+ 6653, 6656, 6659, 6662, 6666, 6668, 6671, 6674, 6677, 6680,
+ 6685, 6689, 6694, 6698, 6700, 6704, 6707, 6711, 6716, 6720,
+ 6723, 6726, 6729, 6732, 6735, 6738, 6741, 6744, 6747, 6751,
+ 6755, 6758, 6762, 6766, 6771, 6775, 6777, 6781, 6784, 6788,
+ 6791, 6796, 6800, 6805, 6809, 6811, 6815, 6818, 6822, 6825,
+ 6828, 6833, 6837, 6842, 6846, 6848, 6852, 6855, 6859, 6862,
+ 6865, 6870, 6874, 6879, 6883, 6885, 6889, 6892, 6896, 6899,
+ 6902, 6905, 6909, 6911, 6914, 6917, 6922, 6926, 6929, 6932,
+ 6935, 6938, 6941, 6944, 6947, 6950, 6953, 6956, 6959, 6963,
+ 6967, 6970, 6973, 6977, 6980, 6983, 6987, 6989, 6992, 6995,
- 7061, 7065, 7067, 7071, 7074, 7078, 7083, 7087, 7090, 7093,
- 7096, 7099, 7102, 7105, 7108, 7111, 7115, 7117, 7120, 7124,
- 7129, 7133, 7134, 7137, 7142, 7146, 7151, 7155, 7156, 7159,
- 7162, 7167, 7171, 7176, 7180, 7181, 7184, 7187, 7192, 7196,
- 7201, 7205, 7206, 7209, 7212, 7217, 7221, 7226, 7230, 7231,
- 7234, 7237, 7240, 7244, 7246, 7251, 7255, 7258, 7261, 7264,
- 7267, 7270, 7273, 7277, 7282, 7286, 7287, 7290, 7293, 7296,
- 7299, 7302, 7305, 7308, 7311, 7314, 7317, 7322, 7326, 7329,
- 7332, 7335, 7339, 7343, 7347, 7351, 7355, 7358, 7361, 7365,
- 7368, 7371, 7374, 7377, 7380, 7384, 7387
+ 6999, 7001, 7004, 7007, 7010, 7014, 7016, 7019, 7022, 7025,
+ 7029, 7031, 7034, 7037, 7040, 7044, 7046, 7049, 7052, 7057,
+ 7061, 7066, 7070, 7072, 7076, 7079, 7083, 7088, 7092, 7095,
+ 7098, 7101, 7104, 7107, 7110, 7113, 7116, 7120, 7122, 7125,
+ 7129, 7134, 7138, 7139, 7142, 7147, 7151, 7156, 7160, 7161,
+ 7164, 7167, 7172, 7176, 7181, 7185, 7186, 7189, 7192, 7197,
+ 7201, 7206, 7210, 7211, 7214, 7217, 7222, 7226, 7231, 7235,
+ 7236, 7239, 7242, 7245, 7249, 7251, 7256, 7260, 7263, 7266,
+ 7269, 7272, 7275, 7278, 7282, 7287, 7291, 7292, 7295, 7298,
+ 7301, 7304, 7307, 7310, 7313, 7316, 7319, 7322, 7327, 7331,
+ 7334, 7337, 7340, 7344, 7348, 7352, 7356, 7360, 7363, 7366,
+ 7370, 7373, 7376, 7379, 7382, 7385, 7389, 7392
} ;
-static yyconst flex_int16_t yy_def[1898] =
+static yyconst flex_int16_t yy_def[1919] =
{ 0,
- 1437, 1, 1437, 1437, 1437, 1437, 1437, 1437, 1438, 1437,
- 1437, 1437, 1437, 1437, 14, 1437, 1437, 1437, 1437, 14,
- 20, 1439, 20, 20, 20, 20, 20, 20, 21, 21,
+ 1458, 1, 1458, 1458, 1458, 1458, 1458, 1458, 1459, 1458,
+ 1458, 1458, 1458, 1458, 14, 1458, 1458, 1458, 1458, 14,
+ 20, 1460, 20, 20, 20, 20, 20, 20, 21, 21,
21, 21, 21, 21, 21, 21, 21, 21, 21, 21,
- 21, 21, 1437, 1437, 1437, 1440, 1437, 21, 21, 20,
- 1441, 50, 21, 21, 21, 1437, 1437, 1437, 1437, 1437,
- 1437, 49, 1439, 1439, 52, 52, 52, 21, 21, 21,
+ 21, 21, 1458, 1458, 1458, 1461, 1458, 21, 21, 20,
+ 1462, 50, 21, 21, 21, 1458, 1458, 1458, 1458, 1458,
+ 1458, 49, 1460, 1460, 52, 52, 52, 21, 21, 21,
21, 52, 21, 21, 52, 21, 21, 21, 52, 21,
21, 21, 21, 21, 52, 21, 21, 21, 21, 21,
21, 21, 21, 21, 21, 21, 21, 21, 21, 21,
@@ -838,203 +842,205 @@
21, 21, 21, 21, 21, 21, 21, 21, 21, 21,
21, 21, 21, 21, 21, 21, 21, 21, 21, 21,
21, 21, 21, 21, 21, 21, 21, 21, 21, 21,
- 21, 21, 21, 21, 1437, 1437, 21, 21, 148, 21,
- 21, 151, 1442, 1437, 54, 1437, 156, 1443, 21, 21,
- 152, 21, 21, 21, 152, 21, 21, 21, 21, 21,
- 21, 152, 21, 21, 21, 21, 21, 21, 21, 152,
+ 21, 21, 21, 21, 21, 21, 21, 21, 21, 1458,
+ 1458, 21, 21, 153, 21, 21, 156, 1463, 1458, 54,
+ 1458, 161, 1464, 21, 21, 157, 21, 21, 21, 157,
+ 21, 21, 21, 21, 21, 21, 157, 21, 21, 21,
+ 21, 21, 21, 21, 157, 21, 21, 21, 21, 21,
21, 21, 21, 21, 21, 21, 21, 21, 21, 21,
- 21, 21, 21, 21, 21, 21, 21, 21, 21, 21,
21, 21, 21, 21, 21, 21, 21, 21, 21, 21,
21, 21, 21, 21, 21, 21, 21, 21, 21, 21,
21, 21, 21, 21, 21, 21, 21, 21, 21, 21,
21, 21, 21, 21, 21, 21, 21, 21, 21, 21,
21, 21, 21, 21, 21, 21, 21, 21, 21, 21,
- 21, 248, 249, 152, 1444, 254, 1445, 1446, 1437, 259,
- 1447, 1448, 1437, 1437, 1437, 1449, 1450, 21, 21, 21,
21, 21, 21, 21, 21, 21, 21, 21, 21, 21,
+ 21, 21, 21, 260, 261, 157, 1465, 266, 1466, 1467,
+ 1458, 271, 1468, 1469, 1458, 1458, 1458, 1470, 1471, 21,
21, 21, 21, 21, 21, 21, 21, 21, 21, 21,
21, 21, 21, 21, 21, 21, 21, 21, 21, 21,
21, 21, 21, 21, 21, 21, 21, 21, 21, 21,
21, 21, 21, 21, 21, 21, 21, 21, 21, 21,
- 21, 21, 21, 21, 21, 21, 21, 21, 328, 21,
- 249, 251, 249, 251, 251, 335, 1451, 1437, 334, 1452,
- 1453, 1437, 1437, 1437, 1437, 1454, 1455, 1456, 1457, 1457,
- 1437, 1458, 1437, 353, 1459, 1450, 21, 21, 21, 21,
21, 21, 21, 21, 21, 21, 21, 21, 21, 21,
21, 21, 21, 21, 21, 21, 21, 21, 21, 21,
+ 21, 21, 21, 21, 21, 21, 21, 347, 21, 261,
+ 263, 261, 263, 263, 354, 1472, 1458, 353, 1473, 1474,
+ 1458, 1458, 1458, 1458, 1475, 1476, 1477, 1478, 1478, 1458,
+ 1479, 1458, 372, 1480, 1471, 21, 21, 21, 21, 21,
21, 21, 21, 21, 21, 21, 21, 21, 21, 21,
21, 21, 21, 21, 21, 21, 21, 21, 21, 21,
- 21, 21, 21, 21, 21, 21, 21, 21, 405, 406,
- 406, 411, 405, 335, 414, 1460, 1461, 1437, 418, 1462,
- 1437, 1463, 1464, 1437, 424, 1465, 1466, 1467, 1467, 1437,
- 1468, 1437, 432, 1469, 1455, 1437, 1437, 1470, 1471, 1437,
- 1437, 1437, 1437, 1472, 1473, 21, 21, 21, 21, 21,
21, 21, 21, 21, 21, 21, 21, 21, 21, 21,
21, 21, 21, 21, 21, 21, 21, 21, 21, 21,
+ 21, 21, 21, 21, 21, 21, 21, 21, 21, 426,
+ 427, 427, 432, 426, 354, 435, 1481, 1482, 1458, 439,
+ 1483, 1458, 1484, 1485, 1458, 445, 1486, 1487, 1488, 1488,
+ 1458, 1489, 1458, 453, 1490, 1476, 1458, 1458, 1491, 1492,
+ 1458, 1458, 1458, 1458, 1493, 1494, 21, 21, 21, 21,
21, 21, 21, 21, 21, 21, 21, 21, 21, 21,
- 21, 21, 21, 21, 21, 21, 21, 21, 21, 489,
- 21, 406, 408, 406, 406, 495, 414, 497, 1474, 1437,
+ 21, 21, 21, 21, 21, 21, 21, 21, 21, 21,
+ 21, 21, 21, 21, 21, 21, 21, 21, 21, 21,
- 1437, 1437, 1475, 1476, 1477, 1437, 1437, 1437, 1437, 1478,
- 1479, 1437, 1480, 1481, 1437, 1437, 1437, 1437, 1482, 1483,
- 1484, 1484, 1470, 1471, 1485, 1485, 1437, 1486, 1437, 529,
- 1487, 1488, 21, 21, 21, 21, 21, 21, 21, 21,
21, 21, 21, 21, 21, 21, 21, 21, 21, 21,
+ 510, 21, 427, 429, 427, 427, 516, 435, 518, 1495,
+ 1458, 1458, 1458, 1496, 1497, 1498, 1458, 1458, 1458, 1458,
+ 1499, 1500, 1458, 1501, 1502, 1458, 1458, 1458, 1458, 1503,
+ 1504, 1505, 1505, 1491, 1492, 1506, 1506, 1458, 1507, 1458,
+ 550, 1508, 1509, 21, 21, 21, 21, 21, 21, 21,
21, 21, 21, 21, 21, 21, 21, 21, 21, 21,
21, 21, 21, 21, 21, 21, 21, 21, 21, 21,
- 21, 21, 21, 21, 572, 572, 576, 497, 578, 1489,
- 1490, 1437, 582, 1491, 1437, 585, 1492, 1437, 1493, 1494,
- 1437, 591, 1495, 1496, 1496, 1437, 1497, 1437, 598, 1498,
+ 21, 21, 21, 21, 21, 21, 21, 21, 21, 21,
+ 21, 21, 21, 21, 21, 593, 593, 597, 518, 599,
- 1499, 1500, 1500, 1501, 1502, 1503, 1503, 1437, 1504, 1437,
- 610, 1505, 1506, 1437, 1507, 1437, 1508, 1509, 1437, 1437,
- 1437, 1437, 1510, 1511, 579, 625, 625, 625, 625, 625,
- 625, 625, 625, 625, 625, 625, 625, 625, 625, 625,
- 625, 625, 625, 625, 625, 625, 625, 625, 625, 625,
- 650, 650, 650, 625, 650, 655, 1512, 1437, 1437, 1437,
- 1513, 1437, 1437, 1514, 1515, 1516, 1437, 1437, 1437, 1437,
- 1517, 1518, 1437, 1519, 1520, 1437, 1437, 1437, 1437, 1521,
- 1522, 1437, 1523, 1437, 1524, 1525, 1437, 1437, 1437, 1437,
- 1526, 1527, 1528, 1437, 1529, 1530, 1530, 1531, 1532, 1533,
+ 1510, 1511, 1458, 603, 1512, 1458, 606, 1513, 1458, 1514,
+ 1515, 1458, 612, 1516, 1517, 1517, 1458, 1518, 1458, 619,
+ 1519, 1520, 1521, 1521, 1522, 1523, 1524, 1524, 1458, 1525,
+ 1458, 631, 1526, 1527, 1458, 1528, 1458, 1529, 1530, 1458,
+ 1458, 1458, 1458, 1531, 1532, 600, 646, 646, 646, 646,
+ 646, 646, 646, 646, 646, 646, 646, 646, 646, 646,
+ 646, 646, 646, 646, 646, 646, 646, 646, 646, 646,
+ 646, 671, 671, 671, 646, 671, 676, 1533, 1458, 1458,
+ 1458, 1534, 1458, 1458, 1535, 1536, 1537, 1458, 1458, 1458,
+ 1458, 1538, 1539, 1458, 1540, 1541, 1458, 1458, 1458, 1458,
- 1533, 1437, 1534, 1437, 704, 1535, 1536, 1537, 1537, 1537,
- 1537, 1537, 1537, 1537, 1537, 1537, 1537, 1537, 1537, 1537,
- 1537, 1537, 1537, 1537, 1537, 1537, 1537, 726, 1537, 726,
- 730, 730, 732, 1538, 1539, 1437, 736, 1540, 1437, 739,
- 1541, 1437, 742, 1542, 1437, 1543, 1544, 1437, 748, 1545,
- 1546, 1546, 1437, 1547, 1437, 755, 1548, 1549, 1550, 1550,
- 1551, 1552, 1553, 1553, 1437, 1554, 1437, 767, 1555, 1556,
- 1557, 1437, 1558, 1559, 1559, 1560, 1561, 1562, 1562, 1437,
- 1563, 1437, 782, 1564, 1565, 1566, 1437, 1567, 1437, 1568,
- 1569, 1437, 1437, 1437, 1437, 1570, 1571, 1572, 1572, 1572,
+ 1542, 1543, 1458, 1544, 1458, 1545, 1546, 1458, 1458, 1458,
+ 1458, 1547, 1548, 1549, 1458, 1550, 1551, 1551, 1552, 1553,
+ 1554, 1554, 1458, 1555, 1458, 725, 1556, 1557, 1558, 1558,
+ 1558, 1558, 1558, 1558, 1558, 1558, 1558, 1558, 1558, 1558,
+ 1558, 1558, 1558, 1558, 1558, 1558, 1558, 1558, 747, 1558,
+ 747, 751, 751, 753, 1559, 1560, 1458, 757, 1561, 1458,
+ 760, 1562, 1458, 763, 1563, 1458, 1564, 1565, 1458, 769,
+ 1566, 1567, 1567, 1458, 1568, 1458, 776, 1569, 1570, 1571,
+ 1571, 1572, 1573, 1574, 1574, 1458, 1575, 1458, 788, 1576,
+ 1577, 1578, 1458, 1579, 1580, 1580, 1581, 1582, 1583, 1583,
- 1572, 1572, 1572, 1572, 1572, 1572, 1572, 1572, 1572, 1572,
- 1572, 811, 811, 813, 811, 811, 816, 1573, 1437, 1437,
- 1437, 1574, 1437, 1437, 1575, 1437, 1437, 1576, 1577, 1578,
- 1437, 1437, 1437, 1437, 1579, 1580, 1437, 1581, 1582, 1437,
- 1437, 1437, 1437, 1583, 1584, 1437, 1585, 1437, 1586, 1587,
- 1437, 1437, 1437, 1437, 1588, 1589, 1590, 1437, 1591, 1437,
- 1592, 1593, 1437, 1437, 1437, 1437, 1594, 1595, 1596, 1597,
- 1437, 1598, 1599, 1599, 1600, 1601, 1602, 1602, 1437, 1603,
- 1437, 881, 1604, 1605, 1606, 1606, 1606, 1606, 1606, 1606,
- 1606, 1606, 1606, 1606, 1606, 1606, 1606, 1606, 898, 1606,
+ 1458, 1584, 1458, 803, 1585, 1586, 1587, 1458, 1588, 1458,
+ 1589, 1590, 1458, 1458, 1458, 1458, 1591, 1592, 1593, 1593,
+ 1593, 1593, 1593, 1593, 1593, 1593, 1593, 1593, 1593, 1593,
+ 1593, 1593, 832, 832, 834, 832, 832, 837, 1594, 1458,
+ 1458, 1458, 1595, 1458, 1458, 1596, 1458, 1458, 1597, 1598,
+ 1599, 1458, 1458, 1458, 1458, 1600, 1601, 1458, 1602, 1603,
+ 1458, 1458, 1458, 1458, 1604, 1605, 1458, 1606, 1458, 1607,
+ 1608, 1458, 1458, 1458, 1458, 1609, 1610, 1611, 1458, 1612,
+ 1458, 1613, 1614, 1458, 1458, 1458, 1458, 1615, 1616, 1617,
+ 1618, 1458, 1619, 1620, 1620, 1621, 1622, 1623, 1623, 1458,
- 1606, 1607, 1608, 1437, 904, 1609, 1437, 907, 1610, 1437,
- 910, 1611, 1437, 913, 1612, 1437, 1613, 1437, 1437, 919,
- 1614, 1615, 1615, 1437, 1616, 1437, 926, 1617, 1618, 1619,
- 1619, 1620, 1621, 1622, 1622, 1437, 1623, 1437, 938, 1624,
- 1625, 1626, 1437, 1627, 1628, 1628, 1629, 1630, 1631, 1631,
- 1437, 1632, 1437, 953, 1633, 1634, 1635, 1636, 1437, 1637,
- 1638, 1638, 1639, 1640, 1641, 1641, 1437, 1642, 1437, 969,
- 1643, 1644, 1645, 1437, 1646, 1437, 1647, 1648, 1437, 1437,
- 1437, 1437, 1649, 1650, 1651, 1651, 1651, 1651, 1651, 1651,
- 1651, 1651, 1651, 1651, 1651, 1651, 1651, 997, 1651, 1652,
+ 1624, 1458, 902, 1625, 1626, 1627, 1627, 1627, 1627, 1627,
+ 1627, 1627, 1627, 1627, 1627, 1627, 1627, 1627, 1627, 919,
+ 1627, 1627, 1628, 1629, 1458, 925, 1630, 1458, 928, 1631,
+ 1458, 931, 1632, 1458, 934, 1633, 1458, 1634, 1458, 1458,
+ 940, 1635, 1636, 1636, 1458, 1637, 1458, 947, 1638, 1639,
+ 1640, 1640, 1641, 1642, 1643, 1643, 1458, 1644, 1458, 959,
+ 1645, 1646, 1647, 1458, 1648, 1649, 1649, 1650, 1651, 1652,
+ 1652, 1458, 1653, 1458, 974, 1654, 1655, 1656, 1657, 1458,
+ 1658, 1659, 1659, 1660, 1661, 1662, 1662, 1458, 1663, 1458,
+ 990, 1664, 1665, 1666, 1458, 1667, 1458, 1668, 1669, 1458,
- 1437, 1437, 1437, 1653, 1437, 1437, 1654, 1437, 1437, 1655,
- 1437, 1437, 1656, 1657, 1437, 1015, 1658, 1659, 1437, 1437,
- 1660, 1661, 1662, 1437, 1663, 1664, 1437, 1437, 1437, 1665,
- 1666, 1667, 1437, 1668, 1437, 1669, 1670, 1437, 1437, 1437,
- 1671, 1672, 1673, 1674, 1437, 1675, 1437, 1676, 1677, 1437,
- 1437, 1437, 1678, 1679, 1680, 1681, 1437, 1682, 1437, 1683,
- 1684, 1437, 1437, 1437, 1685, 1686, 1687, 1688, 1689, 1437,
- 1690, 1691, 1691, 1692, 1693, 1694, 1694, 1437, 1695, 1437,
- 1080, 1696, 1697, 1698, 1698, 1698, 1698, 1698, 1698, 1698,
- 1698, 1698, 1698, 1698, 1699, 1437, 1437, 1097, 1700, 1437,
+ 1458, 1458, 1458, 1670, 1671, 1672, 1672, 1672, 1672, 1672,
+ 1672, 1672, 1672, 1672, 1672, 1672, 1672, 1672, 1018, 1672,
+ 1673, 1458, 1458, 1458, 1674, 1458, 1458, 1675, 1458, 1458,
+ 1676, 1458, 1458, 1677, 1678, 1458, 1036, 1679, 1680, 1458,
+ 1458, 1681, 1682, 1683, 1458, 1684, 1685, 1458, 1458, 1458,
+ 1686, 1687, 1688, 1458, 1689, 1458, 1690, 1691, 1458, 1458,
+ 1458, 1692, 1693, 1694, 1695, 1458, 1696, 1458, 1697, 1698,
+ 1458, 1458, 1458, 1699, 1700, 1701, 1702, 1458, 1703, 1458,
+ 1704, 1705, 1458, 1458, 1458, 1706, 1707, 1708, 1709, 1710,
+ 1458, 1711, 1712, 1712, 1713, 1714, 1715, 1715, 1458, 1716,
- 1100, 1701, 1437, 1103, 1702, 1437, 1106, 1703, 1437, 1109,
- 1704, 1437, 1437, 1437, 1705, 1706, 1707, 1708, 1709, 1709,
- 1437, 1710, 1711, 1712, 1713, 1713, 1714, 1715, 1716, 1716,
- 1437, 1717, 1718, 1719, 1720, 1437, 1721, 1722, 1722, 1723,
- 1724, 1725, 1725, 1437, 1726, 1727, 1728, 1729, 1730, 1437,
- 1731, 1732, 1732, 1733, 1734, 1735, 1735, 1437, 1736, 1737,
- 1738, 1739, 1740, 1437, 1741, 1742, 1742, 1743, 1744, 1745,
- 1745, 1437, 1746, 1747, 1748, 1749, 1437, 1750, 1437, 1751,
- 1752, 1437, 1437, 1437, 1753, 1754, 1755, 1756, 1756, 1756,
- 1756, 1756, 1756, 1756, 1756, 1437, 1196, 1757, 1758, 1437,
+ 1458, 1101, 1717, 1718, 1719, 1719, 1719, 1719, 1719, 1719,
+ 1719, 1719, 1719, 1719, 1719, 1720, 1458, 1458, 1118, 1721,
+ 1458, 1121, 1722, 1458, 1124, 1723, 1458, 1127, 1724, 1458,
+ 1130, 1725, 1458, 1458, 1458, 1726, 1727, 1728, 1729, 1730,
+ 1730, 1458, 1731, 1732, 1733, 1734, 1734, 1735, 1736, 1737,
+ 1737, 1458, 1738, 1739, 1740, 1741, 1458, 1742, 1743, 1743,
+ 1744, 1745, 1746, 1746, 1458, 1747, 1748, 1749, 1750, 1751,
+ 1458, 1752, 1753, 1753, 1754, 1755, 1756, 1756, 1458, 1757,
+ 1758, 1759, 1760, 1761, 1458, 1762, 1763, 1763, 1764, 1765,
+ 1766, 1766, 1458, 1767, 1768, 1769, 1770, 1458, 1771, 1458,
- 1759, 1760, 1437, 1761, 1762, 1437, 1763, 1764, 1437, 1765,
- 1766, 1437, 1767, 1768, 1769, 1769, 1437, 1770, 1771, 1772,
- 1773, 1774, 1437, 1775, 1776, 1437, 1777, 1437, 1778, 1437,
- 1779, 1780, 1437, 1781, 1782, 1437, 1783, 1437, 1784, 1785,
- 1437, 1786, 1787, 1437, 1788, 1437, 1789, 1790, 1437, 1791,
- 1792, 1437, 1793, 1437, 1794, 1795, 1437, 1796, 1797, 1798,
- 1437, 1799, 1800, 1800, 1801, 1802, 1803, 1803, 1437, 1804,
- 1805, 1806, 1807, 1807, 1807, 1807, 1437, 1808, 1809, 1810,
- 1811, 1812, 1813, 1814, 1815, 1437, 1816, 1817, 1437, 1818,
- 1819, 1820, 1820, 1821, 1822, 1823, 1824, 1437, 1825, 1826,
+ 1772, 1773, 1458, 1458, 1458, 1774, 1775, 1776, 1777, 1777,
+ 1777, 1777, 1777, 1777, 1777, 1777, 1458, 1217, 1778, 1779,
+ 1458, 1780, 1781, 1458, 1782, 1783, 1458, 1784, 1785, 1458,
+ 1786, 1787, 1458, 1788, 1789, 1790, 1790, 1458, 1791, 1792,
+ 1793, 1794, 1795, 1458, 1796, 1797, 1458, 1798, 1458, 1799,
+ 1458, 1800, 1801, 1458, 1802, 1803, 1458, 1804, 1458, 1805,
+ 1806, 1458, 1807, 1808, 1458, 1809, 1458, 1810, 1811, 1458,
+ 1812, 1813, 1458, 1814, 1458, 1815, 1816, 1458, 1817, 1818,
+ 1819, 1458, 1820, 1821, 1821, 1822, 1823, 1824, 1824, 1458,
+ 1825, 1826, 1827, 1828, 1828, 1828, 1828, 1458, 1829, 1830,
- 1826, 1827, 1828, 1829, 1830, 1831, 1437, 1832, 1833, 1833,
- 1834, 1835, 1836, 1837, 1838, 1437, 1839, 1840, 1840, 1841,
- 1842, 1843, 1844, 1845, 1437, 1846, 1847, 1847, 1848, 1849,
- 1850, 1851, 1437, 1852, 1437, 1853, 1854, 1437, 1855, 1856,
- 1856, 1856, 1856, 1857, 1437, 1858, 1859, 1860, 1861, 1862,
- 1863, 1864, 1864, 1865, 1866, 1867, 1437, 1437, 1868, 1437,
- 1869, 1437, 1870, 1437, 1871, 1437, 1872, 1437, 1873, 1437,
- 1874, 1437, 1875, 1437, 1876, 1437, 1851, 1877, 1437, 1852,
- 1878, 1878, 1853, 1854, 1879, 1856, 1856, 1856, 1880, 1437,
- 1881, 1882, 1437, 1868, 1869, 1883, 1437, 1870, 1871, 1884,
+ 1831, 1832, 1833, 1834, 1835, 1836, 1458, 1837, 1838, 1458,
+ 1839, 1840, 1841, 1841, 1842, 1843, 1844, 1845, 1458, 1846,
+ 1847, 1847, 1848, 1849, 1850, 1851, 1852, 1458, 1853, 1854,
+ 1854, 1855, 1856, 1857, 1858, 1859, 1458, 1860, 1861, 1861,
+ 1862, 1863, 1864, 1865, 1866, 1458, 1867, 1868, 1868, 1869,
+ 1870, 1871, 1872, 1458, 1873, 1458, 1874, 1875, 1458, 1876,
+ 1877, 1877, 1877, 1877, 1878, 1458, 1879, 1880, 1881, 1882,
+ 1883, 1884, 1885, 1885, 1886, 1887, 1888, 1458, 1458, 1889,
+ 1458, 1890, 1458, 1891, 1458, 1892, 1458, 1893, 1458, 1894,
+ 1458, 1895, 1458, 1896, 1458, 1897, 1458, 1872, 1898, 1458,
- 1437, 1872, 1873, 1885, 1437, 1874, 1875, 1886, 1437, 1876,
- 1887, 1437, 1888, 1437, 1856, 1889, 1437, 1881, 1890, 1891,
- 1892, 1893, 1894, 1887, 1895, 1437, 1888, 1896, 1890, 1891,
- 1892, 1893, 1894, 1897, 1896, 1897, 0, 1437, 1437, 1437,
- 1437, 1437, 1437, 1437, 1437, 1437, 1437, 1437, 1437, 1437,
- 1437, 1437, 1437, 1437, 1437, 1437, 1437, 1437, 1437, 1437,
- 1437, 1437, 1437, 1437, 1437, 1437, 1437, 1437, 1437, 1437,
- 1437, 1437, 1437, 1437, 1437, 1437, 1437, 1437, 1437, 1437,
- 1437, 1437, 1437, 1437, 1437, 1437, 1437, 1437, 1437, 1437,
- 1437, 1437, 1437, 1437, 1437, 1437, 1437, 1437, 1437, 1437,
+ 1873, 1899, 1899, 1874, 1875, 1900, 1877, 1877, 1877, 1901,
+ 1458, 1902, 1903, 1458, 1889, 1890, 1904, 1458, 1891, 1892,
+ 1905, 1458, 1893, 1894, 1906, 1458, 1895, 1896, 1907, 1458,
+ 1897, 1908, 1458, 1909, 1458, 1877, 1910, 1458, 1902, 1911,
+ 1912, 1913, 1914, 1915, 1908, 1916, 1458, 1909, 1917, 1911,
+ 1912, 1913, 1914, 1915, 1918, 1917, 1918, 0, 1458, 1458,
+ 1458, 1458, 1458, 1458, 1458, 1458, 1458, 1458, 1458, 1458,
+ 1458, 1458, 1458, 1458, 1458, 1458, 1458, 1458, 1458, 1458,
+ 1458, 1458, 1458, 1458, 1458, 1458, 1458, 1458, 1458, 1458,
+ 1458, 1458, 1458, 1458, 1458, 1458, 1458, 1458, 1458, 1458,
- 1437, 1437, 1437, 1437, 1437, 1437, 1437, 1437, 1437, 1437,
- 1437, 1437, 1437, 1437, 1437, 1437, 1437, 1437, 1437, 1437,
- 1437, 1437, 1437, 1437, 1437, 1437, 1437, 1437, 1437, 1437,
- 1437, 1437, 1437, 1437, 1437, 1437, 1437, 1437, 1437, 1437,
- 1437, 1437, 1437, 1437, 1437, 1437, 1437, 1437, 1437, 1437,
- 1437, 1437, 1437, 1437, 1437, 1437, 1437, 1437, 1437, 1437,
- 1437, 1437, 1437, 1437, 1437, 1437, 1437, 1437, 1437, 1437,
- 1437, 1437, 1437, 1437, 1437, 1437, 1437, 1437, 1437, 1437,
- 1437, 1437, 1437, 1437, 1437, 1437, 1437, 1437, 1437, 1437,
- 1437, 1437, 1437, 1437, 1437, 1437, 1437, 1437, 1437, 1437,
+ 1458, 1458, 1458, 1458, 1458, 1458, 1458, 1458, 1458, 1458,
+ 1458, 1458, 1458, 1458, 1458, 1458, 1458, 1458, 1458, 1458,
+ 1458, 1458, 1458, 1458, 1458, 1458, 1458, 1458, 1458, 1458,
+ 1458, 1458, 1458, 1458, 1458, 1458, 1458, 1458, 1458, 1458,
+ 1458, 1458, 1458, 1458, 1458, 1458, 1458, 1458, 1458, 1458,
+ 1458, 1458, 1458, 1458, 1458, 1458, 1458, 1458, 1458, 1458,
+ 1458, 1458, 1458, 1458, 1458, 1458, 1458, 1458, 1458, 1458,
+ 1458, 1458, 1458, 1458, 1458, 1458, 1458, 1458, 1458, 1458,
+ 1458, 1458, 1458, 1458, 1458, 1458, 1458, 1458, 1458, 1458,
+ 1458, 1458, 1458, 1458, 1458, 1458, 1458, 1458, 1458, 1458,
- 1437, 1437, 1437, 1437, 1437, 1437, 1437, 1437, 1437, 1437,
- 1437, 1437, 1437, 1437, 1437, 1437, 1437, 1437, 1437, 1437,
- 1437, 1437, 1437, 1437, 1437, 1437, 1437, 1437, 1437, 1437,
- 1437, 1437, 1437, 1437, 1437, 1437, 1437, 1437, 1437, 1437,
- 1437, 1437, 1437, 1437, 1437, 1437, 1437, 1437, 1437, 1437,
- 1437, 1437, 1437, 1437, 1437, 1437, 1437, 1437, 1437, 1437,
- 1437, 1437, 1437, 1437, 1437, 1437, 1437, 1437, 1437, 1437,
- 1437, 1437, 1437, 1437, 1437, 1437, 1437, 1437, 1437, 1437,
- 1437, 1437, 1437, 1437, 1437, 1437, 1437, 1437, 1437, 1437,
- 1437, 1437, 1437, 1437, 1437, 1437, 1437, 1437, 1437, 1437,
+ 1458, 1458, 1458, 1458, 1458, 1458, 1458, 1458, 1458, 1458,
+ 1458, 1458, 1458, 1458, 1458, 1458, 1458, 1458, 1458, 1458,
+ 1458, 1458, 1458, 1458, 1458, 1458, 1458, 1458, 1458, 1458,
+ 1458, 1458, 1458, 1458, 1458, 1458, 1458, 1458, 1458, 1458,
+ 1458, 1458, 1458, 1458, 1458, 1458, 1458, 1458, 1458, 1458,
+ 1458, 1458, 1458, 1458, 1458, 1458, 1458, 1458, 1458, 1458,
+ 1458, 1458, 1458, 1458, 1458, 1458, 1458, 1458, 1458, 1458,
+ 1458, 1458, 1458, 1458, 1458, 1458, 1458, 1458, 1458, 1458,
+ 1458, 1458, 1458, 1458, 1458, 1458, 1458, 1458, 1458, 1458,
+ 1458, 1458, 1458, 1458, 1458, 1458, 1458, 1458, 1458, 1458,
- 1437, 1437, 1437, 1437, 1437, 1437, 1437, 1437, 1437, 1437,
- 1437, 1437, 1437, 1437, 1437, 1437, 1437, 1437, 1437, 1437,
- 1437, 1437, 1437, 1437, 1437, 1437, 1437, 1437, 1437, 1437,
- 1437, 1437, 1437, 1437, 1437, 1437, 1437, 1437, 1437, 1437,
- 1437, 1437, 1437, 1437, 1437, 1437, 1437, 1437, 1437, 1437,
- 1437, 1437, 1437, 1437, 1437, 1437, 1437, 1437, 1437, 1437,
- 1437, 1437, 1437, 1437, 1437, 1437, 1437, 1437, 1437, 1437,
- 1437, 1437, 1437, 1437, 1437, 1437, 1437, 1437, 1437, 1437,
- 1437, 1437, 1437, 1437, 1437, 1437, 1437, 1437, 1437, 1437,
- 1437, 1437, 1437, 1437, 1437, 1437, 1437, 1437, 1437, 1437,
+ 1458, 1458, 1458, 1458, 1458, 1458, 1458, 1458, 1458, 1458,
+ 1458, 1458, 1458, 1458, 1458, 1458, 1458, 1458, 1458, 1458,
+ 1458, 1458, 1458, 1458, 1458, 1458, 1458, 1458, 1458, 1458,
+ 1458, 1458, 1458, 1458, 1458, 1458, 1458, 1458, 1458, 1458,
+ 1458, 1458, 1458, 1458, 1458, 1458, 1458, 1458, 1458, 1458,
+ 1458, 1458, 1458, 1458, 1458, 1458, 1458, 1458, 1458, 1458,
+ 1458, 1458, 1458, 1458, 1458, 1458, 1458, 1458, 1458, 1458,
+ 1458, 1458, 1458, 1458, 1458, 1458, 1458, 1458, 1458, 1458,
+ 1458, 1458, 1458, 1458, 1458, 1458, 1458, 1458, 1458, 1458,
+ 1458, 1458, 1458, 1458, 1458, 1458, 1458, 1458, 1458, 1458,
- 1437, 1437, 1437, 1437, 1437, 1437, 1437, 1437, 1437, 1437,
- 1437, 1437, 1437, 1437, 1437, 1437, 1437, 1437, 1437, 1437,
- 1437, 1437, 1437, 1437, 1437, 1437, 1437, 1437, 1437, 1437,
- 1437, 1437, 1437, 1437, 1437, 1437, 1437, 1437, 1437, 1437,
- 1437, 1437, 1437, 1437, 1437, 1437, 1437, 1437, 1437, 1437,
- 1437, 1437, 1437, 1437, 1437, 1437, 1437, 1437, 1437, 1437,
- 1437, 1437, 1437, 1437, 1437, 1437, 1437, 1437, 1437, 1437,
- 1437, 1437, 1437, 1437, 1437, 1437, 1437, 1437, 1437, 1437,
- 1437, 1437, 1437, 1437, 1437, 1437, 1437, 1437, 1437, 1437,
- 1437, 1437, 1437, 1437, 1437, 1437, 1437
+ 1458, 1458, 1458, 1458, 1458, 1458, 1458, 1458, 1458, 1458,
+ 1458, 1458, 1458, 1458, 1458, 1458, 1458, 1458, 1458, 1458,
+ 1458, 1458, 1458, 1458, 1458, 1458, 1458, 1458, 1458, 1458,
+ 1458, 1458, 1458, 1458, 1458, 1458, 1458, 1458, 1458, 1458,
+ 1458, 1458, 1458, 1458, 1458, 1458, 1458, 1458, 1458, 1458,
+ 1458, 1458, 1458, 1458, 1458, 1458, 1458, 1458, 1458, 1458,
+ 1458, 1458, 1458, 1458, 1458, 1458, 1458, 1458, 1458, 1458,
+ 1458, 1458, 1458, 1458, 1458, 1458, 1458, 1458, 1458, 1458,
+ 1458, 1458, 1458, 1458, 1458, 1458, 1458, 1458, 1458, 1458,
+ 1458, 1458, 1458, 1458, 1458, 1458, 1458, 1458, 1458, 1458,
+ 1458, 1458, 1458, 1458, 1458, 1458, 1458, 1458, 1458, 1458,
+ 1458, 1458, 1458, 1458, 1458, 1458, 1458, 1458
} ;
-static yyconst flex_int16_t yy_nxt[7450] =
+static yyconst flex_int16_t yy_nxt[7455] =
{ 0,
4, 5, 6, 7, 8, 9, 10, 11, 12, 11,
13, 14, 15, 15, 15, 15, 15, 15, 16, 17,
@@ -1042,822 +1048,823 @@
25, 26, 27, 28, 29, 30, 31, 21, 32, 33,
34, 35, 36, 21, 37, 38, 39, 40, 41, 42,
21, 21, 43, 44, 44, 53, 44, 44, 44, 44,
- 44, 44, 44, 44, 111, 44, 57, 58, 44, 60,
- 61, 44, 44, 112, 72, 83, 84, 197, 44, 44,
- 44, 53, 44, 198, 228, 44, 44, 44, 73, 65,
- 44, 66, 67, 79, 85, 74, 68, 80, 426, 86,
+ 44, 44, 44, 44, 116, 44, 57, 58, 44, 60,
+ 61, 44, 44, 117, 72, 83, 84, 209, 44, 44,
+ 44, 53, 44, 210, 240, 44, 44, 44, 73, 65,
+ 44, 66, 67, 79, 85, 74, 68, 80, 1134, 86,
- 44, 69, 229, 81, 87, 70, 82, 71, 44, 48,
- 49, 50, 50, 50, 50, 50, 50, 50, 51, 710,
- 88, 187, 52, 53, 54, 53, 188, 55, 52, 52,
+ 44, 69, 241, 81, 87, 70, 82, 71, 44, 48,
+ 49, 50, 50, 50, 50, 50, 50, 50, 51, 195,
+ 88, 196, 52, 53, 54, 53, 352, 55, 52, 52,
52, 52, 52, 52, 53, 53, 53, 53, 53, 53,
53, 53, 53, 53, 53, 53, 53, 53, 53, 53,
- 54, 53, 44, 118, 75, 44, 234, 44, 119, 120,
- 44, 121, 122, 199, 76, 192, 235, 77, 200, 63,
- 56, 78, 63, 135, 63, 136, 322, 63, 44, 62,
- 52, 52, 52, 52, 52, 52, 52, 63, 105, 137,
- 1177, 222, 106, 53, 113, 63, 138, 1179, 193, 123,
+ 54, 53, 44, 123, 75, 44, 447, 44, 124, 125,
+ 44, 126, 127, 193, 76, 204, 194, 77, 199, 63,
+ 56, 78, 63, 200, 63, 53, 515, 63, 44, 62,
+ 52, 52, 52, 52, 52, 52, 52, 63, 110, 89,
+ 246, 90, 111, 53, 118, 63, 91, 92, 205, 93,
- 323, 107, 108, 124, 223, 109, 114, 110, 115, 203,
- 116, 125, 204, 117, 205, 320, 126, 321, 127, 53,
- 55, 53, 53, 53, 53, 53, 53, 53, 53, 1437,
- 98, 99, 392, 53, 302, 980, 53, 393, 194, 53,
- 53, 53, 53, 53, 53, 90, 100, 303, 91, 92,
- 101, 93, 231, 94, 102, 95, 103, 96, 128, 140,
- 97, 232, 53, 104, 129, 195, 130, 141, 131, 469,
- 196, 142, 132, 143, 133, 134, 44, 53, 333, 44,
- 712, 44, 470, 53, 44, 150, 150, 150, 150, 150,
- 150, 150, 63, 1437, 44, 63, 711, 63, 1185, 473,
+ 247, 112, 113, 94, 145, 114, 119, 115, 120, 211,
+ 121, 341, 146, 122, 212, 339, 147, 340, 148, 53,
+ 55, 53, 53, 53, 53, 53, 53, 53, 53, 1458,
+ 103, 104, 1222, 53, 181, 342, 140, 206, 141, 53,
+ 53, 53, 53, 53, 53, 95, 105, 447, 96, 97,
+ 106, 98, 142, 99, 107, 100, 108, 101, 128, 143,
+ 102, 182, 129, 109, 207, 234, 133, 183, 215, 208,
+ 130, 216, 134, 217, 135, 131, 136, 132, 235, 243,
+ 137, 44, 138, 139, 44, 738, 44, 53, 244, 44,
+ 155, 155, 155, 155, 155, 155, 155, 63, 53, 44,
- 63, 53, 44, 147, 147, 147, 147, 147, 147, 147,
- 63, 1183, 1437, 474, 147, 53, 494, 1345, 63, 1437,
- 147, 147, 147, 147, 147, 147, 148, 149, 149, 149,
- 149, 149, 149, 176, 53, 652, 53, 150, 1437, 358,
- 359, 360, 361, 150, 150, 150, 150, 150, 150, 49,
- 151, 151, 151, 151, 151, 151, 151, 263, 1278, 362,
- 177, 152, 53, 1437, 53, 265, 178, 152, 152, 152,
- 152, 152, 152, 62, 152, 152, 152, 152, 152, 152,
- 152, 155, 155, 155, 155, 155, 155, 155, 1437, 1437,
- 53, 410, 155, 358, 359, 360, 361, 1437, 155, 155,
+ 63, 413, 63, 321, 735, 63, 414, 44, 152, 152,
+ 152, 152, 152, 152, 152, 63, 322, 1458, 1458, 152,
+ 53, 1458, 53, 63, 53, 152, 152, 152, 152, 152,
+ 152, 153, 154, 154, 154, 154, 154, 154, 53, 1458,
+ 1225, 1458, 155, 1458, 1458, 1458, 53, 1458, 155, 155,
+ 155, 155, 155, 155, 49, 156, 156, 156, 156, 156,
+ 156, 156, 275, 447, 53, 1458, 157, 1458, 53, 673,
+ 277, 1458, 157, 157, 157, 157, 157, 157, 62, 157,
+ 157, 157, 157, 157, 157, 157, 160, 160, 160, 160,
+ 160, 160, 160, 377, 378, 379, 380, 160, 490, 730,
- 155, 155, 155, 155, 44, 251, 717, 44, 53, 44,
- 437, 720, 44, 437, 1437, 156, 157, 157, 157, 157,
- 157, 157, 44, 1437, 438, 53, 158, 1437, 1437, 53,
- 44, 251, 158, 158, 158, 158, 158, 158, 246, 543,
- 247, 247, 247, 247, 247, 247, 247, 546, 544, 1278,
- 438, 247, 1437, 1437, 1437, 53, 547, 247, 247, 247,
- 247, 247, 247, 248, 249, 249, 249, 249, 249, 249,
- 249, 343, 263, 709, 53, 250, 1437, 251, 1437, 502,
- 1437, 250, 250, 250, 250, 250, 250, 330, 330, 330,
- 330, 330, 330, 330, 349, 350, 350, 350, 350, 350,
+ 53, 564, 494, 160, 160, 160, 160, 160, 160, 44,
+ 565, 491, 44, 381, 44, 431, 495, 44, 458, 458,
+ 161, 162, 162, 162, 162, 162, 162, 44, 53, 263,
+ 731, 163, 459, 1458, 1228, 44, 53, 163, 163, 163,
+ 163, 163, 163, 258, 567, 259, 259, 259, 259, 259,
+ 259, 259, 362, 568, 53, 263, 259, 1458, 459, 1458,
+ 523, 740, 259, 259, 259, 259, 259, 259, 260, 261,
+ 261, 261, 261, 261, 261, 261, 275, 462, 447, 53,
+ 262, 1458, 263, 1458, 1458, 464, 262, 262, 262, 262,
+ 262, 262, 349, 349, 349, 349, 349, 349, 349, 368,
- 350, 512, 1437, 251, 252, 250, 250, 250, 250, 250,
- 250, 250, 1437, 1437, 426, 513, 250, 1437, 1437, 53,
- 725, 1223, 250, 250, 250, 250, 250, 250, 253, 254,
- 254, 254, 254, 254, 254, 254, 255, 441, 1437, 1437,
- 256, 513, 1019, 1437, 1437, 443, 256, 256, 256, 256,
- 256, 256, 53, 256, 256, 256, 256, 256, 256, 256,
- 259, 260, 260, 260, 260, 260, 260, 261, 53, 1228,
- 574, 262, 718, 1230, 714, 719, 55, 262, 262, 262,
- 262, 262, 262, 263, 264, 264, 264, 264, 264, 264,
- 264, 265, 53, 53, 55, 266, 574, 267, 731, 371,
+ 369, 369, 369, 369, 369, 369, 533, 1458, 263, 264,
+ 262, 262, 262, 262, 262, 262, 262, 1458, 1458, 1231,
+ 534, 262, 377, 378, 379, 380, 447, 262, 262, 262,
+ 262, 262, 262, 265, 266, 266, 266, 266, 266, 266,
+ 266, 267, 1234, 1458, 1458, 268, 534, 1458, 1458, 53,
+ 746, 268, 268, 268, 268, 268, 268, 53, 268, 268,
+ 268, 268, 268, 268, 268, 271, 272, 272, 272, 272,
+ 272, 272, 273, 1458, 1458, 732, 274, 595, 733, 807,
+ 53, 53, 274, 274, 274, 274, 274, 274, 275, 276,
+ 276, 276, 276, 276, 276, 276, 277, 53, 447, 1198,
- 55, 266, 266, 266, 266, 266, 266, 372, 413, 413,
- 413, 413, 413, 413, 413, 1028, 1236, 512, 55, 575,
- 373, 55, 715, 267, 327, 327, 327, 327, 327, 327,
- 327, 1437, 53, 408, 53, 327, 374, 55, 1238, 55,
- 1039, 327, 327, 327, 327, 327, 327, 328, 329, 329,
- 329, 329, 329, 329, 713, 55, 799, 1437, 330, 408,
- 804, 786, 1437, 53, 330, 330, 330, 330, 330, 330,
- 248, 331, 331, 331, 331, 331, 331, 331, 332, 332,
- 332, 332, 332, 332, 332, 507, 516, 786, 1437, 332,
- 1244, 55, 55, 660, 663, 332, 332, 332, 332, 332,
+ 278, 739, 279, 595, 392, 807, 278, 278, 278, 278,
+ 278, 278, 393, 434, 434, 434, 434, 434, 434, 434,
+ 1200, 1001, 533, 1206, 596, 394, 55, 736, 279, 346,
+ 346, 346, 346, 346, 346, 346, 1458, 53, 429, 1458,
+ 346, 395, 1204, 55, 55, 1366, 346, 346, 346, 346,
+ 346, 346, 347, 348, 348, 348, 348, 348, 348, 734,
+ 752, 55, 1458, 349, 429, 1458, 1458, 1458, 53, 349,
+ 349, 349, 349, 349, 349, 260, 350, 350, 350, 350,
+ 350, 350, 350, 351, 351, 351, 351, 351, 351, 351,
+ 528, 537, 1458, 1458, 351, 1458, 53, 55, 681, 684,
- 332, 334, 335, 335, 335, 335, 335, 335, 335, 55,
- 55, 808, 1246, 336, 1051, 1252, 798, 1254, 1063, 336,
- 336, 336, 336, 336, 336, 339, 336, 336, 336, 336,
- 336, 336, 336, 343, 344, 344, 344, 344, 344, 344,
- 344, 345, 620, 396, 614, 346, 1185, 347, 397, 1286,
- 622, 346, 346, 346, 346, 346, 346, 398, 615, 399,
- 400, 1437, 401, 428, 429, 429, 429, 429, 429, 429,
- 55, 614, 55, 347, 263, 351, 351, 351, 351, 351,
- 351, 351, 265, 1113, 615, 1437, 352, 1437, 55, 1333,
- 55, 616, 352, 352, 352, 352, 352, 352, 353, 354,
+ 351, 351, 351, 351, 351, 351, 353, 354, 354, 354,
+ 354, 354, 354, 354, 1299, 55, 1299, 447, 355, 1244,
+ 1040, 1458, 819, 1249, 355, 355, 355, 355, 355, 355,
+ 358, 355, 355, 355, 355, 355, 355, 355, 362, 363,
+ 363, 363, 363, 363, 363, 363, 364, 641, 417, 635,
+ 365, 1251, 366, 418, 1049, 643, 365, 365, 365, 365,
+ 365, 365, 419, 636, 420, 421, 1458, 422, 449, 450,
+ 450, 450, 450, 450, 450, 55, 635, 55, 366, 275,
+ 370, 370, 370, 370, 370, 370, 370, 277, 1257, 636,
+ 1458, 371, 1458, 55, 829, 55, 637, 371, 371, 371,
- 354, 354, 354, 354, 354, 617, 1335, 800, 1358, 355,
- 1362, 1437, 55, 1366, 55, 355, 355, 355, 355, 355,
- 355, 403, 616, 404, 404, 404, 404, 404, 404, 404,
- 55, 617, 55, 805, 404, 806, 1437, 55, 55, 726,
- 404, 404, 404, 404, 404, 404, 405, 406, 406, 406,
- 406, 406, 406, 406, 1370, 55, 55, 55, 407, 809,
- 408, 1374, 1437, 1390, 407, 407, 407, 407, 407, 407,
- 491, 491, 491, 491, 491, 491, 491, 521, 522, 522,
- 522, 522, 522, 522, 673, 724, 408, 409, 407, 407,
- 407, 407, 407, 407, 407, 53, 1412, 1437, 674, 407,
+ 371, 371, 371, 372, 373, 373, 373, 373, 373, 373,
+ 638, 1259, 820, 1060, 374, 1265, 1458, 55, 1267, 55,
+ 374, 374, 374, 374, 374, 374, 424, 637, 425, 425,
+ 425, 425, 425, 425, 425, 55, 638, 55, 1072, 425,
+ 825, 1458, 55, 55, 747, 425, 425, 425, 425, 425,
+ 425, 426, 427, 427, 427, 427, 427, 427, 427, 1273,
+ 55, 55, 55, 428, 826, 429, 1275, 1458, 1084, 428,
+ 428, 428, 428, 428, 428, 512, 512, 512, 512, 512,
+ 512, 512, 542, 543, 543, 543, 543, 543, 543, 694,
+ 745, 429, 430, 428, 428, 428, 428, 428, 428, 428,
- 1437, 55, 728, 1213, 673, 407, 407, 407, 407, 407,
- 407, 411, 412, 412, 412, 412, 412, 412, 1437, 55,
- 426, 1437, 413, 1437, 674, 1437, 1437, 55, 413, 413,
- 413, 413, 413, 413, 253, 414, 414, 414, 414, 414,
- 414, 414, 1210, 426, 1437, 55, 415, 1437, 1437, 857,
- 1437, 1437, 415, 415, 415, 415, 415, 415, 53, 415,
- 415, 415, 415, 415, 415, 415, 418, 419, 419, 419,
- 419, 419, 419, 1207, 1437, 857, 1437, 420, 426, 55,
- 55, 55, 1204, 420, 420, 420, 420, 420, 420, 424,
- 425, 425, 425, 425, 425, 425, 426, 55, 55, 55,
+ 53, 1206, 1307, 695, 428, 1134, 55, 55, 1354, 694,
+ 428, 428, 428, 428, 428, 428, 432, 433, 433, 433,
+ 433, 433, 433, 1458, 55, 55, 1458, 434, 827, 695,
+ 55, 749, 55, 434, 434, 434, 434, 434, 434, 265,
+ 435, 435, 435, 435, 435, 435, 435, 1356, 55, 1458,
+ 55, 436, 1458, 830, 1458, 878, 1379, 436, 436, 436,
+ 436, 436, 436, 53, 436, 436, 436, 436, 436, 436,
+ 436, 439, 440, 440, 440, 440, 440, 440, 1458, 689,
+ 1458, 878, 441, 1383, 55, 55, 1387, 842, 441, 441,
+ 441, 441, 441, 441, 445, 446, 446, 446, 446, 446,
- 427, 426, 885, 886, 887, 55, 427, 427, 427, 427,
- 427, 427, 343, 430, 430, 430, 430, 430, 430, 430,
- 345, 668, 53, 55, 431, 1201, 55, 55, 889, 821,
- 431, 431, 431, 431, 431, 431, 432, 433, 433, 433,
- 433, 433, 433, 426, 55, 55, 426, 434, 53, 891,
- 892, 55, 55, 434, 434, 434, 434, 434, 434, 263,
- 439, 439, 439, 439, 439, 439, 439, 265, 677, 55,
- 55, 440, 894, 973, 1113, 55, 824, 440, 440, 440,
- 440, 440, 440, 441, 442, 442, 442, 442, 442, 442,
- 442, 443, 688, 55, 426, 444, 1437, 445, 994, 973,
+ 446, 447, 55, 55, 1458, 448, 1391, 906, 907, 55,
+ 55, 448, 448, 448, 448, 448, 448, 362, 451, 451,
+ 451, 451, 451, 451, 451, 364, 698, 55, 55, 452,
+ 1395, 55, 908, 910, 845, 452, 452, 452, 452, 452,
+ 452, 453, 454, 454, 454, 454, 454, 454, 447, 55,
+ 1411, 1433, 455, 53, 912, 55, 55, 55, 455, 455,
+ 455, 455, 455, 455, 275, 460, 460, 460, 460, 460,
+ 460, 460, 277, 55, 55, 55, 461, 915, 913, 53,
+ 55, 55, 461, 461, 461, 461, 461, 461, 462, 463,
+ 463, 463, 463, 463, 463, 463, 464, 709, 55, 55,
- 827, 444, 444, 444, 444, 444, 444, 525, 526, 526,
- 526, 526, 526, 526, 594, 595, 595, 595, 595, 595,
- 595, 426, 1437, 445, 454, 1278, 1437, 1213, 455, 1437,
- 55, 456, 55, 682, 457, 682, 458, 459, 460, 461,
- 488, 488, 488, 488, 488, 488, 488, 683, 55, 1437,
- 55, 488, 1437, 990, 55, 1437, 721, 488, 488, 488,
- 488, 488, 488, 489, 490, 490, 490, 490, 490, 490,
- 53, 793, 55, 683, 491, 1437, 1437, 1437, 1437, 795,
- 491, 491, 491, 491, 491, 491, 405, 492, 492, 492,
- 492, 492, 492, 492, 493, 493, 493, 493, 493, 493,
+ 465, 994, 466, 1015, 1458, 848, 465, 465, 465, 465,
+ 465, 465, 546, 547, 547, 547, 547, 547, 547, 615,
+ 616, 616, 616, 616, 616, 616, 447, 994, 466, 475,
+ 1458, 1458, 447, 476, 1458, 55, 477, 55, 703, 478,
+ 703, 479, 480, 481, 482, 509, 509, 509, 509, 509,
+ 509, 509, 704, 55, 1458, 55, 509, 1458, 1011, 55,
+ 1458, 741, 509, 509, 509, 509, 509, 509, 510, 511,
+ 511, 511, 511, 511, 511, 53, 814, 55, 704, 512,
+ 1458, 1458, 1458, 1458, 816, 512, 512, 512, 512, 512,
+ 512, 426, 513, 513, 513, 513, 513, 513, 513, 514,
- 493, 1210, 1437, 1437, 1437, 493, 1437, 55, 55, 55,
- 55, 493, 493, 493, 493, 493, 493, 410, 495, 495,
- 495, 495, 495, 495, 495, 55, 55, 55, 55, 496,
- 1207, 251, 1437, 996, 1204, 496, 496, 496, 496, 496,
- 496, 602, 603, 603, 603, 603, 603, 603, 606, 607,
- 607, 607, 607, 607, 607, 55, 684, 251, 496, 496,
- 496, 496, 496, 496, 496, 1437, 1201, 1044, 1437, 496,
- 685, 1056, 1278, 55, 723, 496, 496, 496, 496, 496,
- 496, 497, 497, 497, 497, 497, 497, 497, 53, 1185,
- 801, 1437, 498, 1044, 1437, 1437, 685, 1056, 498, 498,
+ 514, 514, 514, 514, 514, 514, 1458, 1458, 1458, 1458,
+ 514, 1458, 55, 55, 1299, 55, 514, 514, 514, 514,
+ 514, 514, 431, 516, 516, 516, 516, 516, 516, 516,
+ 55, 55, 1458, 55, 517, 1234, 263, 1458, 1017, 1231,
+ 517, 517, 517, 517, 517, 517, 623, 624, 624, 624,
+ 624, 624, 624, 627, 628, 628, 628, 628, 628, 628,
+ 55, 705, 263, 517, 517, 517, 517, 517, 517, 517,
+ 1065, 1228, 1458, 1077, 517, 706, 1458, 1225, 55, 742,
+ 517, 517, 517, 517, 517, 517, 518, 518, 518, 518,
+ 518, 518, 518, 53, 1222, 821, 1065, 519, 1458, 1077,
- 498, 498, 498, 498, 53, 498, 498, 498, 498, 498,
- 498, 498, 343, 501, 501, 501, 501, 501, 501, 501,
- 502, 1437, 684, 982, 503, 1063, 347, 426, 1213, 864,
- 503, 503, 503, 503, 503, 503, 1437, 693, 694, 694,
- 694, 694, 694, 694, 696, 697, 697, 697, 697, 697,
- 697, 55, 347, 507, 508, 508, 508, 508, 508, 508,
- 508, 509, 1437, 1059, 1057, 510, 1051, 511, 426, 55,
- 1210, 510, 510, 510, 510, 510, 510, 700, 701, 701,
- 701, 701, 701, 701, 751, 752, 752, 752, 752, 752,
- 752, 787, 55, 511, 343, 514, 514, 514, 514, 514,
+ 1458, 706, 1458, 519, 519, 519, 519, 519, 519, 53,
+ 519, 519, 519, 519, 519, 519, 519, 362, 522, 522,
+ 522, 522, 522, 522, 522, 523, 1458, 705, 1299, 524,
+ 1206, 366, 1003, 1084, 447, 524, 524, 524, 524, 524,
+ 524, 1458, 714, 715, 715, 715, 715, 715, 715, 717,
+ 718, 718, 718, 718, 718, 718, 55, 366, 528, 529,
+ 529, 529, 529, 529, 529, 529, 530, 1458, 1234, 885,
+ 531, 1080, 532, 1078, 55, 744, 531, 531, 531, 531,
+ 531, 531, 721, 722, 722, 722, 722, 722, 722, 53,
+ 772, 773, 773, 773, 773, 773, 773, 55, 532, 362,
- 514, 514, 502, 852, 1047, 788, 515, 1045, 1437, 1176,
- 55, 55, 515, 515, 515, 515, 515, 515, 516, 517,
- 517, 517, 517, 517, 517, 517, 518, 803, 1039, 55,
- 519, 788, 520, 1089, 1437, 1176, 519, 519, 519, 519,
- 519, 519, 759, 760, 760, 760, 760, 760, 760, 763,
- 764, 764, 764, 764, 764, 764, 787, 55, 520, 441,
- 527, 527, 527, 527, 527, 527, 527, 443, 426, 1207,
- 1437, 528, 1437, 55, 841, 55, 789, 528, 528, 528,
- 528, 528, 528, 529, 530, 530, 530, 530, 530, 530,
- 790, 55, 890, 1035, 531, 1092, 1437, 55, 1437, 55,
+ 535, 535, 535, 535, 535, 535, 535, 523, 1072, 447,
+ 1197, 536, 1231, 1458, 1458, 55, 55, 536, 536, 536,
+ 536, 536, 536, 537, 538, 538, 538, 538, 538, 538,
+ 538, 539, 822, 873, 55, 540, 1197, 541, 1110, 1458,
+ 1458, 540, 540, 540, 540, 540, 540, 780, 781, 781,
+ 781, 781, 781, 781, 784, 785, 785, 785, 785, 785,
+ 785, 808, 55, 541, 462, 548, 548, 548, 548, 548,
+ 548, 548, 464, 1068, 1066, 809, 549, 1458, 55, 1060,
+ 55, 808, 549, 549, 549, 549, 549, 549, 550, 551,
+ 551, 551, 551, 551, 551, 1458, 55, 824, 447, 552,
- 531, 531, 531, 531, 531, 531, 569, 789, 570, 570,
- 570, 570, 570, 570, 570, 55, 790, 55, 1033, 570,
- 1093, 1437, 1028, 426, 55, 570, 570, 570, 570, 570,
- 570, 571, 572, 572, 572, 572, 572, 572, 572, 1204,
- 832, 1188, 55, 573, 1191, 574, 832, 1437, 1003, 573,
- 573, 573, 573, 573, 573, 771, 772, 772, 772, 772,
- 772, 772, 774, 775, 775, 775, 775, 775, 775, 837,
- 55, 574, 571, 573, 573, 573, 573, 573, 573, 573,
- 1437, 841, 1024, 838, 573, 1437, 1019, 426, 55, 1006,
- 573, 573, 573, 573, 573, 573, 410, 576, 576, 576,
+ 1113, 809, 55, 1458, 55, 552, 552, 552, 552, 552,
+ 552, 590, 810, 591, 591, 591, 591, 591, 591, 591,
+ 55, 1458, 55, 1228, 591, 1114, 811, 862, 1056, 55,
+ 591, 591, 591, 591, 591, 591, 592, 593, 593, 593,
+ 593, 593, 593, 593, 1054, 853, 1209, 55, 594, 1212,
+ 595, 1049, 811, 1024, 594, 594, 594, 594, 594, 594,
+ 792, 793, 793, 793, 793, 793, 793, 795, 796, 796,
+ 796, 796, 796, 796, 810, 55, 595, 592, 594, 594,
+ 594, 594, 594, 594, 594, 1458, 862, 447, 1458, 594,
+ 1458, 1225, 1458, 55, 1027, 594, 594, 594, 594, 594,
- 576, 576, 576, 576, 852, 864, 1437, 895, 577, 838,
- 1437, 1437, 1009, 1012, 577, 577, 577, 577, 577, 577,
- 53, 577, 577, 577, 577, 577, 577, 577, 578, 578,
- 578, 578, 578, 578, 578, 1201, 1437, 426, 1115, 579,
- 1437, 1437, 1235, 1243, 1220, 579, 579, 579, 579, 579,
- 579, 53, 579, 579, 579, 579, 579, 579, 579, 582,
- 583, 583, 583, 583, 583, 583, 1437, 1437, 1235, 1243,
- 584, 1251, 1437, 55, 55, 55, 584, 584, 584, 584,
- 584, 584, 343, 430, 430, 430, 430, 430, 430, 430,
- 502, 55, 55, 55, 431, 1332, 55, 1251, 1437, 837,
+ 594, 431, 597, 597, 597, 597, 597, 597, 597, 873,
+ 911, 1458, 853, 598, 1458, 1256, 1458, 1030, 1458, 598,
+ 598, 598, 598, 598, 598, 53, 598, 598, 598, 598,
+ 598, 598, 598, 599, 599, 599, 599, 599, 599, 599,
+ 885, 1256, 1045, 1040, 600, 1264, 1272, 1458, 1033, 447,
+ 600, 600, 600, 600, 600, 600, 53, 600, 600, 600,
+ 600, 600, 600, 600, 603, 604, 604, 604, 604, 604,
+ 604, 1264, 1272, 1458, 1353, 605, 1382, 1386, 55, 55,
+ 55, 605, 605, 605, 605, 605, 605, 362, 451, 451,
+ 451, 451, 451, 451, 451, 523, 55, 55, 55, 452,
- 431, 431, 431, 431, 431, 431, 585, 586, 586, 586,
- 586, 586, 586, 1437, 55, 1189, 1190, 587, 1096, 1194,
- 55, 1332, 1213, 587, 587, 587, 587, 587, 587, 591,
- 592, 592, 592, 592, 592, 592, 426, 1210, 55, 1437,
- 593, 1207, 1204, 1201, 55, 55, 593, 593, 593, 593,
- 593, 593, 507, 596, 596, 596, 596, 596, 596, 596,
- 509, 980, 55, 55, 597, 1096, 980, 55, 55, 982,
- 597, 597, 597, 597, 597, 597, 598, 599, 599, 599,
- 599, 599, 599, 426, 1192, 55, 55, 600, 1185, 982,
- 55, 55, 55, 600, 600, 600, 600, 600, 600, 516,
+ 1353, 55, 1382, 1386, 858, 452, 452, 452, 452, 452,
+ 452, 606, 607, 607, 607, 607, 607, 607, 859, 55,
+ 1210, 1211, 608, 1222, 1215, 55, 447, 1136, 608, 608,
+ 608, 608, 608, 608, 612, 613, 613, 613, 613, 613,
+ 613, 447, 1241, 55, 859, 614, 1117, 1234, 1231, 55,
+ 55, 614, 614, 614, 614, 614, 614, 528, 617, 617,
+ 617, 617, 617, 617, 617, 530, 1001, 55, 55, 618,
+ 1228, 1225, 55, 55, 1003, 618, 618, 618, 618, 618,
+ 618, 619, 620, 620, 620, 620, 620, 620, 447, 1213,
+ 55, 55, 621, 1222, 1117, 55, 55, 55, 621, 621,
- 608, 608, 608, 608, 608, 608, 608, 518, 55, 55,
- 55, 609, 793, 1341, 1273, 55, 976, 609, 609, 609,
- 609, 609, 609, 610, 611, 611, 611, 611, 611, 611,
- 426, 1019, 974, 55, 612, 1361, 1342, 1065, 55, 1201,
- 612, 612, 612, 612, 612, 612, 441, 618, 618, 618,
- 618, 618, 618, 618, 443, 1028, 55, 1365, 619, 1369,
- 1373, 1361, 426, 1204, 619, 619, 619, 619, 619, 619,
- 620, 621, 621, 621, 621, 621, 621, 621, 622, 1039,
- 1343, 1012, 623, 1365, 624, 1369, 1373, 1207, 623, 623,
- 623, 623, 623, 623, 778, 779, 779, 779, 779, 779,
+ 621, 621, 621, 621, 537, 629, 629, 629, 629, 629,
+ 629, 629, 539, 55, 55, 55, 630, 1001, 1362, 1294,
+ 55, 1206, 630, 630, 630, 630, 630, 630, 631, 632,
+ 632, 632, 632, 632, 632, 447, 1040, 1003, 55, 633,
+ 1390, 1363, 814, 55, 1222, 633, 633, 633, 633, 633,
+ 633, 462, 639, 639, 639, 639, 639, 639, 639, 464,
+ 1049, 55, 1394, 640, 1432, 1440, 1390, 997, 1225, 640,
+ 640, 640, 640, 640, 640, 641, 642, 642, 642, 642,
+ 642, 642, 642, 643, 1060, 1364, 995, 644, 1394, 645,
+ 1432, 1440, 1228, 644, 644, 644, 644, 644, 644, 799,
- 779, 694, 694, 694, 694, 694, 694, 694, 55, 846,
- 624, 648, 648, 648, 648, 648, 648, 648, 1411, 1051,
- 1419, 1420, 648, 847, 1053, 55, 55, 1210, 648, 648,
- 648, 648, 648, 648, 649, 649, 649, 649, 649, 649,
- 649, 888, 1063, 55, 1411, 649, 1419, 1420, 1421, 847,
- 1213, 649, 649, 649, 649, 649, 649, 571, 650, 650,
- 650, 650, 650, 650, 650, 651, 651, 651, 651, 651,
- 651, 651, 1113, 1183, 1421, 1422, 651, 1423, 55, 55,
- 1278, 1185, 651, 651, 651, 651, 651, 651, 410, 653,
- 653, 653, 653, 653, 653, 653, 55, 55, 426, 1009,
+ 800, 800, 800, 800, 800, 800, 715, 715, 715, 715,
+ 715, 715, 715, 55, 858, 645, 669, 669, 669, 669,
+ 669, 669, 669, 1441, 1072, 1442, 1443, 669, 1458, 1086,
+ 55, 55, 1231, 669, 669, 669, 669, 669, 669, 670,
+ 670, 670, 670, 670, 670, 670, 909, 1084, 55, 1441,
+ 670, 1442, 1443, 1444, 1458, 1234, 670, 670, 670, 670,
+ 670, 670, 592, 671, 671, 671, 671, 671, 671, 671,
+ 672, 672, 672, 672, 672, 672, 672, 1134, 1204, 1444,
+ 1449, 672, 1455, 55, 55, 1299, 1206, 672, 672, 672,
+ 672, 672, 672, 431, 674, 674, 674, 674, 674, 674,
- 654, 1422, 1428, 1423, 1434, 1274, 654, 654, 654, 654,
- 654, 654, 53, 654, 654, 654, 654, 654, 654, 654,
- 655, 655, 655, 655, 655, 655, 655, 1183, 1428, 1041,
- 1434, 656, 426, 1006, 1030, 1437, 426, 656, 656, 656,
- 656, 656, 656, 53, 656, 656, 656, 656, 656, 656,
- 656, 507, 659, 659, 659, 659, 659, 659, 659, 660,
- 55, 846, 848, 661, 1003, 511, 55, 1021, 848, 661,
- 661, 661, 661, 661, 661, 1437, 849, 426, 55, 1115,
- 426, 1096, 1437, 1012, 55, 55, 1009, 55, 1006, 55,
- 802, 511, 516, 662, 662, 662, 662, 662, 662, 662,
+ 674, 55, 55, 447, 1033, 675, 1449, 1074, 1455, 447,
+ 1295, 675, 675, 675, 675, 675, 675, 53, 675, 675,
+ 675, 675, 675, 675, 675, 676, 676, 676, 676, 676,
+ 676, 676, 1204, 1030, 1062, 447, 677, 1027, 1051, 447,
+ 1458, 1024, 677, 677, 677, 677, 677, 677, 53, 677,
+ 677, 677, 677, 677, 677, 677, 528, 680, 680, 680,
+ 680, 680, 680, 680, 681, 55, 867, 867, 682, 1042,
+ 532, 55, 447, 869, 682, 682, 682, 682, 682, 682,
+ 868, 1458, 1136, 55, 447, 1117, 1033, 870, 1030, 55,
+ 55, 1027, 55, 1024, 55, 823, 532, 537, 683, 683,
- 663, 1437, 849, 55, 664, 55, 520, 55, 1437, 55,
- 664, 664, 664, 664, 664, 664, 810, 807, 1003, 319,
- 815, 815, 815, 815, 815, 815, 815, 55, 858, 858,
- 860, 55, 520, 668, 669, 669, 669, 669, 669, 669,
- 669, 670, 859, 1437, 861, 671, 1088, 672, 1096, 55,
- 860, 671, 671, 671, 671, 671, 671, 772, 772, 772,
- 772, 772, 772, 772, 1437, 55, 989, 982, 859, 1437,
- 861, 974, 795, 672, 507, 675, 675, 675, 675, 675,
- 675, 675, 660, 55, 864, 975, 676, 1065, 1012, 55,
- 1437, 1388, 676, 676, 676, 676, 676, 676, 677, 678,
+ 683, 683, 683, 683, 683, 684, 868, 1458, 55, 685,
+ 55, 541, 55, 870, 55, 685, 685, 685, 685, 685,
+ 685, 831, 828, 1117, 338, 836, 836, 836, 836, 836,
+ 836, 836, 55, 869, 879, 879, 55, 541, 689, 690,
+ 690, 690, 690, 690, 690, 690, 691, 1458, 880, 1458,
+ 692, 916, 693, 1003, 55, 881, 692, 692, 692, 692,
+ 692, 692, 793, 793, 793, 793, 793, 793, 793, 882,
+ 55, 1010, 816, 1458, 880, 1458, 881, 885, 693, 528,
+ 696, 696, 696, 696, 696, 696, 696, 681, 55, 1086,
+ 1458, 697, 1033, 709, 55, 882, 1409, 697, 697, 697,
- 678, 678, 678, 678, 678, 678, 679, 55, 688, 860,
- 680, 975, 681, 858, 852, 1053, 680, 680, 680, 680,
- 680, 680, 870, 871, 871, 871, 871, 871, 871, 873,
- 874, 874, 874, 874, 874, 874, 974, 55, 681, 516,
- 686, 686, 686, 686, 686, 686, 686, 663, 1009, 677,
- 1437, 687, 848, 846, 841, 55, 991, 687, 687, 687,
- 687, 687, 687, 688, 689, 689, 689, 689, 689, 689,
- 689, 690, 1041, 992, 1006, 691, 1437, 692, 668, 55,
- 55, 691, 691, 691, 691, 691, 691, 877, 878, 878,
- 878, 878, 878, 878, 837, 832, 1030, 55, 55, 1003,
+ 697, 697, 697, 698, 699, 699, 699, 699, 699, 699,
+ 699, 700, 55, 881, 879, 701, 1458, 702, 873, 1074,
+ 1030, 701, 701, 701, 701, 701, 701, 891, 892, 892,
+ 892, 892, 892, 892, 894, 895, 895, 895, 895, 895,
+ 895, 995, 55, 702, 537, 707, 707, 707, 707, 707,
+ 707, 707, 684, 698, 869, 996, 708, 867, 862, 1062,
+ 55, 1012, 708, 708, 708, 708, 708, 708, 709, 710,
+ 710, 710, 710, 710, 710, 710, 711, 1027, 1013, 689,
+ 712, 996, 713, 858, 55, 55, 712, 712, 712, 712,
+ 712, 712, 898, 899, 899, 899, 899, 899, 899, 853,
- 976, 976, 55, 692, 620, 702, 702, 702, 702, 702,
- 702, 702, 622, 893, 977, 1437, 703, 1091, 1021, 918,
- 55, 903, 703, 703, 703, 703, 703, 703, 704, 705,
- 705, 705, 705, 705, 705, 985, 1012, 1009, 1006, 706,
- 977, 1437, 1003, 1001, 903, 706, 706, 706, 706, 706,
- 706, 53, 53, 53, 53, 53, 53, 53, 793, 982,
- 795, 620, 53, 55, 55, 55, 55, 55, 53, 53,
- 53, 53, 53, 53, 922, 923, 923, 923, 923, 923,
- 923, 55, 55, 55, 55, 55, 708, 726, 789, 727,
- 727, 727, 727, 727, 727, 727, 986, 987, 988, 993,
+ 1051, 1024, 55, 55, 1042, 995, 997, 55, 713, 641,
+ 723, 723, 723, 723, 723, 723, 723, 643, 914, 1458,
+ 998, 724, 1112, 939, 924, 55, 997, 724, 724, 724,
+ 724, 724, 724, 725, 726, 726, 726, 726, 726, 726,
+ 1458, 1014, 1033, 1030, 727, 1458, 998, 1027, 1024, 1022,
+ 727, 727, 727, 727, 727, 727, 53, 53, 53, 53,
+ 53, 53, 53, 924, 814, 1003, 1458, 53, 55, 55,
+ 55, 55, 55, 53, 53, 53, 53, 53, 53, 943,
+ 944, 944, 944, 944, 944, 944, 55, 55, 55, 55,
+ 55, 729, 747, 816, 748, 748, 748, 748, 748, 748,
- 727, 995, 1340, 55, 55, 55, 727, 727, 727, 727,
- 727, 727, 930, 931, 931, 931, 931, 931, 931, 1024,
- 1024, 55, 55, 55, 53, 728, 729, 729, 729, 729,
- 729, 729, 729, 1025, 1437, 1087, 1090, 729, 1195, 787,
- 866, 827, 854, 729, 729, 729, 729, 729, 729, 934,
- 935, 935, 935, 935, 935, 935, 824, 843, 821, 1025,
- 1437, 53, 650, 650, 650, 650, 650, 650, 650, 942,
- 943, 943, 943, 943, 943, 943, 945, 946, 946, 946,
- 946, 946, 946, 949, 950, 950, 950, 950, 950, 950,
- 958, 959, 959, 959, 959, 959, 959, 53, 651, 651,
+ 748, 1006, 1007, 1008, 1009, 748, 1016, 641, 55, 1109,
+ 55, 748, 748, 748, 748, 748, 748, 951, 952, 952,
+ 952, 952, 952, 952, 1045, 1045, 55, 55, 55, 53,
+ 749, 750, 750, 750, 750, 750, 750, 750, 1046, 1458,
+ 1108, 810, 750, 1216, 808, 55, 887, 848, 750, 750,
+ 750, 750, 750, 750, 955, 956, 956, 956, 956, 956,
+ 956, 875, 1361, 845, 1046, 1458, 53, 671, 671, 671,
+ 671, 671, 671, 671, 963, 964, 964, 964, 964, 964,
+ 964, 966, 967, 967, 967, 967, 967, 967, 970, 971,
+ 971, 971, 971, 971, 971, 979, 980, 980, 980, 980,
- 651, 651, 651, 651, 651, 834, 918, 903, 827, 651,
- 824, 821, 903, 795, 622, 651, 651, 651, 651, 651,
- 651, 730, 331, 331, 331, 331, 331, 331, 331, 253,
- 732, 732, 732, 732, 732, 732, 732, 688, 866, 827,
- 516, 733, 684, 682, 677, 854, 824, 733, 733, 733,
- 733, 733, 733, 53, 733, 733, 733, 733, 733, 733,
- 733, 736, 737, 737, 737, 737, 737, 737, 507, 673,
- 668, 843, 738, 821, 834, 831, 747, 735, 738, 738,
- 738, 738, 738, 738, 507, 596, 596, 596, 596, 596,
- 596, 596, 660, 827, 824, 821, 597, 819, 735, 620,
+ 980, 980, 53, 672, 672, 672, 672, 672, 672, 672,
+ 864, 842, 855, 939, 672, 924, 848, 845, 842, 924,
+ 672, 672, 672, 672, 672, 672, 751, 350, 350, 350,
+ 350, 350, 350, 350, 265, 753, 753, 753, 753, 753,
+ 753, 753, 816, 643, 709, 887, 754, 848, 537, 705,
+ 703, 698, 754, 754, 754, 754, 754, 754, 53, 754,
+ 754, 754, 754, 754, 754, 754, 757, 758, 758, 758,
+ 758, 758, 758, 875, 845, 528, 694, 759, 689, 864,
+ 842, 855, 852, 759, 759, 759, 759, 759, 759, 528,
+ 617, 617, 617, 617, 617, 617, 617, 681, 768, 756,
- 795, 1033, 597, 597, 597, 597, 597, 597, 739, 740,
- 740, 740, 740, 740, 740, 1034, 622, 441, 616, 741,
- 614, 690, 663, 679, 660, 741, 741, 741, 741, 741,
- 741, 516, 608, 608, 608, 608, 608, 608, 608, 663,
- 670, 1034, 747, 609, 735, 663, 660, 735, 1033, 609,
- 609, 609, 609, 609, 609, 742, 743, 743, 743, 743,
- 743, 743, 1437, 53, 53, 53, 744, 722, 53, 53,
- 716, 622, 744, 744, 744, 744, 744, 744, 748, 749,
- 749, 749, 749, 749, 749, 426, 443, 516, 1437, 750,
- 690, 663, 343, 512, 507, 750, 750, 750, 750, 750,
+ 848, 618, 845, 842, 840, 756, 1054, 618, 618, 618,
+ 618, 618, 618, 760, 761, 761, 761, 761, 761, 761,
+ 1055, 641, 816, 643, 762, 462, 637, 635, 711, 684,
+ 762, 762, 762, 762, 762, 762, 537, 629, 629, 629,
+ 629, 629, 629, 629, 684, 700, 1055, 681, 630, 691,
+ 768, 756, 684, 1054, 630, 630, 630, 630, 630, 630,
+ 763, 764, 764, 764, 764, 764, 764, 1458, 681, 756,
+ 53, 765, 53, 53, 743, 53, 53, 765, 765, 765,
+ 765, 765, 765, 769, 770, 770, 770, 770, 770, 770,
+ 447, 737, 643, 1458, 771, 464, 537, 711, 684, 362,
- 750, 668, 753, 753, 753, 753, 753, 753, 753, 670,
- 679, 660, 670, 754, 667, 590, 581, 663, 660, 754,
- 754, 754, 754, 754, 754, 755, 756, 756, 756, 756,
- 756, 756, 426, 658, 581, 571, 757, 569, 647, 646,
- 645, 644, 757, 757, 757, 757, 757, 757, 677, 765,
- 765, 765, 765, 765, 765, 765, 679, 643, 642, 641,
- 766, 640, 639, 638, 637, 636, 766, 766, 766, 766,
- 766, 766, 767, 768, 768, 768, 768, 768, 768, 426,
- 635, 634, 633, 769, 632, 631, 630, 629, 628, 769,
- 769, 769, 769, 769, 769, 688, 780, 780, 780, 780,
+ 771, 771, 771, 771, 771, 771, 689, 774, 774, 774,
+ 774, 774, 774, 774, 691, 533, 528, 700, 775, 681,
+ 691, 688, 611, 602, 775, 775, 775, 775, 775, 775,
+ 776, 777, 777, 777, 777, 777, 777, 447, 684, 681,
+ 679, 778, 602, 592, 590, 668, 667, 778, 778, 778,
+ 778, 778, 778, 698, 786, 786, 786, 786, 786, 786,
+ 786, 700, 666, 665, 664, 787, 663, 662, 661, 660,
+ 659, 787, 787, 787, 787, 787, 787, 788, 789, 789,
+ 789, 789, 789, 789, 447, 658, 657, 656, 790, 655,
+ 654, 653, 652, 651, 790, 790, 790, 790, 790, 790,
- 780, 780, 780, 690, 627, 626, 625, 781, 441, 622,
- 443, 437, 518, 781, 781, 781, 781, 781, 781, 782,
- 783, 783, 783, 783, 783, 783, 426, 502, 509, 590,
- 784, 581, 502, 581, 575, 575, 784, 784, 784, 784,
- 784, 784, 620, 791, 791, 791, 791, 791, 791, 791,
- 622, 568, 567, 566, 792, 565, 564, 563, 562, 561,
- 792, 792, 792, 792, 792, 792, 793, 794, 794, 794,
- 794, 794, 794, 794, 795, 560, 316, 225, 796, 559,
- 797, 558, 557, 556, 796, 796, 796, 796, 796, 796,
- 961, 962, 962, 962, 962, 962, 962, 965, 966, 966,
+ 709, 801, 801, 801, 801, 801, 801, 801, 711, 650,
+ 649, 648, 802, 647, 646, 462, 643, 464, 802, 802,
+ 802, 802, 802, 802, 803, 804, 804, 804, 804, 804,
+ 804, 447, 458, 539, 523, 805, 530, 611, 602, 523,
+ 602, 805, 805, 805, 805, 805, 805, 641, 812, 812,
+ 812, 812, 812, 812, 812, 643, 596, 596, 589, 813,
+ 588, 587, 586, 585, 584, 813, 813, 813, 813, 813,
+ 813, 814, 815, 815, 815, 815, 815, 815, 815, 816,
+ 583, 582, 581, 817, 335, 818, 237, 580, 579, 817,
+ 817, 817, 817, 817, 817, 982, 983, 983, 983, 983,
- 966, 966, 966, 966, 1035, 1035, 797, 55, 1045, 811,
- 811, 811, 811, 811, 811, 811, 555, 554, 1036, 1437,
- 811, 553, 1046, 552, 551, 55, 811, 811, 811, 811,
- 811, 811, 812, 812, 812, 812, 812, 812, 812, 550,
- 549, 548, 545, 812, 1036, 1437, 542, 541, 1046, 812,
- 812, 812, 812, 812, 812, 813, 814, 814, 814, 814,
- 814, 814, 540, 539, 538, 537, 815, 536, 55, 535,
- 534, 533, 815, 815, 815, 815, 815, 815, 253, 816,
- 816, 816, 816, 816, 816, 816, 55, 443, 265, 426,
- 817, 343, 518, 502, 509, 1387, 817, 817, 817, 817,
+ 983, 983, 986, 987, 987, 987, 987, 987, 987, 1056,
+ 1056, 818, 55, 1066, 832, 832, 832, 832, 832, 832,
+ 832, 578, 577, 1057, 1458, 832, 576, 1067, 575, 574,
+ 55, 832, 832, 832, 832, 832, 832, 833, 833, 833,
+ 833, 833, 833, 833, 573, 572, 571, 570, 833, 1057,
+ 1458, 569, 566, 1067, 833, 833, 833, 833, 833, 833,
+ 834, 835, 835, 835, 835, 835, 835, 563, 562, 561,
+ 560, 836, 559, 55, 558, 557, 556, 836, 836, 836,
+ 836, 836, 836, 265, 837, 837, 837, 837, 837, 837,
+ 837, 55, 555, 554, 464, 838, 277, 447, 362, 539,
- 817, 817, 53, 817, 817, 817, 817, 817, 817, 817,
- 668, 820, 820, 820, 820, 820, 820, 820, 821, 426,
- 506, 423, 822, 417, 672, 502, 500, 417, 822, 822,
- 822, 822, 822, 822, 871, 871, 871, 871, 871, 871,
- 871, 943, 943, 943, 943, 943, 943, 943, 1045, 409,
- 672, 677, 823, 823, 823, 823, 823, 823, 823, 824,
- 403, 1047, 1437, 825, 487, 681, 486, 1047, 1057, 825,
- 825, 825, 825, 825, 825, 1048, 485, 484, 483, 482,
- 481, 1437, 1058, 480, 479, 478, 477, 55, 1437, 1057,
- 476, 681, 688, 826, 826, 826, 826, 826, 826, 826,
+ 1408, 838, 838, 838, 838, 838, 838, 53, 838, 838,
+ 838, 838, 838, 838, 838, 689, 841, 841, 841, 841,
+ 841, 841, 841, 842, 523, 530, 447, 843, 527, 693,
+ 444, 438, 523, 843, 843, 843, 843, 843, 843, 892,
+ 892, 892, 892, 892, 892, 892, 964, 964, 964, 964,
+ 964, 964, 964, 1066, 521, 693, 698, 844, 844, 844,
+ 844, 844, 844, 844, 845, 438, 1068, 1458, 846, 430,
+ 702, 424, 1068, 1078, 846, 846, 846, 846, 846, 846,
+ 1069, 508, 507, 506, 505, 504, 1458, 1079, 503, 502,
+ 501, 500, 55, 1458, 1078, 499, 702, 709, 847, 847,
- 827, 1048, 475, 1437, 828, 55, 692, 1437, 1058, 1059,
- 828, 828, 828, 828, 828, 828, 959, 959, 959, 959,
- 959, 959, 959, 1060, 1386, 472, 471, 468, 1059, 1437,
- 1177, 467, 692, 832, 833, 833, 833, 833, 833, 833,
- 833, 834, 1437, 466, 1178, 835, 465, 836, 464, 1060,
- 1177, 835, 835, 835, 835, 835, 835, 1069, 1070, 1070,
- 1070, 1070, 1070, 1070, 1437, 114, 463, 462, 1437, 1179,
- 1178, 1179, 453, 836, 668, 839, 839, 839, 839, 839,
- 839, 839, 821, 1180, 452, 1437, 840, 451, 450, 449,
- 1437, 448, 840, 840, 840, 840, 840, 840, 841, 842,
+ 847, 847, 847, 847, 847, 848, 1069, 498, 1458, 849,
+ 55, 713, 1458, 1079, 1080, 849, 849, 849, 849, 849,
+ 849, 980, 980, 980, 980, 980, 980, 980, 1081, 1407,
+ 497, 496, 493, 1080, 1458, 1198, 492, 713, 853, 854,
+ 854, 854, 854, 854, 854, 854, 855, 1458, 489, 1199,
+ 856, 488, 857, 487, 1081, 1198, 856, 856, 856, 856,
+ 856, 856, 1090, 1091, 1091, 1091, 1091, 1091, 1091, 1458,
+ 486, 485, 119, 1458, 1200, 1199, 1200, 484, 857, 689,
+ 860, 860, 860, 860, 860, 860, 860, 842, 1201, 483,
+ 1458, 861, 474, 473, 472, 1458, 471, 861, 861, 861,
- 842, 842, 842, 842, 842, 842, 843, 447, 446, 1180,
- 844, 1437, 845, 263, 443, 265, 844, 844, 844, 844,
- 844, 844, 1072, 1073, 1073, 1073, 1073, 1073, 1073, 1076,
- 1077, 1077, 1077, 1077, 1077, 1077, 1223, 426, 845, 677,
- 850, 850, 850, 850, 850, 850, 850, 824, 345, 423,
- 1224, 851, 417, 417, 410, 410, 402, 851, 851, 851,
- 851, 851, 851, 852, 853, 853, 853, 853, 853, 853,
- 853, 854, 55, 55, 1223, 855, 1224, 856, 395, 394,
- 391, 855, 855, 855, 855, 855, 855, 390, 1437, 389,
- 55, 55, 1119, 1120, 1120, 1120, 1120, 1120, 1120, 1228,
+ 861, 861, 861, 862, 863, 863, 863, 863, 863, 863,
+ 863, 864, 470, 469, 1201, 865, 1458, 866, 468, 467,
+ 275, 865, 865, 865, 865, 865, 865, 1093, 1094, 1094,
+ 1094, 1094, 1094, 1094, 1097, 1098, 1098, 1098, 1098, 1098,
+ 1098, 1244, 464, 866, 698, 871, 871, 871, 871, 871,
+ 871, 871, 845, 277, 447, 1245, 872, 364, 444, 438,
+ 438, 55, 872, 872, 872, 872, 872, 872, 873, 874,
+ 874, 874, 874, 874, 874, 874, 875, 55, 55, 55,
+ 876, 1245, 877, 431, 431, 423, 876, 876, 876, 876,
+ 876, 876, 416, 1111, 415, 55, 55, 1140, 1141, 1141,
- 388, 1084, 1085, 856, 688, 862, 862, 862, 862, 862,
- 862, 862, 827, 1229, 1437, 387, 863, 386, 385, 384,
- 383, 382, 863, 863, 863, 863, 863, 863, 864, 865,
- 865, 865, 865, 865, 865, 865, 866, 55, 1228, 1229,
- 867, 381, 868, 380, 379, 55, 867, 867, 867, 867,
- 867, 867, 1437, 378, 377, 55, 1125, 1126, 1126, 1126,
- 1126, 1126, 1126, 55, 376, 1230, 1086, 375, 868, 793,
- 879, 879, 879, 879, 879, 879, 879, 795, 1437, 1231,
- 370, 880, 1415, 369, 298, 368, 1230, 880, 880, 880,
- 880, 880, 880, 881, 882, 882, 882, 882, 882, 882,
+ 1141, 1141, 1141, 1141, 1244, 412, 1105, 1106, 877, 709,
+ 883, 883, 883, 883, 883, 883, 883, 848, 1458, 411,
+ 410, 884, 409, 408, 407, 406, 405, 884, 884, 884,
+ 884, 884, 884, 885, 886, 886, 886, 886, 886, 886,
+ 886, 887, 55, 1249, 1458, 888, 404, 889, 403, 402,
+ 55, 888, 888, 888, 888, 888, 888, 1250, 401, 400,
+ 55, 1146, 1147, 1147, 1147, 1147, 1147, 1147, 55, 399,
+ 1249, 1107, 398, 889, 814, 900, 900, 900, 900, 900,
+ 900, 900, 816, 1250, 1458, 397, 901, 1436, 396, 391,
+ 390, 1251, 901, 901, 901, 901, 901, 901, 902, 903,
- 1437, 367, 366, 365, 883, 1231, 364, 363, 357, 265,
- 883, 883, 883, 883, 883, 883, 55, 1236, 896, 896,
- 896, 896, 896, 896, 896, 345, 1437, 261, 342, 896,
- 258, 1237, 338, 252, 55, 896, 896, 896, 896, 896,
- 896, 897, 897, 897, 897, 897, 897, 897, 246, 137,
- 326, 325, 897, 324, 319, 298, 318, 1237, 897, 897,
- 897, 897, 897, 897, 575, 898, 898, 898, 898, 898,
- 898, 898, 317, 316, 315, 314, 899, 313, 408, 312,
- 311, 310, 899, 899, 899, 899, 899, 899, 1129, 1130,
- 1130, 1130, 1130, 1130, 1130, 1135, 1136, 1136, 1136, 1136,
+ 903, 903, 903, 903, 903, 1252, 389, 388, 317, 904,
+ 1458, 387, 386, 385, 384, 904, 904, 904, 904, 904,
+ 904, 55, 1251, 917, 917, 917, 917, 917, 917, 917,
+ 383, 1252, 382, 376, 917, 277, 1458, 364, 273, 55,
+ 917, 917, 917, 917, 917, 917, 918, 918, 918, 918,
+ 918, 918, 918, 361, 270, 357, 264, 918, 258, 142,
+ 345, 344, 1458, 918, 918, 918, 918, 918, 918, 596,
+ 919, 919, 919, 919, 919, 919, 919, 343, 338, 317,
+ 337, 920, 336, 429, 335, 334, 333, 920, 920, 920,
+ 920, 920, 920, 1150, 1151, 1151, 1151, 1151, 1151, 1151,
- 1136, 1136, 309, 1236, 408, 899, 899, 899, 899, 899,
- 899, 899, 308, 307, 306, 305, 899, 1437, 304, 301,
- 300, 299, 899, 899, 899, 899, 899, 899, 253, 900,
- 900, 900, 900, 900, 900, 900, 298, 297, 296, 295,
- 901, 294, 293, 1437, 292, 291, 901, 901, 901, 901,
- 901, 901, 53, 901, 901, 901, 901, 901, 901, 901,
- 904, 905, 905, 905, 905, 905, 905, 290, 289, 288,
- 287, 906, 286, 285, 284, 283, 137, 906, 906, 906,
- 906, 906, 906, 668, 753, 753, 753, 753, 753, 753,
- 753, 821, 282, 281, 280, 754, 279, 278, 277, 276,
+ 1156, 1157, 1157, 1157, 1157, 1157, 1157, 332, 1257, 429,
+ 920, 920, 920, 920, 920, 920, 920, 331, 330, 329,
+ 328, 920, 1258, 327, 326, 325, 324, 920, 920, 920,
+ 920, 920, 920, 265, 921, 921, 921, 921, 921, 921,
+ 921, 323, 320, 319, 318, 922, 317, 316, 1258, 315,
+ 314, 922, 922, 922, 922, 922, 922, 53, 922, 922,
+ 922, 922, 922, 922, 922, 925, 926, 926, 926, 926,
+ 926, 926, 313, 312, 311, 310, 927, 309, 308, 307,
+ 306, 305, 927, 927, 927, 927, 927, 927, 689, 774,
+ 774, 774, 774, 774, 774, 774, 842, 304, 303, 302,
- 1238, 754, 754, 754, 754, 754, 754, 907, 908, 908,
- 908, 908, 908, 908, 1239, 275, 274, 273, 909, 272,
- 271, 270, 269, 268, 909, 909, 909, 909, 909, 909,
- 677, 765, 765, 765, 765, 765, 765, 765, 824, 265,
- 1239, 253, 766, 258, 245, 244, 243, 1238, 766, 766,
- 766, 766, 766, 766, 910, 911, 911, 911, 911, 911,
- 911, 1437, 242, 241, 240, 912, 239, 238, 237, 236,
- 233, 912, 912, 912, 912, 912, 912, 688, 780, 780,
- 780, 780, 780, 780, 780, 827, 230, 1437, 227, 781,
- 226, 225, 224, 221, 1244, 781, 781, 781, 781, 781,
+ 775, 301, 300, 299, 298, 1257, 775, 775, 775, 775,
+ 775, 775, 928, 929, 929, 929, 929, 929, 929, 1458,
+ 297, 296, 295, 930, 142, 294, 293, 292, 291, 930,
+ 930, 930, 930, 930, 930, 698, 786, 786, 786, 786,
+ 786, 786, 786, 845, 290, 1458, 289, 787, 288, 287,
+ 286, 285, 1259, 787, 787, 787, 787, 787, 787, 931,
+ 932, 932, 932, 932, 932, 932, 1260, 284, 283, 282,
+ 933, 281, 280, 277, 265, 270, 933, 933, 933, 933,
+ 933, 933, 709, 801, 801, 801, 801, 801, 801, 801,
+ 848, 257, 1260, 256, 802, 255, 254, 253, 252, 1259,
- 781, 913, 914, 914, 914, 914, 914, 914, 1245, 220,
- 219, 218, 915, 217, 216, 215, 214, 213, 915, 915,
- 915, 915, 915, 915, 919, 920, 920, 920, 920, 920,
- 920, 426, 212, 211, 1245, 921, 210, 209, 208, 207,
- 206, 921, 921, 921, 921, 921, 921, 832, 924, 924,
- 924, 924, 924, 924, 924, 834, 202, 201, 191, 925,
- 190, 189, 186, 185, 184, 925, 925, 925, 925, 925,
- 925, 926, 927, 927, 927, 927, 927, 927, 426, 183,
- 182, 181, 928, 180, 179, 175, 174, 173, 928, 928,
- 928, 928, 928, 928, 841, 936, 936, 936, 936, 936,
+ 802, 802, 802, 802, 802, 802, 934, 935, 935, 935,
+ 935, 935, 935, 1458, 251, 250, 249, 936, 248, 245,
+ 242, 239, 238, 936, 936, 936, 936, 936, 936, 940,
+ 941, 941, 941, 941, 941, 941, 447, 237, 236, 1458,
+ 942, 233, 232, 231, 230, 229, 942, 942, 942, 942,
+ 942, 942, 853, 945, 945, 945, 945, 945, 945, 945,
+ 855, 228, 227, 226, 946, 225, 224, 223, 222, 221,
+ 946, 946, 946, 946, 946, 946, 947, 948, 948, 948,
+ 948, 948, 948, 447, 220, 219, 218, 949, 214, 213,
+ 203, 202, 201, 949, 949, 949, 949, 949, 949, 862,
- 936, 936, 843, 172, 171, 170, 937, 169, 168, 167,
- 166, 165, 937, 937, 937, 937, 937, 937, 938, 939,
- 939, 939, 939, 939, 939, 426, 164, 163, 162, 940,
- 161, 160, 159, 154, 145, 940, 940, 940, 940, 940,
- 940, 852, 951, 951, 951, 951, 951, 951, 951, 854,
- 144, 139, 89, 952, 59, 47, 45, 1437, 1437, 952,
- 952, 952, 952, 952, 952, 953, 954, 954, 954, 954,
- 954, 954, 426, 1437, 1437, 1437, 955, 1437, 1437, 1437,
- 1437, 1437, 955, 955, 955, 955, 955, 955, 864, 967,
- 967, 967, 967, 967, 967, 967, 866, 1437, 1437, 1437,
+ 957, 957, 957, 957, 957, 957, 957, 864, 198, 197,
+ 192, 958, 191, 190, 189, 188, 187, 958, 958, 958,
+ 958, 958, 958, 959, 960, 960, 960, 960, 960, 960,
+ 447, 186, 185, 184, 961, 180, 179, 178, 177, 176,
+ 961, 961, 961, 961, 961, 961, 873, 972, 972, 972,
+ 972, 972, 972, 972, 875, 175, 174, 173, 973, 172,
+ 171, 170, 169, 168, 973, 973, 973, 973, 973, 973,
+ 974, 975, 975, 975, 975, 975, 975, 447, 167, 166,
+ 165, 976, 164, 159, 150, 149, 144, 976, 976, 976,
+ 976, 976, 976, 885, 988, 988, 988, 988, 988, 988,
- 968, 1437, 1437, 1437, 1437, 1437, 968, 968, 968, 968,
- 968, 968, 969, 970, 970, 970, 970, 970, 970, 426,
- 1437, 1437, 1437, 971, 1437, 1437, 1437, 1437, 1437, 971,
- 971, 971, 971, 971, 971, 793, 978, 978, 978, 978,
- 978, 978, 978, 795, 1437, 1437, 1437, 979, 1437, 1437,
- 1437, 1437, 1437, 979, 979, 979, 979, 979, 979, 980,
- 981, 981, 981, 981, 981, 981, 981, 982, 1437, 1437,
- 1437, 983, 1437, 984, 1437, 1437, 1437, 983, 983, 983,
- 983, 983, 983, 1138, 1139, 1139, 1139, 1139, 1139, 1139,
- 1142, 1143, 1143, 1143, 1143, 1143, 1143, 1437, 1437, 984,
+ 988, 887, 59, 47, 45, 989, 1458, 1458, 1458, 1458,
+ 1458, 989, 989, 989, 989, 989, 989, 990, 991, 991,
+ 991, 991, 991, 991, 447, 1458, 1458, 1458, 992, 1458,
+ 1458, 1458, 1458, 1458, 992, 992, 992, 992, 992, 992,
+ 814, 999, 999, 999, 999, 999, 999, 999, 816, 1458,
+ 1458, 1458, 1000, 1458, 1458, 1458, 1458, 1458, 1000, 1000,
+ 1000, 1000, 1000, 1000, 1001, 1002, 1002, 1002, 1002, 1002,
+ 1002, 1002, 1003, 1458, 1458, 1458, 1004, 1458, 1005, 1458,
+ 1458, 1458, 1004, 1004, 1004, 1004, 1004, 1004, 1159, 1160,
+ 1160, 1160, 1160, 1160, 1160, 1163, 1164, 1164, 1164, 1164,
- 55, 575, 997, 997, 997, 997, 997, 997, 997, 1437,
- 1437, 1437, 1437, 998, 1437, 1437, 1437, 1437, 55, 998,
- 998, 998, 998, 998, 998, 53, 998, 998, 998, 998,
- 998, 998, 998, 55, 253, 999, 999, 999, 999, 999,
- 999, 999, 1149, 1150, 1150, 1150, 1150, 1150, 1150, 1437,
- 1437, 55, 832, 1002, 1002, 1002, 1002, 1002, 1002, 1002,
- 1003, 1437, 1437, 1437, 1004, 1437, 836, 1437, 1437, 1437,
- 1004, 1004, 1004, 1004, 1004, 1004, 1152, 1153, 1153, 1153,
- 1153, 1153, 1153, 1156, 1157, 1157, 1157, 1157, 1157, 1157,
- 1437, 1437, 836, 841, 1005, 1005, 1005, 1005, 1005, 1005,
+ 1164, 1164, 1458, 1458, 1005, 55, 596, 1018, 1018, 1018,
+ 1018, 1018, 1018, 1018, 1458, 1458, 1458, 1458, 1019, 1458,
+ 1458, 1458, 1458, 55, 1019, 1019, 1019, 1019, 1019, 1019,
+ 53, 1019, 1019, 1019, 1019, 1019, 1019, 1019, 55, 265,
+ 1020, 1020, 1020, 1020, 1020, 1020, 1020, 1170, 1171, 1171,
+ 1171, 1171, 1171, 1171, 1458, 1458, 55, 853, 1023, 1023,
+ 1023, 1023, 1023, 1023, 1023, 1024, 1458, 1458, 1458, 1025,
+ 1458, 857, 1458, 1458, 1458, 1025, 1025, 1025, 1025, 1025,
+ 1025, 1173, 1174, 1174, 1174, 1174, 1174, 1174, 1177, 1178,
+ 1178, 1178, 1178, 1178, 1178, 1458, 1458, 857, 862, 1026,
- 1005, 1006, 1437, 1437, 1437, 1007, 1437, 845, 1437, 1437,
- 1437, 1007, 1007, 1007, 1007, 1007, 1007, 1163, 1164, 1164,
- 1164, 1164, 1164, 1164, 1166, 1167, 1167, 1167, 1167, 1167,
- 1167, 1437, 1437, 845, 852, 1008, 1008, 1008, 1008, 1008,
- 1008, 1008, 1009, 1437, 1437, 1437, 1010, 1437, 856, 1437,
- 1437, 1437, 1010, 1010, 1010, 1010, 1010, 1010, 1170, 1171,
- 1171, 1171, 1171, 1171, 1171, 1070, 1070, 1070, 1070, 1070,
- 1070, 1070, 55, 1437, 856, 864, 1011, 1011, 1011, 1011,
- 1011, 1011, 1011, 1012, 1437, 1244, 1246, 1013, 1437, 868,
- 55, 1437, 1437, 1013, 1013, 1013, 1013, 1013, 1013, 1437,
+ 1026, 1026, 1026, 1026, 1026, 1026, 1027, 1458, 1458, 1458,
+ 1028, 1458, 866, 1458, 1458, 1458, 1028, 1028, 1028, 1028,
+ 1028, 1028, 1184, 1185, 1185, 1185, 1185, 1185, 1185, 1187,
+ 1188, 1188, 1188, 1188, 1188, 1188, 1458, 1458, 866, 873,
+ 1029, 1029, 1029, 1029, 1029, 1029, 1029, 1030, 1458, 1458,
+ 1458, 1031, 1458, 877, 1458, 1458, 1458, 1031, 1031, 1031,
+ 1031, 1031, 1031, 1191, 1192, 1192, 1192, 1192, 1192, 1192,
+ 1091, 1091, 1091, 1091, 1091, 1091, 1091, 55, 1458, 877,
+ 885, 1032, 1032, 1032, 1032, 1032, 1032, 1032, 1033, 1458,
+ 1265, 1265, 1034, 1458, 889, 55, 1458, 1458, 1034, 1034,
- 1247, 1193, 1215, 1216, 1216, 1216, 1216, 1216, 1216, 1437,
- 1246, 1437, 1437, 1437, 1252, 868, 1015, 1016, 1016, 1016,
- 1016, 1016, 1016, 1017, 1437, 1437, 1247, 1018, 1253, 1437,
- 1437, 1437, 1437, 1018, 1018, 1018, 1018, 1018, 1018, 1019,
- 1020, 1020, 1020, 1020, 1020, 1020, 1020, 1021, 1437, 1437,
- 1437, 1022, 1437, 1023, 1253, 1437, 1437, 1022, 1022, 1022,
- 1022, 1022, 1022, 1136, 1136, 1136, 1136, 1136, 1136, 1136,
- 1150, 1150, 1150, 1150, 1150, 1150, 1150, 1252, 1437, 1023,
- 832, 1026, 1026, 1026, 1026, 1026, 1026, 1026, 1003, 1437,
- 1437, 1437, 1027, 1437, 1437, 1437, 1437, 1437, 1027, 1027,
+ 1034, 1034, 1034, 1034, 1266, 1458, 1214, 1236, 1237, 1237,
+ 1237, 1237, 1237, 1237, 1458, 1267, 1458, 1458, 1458, 1267,
+ 889, 1036, 1037, 1037, 1037, 1037, 1037, 1037, 1038, 1268,
+ 1266, 1458, 1039, 1458, 1458, 1458, 1458, 1458, 1039, 1039,
+ 1039, 1039, 1039, 1039, 1040, 1041, 1041, 1041, 1041, 1041,
+ 1041, 1041, 1042, 1458, 1458, 1268, 1043, 1458, 1044, 1458,
+ 1458, 1458, 1043, 1043, 1043, 1043, 1043, 1043, 1157, 1157,
+ 1157, 1157, 1157, 1157, 1157, 1171, 1171, 1171, 1171, 1171,
+ 1171, 1171, 1273, 1458, 1044, 853, 1047, 1047, 1047, 1047,
+ 1047, 1047, 1047, 1024, 1458, 1458, 1274, 1048, 1458, 1458,
- 1027, 1027, 1027, 1027, 1028, 1029, 1029, 1029, 1029, 1029,
- 1029, 1029, 1030, 1437, 1437, 1437, 1031, 1437, 1032, 1437,
- 1437, 1254, 1031, 1031, 1031, 1031, 1031, 1031, 1164, 1164,
- 1164, 1164, 1164, 1164, 1164, 1255, 1437, 1437, 1437, 1437,
- 1254, 1437, 1286, 1437, 1032, 841, 1037, 1037, 1037, 1037,
- 1037, 1037, 1037, 1006, 1437, 1437, 1287, 1038, 1437, 1437,
- 1437, 1255, 1437, 1038, 1038, 1038, 1038, 1038, 1038, 1039,
- 1040, 1040, 1040, 1040, 1040, 1040, 1040, 1041, 1437, 1437,
- 1437, 1042, 1287, 1043, 1437, 1437, 1437, 1042, 1042, 1042,
- 1042, 1042, 1042, 1260, 1261, 1261, 1261, 1261, 1261, 1261,
+ 1458, 1458, 1458, 1048, 1048, 1048, 1048, 1048, 1048, 1049,
+ 1050, 1050, 1050, 1050, 1050, 1050, 1050, 1051, 1458, 1458,
+ 1458, 1052, 1274, 1053, 1458, 1458, 1273, 1052, 1052, 1052,
+ 1052, 1052, 1052, 1185, 1185, 1185, 1185, 1185, 1185, 1185,
+ 1458, 1458, 1458, 1458, 1458, 1275, 1458, 1275, 1458, 1053,
+ 862, 1058, 1058, 1058, 1058, 1058, 1058, 1058, 1027, 1276,
+ 1458, 1458, 1059, 1458, 1458, 1458, 1458, 1458, 1059, 1059,
+ 1059, 1059, 1059, 1059, 1060, 1061, 1061, 1061, 1061, 1061,
+ 1061, 1061, 1062, 1458, 1458, 1276, 1063, 1458, 1064, 1458,
+ 1458, 1458, 1063, 1063, 1063, 1063, 1063, 1063, 1281, 1282,
- 1263, 1264, 1264, 1264, 1264, 1264, 1264, 1286, 1437, 1043,
- 852, 1049, 1049, 1049, 1049, 1049, 1049, 1049, 1009, 1437,
- 1437, 1437, 1050, 1437, 1437, 1437, 1437, 1437, 1050, 1050,
- 1050, 1050, 1050, 1050, 1051, 1052, 1052, 1052, 1052, 1052,
- 1052, 1052, 1053, 1437, 1437, 1437, 1054, 1437, 1055, 1437,
- 1437, 1437, 1054, 1054, 1054, 1054, 1054, 1054, 1267, 1268,
- 1268, 1268, 1268, 1268, 1268, 1292, 1293, 1293, 1293, 1293,
- 1293, 1293, 1333, 1437, 1055, 864, 1061, 1061, 1061, 1061,
- 1061, 1061, 1061, 1012, 1437, 1437, 1334, 1062, 1437, 1437,
- 1437, 1437, 55, 1062, 1062, 1062, 1062, 1062, 1062, 1063,
+ 1282, 1282, 1282, 1282, 1282, 1284, 1285, 1285, 1285, 1285,
+ 1285, 1285, 1307, 1458, 1064, 873, 1070, 1070, 1070, 1070,
+ 1070, 1070, 1070, 1030, 1458, 1458, 1308, 1071, 1458, 1458,
+ 1458, 1458, 1458, 1071, 1071, 1071, 1071, 1071, 1071, 1072,
+ 1073, 1073, 1073, 1073, 1073, 1073, 1073, 1074, 1458, 1458,
+ 1458, 1075, 1308, 1076, 1458, 1458, 1307, 1075, 1075, 1075,
+ 1075, 1075, 1075, 1288, 1289, 1289, 1289, 1289, 1289, 1289,
+ 1458, 1313, 1314, 1314, 1314, 1314, 1314, 1314, 1458, 1076,
+ 885, 1082, 1082, 1082, 1082, 1082, 1082, 1082, 1033, 1458,
+ 1458, 1458, 1083, 1458, 1458, 1458, 1458, 55, 1083, 1083,
- 1064, 1064, 1064, 1064, 1064, 1064, 1064, 1065, 55, 1437,
- 55, 1066, 1334, 1067, 1437, 1437, 1437, 1066, 1066, 1066,
- 1066, 1066, 1066, 1275, 1437, 1437, 55, 1297, 1298, 1298,
- 1298, 1298, 1298, 1298, 1437, 1437, 1333, 1276, 1437, 1067,
- 980, 1078, 1078, 1078, 1078, 1078, 1078, 1078, 982, 1437,
- 1437, 1437, 1079, 1437, 1437, 1437, 1437, 1335, 1079, 1079,
- 1079, 1079, 1079, 1079, 1080, 1081, 1081, 1081, 1081, 1081,
- 1081, 1336, 1437, 1437, 1437, 1082, 1437, 1437, 1437, 1437,
- 1437, 1082, 1082, 1082, 1082, 1082, 1082, 55, 575, 1094,
- 1094, 1094, 1094, 1094, 1094, 1094, 1437, 1336, 1437, 1437,
+ 1083, 1083, 1083, 1083, 1084, 1085, 1085, 1085, 1085, 1085,
+ 1085, 1085, 1086, 55, 1458, 55, 1087, 1458, 1088, 1458,
+ 1458, 1458, 1087, 1087, 1087, 1087, 1087, 1087, 1296, 1458,
+ 1458, 55, 1318, 1319, 1319, 1319, 1319, 1319, 1319, 1458,
+ 1458, 1354, 1297, 1458, 1088, 1001, 1099, 1099, 1099, 1099,
+ 1099, 1099, 1099, 1003, 1458, 1355, 1458, 1100, 1458, 1458,
+ 1458, 1458, 1354, 1100, 1100, 1100, 1100, 1100, 1100, 1101,
+ 1102, 1102, 1102, 1102, 1102, 1102, 1458, 1458, 1458, 1458,
+ 1103, 1355, 1458, 1458, 1458, 1458, 1103, 1103, 1103, 1103,
+ 1103, 1103, 55, 596, 1115, 1115, 1115, 1115, 1115, 1115,
- 901, 1437, 1437, 1437, 1437, 55, 901, 901, 901, 901,
- 901, 901, 53, 901, 901, 901, 901, 901, 901, 901,
- 55, 253, 999, 999, 999, 999, 999, 999, 999, 1300,
- 1301, 1301, 1301, 1301, 1301, 1301, 1437, 1335, 55, 1097,
- 1098, 1098, 1098, 1098, 1098, 1098, 1437, 1437, 1437, 1437,
- 1099, 1437, 1437, 1437, 1437, 1437, 1099, 1099, 1099, 1099,
- 1099, 1099, 832, 924, 924, 924, 924, 924, 924, 924,
- 1003, 1437, 1437, 1437, 925, 1437, 1437, 1437, 1437, 1358,
- 925, 925, 925, 925, 925, 925, 1100, 1101, 1101, 1101,
- 1101, 1101, 1101, 1359, 1437, 1437, 1437, 1102, 1437, 1437,
+ 1115, 1458, 1458, 1458, 1458, 922, 1458, 1458, 1458, 1458,
+ 55, 922, 922, 922, 922, 922, 922, 53, 922, 922,
+ 922, 922, 922, 922, 922, 55, 265, 1020, 1020, 1020,
+ 1020, 1020, 1020, 1020, 1321, 1322, 1322, 1322, 1322, 1322,
+ 1322, 1458, 1356, 55, 1118, 1119, 1119, 1119, 1119, 1119,
+ 1119, 1458, 1458, 1458, 1458, 1120, 1357, 1458, 1458, 1458,
+ 1458, 1120, 1120, 1120, 1120, 1120, 1120, 853, 945, 945,
+ 945, 945, 945, 945, 945, 1024, 1458, 1458, 1458, 946,
+ 1458, 1458, 1357, 1458, 1356, 946, 946, 946, 946, 946,
+ 946, 1121, 1122, 1122, 1122, 1122, 1122, 1122, 1458, 1458,
- 1437, 1437, 1437, 1102, 1102, 1102, 1102, 1102, 1102, 841,
- 936, 936, 936, 936, 936, 936, 936, 1006, 1437, 1359,
- 1437, 937, 1437, 1437, 1437, 1437, 1358, 937, 937, 937,
- 937, 937, 937, 1103, 1104, 1104, 1104, 1104, 1104, 1104,
- 1437, 1437, 1437, 1437, 1105, 1437, 1437, 1437, 1437, 1437,
- 1105, 1105, 1105, 1105, 1105, 1105, 852, 951, 951, 951,
- 951, 951, 951, 951, 1009, 1437, 1437, 1437, 952, 1437,
- 1437, 1437, 1437, 1362, 952, 952, 952, 952, 952, 952,
- 1106, 1107, 1107, 1107, 1107, 1107, 1107, 1363, 1437, 1437,
- 1437, 1108, 1437, 1437, 1437, 1437, 1437, 1108, 1108, 1108,
+ 1458, 1458, 1123, 1458, 1458, 1458, 1458, 1458, 1123, 1123,
+ 1123, 1123, 1123, 1123, 862, 957, 957, 957, 957, 957,
+ 957, 957, 1027, 1458, 1458, 1458, 958, 1458, 1458, 1458,
+ 1458, 1379, 958, 958, 958, 958, 958, 958, 1124, 1125,
+ 1125, 1125, 1125, 1125, 1125, 1380, 1458, 1458, 1458, 1126,
+ 1458, 1458, 1458, 1458, 1458, 1126, 1126, 1126, 1126, 1126,
+ 1126, 873, 972, 972, 972, 972, 972, 972, 972, 1030,
+ 1458, 1380, 1458, 973, 1458, 1458, 1458, 1458, 1379, 973,
+ 973, 973, 973, 973, 973, 1127, 1128, 1128, 1128, 1128,
+ 1128, 1128, 1458, 1458, 1458, 1458, 1129, 1458, 1458, 1458,
- 1108, 1108, 1108, 864, 967, 967, 967, 967, 967, 967,
- 967, 1012, 1437, 1363, 1437, 968, 1437, 1437, 1437, 1437,
- 1362, 968, 968, 968, 968, 968, 968, 1109, 1110, 1110,
- 1110, 1110, 1110, 1110, 1437, 1437, 1437, 1437, 1111, 1437,
- 1437, 1437, 1437, 1437, 1111, 1111, 1111, 1111, 1111, 1111,
- 1113, 1114, 1114, 1114, 1114, 1114, 1114, 1114, 1115, 1437,
- 1437, 1437, 1116, 1437, 1117, 1437, 1437, 1437, 1116, 1116,
- 1116, 1116, 1116, 1116, 1306, 1307, 1307, 1307, 1307, 1307,
- 1307, 1309, 1310, 1310, 1310, 1310, 1310, 1310, 1366, 1437,
- 1117, 1019, 1121, 1121, 1121, 1121, 1121, 1121, 1121, 1021,
+ 1458, 1458, 1129, 1129, 1129, 1129, 1129, 1129, 885, 988,
+ 988, 988, 988, 988, 988, 988, 1033, 1458, 1458, 1458,
+ 989, 1458, 1458, 1458, 1458, 1383, 989, 989, 989, 989,
+ 989, 989, 1130, 1131, 1131, 1131, 1131, 1131, 1131, 1384,
+ 1458, 1458, 1458, 1132, 1458, 1458, 1458, 1458, 1458, 1132,
+ 1132, 1132, 1132, 1132, 1132, 1134, 1135, 1135, 1135, 1135,
+ 1135, 1135, 1135, 1136, 1458, 1384, 1458, 1137, 1458, 1138,
+ 1458, 1458, 1458, 1137, 1137, 1137, 1137, 1137, 1137, 1327,
+ 1328, 1328, 1328, 1328, 1328, 1328, 1330, 1331, 1331, 1331,
+ 1331, 1331, 1331, 1383, 1458, 1138, 1040, 1142, 1142, 1142,
- 1437, 1437, 1367, 1122, 1437, 1437, 1437, 1437, 1437, 1122,
- 1122, 1122, 1122, 1122, 1122, 1028, 1131, 1131, 1131, 1131,
- 1131, 1131, 1131, 1030, 1437, 1437, 1437, 1132, 1367, 1437,
- 1437, 1437, 1437, 1132, 1132, 1132, 1132, 1132, 1132, 1039,
- 1144, 1144, 1144, 1144, 1144, 1144, 1144, 1041, 1437, 1437,
- 1437, 1145, 1437, 1437, 1437, 1437, 1437, 1145, 1145, 1145,
- 1145, 1145, 1145, 1051, 1158, 1158, 1158, 1158, 1158, 1158,
- 1158, 1053, 1437, 1437, 1437, 1159, 1437, 1437, 1437, 1437,
- 1437, 1159, 1159, 1159, 1159, 1159, 1159, 1063, 1172, 1172,
- 1172, 1172, 1172, 1172, 1172, 1065, 1437, 1437, 1437, 1173,
+ 1142, 1142, 1142, 1142, 1042, 1458, 1458, 1458, 1143, 1458,
+ 1458, 1458, 1458, 1458, 1143, 1143, 1143, 1143, 1143, 1143,
+ 1049, 1152, 1152, 1152, 1152, 1152, 1152, 1152, 1051, 1458,
+ 1458, 1458, 1153, 1458, 1458, 1458, 1458, 1458, 1153, 1153,
+ 1153, 1153, 1153, 1153, 1060, 1165, 1165, 1165, 1165, 1165,
+ 1165, 1165, 1062, 1458, 1458, 1458, 1166, 1458, 1458, 1458,
+ 1458, 1458, 1166, 1166, 1166, 1166, 1166, 1166, 1072, 1179,
+ 1179, 1179, 1179, 1179, 1179, 1179, 1074, 1458, 1458, 1458,
+ 1180, 1458, 1458, 1458, 1458, 1458, 1180, 1180, 1180, 1180,
+ 1180, 1180, 1084, 1193, 1193, 1193, 1193, 1193, 1193, 1193,
- 1437, 1437, 1437, 1437, 1437, 1173, 1173, 1173, 1173, 1173,
- 1173, 980, 1181, 1181, 1181, 1181, 1181, 1181, 1181, 982,
- 1437, 1437, 1437, 1182, 1437, 1437, 1437, 1437, 1437, 1182,
- 1182, 1182, 1182, 1182, 1182, 1183, 1184, 1184, 1184, 1184,
- 1184, 1184, 1184, 1185, 1437, 1437, 1437, 1186, 1437, 1187,
- 1437, 1437, 1437, 1186, 1186, 1186, 1186, 1186, 1186, 1315,
- 1316, 1316, 1316, 1316, 1316, 1316, 1318, 1319, 1319, 1319,
- 1319, 1319, 1319, 1437, 1437, 1187, 55, 575, 492, 492,
- 492, 492, 492, 492, 492, 1324, 1325, 1325, 1325, 1325,
- 1325, 1325, 1437, 1366, 55, 1196, 1197, 1197, 1197, 1197,
+ 1086, 1458, 1458, 1458, 1194, 1458, 1458, 1458, 1458, 1458,
+ 1194, 1194, 1194, 1194, 1194, 1194, 1001, 1202, 1202, 1202,
+ 1202, 1202, 1202, 1202, 1003, 1458, 1458, 1458, 1203, 1458,
+ 1458, 1458, 1458, 1458, 1203, 1203, 1203, 1203, 1203, 1203,
+ 1204, 1205, 1205, 1205, 1205, 1205, 1205, 1205, 1206, 1458,
+ 1458, 1458, 1207, 1458, 1208, 1458, 1458, 1458, 1207, 1207,
+ 1207, 1207, 1207, 1207, 1336, 1337, 1337, 1337, 1337, 1337,
+ 1337, 1339, 1340, 1340, 1340, 1340, 1340, 1340, 1458, 1458,
+ 1208, 55, 596, 513, 513, 513, 513, 513, 513, 513,
+ 1345, 1346, 1346, 1346, 1346, 1346, 1346, 1458, 1387, 55,
- 1197, 1197, 1198, 1437, 1437, 1437, 1199, 1437, 1437, 1437,
- 1437, 1437, 1199, 1199, 1199, 1199, 1199, 1199, 1019, 1200,
- 1200, 1200, 1200, 1200, 1200, 1200, 1201, 1437, 1437, 1437,
- 1202, 1437, 1023, 1437, 1437, 1437, 1202, 1202, 1202, 1202,
- 1202, 1202, 1327, 1328, 1328, 1328, 1328, 1328, 1328, 1261,
- 1261, 1261, 1261, 1261, 1261, 1261, 1437, 1437, 1023, 1028,
- 1203, 1203, 1203, 1203, 1203, 1203, 1203, 1204, 1437, 1437,
- 1437, 1205, 1437, 1032, 1437, 1437, 1437, 1205, 1205, 1205,
- 1205, 1205, 1205, 1352, 1353, 1353, 1353, 1353, 1353, 1353,
- 1298, 1298, 1298, 1298, 1298, 1298, 1298, 1437, 1437, 1032,
+ 1217, 1218, 1218, 1218, 1218, 1218, 1218, 1219, 1458, 1458,
+ 1458, 1220, 1388, 1458, 1458, 1458, 1458, 1220, 1220, 1220,
+ 1220, 1220, 1220, 1040, 1221, 1221, 1221, 1221, 1221, 1221,
+ 1221, 1222, 1458, 1458, 1458, 1223, 1458, 1044, 1388, 1458,
+ 1458, 1223, 1223, 1223, 1223, 1223, 1223, 1348, 1349, 1349,
+ 1349, 1349, 1349, 1349, 1282, 1282, 1282, 1282, 1282, 1282,
+ 1282, 1458, 1458, 1044, 1049, 1224, 1224, 1224, 1224, 1224,
+ 1224, 1224, 1225, 1458, 1458, 1458, 1226, 1458, 1053, 1458,
+ 1458, 1458, 1226, 1226, 1226, 1226, 1226, 1226, 1373, 1374,
+ 1374, 1374, 1374, 1374, 1374, 1319, 1319, 1319, 1319, 1319,
- 1039, 1206, 1206, 1206, 1206, 1206, 1206, 1206, 1207, 1437,
- 1437, 1437, 1208, 1437, 1043, 1437, 1437, 1437, 1208, 1208,
- 1208, 1208, 1208, 1208, 1307, 1307, 1307, 1307, 1307, 1307,
- 1307, 1316, 1316, 1316, 1316, 1316, 1316, 1316, 1370, 1437,
- 1043, 1051, 1209, 1209, 1209, 1209, 1209, 1209, 1209, 1210,
- 1437, 1370, 1371, 1211, 1437, 1055, 1437, 1437, 1437, 1211,
- 1211, 1211, 1211, 1211, 1211, 1437, 1325, 1325, 1325, 1325,
- 1325, 1325, 1325, 1437, 1437, 1437, 1437, 1437, 1371, 1374,
- 1437, 1055, 1063, 1212, 1212, 1212, 1212, 1212, 1212, 1212,
- 1213, 1437, 1374, 1375, 1214, 1437, 1067, 1437, 1437, 1437,
+ 1319, 1319, 1387, 1458, 1053, 1060, 1227, 1227, 1227, 1227,
+ 1227, 1227, 1227, 1228, 1458, 1458, 1458, 1229, 1458, 1064,
+ 1458, 1458, 1391, 1229, 1229, 1229, 1229, 1229, 1229, 1328,
+ 1328, 1328, 1328, 1328, 1328, 1328, 1392, 1458, 1458, 1458,
+ 1458, 1391, 1458, 1395, 1458, 1064, 1072, 1230, 1230, 1230,
+ 1230, 1230, 1230, 1230, 1231, 1458, 1458, 1396, 1232, 1458,
+ 1076, 1458, 1392, 1395, 1232, 1232, 1232, 1232, 1232, 1232,
+ 1337, 1337, 1337, 1337, 1337, 1337, 1337, 1458, 1458, 1458,
+ 1458, 1458, 1458, 1396, 1458, 1458, 1076, 1084, 1233, 1233,
+ 1233, 1233, 1233, 1233, 1233, 1234, 1458, 1458, 1458, 1235,
- 1214, 1214, 1214, 1214, 1214, 1214, 1437, 1378, 1379, 1379,
- 1379, 1379, 1379, 1379, 1437, 1437, 1437, 1437, 1437, 1375,
- 1390, 1437, 1067, 1113, 1217, 1217, 1217, 1217, 1217, 1217,
- 1217, 1115, 1437, 1437, 1391, 1218, 1437, 1437, 1437, 1437,
- 1437, 1218, 1218, 1218, 1218, 1218, 1218, 1019, 1225, 1225,
- 1225, 1225, 1225, 1225, 1225, 1201, 1437, 1437, 1437, 1226,
- 1391, 1437, 1437, 1437, 1437, 1226, 1226, 1226, 1226, 1226,
- 1226, 1028, 1232, 1232, 1232, 1232, 1232, 1232, 1232, 1204,
- 1437, 1437, 1437, 1233, 1437, 1437, 1437, 1437, 1437, 1233,
- 1233, 1233, 1233, 1233, 1233, 1039, 1240, 1240, 1240, 1240,
+ 1458, 1088, 1458, 1458, 1458, 1235, 1235, 1235, 1235, 1235,
+ 1235, 1346, 1346, 1346, 1346, 1346, 1346, 1346, 1399, 1400,
+ 1400, 1400, 1400, 1400, 1400, 1411, 1458, 1088, 1134, 1238,
+ 1238, 1238, 1238, 1238, 1238, 1238, 1136, 1458, 1458, 1412,
+ 1239, 1458, 1458, 1458, 1458, 1458, 1239, 1239, 1239, 1239,
+ 1239, 1239, 1040, 1246, 1246, 1246, 1246, 1246, 1246, 1246,
+ 1222, 1458, 1458, 1458, 1247, 1412, 1458, 1458, 1458, 1458,
+ 1247, 1247, 1247, 1247, 1247, 1247, 1049, 1253, 1253, 1253,
+ 1253, 1253, 1253, 1253, 1225, 1458, 1458, 1458, 1254, 1458,
+ 1458, 1458, 1458, 1458, 1254, 1254, 1254, 1254, 1254, 1254,
- 1240, 1240, 1240, 1207, 1437, 1437, 1437, 1241, 1437, 1437,
- 1437, 1437, 1437, 1241, 1241, 1241, 1241, 1241, 1241, 1051,
- 1248, 1248, 1248, 1248, 1248, 1248, 1248, 1210, 1437, 1437,
- 1437, 1249, 1437, 1437, 1437, 1437, 1437, 1249, 1249, 1249,
- 1249, 1249, 1249, 1063, 1256, 1256, 1256, 1256, 1256, 1256,
- 1256, 1213, 1437, 1437, 1437, 1257, 1437, 1437, 1437, 1437,
- 1437, 1257, 1257, 1257, 1257, 1257, 1257, 1183, 1269, 1269,
- 1269, 1269, 1269, 1269, 1269, 1185, 1437, 1437, 1437, 1270,
- 1437, 1437, 1437, 1437, 1437, 1270, 1270, 1270, 1270, 1270,
- 1270, 1113, 1277, 1277, 1277, 1277, 1277, 1277, 1277, 1278,
+ 1060, 1261, 1261, 1261, 1261, 1261, 1261, 1261, 1228, 1458,
+ 1458, 1458, 1262, 1458, 1458, 1458, 1458, 1458, 1262, 1262,
+ 1262, 1262, 1262, 1262, 1072, 1269, 1269, 1269, 1269, 1269,
+ 1269, 1269, 1231, 1458, 1458, 1458, 1270, 1458, 1458, 1458,
+ 1458, 1458, 1270, 1270, 1270, 1270, 1270, 1270, 1084, 1277,
+ 1277, 1277, 1277, 1277, 1277, 1277, 1234, 1458, 1458, 1458,
+ 1278, 1458, 1458, 1458, 1458, 1458, 1278, 1278, 1278, 1278,
+ 1278, 1278, 1204, 1290, 1290, 1290, 1290, 1290, 1290, 1290,
+ 1206, 1458, 1458, 1458, 1291, 1458, 1458, 1458, 1458, 1458,
+ 1291, 1291, 1291, 1291, 1291, 1291, 1134, 1298, 1298, 1298,
- 1437, 1437, 1437, 1279, 1437, 1117, 1437, 1437, 1390, 1279,
- 1279, 1279, 1279, 1279, 1279, 1381, 1382, 1382, 1382, 1382,
- 1382, 1382, 1437, 1392, 1393, 1393, 1393, 1393, 1393, 1393,
- 1437, 1117, 1019, 1121, 1121, 1121, 1121, 1121, 1121, 1121,
- 1201, 1437, 1437, 1437, 1122, 1437, 1437, 1437, 1437, 1437,
- 1122, 1122, 1122, 1122, 1122, 1122, 1028, 1131, 1131, 1131,
- 1131, 1131, 1131, 1131, 1204, 1437, 1437, 1437, 1132, 1437,
- 1437, 1437, 1437, 1437, 1132, 1132, 1132, 1132, 1132, 1132,
- 1039, 1144, 1144, 1144, 1144, 1144, 1144, 1144, 1207, 1437,
- 1437, 1437, 1145, 1437, 1437, 1437, 1437, 1437, 1145, 1145,
+ 1298, 1298, 1298, 1298, 1299, 1458, 1458, 1458, 1300, 1458,
+ 1138, 1458, 1458, 1411, 1300, 1300, 1300, 1300, 1300, 1300,
+ 1402, 1403, 1403, 1403, 1403, 1403, 1403, 1458, 1413, 1414,
+ 1414, 1414, 1414, 1414, 1414, 1458, 1138, 1040, 1142, 1142,
+ 1142, 1142, 1142, 1142, 1142, 1222, 1458, 1458, 1458, 1143,
+ 1458, 1458, 1458, 1458, 1458, 1143, 1143, 1143, 1143, 1143,
+ 1143, 1049, 1152, 1152, 1152, 1152, 1152, 1152, 1152, 1225,
+ 1458, 1458, 1458, 1153, 1458, 1458, 1458, 1458, 1458, 1153,
+ 1153, 1153, 1153, 1153, 1153, 1060, 1165, 1165, 1165, 1165,
+ 1165, 1165, 1165, 1228, 1458, 1458, 1458, 1166, 1458, 1458,
- 1145, 1145, 1145, 1145, 1051, 1158, 1158, 1158, 1158, 1158,
- 1158, 1158, 1210, 1437, 1437, 1437, 1159, 1437, 1437, 1437,
- 1437, 1437, 1159, 1159, 1159, 1159, 1159, 1159, 1063, 1172,
- 1172, 1172, 1172, 1172, 1172, 1172, 1213, 1437, 1437, 1437,
- 1173, 1437, 1437, 1437, 1437, 1437, 1173, 1173, 1173, 1173,
- 1173, 1173, 1113, 1288, 1288, 1288, 1288, 1288, 1288, 1288,
- 1278, 1437, 1437, 1437, 1289, 1437, 1437, 1437, 1437, 1437,
- 1289, 1289, 1289, 1289, 1289, 1289, 1183, 1337, 1337, 1337,
- 1337, 1337, 1337, 1337, 1185, 1437, 1437, 1437, 1338, 1437,
- 1437, 1437, 1437, 1437, 1338, 1338, 1338, 1338, 1338, 1338,
+ 1458, 1458, 1458, 1166, 1166, 1166, 1166, 1166, 1166, 1072,
+ 1179, 1179, 1179, 1179, 1179, 1179, 1179, 1231, 1458, 1458,
+ 1458, 1180, 1458, 1458, 1458, 1458, 1458, 1180, 1180, 1180,
+ 1180, 1180, 1180, 1084, 1193, 1193, 1193, 1193, 1193, 1193,
+ 1193, 1234, 1458, 1458, 1458, 1194, 1458, 1458, 1458, 1458,
+ 1458, 1194, 1194, 1194, 1194, 1194, 1194, 1134, 1309, 1309,
+ 1309, 1309, 1309, 1309, 1309, 1299, 1458, 1458, 1458, 1310,
+ 1458, 1458, 1458, 1458, 1458, 1310, 1310, 1310, 1310, 1310,
+ 1310, 1204, 1358, 1358, 1358, 1358, 1358, 1358, 1358, 1206,
+ 1458, 1458, 1458, 1359, 1458, 1458, 1458, 1458, 1458, 1359,
- 1113, 1217, 1217, 1217, 1217, 1217, 1217, 1217, 1278, 1437,
- 1437, 1437, 1218, 1437, 1437, 1437, 1437, 1437, 1218, 1218,
- 1218, 1218, 1218, 1218, 1396, 1397, 1397, 1397, 1397, 1397,
- 1397, 1400, 1401, 1401, 1401, 1401, 1401, 1401, 1404, 1405,
- 1405, 1405, 1405, 1405, 1405, 1408, 1409, 1409, 1409, 1409,
- 1409, 1409, 1379, 1379, 1379, 1379, 1379, 1379, 1379, 1412,
- 1412, 1416, 1417, 1417, 1417, 1417, 1417, 1417, 1437, 1437,
- 1437, 1437, 1437, 1413, 1437, 1393, 1393, 1393, 1393, 1393,
- 1393, 1393, 1397, 1397, 1397, 1397, 1397, 1397, 1397, 1401,
- 1401, 1401, 1401, 1401, 1401, 1401, 1437, 1437, 1437, 1413,
+ 1359, 1359, 1359, 1359, 1359, 1134, 1238, 1238, 1238, 1238,
+ 1238, 1238, 1238, 1299, 1458, 1458, 1458, 1239, 1458, 1458,
+ 1458, 1458, 1458, 1239, 1239, 1239, 1239, 1239, 1239, 1417,
+ 1418, 1418, 1418, 1418, 1418, 1418, 1421, 1422, 1422, 1422,
+ 1422, 1422, 1422, 1425, 1426, 1426, 1426, 1426, 1426, 1426,
+ 1429, 1430, 1430, 1430, 1430, 1430, 1430, 1400, 1400, 1400,
+ 1400, 1400, 1400, 1400, 1433, 1433, 1437, 1438, 1438, 1438,
+ 1438, 1438, 1438, 1458, 1458, 1458, 1458, 1458, 1434, 1458,
+ 1414, 1414, 1414, 1414, 1414, 1414, 1414, 1418, 1418, 1418,
+ 1418, 1418, 1418, 1418, 1422, 1422, 1422, 1422, 1422, 1422,
- 1437, 1405, 1405, 1405, 1405, 1405, 1405, 1405, 1409, 1409,
- 1409, 1409, 1409, 1409, 1409, 1425, 1426, 1426, 1426, 1426,
- 1426, 1426, 1417, 1417, 1417, 1417, 1417, 1417, 1417, 1426,
- 1426, 1426, 1426, 1426, 1426, 1426, 46, 1437, 1437, 1437,
- 1437, 46, 46, 46, 64, 1437, 64, 64, 64, 64,
- 64, 64, 64, 146, 1437, 146, 153, 153, 153, 257,
- 257, 257, 266, 266, 266, 337, 337, 337, 340, 340,
- 340, 341, 341, 341, 348, 348, 348, 346, 346, 346,
- 352, 352, 352, 356, 1437, 356, 416, 416, 416, 421,
- 421, 421, 422, 422, 422, 431, 431, 431, 435, 1437,
+ 1422, 1458, 1458, 1458, 1434, 1458, 1426, 1426, 1426, 1426,
+ 1426, 1426, 1426, 1430, 1430, 1430, 1430, 1430, 1430, 1430,
+ 1446, 1447, 1447, 1447, 1447, 1447, 1447, 1438, 1438, 1438,
+ 1438, 1438, 1438, 1438, 1447, 1447, 1447, 1447, 1447, 1447,
+ 1447, 46, 1458, 1458, 1458, 1458, 46, 46, 46, 64,
+ 1458, 64, 64, 64, 64, 64, 64, 64, 151, 1458,
+ 151, 158, 158, 158, 269, 269, 269, 278, 278, 278,
+ 356, 356, 356, 359, 359, 359, 360, 360, 360, 367,
+ 367, 367, 365, 365, 365, 371, 371, 371, 375, 1458,
+ 375, 437, 437, 437, 442, 442, 442, 443, 443, 443,
- 435, 436, 436, 436, 350, 350, 1437, 1437, 350, 440,
- 440, 440, 444, 444, 444, 340, 340, 340, 499, 499,
- 499, 503, 503, 503, 504, 504, 504, 505, 505, 505,
- 348, 348, 348, 510, 510, 510, 429, 429, 1437, 1437,
- 429, 515, 515, 515, 519, 519, 519, 523, 1437, 523,
- 524, 524, 524, 528, 528, 528, 532, 1437, 532, 580,
- 580, 580, 431, 431, 431, 588, 588, 588, 589, 589,
- 589, 597, 597, 597, 601, 1437, 601, 604, 1437, 604,
- 605, 605, 605, 609, 609, 609, 613, 1437, 613, 522,
- 522, 1437, 1437, 522, 526, 526, 1437, 1437, 526, 619,
+ 452, 452, 452, 456, 1458, 456, 457, 457, 457, 369,
+ 369, 1458, 1458, 369, 461, 461, 461, 465, 465, 465,
+ 359, 359, 359, 520, 520, 520, 524, 524, 524, 525,
+ 525, 525, 526, 526, 526, 367, 367, 367, 531, 531,
+ 531, 450, 450, 1458, 1458, 450, 536, 536, 536, 540,
+ 540, 540, 544, 1458, 544, 545, 545, 545, 549, 549,
+ 549, 553, 1458, 553, 601, 601, 601, 452, 452, 452,
+ 609, 609, 609, 610, 610, 610, 618, 618, 618, 622,
+ 1458, 622, 625, 1458, 625, 626, 626, 626, 630, 630,
+ 630, 634, 1458, 634, 543, 543, 1458, 1458, 543, 547,
- 619, 619, 623, 623, 623, 532, 532, 1437, 532, 504,
- 504, 504, 657, 657, 657, 661, 661, 661, 664, 664,
- 664, 665, 665, 665, 666, 666, 666, 671, 671, 671,
- 595, 595, 1437, 1437, 595, 676, 676, 676, 680, 680,
- 680, 601, 601, 1437, 601, 603, 603, 1437, 1437, 603,
- 604, 604, 1437, 604, 605, 605, 607, 607, 1437, 1437,
- 607, 687, 687, 687, 691, 691, 691, 613, 613, 1437,
- 613, 695, 1437, 695, 698, 1437, 698, 699, 699, 699,
- 703, 703, 703, 707, 1437, 707, 734, 734, 734, 597,
- 597, 597, 609, 609, 609, 745, 745, 745, 746, 746,
+ 547, 1458, 1458, 547, 640, 640, 640, 644, 644, 644,
+ 553, 553, 1458, 553, 525, 525, 525, 678, 678, 678,
+ 682, 682, 682, 685, 685, 685, 686, 686, 686, 687,
+ 687, 687, 692, 692, 692, 616, 616, 1458, 1458, 616,
+ 697, 697, 697, 701, 701, 701, 622, 622, 1458, 622,
+ 624, 624, 1458, 1458, 624, 625, 625, 1458, 625, 626,
+ 626, 628, 628, 1458, 1458, 628, 708, 708, 708, 712,
+ 712, 712, 634, 634, 1458, 634, 716, 1458, 716, 719,
+ 1458, 719, 720, 720, 720, 724, 724, 724, 728, 1458,
+ 728, 755, 755, 755, 618, 618, 618, 630, 630, 630,
- 746, 754, 754, 754, 758, 1437, 758, 761, 1437, 761,
- 762, 762, 762, 766, 766, 766, 770, 1437, 770, 773,
- 1437, 773, 776, 1437, 776, 777, 777, 777, 781, 781,
- 781, 785, 1437, 785, 694, 1437, 1437, 694, 695, 695,
- 1437, 695, 697, 697, 1437, 1437, 697, 698, 698, 1437,
- 698, 699, 699, 701, 701, 1437, 1437, 701, 792, 792,
- 792, 796, 796, 796, 707, 707, 1437, 707, 53, 53,
- 53, 1437, 53, 53, 665, 665, 665, 818, 818, 818,
- 822, 822, 822, 825, 825, 825, 828, 828, 828, 829,
- 829, 829, 830, 830, 830, 835, 835, 835, 752, 752,
+ 766, 766, 766, 767, 767, 767, 775, 775, 775, 779,
+ 1458, 779, 782, 1458, 782, 783, 783, 783, 787, 787,
+ 787, 791, 1458, 791, 794, 1458, 794, 797, 1458, 797,
+ 798, 798, 798, 802, 802, 802, 806, 1458, 806, 715,
+ 1458, 1458, 715, 716, 716, 1458, 716, 718, 718, 1458,
+ 1458, 718, 719, 719, 1458, 719, 720, 720, 722, 722,
+ 1458, 1458, 722, 813, 813, 813, 817, 817, 817, 728,
+ 728, 1458, 728, 53, 53, 53, 1458, 53, 53, 686,
+ 686, 686, 839, 839, 839, 843, 843, 843, 846, 846,
+ 846, 849, 849, 849, 850, 850, 850, 851, 851, 851,
- 1437, 1437, 752, 840, 840, 840, 844, 844, 844, 758,
- 758, 1437, 758, 760, 760, 1437, 1437, 760, 761, 761,
- 1437, 761, 762, 762, 764, 764, 1437, 1437, 764, 851,
- 851, 851, 855, 855, 855, 770, 770, 1437, 770, 772,
- 1437, 1437, 772, 773, 773, 1437, 773, 775, 775, 1437,
- 1437, 775, 776, 776, 1437, 776, 777, 777, 779, 779,
- 1437, 1437, 779, 863, 863, 863, 867, 867, 867, 785,
- 785, 1437, 785, 869, 1437, 869, 872, 1437, 872, 875,
- 1437, 875, 876, 876, 876, 880, 880, 880, 884, 1437,
- 884, 53, 53, 53, 1437, 53, 53, 902, 902, 902,
+ 856, 856, 856, 773, 773, 1458, 1458, 773, 861, 861,
+ 861, 865, 865, 865, 779, 779, 1458, 779, 781, 781,
+ 1458, 1458, 781, 782, 782, 1458, 782, 783, 783, 785,
+ 785, 1458, 1458, 785, 872, 872, 872, 876, 876, 876,
+ 791, 791, 1458, 791, 793, 1458, 1458, 793, 794, 794,
+ 1458, 794, 796, 796, 1458, 1458, 796, 797, 797, 1458,
+ 797, 798, 798, 800, 800, 1458, 1458, 800, 884, 884,
+ 884, 888, 888, 888, 806, 806, 1458, 806, 890, 1458,
+ 890, 893, 1458, 893, 896, 1458, 896, 897, 897, 897,
+ 901, 901, 901, 905, 1458, 905, 53, 53, 53, 1458,
- 754, 754, 754, 766, 766, 766, 781, 781, 781, 916,
- 916, 916, 917, 917, 917, 925, 925, 925, 929, 1437,
- 929, 932, 1437, 932, 933, 933, 933, 937, 937, 937,
- 941, 1437, 941, 944, 1437, 944, 947, 1437, 947, 948,
- 948, 948, 952, 952, 952, 956, 1437, 956, 957, 1437,
- 957, 960, 1437, 960, 963, 1437, 963, 964, 964, 964,
- 968, 968, 968, 972, 1437, 972, 869, 1437, 869, 871,
- 1437, 1437, 871, 872, 872, 1437, 872, 874, 874, 1437,
- 1437, 874, 875, 875, 1437, 875, 876, 876, 878, 878,
- 1437, 1437, 878, 979, 979, 979, 983, 983, 983, 884,
+ 53, 53, 923, 923, 923, 775, 775, 775, 787, 787,
+ 787, 802, 802, 802, 937, 937, 937, 938, 938, 938,
+ 946, 946, 946, 950, 1458, 950, 953, 1458, 953, 954,
+ 954, 954, 958, 958, 958, 962, 1458, 962, 965, 1458,
+ 965, 968, 1458, 968, 969, 969, 969, 973, 973, 973,
+ 977, 1458, 977, 978, 1458, 978, 981, 1458, 981, 984,
+ 1458, 984, 985, 985, 985, 989, 989, 989, 993, 1458,
+ 993, 890, 1458, 890, 892, 1458, 1458, 892, 893, 893,
+ 1458, 893, 895, 895, 1458, 1458, 895, 896, 896, 1458,
+ 896, 897, 897, 899, 899, 1458, 1458, 899, 1000, 1000,
- 884, 1437, 884, 53, 53, 53, 1437, 53, 53, 829,
- 829, 829, 1000, 1000, 1000, 1004, 1004, 1004, 1007, 1007,
- 1007, 1010, 1010, 1010, 1013, 1013, 1013, 1014, 1014, 1014,
- 1022, 1022, 1022, 923, 923, 1437, 1437, 923, 1027, 1027,
- 1027, 1031, 1031, 1031, 929, 929, 1437, 929, 931, 931,
- 1437, 1437, 931, 932, 932, 1437, 932, 933, 933, 935,
- 935, 1437, 1437, 935, 1038, 1038, 1038, 1042, 1042, 1042,
- 941, 941, 1437, 941, 943, 1437, 1437, 943, 944, 944,
- 1437, 944, 946, 946, 1437, 1437, 946, 947, 947, 1437,
- 947, 948, 948, 950, 950, 1437, 1437, 950, 1050, 1050,
+ 1000, 1004, 1004, 1004, 905, 905, 1458, 905, 53, 53,
+ 53, 1458, 53, 53, 850, 850, 850, 1021, 1021, 1021,
+ 1025, 1025, 1025, 1028, 1028, 1028, 1031, 1031, 1031, 1034,
+ 1034, 1034, 1035, 1035, 1035, 1043, 1043, 1043, 944, 944,
+ 1458, 1458, 944, 1048, 1048, 1048, 1052, 1052, 1052, 950,
+ 950, 1458, 950, 952, 952, 1458, 1458, 952, 953, 953,
+ 1458, 953, 954, 954, 956, 956, 1458, 1458, 956, 1059,
+ 1059, 1059, 1063, 1063, 1063, 962, 962, 1458, 962, 964,
+ 1458, 1458, 964, 965, 965, 1458, 965, 967, 967, 1458,
+ 1458, 967, 968, 968, 1458, 968, 969, 969, 971, 971,
- 1050, 1054, 1054, 1054, 956, 956, 1437, 956, 957, 1437,
- 957, 959, 1437, 1437, 959, 960, 960, 1437, 960, 962,
- 962, 1437, 1437, 962, 963, 963, 1437, 963, 964, 964,
- 966, 966, 1437, 1437, 966, 1062, 1062, 1062, 1066, 1066,
- 1066, 972, 972, 1437, 972, 1068, 1437, 1068, 1071, 1437,
- 1071, 1074, 1437, 1074, 1075, 1075, 1075, 1079, 1079, 1079,
- 1083, 1437, 1083, 53, 53, 53, 1437, 53, 53, 1095,
- 1095, 1095, 925, 925, 925, 937, 937, 937, 952, 952,
- 952, 968, 968, 968, 1112, 1112, 1112, 1118, 1118, 1118,
- 1116, 1116, 1116, 1123, 1123, 1123, 1122, 1122, 1122, 1124,
+ 1458, 1458, 971, 1071, 1071, 1071, 1075, 1075, 1075, 977,
+ 977, 1458, 977, 978, 1458, 978, 980, 1458, 1458, 980,
+ 981, 981, 1458, 981, 983, 983, 1458, 1458, 983, 984,
+ 984, 1458, 984, 985, 985, 987, 987, 1458, 1458, 987,
+ 1083, 1083, 1083, 1087, 1087, 1087, 993, 993, 1458, 993,
+ 1089, 1458, 1089, 1092, 1458, 1092, 1095, 1458, 1095, 1096,
+ 1096, 1096, 1100, 1100, 1100, 1104, 1458, 1104, 53, 53,
+ 53, 1458, 53, 53, 1116, 1116, 1116, 946, 946, 946,
+ 958, 958, 958, 973, 973, 973, 989, 989, 989, 1133,
+ 1133, 1133, 1139, 1139, 1139, 1137, 1137, 1137, 1144, 1144,
- 1437, 1124, 1127, 1437, 1127, 1128, 1128, 1128, 1133, 1133,
- 1133, 1132, 1132, 1132, 1134, 1437, 1134, 1137, 1437, 1137,
- 1140, 1437, 1140, 1141, 1141, 1141, 1146, 1146, 1146, 1145,
- 1145, 1145, 1147, 1437, 1147, 1148, 1437, 1148, 1151, 1437,
- 1151, 1154, 1437, 1154, 1155, 1155, 1155, 1160, 1160, 1160,
- 1159, 1159, 1159, 1161, 1437, 1161, 1162, 1437, 1162, 1165,
- 1437, 1165, 1168, 1437, 1168, 1169, 1169, 1169, 1174, 1174,
- 1174, 1173, 1173, 1173, 1175, 1437, 1175, 1068, 1437, 1068,
- 1070, 1437, 1437, 1070, 1071, 1071, 1437, 1071, 1073, 1073,
- 1437, 1437, 1073, 1074, 1074, 1437, 1074, 1075, 1075, 1077,
+ 1144, 1143, 1143, 1143, 1145, 1458, 1145, 1148, 1458, 1148,
+ 1149, 1149, 1149, 1154, 1154, 1154, 1153, 1153, 1153, 1155,
+ 1458, 1155, 1158, 1458, 1158, 1161, 1458, 1161, 1162, 1162,
+ 1162, 1167, 1167, 1167, 1166, 1166, 1166, 1168, 1458, 1168,
+ 1169, 1458, 1169, 1172, 1458, 1172, 1175, 1458, 1175, 1176,
+ 1176, 1176, 1181, 1181, 1181, 1180, 1180, 1180, 1182, 1458,
+ 1182, 1183, 1458, 1183, 1186, 1458, 1186, 1189, 1458, 1189,
+ 1190, 1190, 1190, 1195, 1195, 1195, 1194, 1194, 1194, 1196,
+ 1458, 1196, 1089, 1458, 1089, 1091, 1458, 1458, 1091, 1092,
+ 1092, 1458, 1092, 1094, 1094, 1458, 1458, 1094, 1095, 1095,
- 1077, 1437, 1437, 1077, 1182, 1182, 1182, 1186, 1186, 1186,
- 1083, 1083, 1437, 1083, 53, 53, 53, 1437, 53, 53,
- 1014, 1014, 1014, 1202, 1202, 1202, 1205, 1205, 1205, 1208,
- 1208, 1208, 1211, 1211, 1211, 1214, 1214, 1214, 1219, 1219,
- 1219, 1218, 1218, 1218, 1221, 1437, 1221, 1222, 1222, 1222,
- 1120, 1120, 1437, 1437, 1120, 1226, 1226, 1226, 1227, 1227,
- 1227, 1124, 1124, 1437, 1124, 1126, 1126, 1437, 1437, 1126,
- 1127, 1127, 1437, 1127, 1128, 1128, 1130, 1130, 1437, 1437,
- 1130, 1233, 1233, 1233, 1234, 1234, 1234, 1134, 1134, 1437,
- 1134, 1136, 1437, 1437, 1136, 1137, 1137, 1437, 1137, 1139,
+ 1458, 1095, 1096, 1096, 1098, 1098, 1458, 1458, 1098, 1203,
+ 1203, 1203, 1207, 1207, 1207, 1104, 1104, 1458, 1104, 53,
+ 53, 53, 1458, 53, 53, 1035, 1035, 1035, 1223, 1223,
+ 1223, 1226, 1226, 1226, 1229, 1229, 1229, 1232, 1232, 1232,
+ 1235, 1235, 1235, 1240, 1240, 1240, 1239, 1239, 1239, 1242,
+ 1458, 1242, 1243, 1243, 1243, 1141, 1141, 1458, 1458, 1141,
+ 1247, 1247, 1247, 1248, 1248, 1248, 1145, 1145, 1458, 1145,
+ 1147, 1147, 1458, 1458, 1147, 1148, 1148, 1458, 1148, 1149,
+ 1149, 1151, 1151, 1458, 1458, 1151, 1254, 1254, 1254, 1255,
+ 1255, 1255, 1155, 1155, 1458, 1155, 1157, 1458, 1458, 1157,
- 1139, 1437, 1437, 1139, 1140, 1140, 1437, 1140, 1141, 1141,
- 1143, 1143, 1437, 1437, 1143, 1241, 1241, 1241, 1242, 1242,
- 1242, 1147, 1147, 1437, 1147, 1148, 1437, 1148, 1150, 1437,
- 1437, 1150, 1151, 1151, 1437, 1151, 1153, 1153, 1437, 1437,
- 1153, 1154, 1154, 1437, 1154, 1155, 1155, 1157, 1157, 1437,
- 1437, 1157, 1249, 1249, 1249, 1250, 1250, 1250, 1161, 1161,
- 1437, 1161, 1162, 1437, 1162, 1164, 1437, 1437, 1164, 1165,
- 1165, 1437, 1165, 1167, 1167, 1437, 1437, 1167, 1168, 1168,
- 1437, 1168, 1169, 1169, 1171, 1171, 1437, 1437, 1171, 1257,
- 1257, 1257, 1258, 1258, 1258, 1175, 1175, 1437, 1175, 1259,
+ 1158, 1158, 1458, 1158, 1160, 1160, 1458, 1458, 1160, 1161,
+ 1161, 1458, 1161, 1162, 1162, 1164, 1164, 1458, 1458, 1164,
+ 1262, 1262, 1262, 1263, 1263, 1263, 1168, 1168, 1458, 1168,
+ 1169, 1458, 1169, 1171, 1458, 1458, 1171, 1172, 1172, 1458,
+ 1172, 1174, 1174, 1458, 1458, 1174, 1175, 1175, 1458, 1175,
+ 1176, 1176, 1178, 1178, 1458, 1458, 1178, 1270, 1270, 1270,
+ 1271, 1271, 1271, 1182, 1182, 1458, 1182, 1183, 1458, 1183,
+ 1185, 1458, 1458, 1185, 1186, 1186, 1458, 1186, 1188, 1188,
+ 1458, 1458, 1188, 1189, 1189, 1458, 1189, 1190, 1190, 1192,
+ 1192, 1458, 1458, 1192, 1278, 1278, 1278, 1279, 1279, 1279,
- 1437, 1259, 1262, 1437, 1262, 1265, 1437, 1265, 1266, 1266,
- 1266, 1271, 1437, 1271, 1270, 1270, 1270, 1272, 1437, 1272,
- 53, 53, 53, 1437, 53, 53, 1280, 1437, 1280, 1279,
- 1279, 1279, 1281, 1437, 1281, 1122, 1122, 1122, 1282, 1437,
- 1282, 1132, 1132, 1132, 1283, 1437, 1283, 1145, 1145, 1145,
- 1284, 1437, 1284, 1159, 1159, 1159, 1285, 1437, 1285, 1173,
- 1173, 1173, 1216, 1216, 1437, 1437, 1216, 1289, 1289, 1289,
- 1290, 1290, 1290, 348, 348, 348, 1221, 1221, 1437, 1221,
- 1291, 1291, 1291, 1294, 1437, 1294, 1295, 1295, 1295, 1296,
- 1296, 1296, 1299, 1437, 1299, 1302, 1437, 1302, 1303, 1303,
+ 1196, 1196, 1458, 1196, 1280, 1458, 1280, 1283, 1458, 1283,
+ 1286, 1458, 1286, 1287, 1287, 1287, 1292, 1458, 1292, 1291,
+ 1291, 1291, 1293, 1458, 1293, 53, 53, 53, 1458, 53,
+ 53, 1301, 1458, 1301, 1300, 1300, 1300, 1302, 1458, 1302,
+ 1143, 1143, 1143, 1303, 1458, 1303, 1153, 1153, 1153, 1304,
+ 1458, 1304, 1166, 1166, 1166, 1305, 1458, 1305, 1180, 1180,
+ 1180, 1306, 1458, 1306, 1194, 1194, 1194, 1237, 1237, 1458,
+ 1458, 1237, 1310, 1310, 1310, 1311, 1311, 1311, 367, 367,
+ 367, 1242, 1242, 1458, 1242, 1312, 1312, 1312, 1315, 1458,
+ 1315, 1316, 1316, 1316, 1317, 1317, 1317, 1320, 1458, 1320,
- 1303, 1304, 1304, 1304, 1305, 1437, 1305, 1308, 1437, 1308,
- 1311, 1437, 1311, 1312, 1312, 1312, 1313, 1313, 1313, 1314,
- 1437, 1314, 1317, 1437, 1317, 1320, 1437, 1320, 1321, 1321,
- 1321, 1322, 1322, 1322, 1323, 1437, 1323, 1326, 1437, 1326,
- 1329, 1437, 1329, 1330, 1330, 1330, 1331, 1331, 1331, 1259,
- 1437, 1259, 1261, 1437, 1437, 1261, 1262, 1262, 1437, 1262,
- 1264, 1264, 1437, 1437, 1264, 1265, 1265, 1437, 1265, 1266,
- 1266, 1268, 1268, 1437, 1437, 1268, 1338, 1338, 1338, 1339,
- 1437, 1339, 1272, 1272, 1437, 1272, 53, 53, 53, 1437,
- 53, 53, 1344, 1344, 1344, 1218, 1218, 1218, 1346, 1437,
+ 1323, 1458, 1323, 1324, 1324, 1324, 1325, 1325, 1325, 1326,
+ 1458, 1326, 1329, 1458, 1329, 1332, 1458, 1332, 1333, 1333,
+ 1333, 1334, 1334, 1334, 1335, 1458, 1335, 1338, 1458, 1338,
+ 1341, 1458, 1341, 1342, 1342, 1342, 1343, 1343, 1343, 1344,
+ 1458, 1344, 1347, 1458, 1347, 1350, 1458, 1350, 1351, 1351,
+ 1351, 1352, 1352, 1352, 1280, 1458, 1280, 1282, 1458, 1458,
+ 1282, 1283, 1283, 1458, 1283, 1285, 1285, 1458, 1458, 1285,
+ 1286, 1286, 1458, 1286, 1287, 1287, 1289, 1289, 1458, 1458,
+ 1289, 1359, 1359, 1359, 1360, 1458, 1360, 1293, 1293, 1458,
+ 1293, 53, 53, 53, 1458, 53, 53, 1365, 1365, 1365,
- 1346, 1347, 1437, 1347, 1348, 1437, 1348, 1349, 1437, 1349,
- 1350, 1437, 1350, 1351, 1437, 1351, 1354, 1437, 1354, 1355,
- 1355, 1355, 1356, 1356, 1356, 1357, 1437, 1357, 1293, 1293,
- 1437, 1437, 1293, 1294, 1294, 1437, 1294, 1295, 1295, 1360,
- 1437, 1360, 1298, 1437, 1437, 1298, 1299, 1299, 1437, 1299,
- 1301, 1301, 1437, 1437, 1301, 1302, 1302, 1437, 1302, 1303,
- 1303, 1364, 1437, 1364, 1305, 1437, 1305, 1307, 1437, 1437,
- 1307, 1308, 1308, 1437, 1308, 1310, 1310, 1437, 1437, 1310,
- 1311, 1311, 1437, 1311, 1312, 1312, 1368, 1437, 1368, 1314,
- 1437, 1314, 1316, 1437, 1437, 1316, 1317, 1317, 1437, 1317,
+ 1239, 1239, 1239, 1367, 1458, 1367, 1368, 1458, 1368, 1369,
+ 1458, 1369, 1370, 1458, 1370, 1371, 1458, 1371, 1372, 1458,
+ 1372, 1375, 1458, 1375, 1376, 1376, 1376, 1377, 1377, 1377,
+ 1378, 1458, 1378, 1314, 1314, 1458, 1458, 1314, 1315, 1315,
+ 1458, 1315, 1316, 1316, 1381, 1458, 1381, 1319, 1458, 1458,
+ 1319, 1320, 1320, 1458, 1320, 1322, 1322, 1458, 1458, 1322,
+ 1323, 1323, 1458, 1323, 1324, 1324, 1385, 1458, 1385, 1326,
+ 1458, 1326, 1328, 1458, 1458, 1328, 1329, 1329, 1458, 1329,
+ 1331, 1331, 1458, 1458, 1331, 1332, 1332, 1458, 1332, 1333,
+ 1333, 1389, 1458, 1389, 1335, 1458, 1335, 1337, 1458, 1458,
- 1319, 1319, 1437, 1437, 1319, 1320, 1320, 1437, 1320, 1321,
- 1321, 1372, 1437, 1372, 1323, 1437, 1323, 1325, 1437, 1437,
- 1325, 1326, 1326, 1437, 1326, 1328, 1328, 1437, 1437, 1328,
- 1329, 1329, 1437, 1329, 1330, 1330, 1376, 1437, 1376, 1377,
- 1437, 1377, 1380, 1437, 1380, 1383, 1437, 1383, 1384, 1384,
- 1384, 1385, 1437, 1385, 53, 53, 53, 1437, 53, 53,
- 1389, 1437, 1389, 1291, 1437, 1291, 1296, 1437, 1296, 1304,
- 1437, 1304, 1313, 1437, 1313, 1322, 1437, 1322, 1331, 1437,
- 1331, 1353, 1353, 1437, 1437, 1353, 1354, 1354, 1437, 1354,
- 1355, 1355, 1345, 1437, 1345, 1394, 1437, 1394, 1395, 1437,
+ 1337, 1338, 1338, 1458, 1338, 1340, 1340, 1458, 1458, 1340,
+ 1341, 1341, 1458, 1341, 1342, 1342, 1393, 1458, 1393, 1344,
+ 1458, 1344, 1346, 1458, 1458, 1346, 1347, 1347, 1458, 1347,
+ 1349, 1349, 1458, 1458, 1349, 1350, 1350, 1458, 1350, 1351,
+ 1351, 1397, 1458, 1397, 1398, 1458, 1398, 1401, 1458, 1401,
+ 1404, 1458, 1404, 1405, 1405, 1405, 1406, 1458, 1406, 53,
+ 53, 53, 1458, 53, 53, 1410, 1458, 1410, 1312, 1458,
+ 1312, 1317, 1458, 1317, 1325, 1458, 1325, 1334, 1458, 1334,
+ 1343, 1458, 1343, 1352, 1458, 1352, 1374, 1374, 1458, 1458,
+ 1374, 1375, 1375, 1458, 1375, 1376, 1376, 1366, 1458, 1366,
- 1395, 1398, 1437, 1398, 1399, 1437, 1399, 1402, 1437, 1402,
- 1403, 1437, 1403, 1406, 1437, 1406, 1407, 1437, 1407, 1410,
- 1437, 1410, 1379, 1437, 1437, 1379, 1382, 1382, 1437, 1437,
- 1382, 1414, 1437, 1414, 1356, 1437, 1356, 1418, 1437, 1418,
- 1393, 1437, 1437, 1393, 1397, 1437, 1437, 1397, 1401, 1437,
- 1437, 1401, 1405, 1437, 1437, 1405, 1409, 1437, 1437, 1409,
- 1424, 1437, 1424, 1427, 1437, 1427, 1417, 1437, 1437, 1417,
- 1429, 1437, 1429, 1430, 1437, 1430, 1431, 1437, 1431, 1432,
- 1437, 1432, 1433, 1437, 1433, 1426, 1437, 1437, 1426, 1435,
- 1437, 1435, 1436, 1437, 1436, 3, 1437, 1437, 1437, 1437,
+ 1415, 1458, 1415, 1416, 1458, 1416, 1419, 1458, 1419, 1420,
+ 1458, 1420, 1423, 1458, 1423, 1424, 1458, 1424, 1427, 1458,
+ 1427, 1428, 1458, 1428, 1431, 1458, 1431, 1400, 1458, 1458,
+ 1400, 1403, 1403, 1458, 1458, 1403, 1435, 1458, 1435, 1377,
+ 1458, 1377, 1439, 1458, 1439, 1414, 1458, 1458, 1414, 1418,
+ 1458, 1458, 1418, 1422, 1458, 1458, 1422, 1426, 1458, 1458,
+ 1426, 1430, 1458, 1458, 1430, 1445, 1458, 1445, 1448, 1458,
+ 1448, 1438, 1458, 1458, 1438, 1450, 1458, 1450, 1451, 1458,
+ 1451, 1452, 1458, 1452, 1453, 1458, 1453, 1454, 1458, 1454,
+ 1447, 1458, 1458, 1447, 1456, 1458, 1456, 1457, 1458, 1457,
- 1437, 1437, 1437, 1437, 1437, 1437, 1437, 1437, 1437, 1437,
- 1437, 1437, 1437, 1437, 1437, 1437, 1437, 1437, 1437, 1437,
- 1437, 1437, 1437, 1437, 1437, 1437, 1437, 1437, 1437, 1437,
- 1437, 1437, 1437, 1437, 1437, 1437, 1437, 1437, 1437, 1437,
- 1437, 1437, 1437, 1437, 1437, 1437, 1437, 1437, 1437
+ 3, 1458, 1458, 1458, 1458, 1458, 1458, 1458, 1458, 1458,
+ 1458, 1458, 1458, 1458, 1458, 1458, 1458, 1458, 1458, 1458,
+ 1458, 1458, 1458, 1458, 1458, 1458, 1458, 1458, 1458, 1458,
+ 1458, 1458, 1458, 1458, 1458, 1458, 1458, 1458, 1458, 1458,
+ 1458, 1458, 1458, 1458, 1458, 1458, 1458, 1458, 1458, 1458,
+ 1458, 1458, 1458, 1458
} ;
-static yyconst flex_int16_t yy_chk[7450] =
+static yyconst flex_int16_t yy_chk[7455] =
{ 0,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
@@ -1866,818 +1873,819 @@
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 4, 7, 15, 4, 7, 4, 7,
9, 4, 7, 9, 34, 9, 17, 17, 9, 19,
- 19, 4, 7, 34, 24, 27, 27, 100, 9, 4,
- 7, 15, 12, 100, 128, 12, 9, 12, 24, 23,
- 12, 23, 23, 26, 28, 24, 23, 26, 1258, 28,
+ 19, 4, 7, 34, 24, 27, 27, 105, 9, 4,
+ 7, 15, 12, 105, 133, 12, 9, 12, 24, 23,
+ 12, 23, 23, 26, 28, 24, 23, 26, 1242, 28,
- 12, 23, 128, 26, 29, 23, 26, 23, 12, 14,
- 14, 14, 14, 14, 14, 14, 14, 14, 14, 627,
- 29, 92, 14, 14, 14, 627, 92, 14, 14, 14,
+ 12, 23, 133, 26, 29, 23, 26, 23, 12, 14,
+ 14, 14, 14, 14, 14, 14, 14, 14, 14, 94,
+ 29, 94, 14, 14, 14, 265, 265, 14, 14, 14,
14, 14, 14, 14, 14, 14, 14, 14, 14, 14,
14, 14, 14, 14, 14, 14, 14, 14, 14, 14,
- 14, 14, 16, 36, 25, 16, 132, 16, 36, 36,
- 16, 36, 36, 101, 25, 96, 132, 25, 101, 22,
- 16, 25, 22, 39, 22, 39, 238, 22, 16, 20,
- 20, 20, 20, 20, 20, 20, 20, 22, 33, 39,
- 1262, 123, 33, 20, 35, 22, 39, 1265, 96, 37,
+ 14, 14, 16, 36, 25, 16, 1243, 16, 36, 36,
+ 16, 36, 36, 93, 25, 101, 93, 25, 97, 22,
+ 16, 25, 22, 97, 22, 431, 431, 22, 16, 20,
+ 20, 20, 20, 20, 20, 20, 20, 22, 33, 30,
+ 137, 30, 33, 20, 35, 22, 30, 30, 101, 30,
- 238, 33, 33, 37, 123, 33, 35, 33, 35, 104,
- 35, 37, 104, 35, 104, 237, 37, 237, 37, 20,
+ 137, 33, 33, 30, 41, 33, 35, 33, 35, 106,
+ 35, 250, 41, 35, 106, 249, 41, 249, 41, 20,
21, 21, 21, 21, 21, 21, 21, 21, 21, 21,
- 32, 32, 317, 21, 208, 1266, 149, 317, 97, 21,
- 21, 21, 21, 21, 21, 31, 32, 208, 31, 31,
- 32, 31, 130, 31, 32, 31, 32, 31, 38, 41,
- 31, 130, 149, 32, 38, 97, 38, 41, 38, 385,
- 97, 41, 38, 41, 38, 38, 44, 253, 253, 44,
- 629, 44, 385, 629, 44, 62, 62, 62, 62, 62,
- 62, 62, 63, 157, 44, 63, 628, 63, 1270, 388,
+ 32, 32, 1247, 21, 83, 250, 39, 102, 39, 21,
+ 21, 21, 21, 21, 21, 31, 32, 1248, 31, 31,
+ 32, 31, 39, 31, 32, 31, 32, 31, 37, 39,
+ 31, 83, 37, 32, 102, 128, 38, 83, 109, 102,
+ 37, 109, 38, 109, 38, 37, 38, 37, 128, 135,
+ 38, 44, 38, 38, 44, 655, 44, 655, 135, 44,
+ 62, 62, 62, 62, 62, 62, 62, 63, 154, 44,
- 63, 628, 44, 48, 48, 48, 48, 48, 48, 48,
- 63, 1272, 260, 388, 48, 410, 410, 1278, 63, 157,
- 48, 48, 48, 48, 48, 48, 49, 49, 49, 49,
- 49, 49, 49, 83, 575, 575, 329, 49, 260, 270,
- 270, 270, 270, 49, 49, 49, 49, 49, 49, 50,
- 50, 50, 50, 50, 50, 50, 50, 439, 1279, 270,
- 83, 50, 329, 354, 412, 439, 83, 50, 50, 50,
- 50, 50, 50, 52, 52, 52, 52, 52, 52, 52,
- 52, 54, 54, 54, 54, 54, 54, 54, 419, 354,
- 412, 333, 54, 533, 533, 533, 533, 425, 54, 54,
+ 63, 336, 63, 220, 652, 63, 336, 44, 48, 48,
+ 48, 48, 48, 48, 48, 63, 220, 162, 272, 48,
+ 348, 373, 652, 63, 154, 48, 48, 48, 48, 48,
+ 48, 49, 49, 49, 49, 49, 49, 49, 433, 440,
+ 1254, 446, 49, 162, 272, 454, 348, 373, 49, 49,
+ 49, 49, 49, 49, 50, 50, 50, 50, 50, 50,
+ 50, 50, 460, 1255, 433, 440, 50, 446, 596, 596,
+ 460, 454, 50, 50, 50, 50, 50, 50, 52, 52,
+ 52, 52, 52, 52, 52, 52, 54, 54, 54, 54,
+ 54, 54, 54, 282, 282, 282, 282, 54, 406, 647,
- 54, 54, 54, 54, 56, 333, 634, 56, 634, 56,
- 349, 637, 56, 350, 419, 56, 56, 56, 56, 56,
- 56, 56, 56, 425, 349, 637, 56, 350, 433, 490,
- 56, 333, 56, 56, 56, 56, 56, 56, 147, 458,
- 147, 147, 147, 147, 147, 147, 147, 460, 458, 1289,
- 349, 147, 530, 350, 433, 490, 460, 147, 147, 147,
- 147, 147, 147, 148, 148, 148, 148, 148, 148, 148,
- 148, 514, 524, 626, 626, 148, 583, 148, 530, 514,
- 524, 148, 148, 148, 148, 148, 148, 252, 252, 252,
- 252, 252, 252, 252, 263, 263, 263, 263, 263, 263,
+ 647, 479, 409, 54, 54, 54, 54, 54, 54, 56,
+ 479, 406, 56, 282, 56, 352, 409, 56, 368, 369,
+ 56, 56, 56, 56, 56, 56, 56, 56, 511, 352,
+ 648, 56, 368, 369, 1262, 56, 648, 56, 56, 56,
+ 56, 56, 56, 152, 481, 152, 152, 152, 152, 152,
+ 152, 152, 535, 481, 511, 352, 152, 551, 368, 369,
+ 535, 657, 152, 152, 152, 152, 152, 152, 153, 153,
+ 153, 153, 153, 153, 153, 153, 545, 639, 1263, 657,
+ 153, 604, 153, 551, 545, 639, 153, 153, 153, 153,
+ 153, 153, 264, 264, 264, 264, 264, 264, 264, 275,
- 263, 428, 583, 148, 150, 150, 150, 150, 150, 150,
- 150, 150, 586, 592, 1290, 428, 150, 599, 611, 645,
- 645, 1294, 150, 150, 150, 150, 150, 150, 151, 151,
- 151, 151, 151, 151, 151, 151, 151, 618, 586, 592,
- 151, 428, 1295, 599, 611, 618, 151, 151, 151, 151,
- 151, 151, 152, 152, 152, 152, 152, 152, 152, 152,
- 154, 154, 154, 154, 154, 154, 154, 154, 635, 1299,
- 652, 154, 635, 1302, 631, 636, 708, 154, 154, 154,
- 154, 154, 154, 156, 156, 156, 156, 156, 156, 156,
- 156, 156, 631, 636, 708, 156, 652, 156, 654, 287,
+ 275, 275, 275, 275, 275, 275, 449, 604, 153, 155,
+ 155, 155, 155, 155, 155, 155, 155, 607, 613, 1270,
+ 449, 155, 554, 554, 554, 554, 1271, 155, 155, 155,
+ 155, 155, 155, 156, 156, 156, 156, 156, 156, 156,
+ 156, 156, 1278, 607, 613, 156, 449, 620, 632, 666,
+ 666, 156, 156, 156, 156, 156, 156, 157, 157, 157,
+ 157, 157, 157, 157, 157, 159, 159, 159, 159, 159,
+ 159, 159, 159, 620, 632, 649, 159, 673, 650, 714,
+ 649, 650, 159, 159, 159, 159, 159, 159, 161, 161,
+ 161, 161, 161, 161, 161, 161, 161, 656, 1279, 1283,
- 710, 156, 156, 156, 156, 156, 156, 287, 339, 339,
- 339, 339, 339, 339, 339, 1303, 1308, 429, 710, 494,
- 287, 711, 632, 156, 246, 246, 246, 246, 246, 246,
- 246, 429, 632, 494, 654, 246, 287, 716, 1311, 711,
- 1312, 246, 246, 246, 246, 246, 246, 248, 248, 248,
- 248, 248, 248, 248, 630, 716, 711, 429, 248, 494,
- 716, 693, 705, 630, 248, 248, 248, 248, 248, 248,
- 249, 249, 249, 249, 249, 249, 249, 249, 251, 251,
- 251, 251, 251, 251, 251, 675, 686, 693, 705, 251,
- 1317, 709, 720, 675, 686, 251, 251, 251, 251, 251,
+ 161, 656, 161, 673, 306, 714, 161, 161, 161, 161,
+ 161, 161, 306, 358, 358, 358, 358, 358, 358, 358,
+ 1286, 1287, 450, 1291, 515, 306, 729, 653, 161, 258,
+ 258, 258, 258, 258, 258, 258, 450, 653, 515, 726,
+ 258, 306, 1293, 731, 729, 1299, 258, 258, 258, 258,
+ 258, 258, 260, 260, 260, 260, 260, 260, 260, 651,
+ 675, 731, 450, 260, 515, 726, 758, 761, 651, 260,
+ 260, 260, 260, 260, 260, 261, 261, 261, 261, 261,
+ 261, 261, 261, 263, 263, 263, 263, 263, 263, 263,
+ 696, 707, 758, 761, 263, 764, 675, 730, 696, 707,
- 251, 254, 254, 254, 254, 254, 254, 254, 254, 709,
- 720, 720, 1320, 254, 1321, 1326, 709, 1329, 1330, 254,
- 254, 254, 254, 254, 254, 256, 256, 256, 256, 256,
- 256, 256, 256, 259, 259, 259, 259, 259, 259, 259,
- 259, 259, 791, 322, 521, 259, 1338, 259, 322, 1354,
- 791, 259, 259, 259, 259, 259, 259, 322, 521, 322,
- 322, 737, 322, 343, 343, 343, 343, 343, 343, 343,
- 722, 522, 712, 259, 264, 264, 264, 264, 264, 264,
- 264, 264, 264, 1355, 521, 522, 264, 737, 722, 1380,
- 712, 525, 264, 264, 264, 264, 264, 264, 265, 265,
+ 263, 263, 263, 263, 263, 263, 266, 266, 266, 266,
+ 266, 266, 266, 266, 1300, 730, 1310, 1311, 266, 1315,
+ 1316, 764, 730, 1320, 266, 266, 266, 266, 266, 266,
+ 268, 268, 268, 268, 268, 268, 268, 268, 271, 271,
+ 271, 271, 271, 271, 271, 271, 271, 812, 341, 542,
+ 271, 1323, 271, 341, 1324, 812, 271, 271, 271, 271,
+ 271, 271, 341, 542, 341, 341, 770, 341, 362, 362,
+ 362, 362, 362, 362, 362, 741, 543, 732, 271, 276,
+ 276, 276, 276, 276, 276, 276, 276, 276, 1329, 542,
+ 543, 276, 770, 741, 741, 732, 546, 276, 276, 276,
- 265, 265, 265, 265, 265, 525, 1383, 712, 1394, 265,
- 1398, 522, 717, 1402, 718, 265, 265, 265, 265, 265,
- 265, 327, 526, 327, 327, 327, 327, 327, 327, 327,
- 717, 525, 718, 717, 327, 718, 526, 723, 721, 727,
- 327, 327, 327, 327, 327, 327, 328, 328, 328, 328,
- 328, 328, 328, 328, 1406, 723, 721, 727, 328, 721,
- 328, 1410, 526, 1418, 328, 328, 328, 328, 328, 328,
- 409, 409, 409, 409, 409, 409, 409, 437, 437, 437,
- 437, 437, 437, 437, 594, 644, 328, 330, 330, 330,
- 330, 330, 330, 330, 330, 644, 1427, 740, 594, 330,
+ 276, 276, 276, 277, 277, 277, 277, 277, 277, 277,
+ 546, 1332, 732, 1333, 277, 1338, 543, 737, 1341, 743,
+ 277, 277, 277, 277, 277, 277, 346, 547, 346, 346,
+ 346, 346, 346, 346, 346, 737, 546, 743, 1342, 346,
+ 737, 547, 744, 738, 748, 346, 346, 346, 346, 346,
+ 346, 347, 347, 347, 347, 347, 347, 347, 347, 1347,
+ 744, 738, 748, 347, 738, 347, 1350, 547, 1351, 347,
+ 347, 347, 347, 347, 347, 430, 430, 430, 430, 430,
+ 430, 430, 458, 458, 458, 458, 458, 458, 458, 615,
+ 665, 347, 349, 349, 349, 349, 349, 349, 349, 349,
- 743, 729, 729, 1257, 595, 330, 330, 330, 330, 330,
- 330, 334, 334, 334, 334, 334, 334, 334, 595, 729,
- 1250, 749, 334, 740, 594, 756, 743, 798, 334, 334,
- 334, 334, 334, 334, 335, 335, 335, 335, 335, 335,
- 335, 335, 1249, 1242, 595, 798, 335, 749, 768, 771,
- 783, 756, 335, 335, 335, 335, 335, 335, 336, 336,
- 336, 336, 336, 336, 336, 336, 338, 338, 338, 338,
- 338, 338, 338, 1241, 768, 771, 783, 338, 1234, 799,
- 800, 801, 1233, 338, 338, 338, 338, 338, 338, 342,
- 342, 342, 342, 342, 342, 342, 342, 799, 800, 801,
+ 665, 1359, 1375, 615, 349, 1376, 819, 739, 1401, 616,
+ 349, 349, 349, 349, 349, 349, 353, 353, 353, 353,
+ 353, 353, 353, 616, 819, 739, 777, 353, 739, 615,
+ 750, 750, 742, 353, 353, 353, 353, 353, 353, 354,
+ 354, 354, 354, 354, 354, 354, 354, 1404, 750, 616,
+ 742, 354, 777, 742, 789, 792, 1415, 354, 354, 354,
+ 354, 354, 354, 355, 355, 355, 355, 355, 355, 355,
+ 355, 357, 357, 357, 357, 357, 357, 357, 804, 860,
+ 789, 792, 357, 1419, 820, 821, 1423, 860, 357, 357,
+ 357, 357, 357, 357, 361, 361, 361, 361, 361, 361,
- 342, 1227, 799, 800, 801, 803, 342, 342, 342, 342,
- 342, 342, 344, 344, 344, 344, 344, 344, 344, 344,
- 344, 839, 814, 803, 344, 1226, 805, 806, 803, 839,
- 344, 344, 344, 344, 344, 344, 345, 345, 345, 345,
- 345, 345, 345, 345, 805, 806, 1222, 345, 814, 805,
- 806, 808, 810, 345, 345, 345, 345, 345, 345, 351,
- 351, 351, 351, 351, 351, 351, 351, 351, 850, 808,
- 810, 351, 808, 870, 1221, 892, 850, 351, 351, 351,
- 351, 351, 351, 353, 353, 353, 353, 353, 353, 353,
- 353, 353, 862, 892, 1220, 353, 882, 353, 892, 870,
+ 361, 361, 820, 821, 804, 361, 1427, 820, 821, 822,
+ 824, 361, 361, 361, 361, 361, 361, 363, 363, 363,
+ 363, 363, 363, 363, 363, 363, 871, 822, 824, 363,
+ 1431, 826, 822, 824, 871, 363, 363, 363, 363, 363,
+ 363, 364, 364, 364, 364, 364, 364, 364, 364, 826,
+ 1439, 1448, 364, 835, 826, 827, 829, 831, 364, 364,
+ 364, 364, 364, 364, 370, 370, 370, 370, 370, 370,
+ 370, 370, 370, 827, 829, 831, 370, 829, 827, 835,
+ 913, 916, 370, 370, 370, 370, 370, 370, 372, 372,
+ 372, 372, 372, 372, 372, 372, 372, 883, 913, 916,
- 862, 353, 353, 353, 353, 353, 353, 441, 441, 441,
- 441, 441, 441, 441, 507, 507, 507, 507, 507, 507,
- 507, 1219, 882, 353, 371, 1218, 905, 1214, 371, 908,
- 895, 371, 889, 602, 371, 603, 371, 371, 371, 371,
- 403, 403, 403, 403, 403, 403, 403, 602, 895, 603,
- 889, 403, 905, 889, 896, 908, 640, 403, 403, 403,
- 403, 403, 403, 405, 405, 405, 405, 405, 405, 405,
- 640, 978, 896, 602, 405, 603, 911, 914, 920, 978,
- 405, 405, 405, 405, 405, 405, 406, 406, 406, 406,
- 406, 406, 406, 406, 408, 408, 408, 408, 408, 408,
+ 372, 891, 372, 913, 903, 883, 372, 372, 372, 372,
+ 372, 372, 462, 462, 462, 462, 462, 462, 462, 528,
+ 528, 528, 528, 528, 528, 528, 1241, 891, 372, 392,
+ 903, 926, 1240, 392, 929, 917, 392, 910, 623, 392,
+ 624, 392, 392, 392, 392, 424, 424, 424, 424, 424,
+ 424, 424, 623, 917, 624, 910, 424, 926, 910, 918,
+ 929, 658, 424, 424, 424, 424, 424, 424, 426, 426,
+ 426, 426, 426, 426, 426, 658, 999, 918, 623, 426,
+ 624, 932, 935, 941, 999, 426, 426, 426, 426, 426,
+ 426, 427, 427, 427, 427, 427, 427, 427, 427, 429,
- 408, 1211, 911, 914, 920, 408, 927, 894, 897, 901,
- 988, 408, 408, 408, 408, 408, 408, 411, 411, 411,
- 411, 411, 411, 411, 411, 894, 897, 901, 988, 411,
- 1208, 411, 927, 894, 1205, 411, 411, 411, 411, 411,
- 411, 512, 512, 512, 512, 512, 512, 512, 516, 516,
- 516, 516, 516, 516, 516, 713, 606, 411, 413, 413,
- 413, 413, 413, 413, 413, 939, 1202, 942, 954, 413,
- 606, 958, 1199, 713, 643, 413, 413, 413, 413, 413,
- 413, 414, 414, 414, 414, 414, 414, 414, 643, 1186,
- 713, 939, 414, 942, 954, 970, 606, 958, 414, 414,
+ 429, 429, 429, 429, 429, 429, 948, 932, 935, 941,
+ 429, 960, 915, 922, 1239, 1009, 429, 429, 429, 429,
+ 429, 429, 432, 432, 432, 432, 432, 432, 432, 432,
+ 915, 922, 948, 1009, 432, 1235, 432, 960, 915, 1232,
+ 432, 432, 432, 432, 432, 432, 533, 533, 533, 533,
+ 533, 533, 533, 537, 537, 537, 537, 537, 537, 537,
+ 733, 627, 432, 434, 434, 434, 434, 434, 434, 434,
+ 963, 1229, 975, 979, 434, 627, 991, 1226, 733, 661,
+ 434, 434, 434, 434, 434, 434, 435, 435, 435, 435,
+ 435, 435, 435, 661, 1223, 733, 963, 435, 975, 979,
- 414, 414, 414, 414, 415, 415, 415, 415, 415, 415,
- 415, 415, 418, 418, 418, 418, 418, 418, 418, 418,
- 418, 970, 607, 1182, 418, 1175, 418, 1174, 1173, 1169,
- 418, 418, 418, 418, 418, 418, 607, 614, 614, 614,
- 614, 614, 614, 614, 616, 616, 616, 616, 616, 616,
- 616, 996, 418, 424, 424, 424, 424, 424, 424, 424,
- 424, 424, 607, 1168, 1165, 424, 1161, 424, 1160, 996,
- 1159, 424, 424, 424, 424, 424, 424, 620, 620, 620,
- 620, 620, 620, 620, 668, 668, 668, 668, 668, 668,
- 668, 696, 715, 424, 430, 430, 430, 430, 430, 430,
+ 1037, 627, 991, 435, 435, 435, 435, 435, 435, 436,
+ 436, 436, 436, 436, 436, 436, 436, 439, 439, 439,
+ 439, 439, 439, 439, 439, 439, 1037, 628, 1220, 439,
+ 1207, 439, 1203, 1196, 1195, 439, 439, 439, 439, 439,
+ 439, 628, 635, 635, 635, 635, 635, 635, 635, 637,
+ 637, 637, 637, 637, 637, 637, 1017, 439, 445, 445,
+ 445, 445, 445, 445, 445, 445, 445, 628, 1194, 1190,
+ 445, 1189, 445, 1186, 1017, 664, 445, 445, 445, 445,
+ 445, 445, 641, 641, 641, 641, 641, 641, 641, 664,
+ 689, 689, 689, 689, 689, 689, 689, 734, 445, 451,
- 430, 430, 430, 1155, 1154, 696, 430, 1151, 1016, 1069,
- 715, 991, 430, 430, 430, 430, 430, 430, 432, 432,
- 432, 432, 432, 432, 432, 432, 432, 715, 1147, 991,
- 432, 696, 432, 991, 1016, 1069, 432, 432, 432, 432,
- 432, 432, 673, 673, 673, 673, 673, 673, 673, 677,
- 677, 677, 677, 677, 677, 677, 697, 804, 432, 442,
- 442, 442, 442, 442, 442, 442, 442, 442, 1146, 1145,
- 697, 442, 1081, 994, 1141, 804, 700, 442, 442, 442,
- 442, 442, 442, 443, 443, 443, 443, 443, 443, 443,
- 700, 994, 804, 1140, 443, 994, 697, 995, 1081, 1084,
+ 451, 451, 451, 451, 451, 451, 451, 451, 1182, 1181,
+ 1090, 451, 1180, 1102, 1119, 734, 1012, 451, 451, 451,
+ 451, 451, 451, 453, 453, 453, 453, 453, 453, 453,
+ 453, 453, 734, 1176, 1012, 453, 1090, 453, 1012, 1102,
+ 1119, 453, 453, 453, 453, 453, 453, 694, 694, 694,
+ 694, 694, 694, 694, 698, 698, 698, 698, 698, 698,
+ 698, 717, 736, 453, 463, 463, 463, 463, 463, 463,
+ 463, 463, 463, 1175, 1172, 717, 463, 1122, 1015, 1168,
+ 736, 718, 463, 463, 463, 463, 463, 463, 464, 464,
+ 464, 464, 464, 464, 464, 718, 1015, 736, 1167, 464,
- 443, 443, 443, 443, 443, 443, 488, 701, 488, 488,
- 488, 488, 488, 488, 488, 995, 700, 1084, 1137, 488,
- 995, 701, 1134, 1133, 1087, 488, 488, 488, 488, 488,
- 488, 489, 489, 489, 489, 489, 489, 489, 489, 1132,
- 1026, 1084, 1087, 489, 1087, 489, 1128, 701, 1026, 489,
- 489, 489, 489, 489, 489, 682, 682, 682, 682, 682,
- 682, 682, 684, 684, 684, 684, 684, 684, 684, 751,
- 809, 489, 491, 491, 491, 491, 491, 491, 491, 491,
- 1098, 1037, 1127, 751, 491, 1101, 1124, 1123, 809, 1037,
- 491, 491, 491, 491, 491, 491, 495, 495, 495, 495,
+ 1015, 717, 1016, 1122, 1105, 464, 464, 464, 464, 464,
+ 464, 509, 721, 509, 509, 509, 509, 509, 509, 509,
+ 1016, 718, 1105, 1166, 509, 1016, 721, 1162, 1161, 1108,
+ 509, 509, 509, 509, 509, 509, 510, 510, 510, 510,
+ 510, 510, 510, 510, 1158, 1047, 1105, 1108, 510, 1108,
+ 510, 1155, 721, 1047, 510, 510, 510, 510, 510, 510,
+ 703, 703, 703, 703, 703, 703, 703, 705, 705, 705,
+ 705, 705, 705, 705, 722, 825, 510, 512, 512, 512,
+ 512, 512, 512, 512, 512, 1125, 1058, 1154, 722, 512,
+ 1128, 1153, 1131, 825, 1058, 512, 512, 512, 512, 512,
- 495, 495, 495, 495, 1049, 1061, 1098, 809, 495, 751,
- 1104, 1101, 1049, 1061, 495, 495, 495, 495, 495, 495,
- 496, 496, 496, 496, 496, 496, 496, 496, 497, 497,
- 497, 497, 497, 497, 497, 1122, 1104, 1118, 1116, 497,
- 1107, 1110, 1135, 1149, 1115, 497, 497, 497, 497, 497,
- 497, 498, 498, 498, 498, 498, 498, 498, 498, 500,
- 500, 500, 500, 500, 500, 500, 1107, 1110, 1135, 1149,
- 500, 1163, 1197, 1085, 1086, 1088, 500, 500, 500, 500,
- 500, 500, 501, 501, 501, 501, 501, 501, 501, 501,
- 501, 1085, 1086, 1088, 501, 1260, 1091, 1163, 1197, 752,
+ 512, 516, 516, 516, 516, 516, 516, 516, 516, 1070,
+ 825, 1125, 1149, 516, 722, 1156, 1128, 1070, 1131, 516,
+ 516, 516, 516, 516, 516, 517, 517, 517, 517, 517,
+ 517, 517, 517, 518, 518, 518, 518, 518, 518, 518,
+ 1082, 1156, 1148, 1145, 518, 1170, 1184, 1218, 1082, 1144,
+ 518, 518, 518, 518, 518, 518, 519, 519, 519, 519,
+ 519, 519, 519, 519, 521, 521, 521, 521, 521, 521,
+ 521, 1170, 1184, 1218, 1281, 521, 1318, 1327, 1106, 1107,
+ 1109, 521, 521, 521, 521, 521, 521, 522, 522, 522,
+ 522, 522, 522, 522, 522, 522, 1106, 1107, 1109, 522,
- 501, 501, 501, 501, 501, 501, 502, 502, 502, 502,
- 502, 502, 502, 752, 1091, 1085, 1086, 502, 1112, 1091,
- 1092, 1260, 1111, 502, 502, 502, 502, 502, 502, 506,
- 506, 506, 506, 506, 506, 506, 506, 1108, 1092, 752,
- 506, 1105, 1102, 1099, 1188, 1089, 506, 506, 506, 506,
- 506, 506, 508, 508, 508, 508, 508, 508, 508, 508,
- 508, 1181, 1188, 1089, 508, 1095, 1083, 1189, 1190, 1181,
- 508, 508, 508, 508, 508, 508, 509, 509, 509, 509,
- 509, 509, 509, 509, 1089, 1189, 1190, 509, 1082, 1079,
- 1191, 1192, 1274, 509, 509, 509, 509, 509, 509, 517,
+ 1281, 1112, 1318, 1327, 772, 522, 522, 522, 522, 522,
+ 522, 523, 523, 523, 523, 523, 523, 523, 772, 1112,
+ 1106, 1107, 523, 1143, 1112, 1113, 1139, 1137, 523, 523,
+ 523, 523, 523, 523, 527, 527, 527, 527, 527, 527,
+ 527, 527, 1136, 1113, 772, 527, 1133, 1132, 1129, 1209,
+ 1110, 527, 527, 527, 527, 527, 527, 529, 529, 529,
+ 529, 529, 529, 529, 529, 529, 1202, 1209, 1110, 529,
+ 1126, 1123, 1210, 1211, 1202, 529, 529, 529, 529, 529,
+ 529, 530, 530, 530, 530, 530, 530, 530, 530, 1110,
+ 1210, 1211, 530, 1120, 1116, 1212, 1213, 1295, 530, 530,
- 517, 517, 517, 517, 517, 517, 517, 517, 1191, 1192,
- 1274, 517, 1075, 1274, 1192, 1275, 1074, 517, 517, 517,
- 517, 517, 517, 518, 518, 518, 518, 518, 518, 518,
- 518, 1225, 1071, 1275, 518, 1297, 1275, 1066, 1276, 1225,
- 518, 518, 518, 518, 518, 518, 527, 527, 527, 527,
- 527, 527, 527, 527, 527, 1232, 1276, 1306, 527, 1315,
- 1324, 1297, 1065, 1232, 527, 527, 527, 527, 527, 527,
- 529, 529, 529, 529, 529, 529, 529, 529, 529, 1240,
- 1276, 1062, 529, 1306, 529, 1315, 1324, 1240, 529, 529,
- 529, 529, 529, 529, 688, 688, 688, 688, 688, 688,
+ 530, 530, 530, 530, 538, 538, 538, 538, 538, 538,
+ 538, 538, 538, 1212, 1213, 1295, 538, 1104, 1295, 1213,
+ 1296, 1103, 538, 538, 538, 538, 538, 538, 539, 539,
+ 539, 539, 539, 539, 539, 539, 1246, 1100, 1296, 539,
+ 1336, 1296, 1096, 1297, 1246, 539, 539, 539, 539, 539,
+ 539, 548, 548, 548, 548, 548, 548, 548, 548, 548,
+ 1253, 1297, 1345, 548, 1399, 1413, 1336, 1095, 1253, 548,
+ 548, 548, 548, 548, 548, 550, 550, 550, 550, 550,
+ 550, 550, 550, 550, 1261, 1297, 1092, 550, 1345, 550,
+ 1399, 1413, 1261, 550, 550, 550, 550, 550, 550, 709,
- 688, 694, 694, 694, 694, 694, 694, 694, 802, 759,
- 529, 569, 569, 569, 569, 569, 569, 569, 1378, 1248,
- 1392, 1396, 569, 759, 1054, 1343, 802, 1248, 569, 569,
- 569, 569, 569, 569, 571, 571, 571, 571, 571, 571,
- 571, 802, 1256, 1343, 1378, 571, 1392, 1396, 1400, 759,
- 1256, 571, 571, 571, 571, 571, 571, 572, 572, 572,
- 572, 572, 572, 572, 572, 574, 574, 574, 574, 574,
- 574, 574, 1288, 1337, 1400, 1404, 574, 1408, 1193, 1386,
- 1288, 1337, 574, 574, 574, 574, 574, 574, 576, 576,
- 576, 576, 576, 576, 576, 576, 1193, 1386, 1053, 1050,
+ 709, 709, 709, 709, 709, 709, 715, 715, 715, 715,
+ 715, 715, 715, 823, 773, 550, 590, 590, 590, 590,
+ 590, 590, 590, 1417, 1269, 1421, 1425, 590, 773, 1087,
+ 1364, 823, 1269, 590, 590, 590, 590, 590, 590, 592,
+ 592, 592, 592, 592, 592, 592, 823, 1277, 1364, 1417,
+ 592, 1421, 1425, 1429, 773, 1277, 592, 592, 592, 592,
+ 592, 592, 593, 593, 593, 593, 593, 593, 593, 593,
+ 595, 595, 595, 595, 595, 595, 595, 1309, 1358, 1429,
+ 1437, 595, 1446, 1214, 1407, 1309, 1358, 595, 595, 595,
+ 595, 595, 595, 597, 597, 597, 597, 597, 597, 597,
- 576, 1404, 1416, 1408, 1425, 1193, 576, 576, 576, 576,
- 576, 576, 577, 577, 577, 577, 577, 577, 577, 577,
- 578, 578, 578, 578, 578, 578, 578, 1384, 1416, 1042,
- 1425, 578, 1041, 1038, 1031, 1384, 1030, 578, 578, 578,
- 578, 578, 578, 579, 579, 579, 579, 579, 579, 579,
- 579, 582, 582, 582, 582, 582, 582, 582, 582, 582,
- 714, 760, 763, 582, 1027, 582, 1388, 1022, 764, 582,
- 582, 582, 582, 582, 582, 760, 763, 1021, 714, 1018,
- 1017, 1014, 764, 1013, 1388, 724, 1010, 719, 1007, 725,
- 714, 582, 585, 585, 585, 585, 585, 585, 585, 585,
+ 597, 1214, 1407, 1086, 1083, 597, 1437, 1075, 1446, 1074,
+ 1214, 597, 597, 597, 597, 597, 597, 598, 598, 598,
+ 598, 598, 598, 598, 598, 599, 599, 599, 599, 599,
+ 599, 599, 1405, 1071, 1063, 1062, 599, 1059, 1052, 1051,
+ 1405, 1048, 599, 599, 599, 599, 599, 599, 600, 600,
+ 600, 600, 600, 600, 600, 600, 603, 603, 603, 603,
+ 603, 603, 603, 603, 603, 735, 780, 781, 603, 1043,
+ 603, 1409, 1042, 784, 603, 603, 603, 603, 603, 603,
+ 780, 781, 1039, 735, 1038, 1035, 1034, 784, 1031, 1409,
+ 745, 1028, 740, 1025, 746, 735, 603, 606, 606, 606,
- 585, 760, 763, 724, 585, 719, 585, 725, 764, 990,
- 585, 585, 585, 585, 585, 585, 724, 719, 1004, 725,
- 731, 731, 731, 731, 731, 731, 731, 990, 774, 775,
- 778, 888, 585, 591, 591, 591, 591, 591, 591, 591,
- 591, 591, 774, 775, 778, 591, 990, 591, 1000, 888,
- 779, 591, 591, 591, 591, 591, 591, 772, 772, 772,
- 772, 772, 772, 772, 779, 1342, 888, 983, 774, 775,
- 778, 873, 979, 591, 596, 596, 596, 596, 596, 596,
- 596, 596, 596, 1342, 972, 873, 596, 971, 968, 1415,
- 779, 1342, 596, 596, 596, 596, 596, 596, 598, 598,
+ 606, 606, 606, 606, 606, 606, 780, 781, 745, 606,
+ 740, 606, 746, 784, 830, 606, 606, 606, 606, 606,
+ 606, 745, 740, 1021, 746, 752, 752, 752, 752, 752,
+ 752, 752, 830, 785, 795, 796, 909, 606, 612, 612,
+ 612, 612, 612, 612, 612, 612, 612, 785, 795, 796,
+ 612, 830, 612, 1004, 909, 799, 612, 612, 612, 612,
+ 612, 612, 793, 793, 793, 793, 793, 793, 793, 799,
+ 1363, 909, 1000, 785, 795, 796, 800, 993, 612, 617,
+ 617, 617, 617, 617, 617, 617, 617, 617, 1363, 992,
+ 800, 617, 989, 985, 1436, 799, 1363, 617, 617, 617,
- 598, 598, 598, 598, 598, 598, 598, 1415, 964, 963,
- 598, 873, 598, 960, 956, 955, 598, 598, 598, 598,
- 598, 598, 787, 787, 787, 787, 787, 787, 787, 789,
- 789, 789, 789, 789, 789, 789, 874, 890, 598, 608,
- 608, 608, 608, 608, 608, 608, 608, 608, 952, 948,
- 874, 608, 947, 944, 941, 890, 890, 608, 608, 608,
- 608, 608, 608, 610, 610, 610, 610, 610, 610, 610,
- 610, 610, 940, 890, 937, 610, 874, 610, 933, 993,
- 807, 610, 610, 610, 610, 610, 610, 793, 793, 793,
- 793, 793, 793, 793, 932, 929, 928, 993, 807, 925,
+ 617, 617, 617, 619, 619, 619, 619, 619, 619, 619,
+ 619, 619, 1436, 984, 981, 619, 800, 619, 977, 976,
+ 973, 619, 619, 619, 619, 619, 619, 808, 808, 808,
+ 808, 808, 808, 808, 810, 810, 810, 810, 810, 810,
+ 810, 894, 911, 619, 629, 629, 629, 629, 629, 629,
+ 629, 629, 629, 969, 968, 894, 629, 965, 962, 961,
+ 911, 911, 629, 629, 629, 629, 629, 629, 631, 631,
+ 631, 631, 631, 631, 631, 631, 631, 958, 911, 954,
+ 631, 894, 631, 953, 1014, 828, 631, 631, 631, 631,
+ 631, 631, 814, 814, 814, 814, 814, 814, 814, 950,
- 877, 878, 885, 610, 621, 621, 621, 621, 621, 621,
- 621, 621, 621, 807, 877, 878, 621, 993, 921, 917,
- 885, 916, 621, 621, 621, 621, 621, 621, 622, 622,
- 622, 622, 622, 622, 622, 885, 915, 912, 909, 622,
- 877, 878, 906, 903, 902, 622, 622, 622, 622, 622,
- 622, 625, 625, 625, 625, 625, 625, 625, 884, 883,
- 880, 876, 625, 886, 887, 891, 893, 1273, 625, 625,
- 625, 625, 625, 625, 832, 832, 832, 832, 832, 832,
- 832, 886, 887, 891, 893, 1273, 625, 648, 875, 648,
- 648, 648, 648, 648, 648, 648, 886, 887, 887, 891,
+ 949, 946, 1014, 828, 942, 895, 898, 912, 631, 642,
+ 642, 642, 642, 642, 642, 642, 642, 642, 828, 895,
+ 898, 642, 1014, 938, 937, 912, 899, 642, 642, 642,
+ 642, 642, 642, 643, 643, 643, 643, 643, 643, 643,
+ 899, 912, 936, 933, 643, 895, 898, 930, 927, 924,
+ 643, 643, 643, 643, 643, 643, 646, 646, 646, 646,
+ 646, 646, 646, 923, 905, 904, 899, 646, 906, 907,
+ 908, 914, 1011, 646, 646, 646, 646, 646, 646, 853,
+ 853, 853, 853, 853, 853, 853, 906, 907, 908, 914,
+ 1011, 646, 669, 901, 669, 669, 669, 669, 669, 669,
- 648, 893, 1273, 989, 992, 1093, 648, 648, 648, 648,
- 648, 648, 837, 837, 837, 837, 837, 837, 837, 922,
- 923, 989, 992, 1093, 648, 649, 649, 649, 649, 649,
- 649, 649, 649, 922, 923, 989, 992, 649, 1093, 872,
- 867, 863, 855, 649, 649, 649, 649, 649, 649, 841,
- 841, 841, 841, 841, 841, 841, 851, 844, 840, 922,
- 923, 649, 650, 650, 650, 650, 650, 650, 650, 846,
- 846, 846, 846, 846, 846, 846, 848, 848, 848, 848,
- 848, 848, 848, 852, 852, 852, 852, 852, 852, 852,
- 858, 858, 858, 858, 858, 858, 858, 650, 651, 651,
+ 669, 906, 907, 908, 908, 669, 914, 897, 1010, 1011,
+ 1114, 669, 669, 669, 669, 669, 669, 858, 858, 858,
+ 858, 858, 858, 858, 943, 944, 1010, 1294, 1114, 669,
+ 670, 670, 670, 670, 670, 670, 670, 670, 943, 944,
+ 1010, 896, 670, 1114, 893, 1294, 888, 884, 670, 670,
+ 670, 670, 670, 670, 862, 862, 862, 862, 862, 862,
+ 862, 876, 1294, 872, 943, 944, 670, 671, 671, 671,
+ 671, 671, 671, 671, 867, 867, 867, 867, 867, 867,
+ 867, 869, 869, 869, 869, 869, 869, 869, 873, 873,
+ 873, 873, 873, 873, 873, 879, 879, 879, 879, 879,
- 651, 651, 651, 651, 651, 835, 830, 829, 828, 651,
- 825, 822, 818, 796, 792, 651, 651, 651, 651, 651,
- 651, 653, 653, 653, 653, 653, 653, 653, 653, 655,
- 655, 655, 655, 655, 655, 655, 655, 785, 784, 781,
- 777, 655, 776, 773, 770, 769, 766, 655, 655, 655,
- 655, 655, 655, 656, 656, 656, 656, 656, 656, 656,
- 656, 658, 658, 658, 658, 658, 658, 658, 762, 761,
- 758, 757, 658, 754, 750, 747, 746, 745, 658, 658,
- 658, 658, 658, 658, 659, 659, 659, 659, 659, 659,
- 659, 659, 659, 744, 741, 738, 659, 735, 734, 707,
+ 879, 879, 671, 672, 672, 672, 672, 672, 672, 672,
+ 865, 861, 856, 851, 672, 850, 849, 846, 843, 839,
+ 672, 672, 672, 672, 672, 672, 674, 674, 674, 674,
+ 674, 674, 674, 674, 676, 676, 676, 676, 676, 676,
+ 676, 676, 817, 813, 806, 805, 676, 802, 798, 797,
+ 794, 791, 676, 676, 676, 676, 676, 676, 677, 677,
+ 677, 677, 677, 677, 677, 677, 679, 679, 679, 679,
+ 679, 679, 679, 790, 787, 783, 782, 679, 779, 778,
+ 775, 771, 768, 679, 679, 679, 679, 679, 679, 680,
+ 680, 680, 680, 680, 680, 680, 680, 680, 767, 766,
- 706, 930, 659, 659, 659, 659, 659, 659, 660, 660,
- 660, 660, 660, 660, 660, 930, 703, 699, 698, 660,
- 695, 691, 687, 680, 676, 660, 660, 660, 660, 660,
- 660, 662, 662, 662, 662, 662, 662, 662, 662, 662,
- 671, 930, 666, 662, 665, 664, 661, 657, 931, 662,
- 662, 662, 662, 662, 662, 663, 663, 663, 663, 663,
- 663, 663, 931, 647, 646, 642, 663, 641, 639, 638,
- 633, 623, 663, 663, 663, 663, 663, 663, 667, 667,
- 667, 667, 667, 667, 667, 667, 619, 613, 931, 667,
- 612, 609, 605, 604, 601, 667, 667, 667, 667, 667,
+ 765, 680, 762, 759, 756, 755, 951, 680, 680, 680,
+ 680, 680, 680, 681, 681, 681, 681, 681, 681, 681,
+ 951, 728, 727, 724, 681, 720, 719, 716, 712, 708,
+ 681, 681, 681, 681, 681, 681, 683, 683, 683, 683,
+ 683, 683, 683, 683, 683, 701, 951, 697, 683, 692,
+ 687, 686, 685, 952, 683, 683, 683, 683, 683, 683,
+ 684, 684, 684, 684, 684, 684, 684, 952, 682, 678,
+ 668, 684, 667, 663, 662, 660, 659, 684, 684, 684,
+ 684, 684, 684, 688, 688, 688, 688, 688, 688, 688,
+ 688, 654, 644, 952, 688, 640, 634, 633, 630, 626,
- 667, 669, 669, 669, 669, 669, 669, 669, 669, 669,
- 600, 597, 593, 669, 590, 589, 588, 587, 584, 669,
- 669, 669, 669, 669, 669, 670, 670, 670, 670, 670,
- 670, 670, 670, 581, 580, 573, 670, 570, 568, 564,
- 560, 559, 670, 670, 670, 670, 670, 670, 678, 678,
- 678, 678, 678, 678, 678, 678, 678, 558, 557, 553,
- 678, 552, 550, 549, 548, 547, 678, 678, 678, 678,
- 678, 678, 679, 679, 679, 679, 679, 679, 679, 679,
- 546, 545, 544, 679, 543, 542, 541, 540, 539, 679,
- 679, 679, 679, 679, 679, 689, 689, 689, 689, 689,
+ 688, 688, 688, 688, 688, 688, 690, 690, 690, 690,
+ 690, 690, 690, 690, 690, 625, 622, 621, 690, 618,
+ 614, 611, 610, 609, 690, 690, 690, 690, 690, 690,
+ 691, 691, 691, 691, 691, 691, 691, 691, 608, 605,
+ 602, 691, 601, 594, 591, 589, 585, 691, 691, 691,
+ 691, 691, 691, 699, 699, 699, 699, 699, 699, 699,
+ 699, 699, 581, 580, 579, 699, 578, 574, 573, 571,
+ 570, 699, 699, 699, 699, 699, 699, 700, 700, 700,
+ 700, 700, 700, 700, 700, 569, 568, 567, 700, 566,
+ 565, 564, 563, 562, 700, 700, 700, 700, 700, 700,
- 689, 689, 689, 689, 536, 535, 534, 689, 532, 531,
- 528, 523, 519, 689, 689, 689, 689, 689, 689, 690,
- 690, 690, 690, 690, 690, 690, 690, 515, 510, 505,
- 690, 504, 503, 499, 493, 492, 690, 690, 690, 690,
- 690, 690, 702, 702, 702, 702, 702, 702, 702, 702,
- 702, 487, 486, 485, 702, 484, 483, 482, 481, 480,
- 702, 702, 702, 702, 702, 702, 704, 704, 704, 704,
- 704, 704, 704, 704, 704, 479, 478, 477, 704, 475,
- 704, 472, 471, 470, 704, 704, 704, 704, 704, 704,
- 860, 860, 860, 860, 860, 860, 860, 864, 864, 864,
+ 710, 710, 710, 710, 710, 710, 710, 710, 710, 561,
+ 560, 557, 710, 556, 555, 553, 552, 549, 710, 710,
+ 710, 710, 710, 710, 711, 711, 711, 711, 711, 711,
+ 711, 711, 544, 540, 536, 711, 531, 526, 525, 524,
+ 520, 711, 711, 711, 711, 711, 711, 723, 723, 723,
+ 723, 723, 723, 723, 723, 723, 514, 513, 508, 723,
+ 507, 506, 505, 504, 503, 723, 723, 723, 723, 723,
+ 723, 725, 725, 725, 725, 725, 725, 725, 725, 725,
+ 502, 501, 500, 725, 499, 725, 498, 496, 493, 725,
+ 725, 725, 725, 725, 725, 881, 881, 881, 881, 881,
- 864, 864, 864, 864, 934, 935, 704, 726, 945, 726,
- 726, 726, 726, 726, 726, 726, 469, 468, 934, 935,
- 726, 467, 945, 466, 464, 726, 726, 726, 726, 726,
- 726, 726, 728, 728, 728, 728, 728, 728, 728, 463,
- 462, 461, 459, 728, 934, 935, 457, 456, 945, 728,
- 728, 728, 728, 728, 728, 730, 730, 730, 730, 730,
- 730, 730, 455, 454, 453, 452, 730, 451, 1341, 449,
- 448, 447, 730, 730, 730, 730, 730, 730, 732, 732,
- 732, 732, 732, 732, 732, 732, 1341, 444, 440, 436,
- 732, 435, 434, 431, 427, 1341, 732, 732, 732, 732,
+ 881, 881, 885, 885, 885, 885, 885, 885, 885, 955,
+ 956, 725, 747, 966, 747, 747, 747, 747, 747, 747,
+ 747, 492, 491, 955, 956, 747, 490, 966, 489, 488,
+ 747, 747, 747, 747, 747, 747, 747, 749, 749, 749,
+ 749, 749, 749, 749, 487, 485, 484, 483, 749, 955,
+ 956, 482, 480, 966, 749, 749, 749, 749, 749, 749,
+ 751, 751, 751, 751, 751, 751, 751, 478, 477, 476,
+ 475, 751, 474, 1362, 473, 472, 470, 751, 751, 751,
+ 751, 751, 751, 753, 753, 753, 753, 753, 753, 753,
+ 753, 1362, 469, 468, 465, 753, 461, 457, 456, 455,
- 732, 732, 733, 733, 733, 733, 733, 733, 733, 733,
- 736, 736, 736, 736, 736, 736, 736, 736, 736, 426,
- 423, 422, 736, 421, 736, 420, 417, 416, 736, 736,
- 736, 736, 736, 736, 871, 871, 871, 871, 871, 871,
- 871, 943, 943, 943, 943, 943, 943, 943, 946, 407,
- 736, 739, 739, 739, 739, 739, 739, 739, 739, 739,
- 404, 949, 946, 739, 402, 739, 401, 950, 961, 739,
- 739, 739, 739, 739, 739, 949, 400, 399, 398, 397,
- 396, 950, 961, 395, 394, 393, 392, 1340, 946, 962,
- 391, 739, 742, 742, 742, 742, 742, 742, 742, 742,
+ 1362, 753, 753, 753, 753, 753, 753, 754, 754, 754,
+ 754, 754, 754, 754, 754, 757, 757, 757, 757, 757,
+ 757, 757, 757, 757, 452, 448, 447, 757, 444, 757,
+ 443, 442, 441, 757, 757, 757, 757, 757, 757, 892,
+ 892, 892, 892, 892, 892, 892, 964, 964, 964, 964,
+ 964, 964, 964, 967, 438, 757, 760, 760, 760, 760,
+ 760, 760, 760, 760, 760, 437, 970, 967, 760, 428,
+ 760, 425, 971, 982, 760, 760, 760, 760, 760, 760,
+ 970, 423, 422, 421, 420, 419, 971, 982, 418, 417,
+ 416, 415, 1361, 967, 983, 414, 760, 763, 763, 763,
- 742, 949, 389, 962, 742, 1340, 742, 950, 961, 965,
- 742, 742, 742, 742, 742, 742, 959, 959, 959, 959,
- 959, 959, 959, 965, 1340, 387, 386, 384, 966, 962,
- 1072, 383, 742, 748, 748, 748, 748, 748, 748, 748,
- 748, 748, 966, 380, 1072, 748, 379, 748, 377, 965,
- 1073, 748, 748, 748, 748, 748, 748, 974, 974, 974,
- 974, 974, 974, 974, 1073, 375, 374, 373, 966, 1076,
- 1072, 1077, 370, 748, 753, 753, 753, 753, 753, 753,
- 753, 753, 753, 1076, 369, 1077, 753, 367, 366, 365,
- 1073, 364, 753, 753, 753, 753, 753, 753, 755, 755,
+ 763, 763, 763, 763, 763, 763, 970, 413, 983, 763,
+ 1361, 763, 971, 982, 986, 763, 763, 763, 763, 763,
+ 763, 980, 980, 980, 980, 980, 980, 980, 986, 1361,
+ 412, 410, 408, 987, 983, 1093, 407, 763, 769, 769,
+ 769, 769, 769, 769, 769, 769, 769, 987, 405, 1093,
+ 769, 404, 769, 401, 986, 1094, 769, 769, 769, 769,
+ 769, 769, 995, 995, 995, 995, 995, 995, 995, 1094,
+ 400, 398, 396, 987, 1097, 1093, 1098, 395, 769, 774,
+ 774, 774, 774, 774, 774, 774, 774, 774, 1097, 394,
+ 1098, 774, 389, 388, 386, 1094, 385, 774, 774, 774,
- 755, 755, 755, 755, 755, 755, 755, 362, 357, 1076,
- 755, 1077, 755, 356, 355, 352, 755, 755, 755, 755,
- 755, 755, 976, 976, 976, 976, 976, 976, 976, 980,
- 980, 980, 980, 980, 980, 980, 1119, 348, 755, 765,
- 765, 765, 765, 765, 765, 765, 765, 765, 346, 341,
- 1119, 765, 340, 337, 332, 331, 323, 765, 765, 765,
- 765, 765, 765, 767, 767, 767, 767, 767, 767, 767,
- 767, 767, 985, 986, 1120, 767, 1119, 767, 321, 320,
- 315, 767, 767, 767, 767, 767, 767, 313, 1120, 311,
- 985, 986, 1019, 1019, 1019, 1019, 1019, 1019, 1019, 1125,
+ 774, 774, 774, 776, 776, 776, 776, 776, 776, 776,
+ 776, 776, 384, 383, 1097, 776, 1098, 776, 381, 376,
+ 375, 776, 776, 776, 776, 776, 776, 997, 997, 997,
+ 997, 997, 997, 997, 1001, 1001, 1001, 1001, 1001, 1001,
+ 1001, 1140, 374, 776, 786, 786, 786, 786, 786, 786,
+ 786, 786, 786, 371, 367, 1140, 786, 365, 360, 359,
+ 356, 1013, 786, 786, 786, 786, 786, 786, 788, 788,
+ 788, 788, 788, 788, 788, 788, 788, 1006, 1007, 1013,
+ 788, 1140, 788, 351, 350, 342, 788, 788, 788, 788,
+ 788, 788, 340, 1013, 339, 1006, 1007, 1040, 1040, 1040,
- 310, 985, 986, 767, 780, 780, 780, 780, 780, 780,
- 780, 780, 780, 1125, 1120, 309, 780, 308, 307, 306,
- 305, 303, 780, 780, 780, 780, 780, 780, 782, 782,
- 782, 782, 782, 782, 782, 782, 782, 987, 1126, 1125,
- 782, 302, 782, 301, 296, 1387, 782, 782, 782, 782,
- 782, 782, 1126, 293, 292, 987, 1024, 1024, 1024, 1024,
- 1024, 1024, 1024, 1387, 291, 1129, 987, 288, 782, 794,
- 794, 794, 794, 794, 794, 794, 794, 794, 1126, 1129,
- 285, 794, 1387, 284, 282, 280, 1130, 794, 794, 794,
- 794, 794, 794, 795, 795, 795, 795, 795, 795, 795,
+ 1040, 1040, 1040, 1040, 1141, 334, 1006, 1007, 788, 801,
+ 801, 801, 801, 801, 801, 801, 801, 801, 1141, 332,
+ 330, 801, 329, 328, 327, 326, 325, 801, 801, 801,
+ 801, 801, 801, 803, 803, 803, 803, 803, 803, 803,
+ 803, 803, 1008, 1146, 1141, 803, 324, 803, 322, 321,
+ 1408, 803, 803, 803, 803, 803, 803, 1146, 320, 315,
+ 1008, 1045, 1045, 1045, 1045, 1045, 1045, 1045, 1408, 312,
+ 1147, 1008, 311, 803, 815, 815, 815, 815, 815, 815,
+ 815, 815, 815, 1146, 1147, 310, 815, 1408, 307, 300,
+ 299, 1150, 815, 815, 815, 815, 815, 815, 816, 816,
- 1130, 279, 278, 276, 795, 1129, 272, 271, 269, 266,
- 795, 795, 795, 795, 795, 795, 811, 1138, 811, 811,
- 811, 811, 811, 811, 811, 262, 1130, 261, 258, 811,
- 257, 1138, 255, 250, 811, 811, 811, 811, 811, 811,
- 811, 812, 812, 812, 812, 812, 812, 812, 247, 245,
- 244, 242, 812, 239, 235, 231, 229, 1138, 812, 812,
- 812, 812, 812, 812, 813, 813, 813, 813, 813, 813,
- 813, 813, 227, 226, 224, 223, 813, 222, 813, 221,
- 220, 219, 813, 813, 813, 813, 813, 813, 1028, 1028,
- 1028, 1028, 1028, 1028, 1028, 1033, 1033, 1033, 1033, 1033,
+ 816, 816, 816, 816, 816, 1150, 297, 296, 294, 816,
+ 1147, 292, 291, 290, 288, 816, 816, 816, 816, 816,
+ 816, 832, 1151, 832, 832, 832, 832, 832, 832, 832,
+ 284, 1150, 283, 281, 832, 278, 1151, 274, 273, 832,
+ 832, 832, 832, 832, 832, 832, 833, 833, 833, 833,
+ 833, 833, 833, 270, 269, 267, 262, 833, 259, 257,
+ 256, 254, 1151, 833, 833, 833, 833, 833, 833, 834,
+ 834, 834, 834, 834, 834, 834, 834, 251, 247, 243,
+ 241, 834, 239, 834, 238, 236, 235, 834, 834, 834,
+ 834, 834, 834, 1049, 1049, 1049, 1049, 1049, 1049, 1049,
- 1033, 1033, 218, 1139, 813, 815, 815, 815, 815, 815,
- 815, 815, 216, 214, 212, 211, 815, 1139, 209, 207,
- 206, 204, 815, 815, 815, 815, 815, 815, 816, 816,
- 816, 816, 816, 816, 816, 816, 201, 200, 199, 197,
- 816, 195, 194, 1139, 191, 190, 816, 816, 816, 816,
- 816, 816, 817, 817, 817, 817, 817, 817, 817, 817,
- 819, 819, 819, 819, 819, 819, 819, 188, 187, 186,
- 185, 819, 184, 183, 182, 181, 180, 819, 819, 819,
- 819, 819, 819, 820, 820, 820, 820, 820, 820, 820,
- 820, 820, 179, 177, 176, 820, 173, 172, 171, 170,
+ 1054, 1054, 1054, 1054, 1054, 1054, 1054, 234, 1159, 834,
+ 836, 836, 836, 836, 836, 836, 836, 233, 232, 231,
+ 230, 836, 1159, 228, 226, 224, 223, 836, 836, 836,
+ 836, 836, 836, 837, 837, 837, 837, 837, 837, 837,
+ 837, 221, 219, 218, 216, 837, 213, 212, 1159, 211,
+ 209, 837, 837, 837, 837, 837, 837, 838, 838, 838,
+ 838, 838, 838, 838, 838, 840, 840, 840, 840, 840,
+ 840, 840, 207, 206, 203, 202, 840, 200, 199, 198,
+ 197, 196, 840, 840, 840, 840, 840, 840, 841, 841,
+ 841, 841, 841, 841, 841, 841, 841, 195, 194, 193,
- 1142, 820, 820, 820, 820, 820, 820, 821, 821, 821,
- 821, 821, 821, 821, 1142, 169, 168, 167, 821, 166,
- 164, 161, 160, 159, 821, 821, 821, 821, 821, 821,
- 823, 823, 823, 823, 823, 823, 823, 823, 823, 158,
- 1142, 155, 823, 153, 144, 143, 142, 1143, 823, 823,
- 823, 823, 823, 823, 824, 824, 824, 824, 824, 824,
- 824, 1143, 141, 140, 139, 824, 138, 136, 134, 133,
- 131, 824, 824, 824, 824, 824, 824, 826, 826, 826,
- 826, 826, 826, 826, 826, 826, 129, 1143, 127, 826,
- 126, 125, 124, 122, 1152, 826, 826, 826, 826, 826,
+ 841, 192, 191, 190, 189, 1160, 841, 841, 841, 841,
+ 841, 841, 842, 842, 842, 842, 842, 842, 842, 1160,
+ 188, 187, 186, 842, 185, 184, 182, 181, 178, 842,
+ 842, 842, 842, 842, 842, 844, 844, 844, 844, 844,
+ 844, 844, 844, 844, 177, 1160, 176, 844, 175, 174,
+ 173, 172, 1163, 844, 844, 844, 844, 844, 844, 845,
+ 845, 845, 845, 845, 845, 845, 1163, 171, 169, 166,
+ 845, 165, 164, 163, 160, 158, 845, 845, 845, 845,
+ 845, 845, 847, 847, 847, 847, 847, 847, 847, 847,
+ 847, 149, 1163, 148, 847, 147, 146, 145, 144, 1164,
- 826, 827, 827, 827, 827, 827, 827, 827, 1152, 121,
- 120, 119, 827, 118, 117, 115, 113, 112, 827, 827,
- 827, 827, 827, 827, 831, 831, 831, 831, 831, 831,
- 831, 831, 111, 110, 1152, 831, 109, 108, 107, 106,
- 105, 831, 831, 831, 831, 831, 831, 833, 833, 833,
- 833, 833, 833, 833, 833, 833, 103, 102, 95, 833,
- 94, 93, 91, 90, 89, 833, 833, 833, 833, 833,
- 833, 834, 834, 834, 834, 834, 834, 834, 834, 88,
- 87, 86, 834, 85, 84, 82, 81, 80, 834, 834,
- 834, 834, 834, 834, 842, 842, 842, 842, 842, 842,
+ 847, 847, 847, 847, 847, 847, 848, 848, 848, 848,
+ 848, 848, 848, 1164, 143, 141, 139, 848, 138, 136,
+ 134, 132, 131, 848, 848, 848, 848, 848, 848, 852,
+ 852, 852, 852, 852, 852, 852, 852, 130, 129, 1164,
+ 852, 127, 126, 125, 124, 123, 852, 852, 852, 852,
+ 852, 852, 854, 854, 854, 854, 854, 854, 854, 854,
+ 854, 122, 120, 118, 854, 117, 116, 115, 114, 113,
+ 854, 854, 854, 854, 854, 854, 855, 855, 855, 855,
+ 855, 855, 855, 855, 112, 111, 110, 855, 108, 107,
+ 100, 99, 98, 855, 855, 855, 855, 855, 855, 863,
- 842, 842, 842, 79, 78, 77, 842, 76, 75, 74,
- 73, 72, 842, 842, 842, 842, 842, 842, 843, 843,
- 843, 843, 843, 843, 843, 843, 71, 70, 69, 843,
- 67, 66, 65, 51, 43, 843, 843, 843, 843, 843,
- 843, 853, 853, 853, 853, 853, 853, 853, 853, 853,
- 42, 40, 30, 853, 18, 10, 8, 3, 0, 853,
- 853, 853, 853, 853, 853, 854, 854, 854, 854, 854,
- 854, 854, 854, 0, 0, 0, 854, 0, 0, 0,
- 0, 0, 854, 854, 854, 854, 854, 854, 865, 865,
- 865, 865, 865, 865, 865, 865, 865, 0, 0, 0,
+ 863, 863, 863, 863, 863, 863, 863, 863, 96, 95,
+ 92, 863, 91, 90, 89, 88, 87, 863, 863, 863,
+ 863, 863, 863, 864, 864, 864, 864, 864, 864, 864,
+ 864, 86, 85, 84, 864, 82, 81, 80, 79, 78,
+ 864, 864, 864, 864, 864, 864, 874, 874, 874, 874,
+ 874, 874, 874, 874, 874, 77, 76, 75, 874, 74,
+ 73, 72, 71, 70, 874, 874, 874, 874, 874, 874,
+ 875, 875, 875, 875, 875, 875, 875, 875, 69, 67,
+ 66, 875, 65, 51, 43, 42, 40, 875, 875, 875,
+ 875, 875, 875, 886, 886, 886, 886, 886, 886, 886,
- 865, 0, 0, 0, 0, 0, 865, 865, 865, 865,
- 865, 865, 866, 866, 866, 866, 866, 866, 866, 866,
- 0, 0, 0, 866, 0, 0, 0, 0, 0, 866,
- 866, 866, 866, 866, 866, 879, 879, 879, 879, 879,
- 879, 879, 879, 879, 0, 0, 0, 879, 0, 0,
- 0, 0, 0, 879, 879, 879, 879, 879, 879, 881,
- 881, 881, 881, 881, 881, 881, 881, 881, 0, 0,
- 0, 881, 0, 881, 0, 0, 0, 881, 881, 881,
- 881, 881, 881, 1035, 1035, 1035, 1035, 1035, 1035, 1035,
- 1039, 1039, 1039, 1039, 1039, 1039, 1039, 0, 0, 881,
+ 886, 886, 18, 10, 8, 886, 3, 0, 0, 0,
+ 0, 886, 886, 886, 886, 886, 886, 887, 887, 887,
+ 887, 887, 887, 887, 887, 0, 0, 0, 887, 0,
+ 0, 0, 0, 0, 887, 887, 887, 887, 887, 887,
+ 900, 900, 900, 900, 900, 900, 900, 900, 900, 0,
+ 0, 0, 900, 0, 0, 0, 0, 0, 900, 900,
+ 900, 900, 900, 900, 902, 902, 902, 902, 902, 902,
+ 902, 902, 902, 0, 0, 0, 902, 0, 902, 0,
+ 0, 0, 902, 902, 902, 902, 902, 902, 1056, 1056,
+ 1056, 1056, 1056, 1056, 1056, 1060, 1060, 1060, 1060, 1060,
- 898, 898, 898, 898, 898, 898, 898, 898, 898, 0,
- 0, 0, 0, 898, 0, 0, 0, 0, 898, 898,
- 898, 898, 898, 898, 898, 899, 899, 899, 899, 899,
- 899, 899, 899, 900, 900, 900, 900, 900, 900, 900,
- 900, 900, 1045, 1045, 1045, 1045, 1045, 1045, 1045, 0,
- 0, 900, 904, 904, 904, 904, 904, 904, 904, 904,
- 904, 0, 0, 0, 904, 0, 904, 0, 0, 0,
- 904, 904, 904, 904, 904, 904, 1047, 1047, 1047, 1047,
- 1047, 1047, 1047, 1051, 1051, 1051, 1051, 1051, 1051, 1051,
- 0, 0, 904, 907, 907, 907, 907, 907, 907, 907,
+ 1060, 1060, 0, 0, 902, 919, 919, 919, 919, 919,
+ 919, 919, 919, 919, 0, 0, 0, 0, 919, 0,
+ 0, 0, 0, 919, 919, 919, 919, 919, 919, 919,
+ 920, 920, 920, 920, 920, 920, 920, 920, 921, 921,
+ 921, 921, 921, 921, 921, 921, 921, 1066, 1066, 1066,
+ 1066, 1066, 1066, 1066, 0, 0, 921, 925, 925, 925,
+ 925, 925, 925, 925, 925, 925, 0, 0, 0, 925,
+ 0, 925, 0, 0, 0, 925, 925, 925, 925, 925,
+ 925, 1068, 1068, 1068, 1068, 1068, 1068, 1068, 1072, 1072,
+ 1072, 1072, 1072, 1072, 1072, 0, 0, 925, 928, 928,
- 907, 907, 0, 0, 0, 907, 0, 907, 0, 0,
- 0, 907, 907, 907, 907, 907, 907, 1057, 1057, 1057,
- 1057, 1057, 1057, 1057, 1059, 1059, 1059, 1059, 1059, 1059,
- 1059, 0, 0, 907, 910, 910, 910, 910, 910, 910,
- 910, 910, 910, 0, 0, 0, 910, 0, 910, 0,
- 0, 0, 910, 910, 910, 910, 910, 910, 1063, 1063,
- 1063, 1063, 1063, 1063, 1063, 1070, 1070, 1070, 1070, 1070,
- 1070, 1070, 1090, 0, 910, 913, 913, 913, 913, 913,
- 913, 913, 913, 913, 0, 1153, 1156, 913, 0, 913,
- 1090, 0, 0, 913, 913, 913, 913, 913, 913, 1153,
+ 928, 928, 928, 928, 928, 928, 928, 0, 0, 0,
+ 928, 0, 928, 0, 0, 0, 928, 928, 928, 928,
+ 928, 928, 1078, 1078, 1078, 1078, 1078, 1078, 1078, 1080,
+ 1080, 1080, 1080, 1080, 1080, 1080, 0, 0, 928, 931,
+ 931, 931, 931, 931, 931, 931, 931, 931, 0, 0,
+ 0, 931, 0, 931, 0, 0, 0, 931, 931, 931,
+ 931, 931, 931, 1084, 1084, 1084, 1084, 1084, 1084, 1084,
+ 1091, 1091, 1091, 1091, 1091, 1091, 1091, 1111, 0, 931,
+ 934, 934, 934, 934, 934, 934, 934, 934, 934, 0,
+ 1173, 1174, 934, 0, 934, 1111, 0, 0, 934, 934,
- 1156, 1090, 1113, 1113, 1113, 1113, 1113, 1113, 1113, 0,
- 1157, 0, 0, 0, 1166, 913, 918, 918, 918, 918,
- 918, 918, 918, 918, 1157, 1153, 1156, 918, 1166, 0,
- 0, 0, 0, 918, 918, 918, 918, 918, 918, 919,
- 919, 919, 919, 919, 919, 919, 919, 919, 0, 0,
- 1157, 919, 0, 919, 1166, 0, 0, 919, 919, 919,
- 919, 919, 919, 1136, 1136, 1136, 1136, 1136, 1136, 1136,
- 1150, 1150, 1150, 1150, 1150, 1150, 1150, 1167, 0, 919,
- 924, 924, 924, 924, 924, 924, 924, 924, 924, 0,
- 0, 1167, 924, 0, 0, 0, 0, 0, 924, 924,
+ 934, 934, 934, 934, 1173, 1174, 1111, 1134, 1134, 1134,
+ 1134, 1134, 1134, 1134, 0, 1177, 0, 0, 0, 1178,
+ 934, 939, 939, 939, 939, 939, 939, 939, 939, 1177,
+ 1173, 1174, 939, 1178, 0, 0, 0, 0, 939, 939,
+ 939, 939, 939, 939, 940, 940, 940, 940, 940, 940,
+ 940, 940, 940, 0, 0, 1177, 940, 0, 940, 1178,
+ 0, 0, 940, 940, 940, 940, 940, 940, 1157, 1157,
+ 1157, 1157, 1157, 1157, 1157, 1171, 1171, 1171, 1171, 1171,
+ 1171, 1171, 1187, 0, 940, 945, 945, 945, 945, 945,
+ 945, 945, 945, 945, 0, 0, 1187, 945, 0, 0,
- 924, 924, 924, 924, 926, 926, 926, 926, 926, 926,
- 926, 926, 926, 0, 0, 0, 926, 1167, 926, 0,
- 0, 1170, 926, 926, 926, 926, 926, 926, 1164, 1164,
- 1164, 1164, 1164, 1164, 1164, 1170, 0, 0, 0, 0,
- 1171, 0, 1215, 0, 926, 936, 936, 936, 936, 936,
- 936, 936, 936, 936, 1171, 0, 1215, 936, 0, 0,
- 0, 1170, 0, 936, 936, 936, 936, 936, 936, 938,
- 938, 938, 938, 938, 938, 938, 938, 938, 0, 0,
- 1171, 938, 1215, 938, 0, 0, 0, 938, 938, 938,
- 938, 938, 938, 1177, 1177, 1177, 1177, 1177, 1177, 1177,
+ 0, 0, 0, 945, 945, 945, 945, 945, 945, 947,
+ 947, 947, 947, 947, 947, 947, 947, 947, 0, 0,
+ 0, 947, 1187, 947, 0, 0, 1188, 947, 947, 947,
+ 947, 947, 947, 1185, 1185, 1185, 1185, 1185, 1185, 1185,
+ 1188, 0, 0, 0, 0, 1191, 0, 1192, 0, 947,
+ 957, 957, 957, 957, 957, 957, 957, 957, 957, 1191,
+ 0, 1192, 957, 0, 0, 0, 1188, 0, 957, 957,
+ 957, 957, 957, 957, 959, 959, 959, 959, 959, 959,
+ 959, 959, 959, 0, 0, 1191, 959, 1192, 959, 0,
+ 0, 0, 959, 959, 959, 959, 959, 959, 1198, 1198,
- 1179, 1179, 1179, 1179, 1179, 1179, 1179, 1216, 0, 938,
- 951, 951, 951, 951, 951, 951, 951, 951, 951, 0,
- 0, 1216, 951, 0, 0, 0, 0, 0, 951, 951,
- 951, 951, 951, 951, 953, 953, 953, 953, 953, 953,
- 953, 953, 953, 0, 0, 0, 953, 1216, 953, 0,
- 0, 0, 953, 953, 953, 953, 953, 953, 1183, 1183,
- 1183, 1183, 1183, 1183, 1183, 1223, 1223, 1223, 1223, 1223,
- 1223, 1223, 1263, 0, 953, 967, 967, 967, 967, 967,
- 967, 967, 967, 967, 0, 0, 1263, 967, 0, 0,
- 0, 0, 1194, 967, 967, 967, 967, 967, 967, 969,
+ 1198, 1198, 1198, 1198, 1198, 1200, 1200, 1200, 1200, 1200,
+ 1200, 1200, 1236, 0, 959, 972, 972, 972, 972, 972,
+ 972, 972, 972, 972, 0, 0, 1236, 972, 0, 0,
+ 0, 0, 0, 972, 972, 972, 972, 972, 972, 974,
+ 974, 974, 974, 974, 974, 974, 974, 974, 0, 0,
+ 0, 974, 1236, 974, 0, 0, 1237, 974, 974, 974,
+ 974, 974, 974, 1204, 1204, 1204, 1204, 1204, 1204, 1204,
+ 1237, 1244, 1244, 1244, 1244, 1244, 1244, 1244, 0, 974,
+ 988, 988, 988, 988, 988, 988, 988, 988, 988, 0,
+ 0, 0, 988, 0, 0, 0, 1237, 1215, 988, 988,
- 969, 969, 969, 969, 969, 969, 969, 969, 1195, 0,
- 1194, 969, 1263, 969, 0, 0, 0, 969, 969, 969,
- 969, 969, 969, 1194, 0, 0, 1195, 1228, 1228, 1228,
- 1228, 1228, 1228, 1228, 0, 0, 1264, 1195, 0, 969,
- 981, 981, 981, 981, 981, 981, 981, 981, 981, 0,
- 1264, 0, 981, 0, 0, 0, 0, 1267, 981, 981,
- 981, 981, 981, 981, 982, 982, 982, 982, 982, 982,
- 982, 1267, 0, 0, 0, 982, 1264, 0, 0, 0,
- 0, 982, 982, 982, 982, 982, 982, 997, 997, 997,
- 997, 997, 997, 997, 997, 997, 0, 1267, 0, 0,
+ 988, 988, 988, 988, 990, 990, 990, 990, 990, 990,
+ 990, 990, 990, 1216, 0, 1215, 990, 0, 990, 0,
+ 0, 0, 990, 990, 990, 990, 990, 990, 1215, 0,
+ 0, 1216, 1249, 1249, 1249, 1249, 1249, 1249, 1249, 0,
+ 0, 1284, 1216, 0, 990, 1002, 1002, 1002, 1002, 1002,
+ 1002, 1002, 1002, 1002, 0, 1284, 0, 1002, 0, 0,
+ 0, 0, 1285, 1002, 1002, 1002, 1002, 1002, 1002, 1003,
+ 1003, 1003, 1003, 1003, 1003, 1003, 1285, 0, 0, 0,
+ 1003, 1284, 0, 0, 0, 0, 1003, 1003, 1003, 1003,
+ 1003, 1003, 1018, 1018, 1018, 1018, 1018, 1018, 1018, 1018,
- 997, 0, 0, 0, 0, 997, 997, 997, 997, 997,
- 997, 997, 998, 998, 998, 998, 998, 998, 998, 998,
- 999, 999, 999, 999, 999, 999, 999, 999, 999, 1230,
- 1230, 1230, 1230, 1230, 1230, 1230, 0, 1268, 999, 1001,
- 1001, 1001, 1001, 1001, 1001, 1001, 0, 0, 0, 0,
- 1001, 1268, 0, 0, 0, 0, 1001, 1001, 1001, 1001,
- 1001, 1001, 1002, 1002, 1002, 1002, 1002, 1002, 1002, 1002,
- 1002, 0, 0, 0, 1002, 0, 0, 1268, 0, 1292,
- 1002, 1002, 1002, 1002, 1002, 1002, 1003, 1003, 1003, 1003,
- 1003, 1003, 1003, 1292, 0, 0, 0, 1003, 0, 0,
+ 1018, 0, 1285, 0, 0, 1018, 0, 0, 0, 0,
+ 1018, 1018, 1018, 1018, 1018, 1018, 1018, 1019, 1019, 1019,
+ 1019, 1019, 1019, 1019, 1019, 1020, 1020, 1020, 1020, 1020,
+ 1020, 1020, 1020, 1020, 1251, 1251, 1251, 1251, 1251, 1251,
+ 1251, 0, 1288, 1020, 1022, 1022, 1022, 1022, 1022, 1022,
+ 1022, 0, 0, 0, 0, 1022, 1288, 0, 0, 0,
+ 0, 1022, 1022, 1022, 1022, 1022, 1022, 1023, 1023, 1023,
+ 1023, 1023, 1023, 1023, 1023, 1023, 0, 0, 0, 1023,
+ 0, 0, 1288, 0, 1289, 1023, 1023, 1023, 1023, 1023,
+ 1023, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1289, 0,
- 0, 0, 0, 1003, 1003, 1003, 1003, 1003, 1003, 1005,
- 1005, 1005, 1005, 1005, 1005, 1005, 1005, 1005, 0, 1292,
- 0, 1005, 0, 0, 0, 0, 1293, 1005, 1005, 1005,
- 1005, 1005, 1005, 1006, 1006, 1006, 1006, 1006, 1006, 1006,
- 1293, 0, 0, 0, 1006, 0, 0, 0, 0, 0,
- 1006, 1006, 1006, 1006, 1006, 1006, 1008, 1008, 1008, 1008,
- 1008, 1008, 1008, 1008, 1008, 0, 1293, 0, 1008, 0,
- 0, 0, 0, 1300, 1008, 1008, 1008, 1008, 1008, 1008,
- 1009, 1009, 1009, 1009, 1009, 1009, 1009, 1300, 0, 0,
- 0, 1009, 0, 0, 0, 0, 0, 1009, 1009, 1009,
+ 0, 0, 1024, 0, 0, 0, 0, 0, 1024, 1024,
+ 1024, 1024, 1024, 1024, 1026, 1026, 1026, 1026, 1026, 1026,
+ 1026, 1026, 1026, 0, 1289, 0, 1026, 0, 0, 0,
+ 0, 1313, 1026, 1026, 1026, 1026, 1026, 1026, 1027, 1027,
+ 1027, 1027, 1027, 1027, 1027, 1313, 0, 0, 0, 1027,
+ 0, 0, 0, 0, 0, 1027, 1027, 1027, 1027, 1027,
+ 1027, 1029, 1029, 1029, 1029, 1029, 1029, 1029, 1029, 1029,
+ 0, 1313, 0, 1029, 0, 0, 0, 0, 1314, 1029,
+ 1029, 1029, 1029, 1029, 1029, 1030, 1030, 1030, 1030, 1030,
+ 1030, 1030, 1314, 0, 0, 0, 1030, 0, 0, 0,
- 1009, 1009, 1009, 1011, 1011, 1011, 1011, 1011, 1011, 1011,
- 1011, 1011, 0, 1300, 0, 1011, 0, 0, 0, 0,
- 1301, 1011, 1011, 1011, 1011, 1011, 1011, 1012, 1012, 1012,
- 1012, 1012, 1012, 1012, 1301, 0, 0, 0, 1012, 0,
- 0, 0, 0, 0, 1012, 1012, 1012, 1012, 1012, 1012,
- 1015, 1015, 1015, 1015, 1015, 1015, 1015, 1015, 1015, 0,
- 1301, 0, 1015, 0, 1015, 0, 0, 0, 1015, 1015,
- 1015, 1015, 1015, 1015, 1236, 1236, 1236, 1236, 1236, 1236,
- 1236, 1238, 1238, 1238, 1238, 1238, 1238, 1238, 1309, 0,
- 1015, 1020, 1020, 1020, 1020, 1020, 1020, 1020, 1020, 1020,
+ 0, 0, 1030, 1030, 1030, 1030, 1030, 1030, 1032, 1032,
+ 1032, 1032, 1032, 1032, 1032, 1032, 1032, 0, 1314, 0,
+ 1032, 0, 0, 0, 0, 1321, 1032, 1032, 1032, 1032,
+ 1032, 1032, 1033, 1033, 1033, 1033, 1033, 1033, 1033, 1321,
+ 0, 0, 0, 1033, 0, 0, 0, 0, 0, 1033,
+ 1033, 1033, 1033, 1033, 1033, 1036, 1036, 1036, 1036, 1036,
+ 1036, 1036, 1036, 1036, 0, 1321, 0, 1036, 0, 1036,
+ 0, 0, 0, 1036, 1036, 1036, 1036, 1036, 1036, 1257,
+ 1257, 1257, 1257, 1257, 1257, 1257, 1259, 1259, 1259, 1259,
+ 1259, 1259, 1259, 1322, 0, 1036, 1041, 1041, 1041, 1041,
- 0, 0, 1309, 1020, 0, 0, 0, 0, 0, 1020,
- 1020, 1020, 1020, 1020, 1020, 1029, 1029, 1029, 1029, 1029,
- 1029, 1029, 1029, 1029, 0, 0, 0, 1029, 1309, 0,
- 0, 0, 0, 1029, 1029, 1029, 1029, 1029, 1029, 1040,
- 1040, 1040, 1040, 1040, 1040, 1040, 1040, 1040, 0, 0,
- 0, 1040, 0, 0, 0, 0, 0, 1040, 1040, 1040,
- 1040, 1040, 1040, 1052, 1052, 1052, 1052, 1052, 1052, 1052,
- 1052, 1052, 0, 0, 0, 1052, 0, 0, 0, 0,
- 0, 1052, 1052, 1052, 1052, 1052, 1052, 1064, 1064, 1064,
- 1064, 1064, 1064, 1064, 1064, 1064, 0, 0, 0, 1064,
+ 1041, 1041, 1041, 1041, 1041, 0, 0, 1322, 1041, 0,
+ 0, 0, 0, 0, 1041, 1041, 1041, 1041, 1041, 1041,
+ 1050, 1050, 1050, 1050, 1050, 1050, 1050, 1050, 1050, 0,
+ 0, 0, 1050, 1322, 0, 0, 0, 0, 1050, 1050,
+ 1050, 1050, 1050, 1050, 1061, 1061, 1061, 1061, 1061, 1061,
+ 1061, 1061, 1061, 0, 0, 0, 1061, 0, 0, 0,
+ 0, 0, 1061, 1061, 1061, 1061, 1061, 1061, 1073, 1073,
+ 1073, 1073, 1073, 1073, 1073, 1073, 1073, 0, 0, 0,
+ 1073, 0, 0, 0, 0, 0, 1073, 1073, 1073, 1073,
+ 1073, 1073, 1085, 1085, 1085, 1085, 1085, 1085, 1085, 1085,
- 0, 0, 0, 0, 0, 1064, 1064, 1064, 1064, 1064,
- 1064, 1078, 1078, 1078, 1078, 1078, 1078, 1078, 1078, 1078,
- 0, 0, 0, 1078, 0, 0, 0, 0, 0, 1078,
- 1078, 1078, 1078, 1078, 1078, 1080, 1080, 1080, 1080, 1080,
- 1080, 1080, 1080, 1080, 0, 0, 0, 1080, 0, 1080,
- 0, 0, 0, 1080, 1080, 1080, 1080, 1080, 1080, 1244,
- 1244, 1244, 1244, 1244, 1244, 1244, 1246, 1246, 1246, 1246,
- 1246, 1246, 1246, 0, 0, 1080, 1094, 1094, 1094, 1094,
- 1094, 1094, 1094, 1094, 1094, 1252, 1252, 1252, 1252, 1252,
- 1252, 1252, 0, 1310, 1094, 1096, 1096, 1096, 1096, 1096,
+ 1085, 0, 0, 0, 1085, 0, 0, 0, 0, 0,
+ 1085, 1085, 1085, 1085, 1085, 1085, 1099, 1099, 1099, 1099,
+ 1099, 1099, 1099, 1099, 1099, 0, 0, 0, 1099, 0,
+ 0, 0, 0, 0, 1099, 1099, 1099, 1099, 1099, 1099,
+ 1101, 1101, 1101, 1101, 1101, 1101, 1101, 1101, 1101, 0,
+ 0, 0, 1101, 0, 1101, 0, 0, 0, 1101, 1101,
+ 1101, 1101, 1101, 1101, 1265, 1265, 1265, 1265, 1265, 1265,
+ 1265, 1267, 1267, 1267, 1267, 1267, 1267, 1267, 0, 0,
+ 1101, 1115, 1115, 1115, 1115, 1115, 1115, 1115, 1115, 1115,
+ 1273, 1273, 1273, 1273, 1273, 1273, 1273, 0, 1330, 1115,
- 1096, 1096, 1096, 0, 0, 0, 1096, 1310, 0, 0,
- 0, 0, 1096, 1096, 1096, 1096, 1096, 1096, 1097, 1097,
- 1097, 1097, 1097, 1097, 1097, 1097, 1097, 0, 0, 0,
- 1097, 0, 1097, 1310, 0, 0, 1097, 1097, 1097, 1097,
- 1097, 1097, 1254, 1254, 1254, 1254, 1254, 1254, 1254, 1261,
- 1261, 1261, 1261, 1261, 1261, 1261, 0, 0, 1097, 1100,
- 1100, 1100, 1100, 1100, 1100, 1100, 1100, 1100, 0, 0,
- 0, 1100, 0, 1100, 0, 0, 0, 1100, 1100, 1100,
- 1100, 1100, 1100, 1286, 1286, 1286, 1286, 1286, 1286, 1286,
- 1298, 1298, 1298, 1298, 1298, 1298, 1298, 0, 0, 1100,
+ 1117, 1117, 1117, 1117, 1117, 1117, 1117, 1117, 0, 0,
+ 0, 1117, 1330, 0, 0, 0, 0, 1117, 1117, 1117,
+ 1117, 1117, 1117, 1118, 1118, 1118, 1118, 1118, 1118, 1118,
+ 1118, 1118, 0, 0, 0, 1118, 0, 1118, 1330, 0,
+ 0, 1118, 1118, 1118, 1118, 1118, 1118, 1275, 1275, 1275,
+ 1275, 1275, 1275, 1275, 1282, 1282, 1282, 1282, 1282, 1282,
+ 1282, 0, 0, 1118, 1121, 1121, 1121, 1121, 1121, 1121,
+ 1121, 1121, 1121, 0, 0, 0, 1121, 0, 1121, 0,
+ 0, 0, 1121, 1121, 1121, 1121, 1121, 1121, 1307, 1307,
+ 1307, 1307, 1307, 1307, 1307, 1319, 1319, 1319, 1319, 1319,
- 1103, 1103, 1103, 1103, 1103, 1103, 1103, 1103, 1103, 0,
- 0, 0, 1103, 0, 1103, 0, 0, 0, 1103, 1103,
- 1103, 1103, 1103, 1103, 1307, 1307, 1307, 1307, 1307, 1307,
- 1307, 1316, 1316, 1316, 1316, 1316, 1316, 1316, 1318, 0,
- 1103, 1106, 1106, 1106, 1106, 1106, 1106, 1106, 1106, 1106,
- 0, 1319, 1318, 1106, 0, 1106, 0, 0, 0, 1106,
- 1106, 1106, 1106, 1106, 1106, 1319, 1325, 1325, 1325, 1325,
- 1325, 1325, 1325, 0, 0, 0, 0, 0, 1318, 1327,
- 0, 1106, 1109, 1109, 1109, 1109, 1109, 1109, 1109, 1109,
- 1109, 1319, 1328, 1327, 1109, 0, 1109, 0, 0, 0,
+ 1319, 1319, 1331, 0, 1121, 1124, 1124, 1124, 1124, 1124,
+ 1124, 1124, 1124, 1124, 0, 0, 1331, 1124, 0, 1124,
+ 0, 0, 1339, 1124, 1124, 1124, 1124, 1124, 1124, 1328,
+ 1328, 1328, 1328, 1328, 1328, 1328, 1339, 0, 0, 0,
+ 0, 1340, 1331, 1348, 0, 1124, 1127, 1127, 1127, 1127,
+ 1127, 1127, 1127, 1127, 1127, 1340, 0, 1348, 1127, 0,
+ 1127, 0, 1339, 1349, 1127, 1127, 1127, 1127, 1127, 1127,
+ 1337, 1337, 1337, 1337, 1337, 1337, 1337, 1349, 0, 0,
+ 0, 1340, 0, 1348, 0, 0, 1127, 1130, 1130, 1130,
+ 1130, 1130, 1130, 1130, 1130, 1130, 0, 0, 0, 1130,
- 1109, 1109, 1109, 1109, 1109, 1109, 1328, 1333, 1333, 1333,
- 1333, 1333, 1333, 1333, 0, 0, 0, 0, 0, 1327,
- 1352, 0, 1109, 1114, 1114, 1114, 1114, 1114, 1114, 1114,
- 1114, 1114, 1328, 0, 1352, 1114, 0, 0, 0, 0,
- 0, 1114, 1114, 1114, 1114, 1114, 1114, 1121, 1121, 1121,
- 1121, 1121, 1121, 1121, 1121, 1121, 0, 0, 0, 1121,
- 1352, 0, 0, 0, 0, 1121, 1121, 1121, 1121, 1121,
- 1121, 1131, 1131, 1131, 1131, 1131, 1131, 1131, 1131, 1131,
- 0, 0, 0, 1131, 0, 0, 0, 0, 0, 1131,
- 1131, 1131, 1131, 1131, 1131, 1144, 1144, 1144, 1144, 1144,
+ 0, 1130, 0, 1349, 0, 1130, 1130, 1130, 1130, 1130,
+ 1130, 1346, 1346, 1346, 1346, 1346, 1346, 1346, 1354, 1354,
+ 1354, 1354, 1354, 1354, 1354, 1373, 0, 1130, 1135, 1135,
+ 1135, 1135, 1135, 1135, 1135, 1135, 1135, 0, 0, 1373,
+ 1135, 0, 0, 0, 0, 0, 1135, 1135, 1135, 1135,
+ 1135, 1135, 1142, 1142, 1142, 1142, 1142, 1142, 1142, 1142,
+ 1142, 0, 0, 0, 1142, 1373, 0, 0, 0, 0,
+ 1142, 1142, 1142, 1142, 1142, 1142, 1152, 1152, 1152, 1152,
+ 1152, 1152, 1152, 1152, 1152, 0, 0, 0, 1152, 0,
+ 0, 0, 0, 0, 1152, 1152, 1152, 1152, 1152, 1152,
- 1144, 1144, 1144, 1144, 0, 0, 0, 1144, 0, 0,
- 0, 0, 0, 1144, 1144, 1144, 1144, 1144, 1144, 1158,
- 1158, 1158, 1158, 1158, 1158, 1158, 1158, 1158, 0, 0,
- 0, 1158, 0, 0, 0, 0, 0, 1158, 1158, 1158,
- 1158, 1158, 1158, 1172, 1172, 1172, 1172, 1172, 1172, 1172,
- 1172, 1172, 0, 0, 0, 1172, 0, 0, 0, 0,
- 0, 1172, 1172, 1172, 1172, 1172, 1172, 1184, 1184, 1184,
- 1184, 1184, 1184, 1184, 1184, 1184, 0, 0, 0, 1184,
- 0, 0, 0, 0, 0, 1184, 1184, 1184, 1184, 1184,
- 1184, 1196, 1196, 1196, 1196, 1196, 1196, 1196, 1196, 1196,
+ 1165, 1165, 1165, 1165, 1165, 1165, 1165, 1165, 1165, 0,
+ 0, 0, 1165, 0, 0, 0, 0, 0, 1165, 1165,
+ 1165, 1165, 1165, 1165, 1179, 1179, 1179, 1179, 1179, 1179,
+ 1179, 1179, 1179, 0, 0, 0, 1179, 0, 0, 0,
+ 0, 0, 1179, 1179, 1179, 1179, 1179, 1179, 1193, 1193,
+ 1193, 1193, 1193, 1193, 1193, 1193, 1193, 0, 0, 0,
+ 1193, 0, 0, 0, 0, 0, 1193, 1193, 1193, 1193,
+ 1193, 1193, 1205, 1205, 1205, 1205, 1205, 1205, 1205, 1205,
+ 1205, 0, 0, 0, 1205, 0, 0, 0, 0, 0,
+ 1205, 1205, 1205, 1205, 1205, 1205, 1217, 1217, 1217, 1217,
- 0, 0, 0, 1196, 0, 1196, 0, 0, 1353, 1196,
- 1196, 1196, 1196, 1196, 1196, 1335, 1335, 1335, 1335, 1335,
- 1335, 1335, 1353, 1358, 1358, 1358, 1358, 1358, 1358, 1358,
- 0, 1196, 1200, 1200, 1200, 1200, 1200, 1200, 1200, 1200,
- 1200, 0, 0, 0, 1200, 0, 0, 0, 1353, 0,
- 1200, 1200, 1200, 1200, 1200, 1200, 1203, 1203, 1203, 1203,
- 1203, 1203, 1203, 1203, 1203, 0, 0, 0, 1203, 0,
- 0, 0, 0, 0, 1203, 1203, 1203, 1203, 1203, 1203,
- 1206, 1206, 1206, 1206, 1206, 1206, 1206, 1206, 1206, 0,
- 0, 0, 1206, 0, 0, 0, 0, 0, 1206, 1206,
+ 1217, 1217, 1217, 1217, 1217, 0, 0, 0, 1217, 0,
+ 1217, 0, 0, 1374, 1217, 1217, 1217, 1217, 1217, 1217,
+ 1356, 1356, 1356, 1356, 1356, 1356, 1356, 1374, 1379, 1379,
+ 1379, 1379, 1379, 1379, 1379, 0, 1217, 1221, 1221, 1221,
+ 1221, 1221, 1221, 1221, 1221, 1221, 0, 0, 0, 1221,
+ 0, 0, 0, 1374, 0, 1221, 1221, 1221, 1221, 1221,
+ 1221, 1224, 1224, 1224, 1224, 1224, 1224, 1224, 1224, 1224,
+ 0, 0, 0, 1224, 0, 0, 0, 0, 0, 1224,
+ 1224, 1224, 1224, 1224, 1224, 1227, 1227, 1227, 1227, 1227,
+ 1227, 1227, 1227, 1227, 0, 0, 0, 1227, 0, 0,
- 1206, 1206, 1206, 1206, 1209, 1209, 1209, 1209, 1209, 1209,
- 1209, 1209, 1209, 0, 0, 0, 1209, 0, 0, 0,
- 0, 0, 1209, 1209, 1209, 1209, 1209, 1209, 1212, 1212,
- 1212, 1212, 1212, 1212, 1212, 1212, 1212, 0, 0, 0,
- 1212, 0, 0, 0, 0, 0, 1212, 1212, 1212, 1212,
- 1212, 1212, 1217, 1217, 1217, 1217, 1217, 1217, 1217, 1217,
- 1217, 0, 0, 0, 1217, 0, 0, 0, 0, 0,
- 1217, 1217, 1217, 1217, 1217, 1217, 1269, 1269, 1269, 1269,
- 1269, 1269, 1269, 1269, 1269, 0, 0, 0, 1269, 0,
- 0, 0, 0, 0, 1269, 1269, 1269, 1269, 1269, 1269,
+ 0, 0, 0, 1227, 1227, 1227, 1227, 1227, 1227, 1230,
+ 1230, 1230, 1230, 1230, 1230, 1230, 1230, 1230, 0, 0,
+ 0, 1230, 0, 0, 0, 0, 0, 1230, 1230, 1230,
+ 1230, 1230, 1230, 1233, 1233, 1233, 1233, 1233, 1233, 1233,
+ 1233, 1233, 0, 0, 0, 1233, 0, 0, 0, 0,
+ 0, 1233, 1233, 1233, 1233, 1233, 1233, 1238, 1238, 1238,
+ 1238, 1238, 1238, 1238, 1238, 1238, 0, 0, 0, 1238,
+ 0, 0, 0, 0, 0, 1238, 1238, 1238, 1238, 1238,
+ 1238, 1290, 1290, 1290, 1290, 1290, 1290, 1290, 1290, 1290,
+ 0, 0, 0, 1290, 0, 0, 0, 0, 0, 1290,
- 1277, 1277, 1277, 1277, 1277, 1277, 1277, 1277, 1277, 0,
- 0, 0, 1277, 0, 0, 0, 0, 0, 1277, 1277,
- 1277, 1277, 1277, 1277, 1362, 1362, 1362, 1362, 1362, 1362,
- 1362, 1366, 1366, 1366, 1366, 1366, 1366, 1366, 1370, 1370,
- 1370, 1370, 1370, 1370, 1370, 1374, 1374, 1374, 1374, 1374,
- 1374, 1374, 1379, 1379, 1379, 1379, 1379, 1379, 1379, 1381,
- 1382, 1390, 1390, 1390, 1390, 1390, 1390, 1390, 0, 0,
- 0, 0, 0, 1381, 1382, 1393, 1393, 1393, 1393, 1393,
- 1393, 1393, 1397, 1397, 1397, 1397, 1397, 1397, 1397, 1401,
- 1401, 1401, 1401, 1401, 1401, 1401, 0, 0, 0, 1381,
+ 1290, 1290, 1290, 1290, 1290, 1298, 1298, 1298, 1298, 1298,
+ 1298, 1298, 1298, 1298, 0, 0, 0, 1298, 0, 0,
+ 0, 0, 0, 1298, 1298, 1298, 1298, 1298, 1298, 1383,
+ 1383, 1383, 1383, 1383, 1383, 1383, 1387, 1387, 1387, 1387,
+ 1387, 1387, 1387, 1391, 1391, 1391, 1391, 1391, 1391, 1391,
+ 1395, 1395, 1395, 1395, 1395, 1395, 1395, 1400, 1400, 1400,
+ 1400, 1400, 1400, 1400, 1402, 1403, 1411, 1411, 1411, 1411,
+ 1411, 1411, 1411, 0, 0, 0, 0, 0, 1402, 1403,
+ 1414, 1414, 1414, 1414, 1414, 1414, 1414, 1418, 1418, 1418,
+ 1418, 1418, 1418, 1418, 1422, 1422, 1422, 1422, 1422, 1422,
- 1382, 1405, 1405, 1405, 1405, 1405, 1405, 1405, 1409, 1409,
- 1409, 1409, 1409, 1409, 1409, 1412, 1412, 1412, 1412, 1412,
- 1412, 1412, 1417, 1417, 1417, 1417, 1417, 1417, 1417, 1426,
- 1426, 1426, 1426, 1426, 1426, 1426, 1438, 0, 0, 0,
- 0, 1438, 1438, 1438, 1439, 0, 1439, 1439, 1439, 1439,
- 1439, 1439, 1439, 1440, 0, 1440, 1441, 1441, 1441, 1442,
- 1442, 1442, 1443, 1443, 1443, 1444, 1444, 1444, 1445, 1445,
- 1445, 1446, 1446, 1446, 1447, 1447, 1447, 1448, 1448, 1448,
- 1449, 1449, 1449, 1450, 0, 1450, 1451, 1451, 1451, 1452,
- 1452, 1452, 1453, 1453, 1453, 1454, 1454, 1454, 1455, 0,
-
- 1455, 1456, 1456, 1456, 1457, 1457, 0, 0, 1457, 1458,
- 1458, 1458, 1459, 1459, 1459, 1460, 1460, 1460, 1461, 1461,
+ 1422, 0, 0, 0, 1402, 1403, 1426, 1426, 1426, 1426,
+ 1426, 1426, 1426, 1430, 1430, 1430, 1430, 1430, 1430, 1430,
+ 1433, 1433, 1433, 1433, 1433, 1433, 1433, 1438, 1438, 1438,
+ 1438, 1438, 1438, 1438, 1447, 1447, 1447, 1447, 1447, 1447,
+ 1447, 1459, 0, 0, 0, 0, 1459, 1459, 1459, 1460,
+ 0, 1460, 1460, 1460, 1460, 1460, 1460, 1460, 1461, 0,
1461, 1462, 1462, 1462, 1463, 1463, 1463, 1464, 1464, 1464,
- 1465, 1465, 1465, 1466, 1466, 1466, 1467, 1467, 0, 0,
- 1467, 1468, 1468, 1468, 1469, 1469, 1469, 1470, 0, 1470,
- 1471, 1471, 1471, 1472, 1472, 1472, 1473, 0, 1473, 1474,
- 1474, 1474, 1475, 1475, 1475, 1476, 1476, 1476, 1477, 1477,
- 1477, 1478, 1478, 1478, 1479, 0, 1479, 1480, 0, 1480,
- 1481, 1481, 1481, 1482, 1482, 1482, 1483, 0, 1483, 1484,
- 1484, 0, 0, 1484, 1485, 1485, 0, 0, 1485, 1486,
+ 1465, 1465, 1465, 1466, 1466, 1466, 1467, 1467, 1467, 1468,
+ 1468, 1468, 1469, 1469, 1469, 1470, 1470, 1470, 1471, 0,
+ 1471, 1472, 1472, 1472, 1473, 1473, 1473, 1474, 1474, 1474,
- 1486, 1486, 1487, 1487, 1487, 1488, 1488, 0, 1488, 1489,
- 1489, 1489, 1490, 1490, 1490, 1491, 1491, 1491, 1492, 1492,
- 1492, 1493, 1493, 1493, 1494, 1494, 1494, 1495, 1495, 1495,
- 1496, 1496, 0, 0, 1496, 1497, 1497, 1497, 1498, 1498,
- 1498, 1499, 1499, 0, 1499, 1500, 1500, 0, 0, 1500,
- 1501, 1501, 0, 1501, 1502, 1502, 1503, 1503, 0, 0,
- 1503, 1504, 1504, 1504, 1505, 1505, 1505, 1506, 1506, 0,
- 1506, 1507, 0, 1507, 1508, 0, 1508, 1509, 1509, 1509,
- 1510, 1510, 1510, 1511, 0, 1511, 1512, 1512, 1512, 1513,
- 1513, 1513, 1514, 1514, 1514, 1515, 1515, 1515, 1516, 1516,
+ 1475, 1475, 1475, 1476, 0, 1476, 1477, 1477, 1477, 1478,
+ 1478, 0, 0, 1478, 1479, 1479, 1479, 1480, 1480, 1480,
+ 1481, 1481, 1481, 1482, 1482, 1482, 1483, 1483, 1483, 1484,
+ 1484, 1484, 1485, 1485, 1485, 1486, 1486, 1486, 1487, 1487,
+ 1487, 1488, 1488, 0, 0, 1488, 1489, 1489, 1489, 1490,
+ 1490, 1490, 1491, 0, 1491, 1492, 1492, 1492, 1493, 1493,
+ 1493, 1494, 0, 1494, 1495, 1495, 1495, 1496, 1496, 1496,
+ 1497, 1497, 1497, 1498, 1498, 1498, 1499, 1499, 1499, 1500,
+ 0, 1500, 1501, 0, 1501, 1502, 1502, 1502, 1503, 1503,
+ 1503, 1504, 0, 1504, 1505, 1505, 0, 0, 1505, 1506,
- 1516, 1517, 1517, 1517, 1518, 0, 1518, 1519, 0, 1519,
- 1520, 1520, 1520, 1521, 1521, 1521, 1522, 0, 1522, 1523,
- 0, 1523, 1524, 0, 1524, 1525, 1525, 1525, 1526, 1526,
- 1526, 1527, 0, 1527, 1528, 0, 0, 1528, 1529, 1529,
- 0, 1529, 1530, 1530, 0, 0, 1530, 1531, 1531, 0,
- 1531, 1532, 1532, 1533, 1533, 0, 0, 1533, 1534, 1534,
- 1534, 1535, 1535, 1535, 1536, 1536, 0, 1536, 1537, 1537,
- 1537, 0, 1537, 1537, 1538, 1538, 1538, 1539, 1539, 1539,
- 1540, 1540, 1540, 1541, 1541, 1541, 1542, 1542, 1542, 1543,
- 1543, 1543, 1544, 1544, 1544, 1545, 1545, 1545, 1546, 1546,
+ 1506, 0, 0, 1506, 1507, 1507, 1507, 1508, 1508, 1508,
+ 1509, 1509, 0, 1509, 1510, 1510, 1510, 1511, 1511, 1511,
+ 1512, 1512, 1512, 1513, 1513, 1513, 1514, 1514, 1514, 1515,
+ 1515, 1515, 1516, 1516, 1516, 1517, 1517, 0, 0, 1517,
+ 1518, 1518, 1518, 1519, 1519, 1519, 1520, 1520, 0, 1520,
+ 1521, 1521, 0, 0, 1521, 1522, 1522, 0, 1522, 1523,
+ 1523, 1524, 1524, 0, 0, 1524, 1525, 1525, 1525, 1526,
+ 1526, 1526, 1527, 1527, 0, 1527, 1528, 0, 1528, 1529,
+ 0, 1529, 1530, 1530, 1530, 1531, 1531, 1531, 1532, 0,
+ 1532, 1533, 1533, 1533, 1534, 1534, 1534, 1535, 1535, 1535,
- 0, 0, 1546, 1547, 1547, 1547, 1548, 1548, 1548, 1549,
- 1549, 0, 1549, 1550, 1550, 0, 0, 1550, 1551, 1551,
- 0, 1551, 1552, 1552, 1553, 1553, 0, 0, 1553, 1554,
- 1554, 1554, 1555, 1555, 1555, 1556, 1556, 0, 1556, 1557,
- 0, 0, 1557, 1558, 1558, 0, 1558, 1559, 1559, 0,
- 0, 1559, 1560, 1560, 0, 1560, 1561, 1561, 1562, 1562,
- 0, 0, 1562, 1563, 1563, 1563, 1564, 1564, 1564, 1565,
- 1565, 0, 1565, 1566, 0, 1566, 1567, 0, 1567, 1568,
- 0, 1568, 1569, 1569, 1569, 1570, 1570, 1570, 1571, 0,
- 1571, 1572, 1572, 1572, 0, 1572, 1572, 1573, 1573, 1573,
+ 1536, 1536, 1536, 1537, 1537, 1537, 1538, 1538, 1538, 1539,
+ 0, 1539, 1540, 0, 1540, 1541, 1541, 1541, 1542, 1542,
+ 1542, 1543, 0, 1543, 1544, 0, 1544, 1545, 0, 1545,
+ 1546, 1546, 1546, 1547, 1547, 1547, 1548, 0, 1548, 1549,
+ 0, 0, 1549, 1550, 1550, 0, 1550, 1551, 1551, 0,
+ 0, 1551, 1552, 1552, 0, 1552, 1553, 1553, 1554, 1554,
+ 0, 0, 1554, 1555, 1555, 1555, 1556, 1556, 1556, 1557,
+ 1557, 0, 1557, 1558, 1558, 1558, 0, 1558, 1558, 1559,
+ 1559, 1559, 1560, 1560, 1560, 1561, 1561, 1561, 1562, 1562,
+ 1562, 1563, 1563, 1563, 1564, 1564, 1564, 1565, 1565, 1565,
- 1574, 1574, 1574, 1575, 1575, 1575, 1576, 1576, 1576, 1577,
- 1577, 1577, 1578, 1578, 1578, 1579, 1579, 1579, 1580, 0,
- 1580, 1581, 0, 1581, 1582, 1582, 1582, 1583, 1583, 1583,
- 1584, 0, 1584, 1585, 0, 1585, 1586, 0, 1586, 1587,
- 1587, 1587, 1588, 1588, 1588, 1589, 0, 1589, 1590, 0,
- 1590, 1591, 0, 1591, 1592, 0, 1592, 1593, 1593, 1593,
- 1594, 1594, 1594, 1595, 0, 1595, 1596, 0, 1596, 1597,
- 0, 0, 1597, 1598, 1598, 0, 1598, 1599, 1599, 0,
- 0, 1599, 1600, 1600, 0, 1600, 1601, 1601, 1602, 1602,
- 0, 0, 1602, 1603, 1603, 1603, 1604, 1604, 1604, 1605,
+ 1566, 1566, 1566, 1567, 1567, 0, 0, 1567, 1568, 1568,
+ 1568, 1569, 1569, 1569, 1570, 1570, 0, 1570, 1571, 1571,
+ 0, 0, 1571, 1572, 1572, 0, 1572, 1573, 1573, 1574,
+ 1574, 0, 0, 1574, 1575, 1575, 1575, 1576, 1576, 1576,
+ 1577, 1577, 0, 1577, 1578, 0, 0, 1578, 1579, 1579,
+ 0, 1579, 1580, 1580, 0, 0, 1580, 1581, 1581, 0,
+ 1581, 1582, 1582, 1583, 1583, 0, 0, 1583, 1584, 1584,
+ 1584, 1585, 1585, 1585, 1586, 1586, 0, 1586, 1587, 0,
+ 1587, 1588, 0, 1588, 1589, 0, 1589, 1590, 1590, 1590,
+ 1591, 1591, 1591, 1592, 0, 1592, 1593, 1593, 1593, 0,
- 1605, 0, 1605, 1606, 1606, 1606, 0, 1606, 1606, 1607,
- 1607, 1607, 1608, 1608, 1608, 1609, 1609, 1609, 1610, 1610,
- 1610, 1611, 1611, 1611, 1612, 1612, 1612, 1613, 1613, 1613,
- 1614, 1614, 1614, 1615, 1615, 0, 0, 1615, 1616, 1616,
- 1616, 1617, 1617, 1617, 1618, 1618, 0, 1618, 1619, 1619,
- 0, 0, 1619, 1620, 1620, 0, 1620, 1621, 1621, 1622,
- 1622, 0, 0, 1622, 1623, 1623, 1623, 1624, 1624, 1624,
- 1625, 1625, 0, 1625, 1626, 0, 0, 1626, 1627, 1627,
- 0, 1627, 1628, 1628, 0, 0, 1628, 1629, 1629, 0,
- 1629, 1630, 1630, 1631, 1631, 0, 0, 1631, 1632, 1632,
+ 1593, 1593, 1594, 1594, 1594, 1595, 1595, 1595, 1596, 1596,
+ 1596, 1597, 1597, 1597, 1598, 1598, 1598, 1599, 1599, 1599,
+ 1600, 1600, 1600, 1601, 0, 1601, 1602, 0, 1602, 1603,
+ 1603, 1603, 1604, 1604, 1604, 1605, 0, 1605, 1606, 0,
+ 1606, 1607, 0, 1607, 1608, 1608, 1608, 1609, 1609, 1609,
+ 1610, 0, 1610, 1611, 0, 1611, 1612, 0, 1612, 1613,
+ 0, 1613, 1614, 1614, 1614, 1615, 1615, 1615, 1616, 0,
+ 1616, 1617, 0, 1617, 1618, 0, 0, 1618, 1619, 1619,
+ 0, 1619, 1620, 1620, 0, 0, 1620, 1621, 1621, 0,
+ 1621, 1622, 1622, 1623, 1623, 0, 0, 1623, 1624, 1624,
- 1632, 1633, 1633, 1633, 1634, 1634, 0, 1634, 1635, 0,
- 1635, 1636, 0, 0, 1636, 1637, 1637, 0, 1637, 1638,
- 1638, 0, 0, 1638, 1639, 1639, 0, 1639, 1640, 1640,
- 1641, 1641, 0, 0, 1641, 1642, 1642, 1642, 1643, 1643,
- 1643, 1644, 1644, 0, 1644, 1645, 0, 1645, 1646, 0,
- 1646, 1647, 0, 1647, 1648, 1648, 1648, 1649, 1649, 1649,
- 1650, 0, 1650, 1651, 1651, 1651, 0, 1651, 1651, 1652,
- 1652, 1652, 1653, 1653, 1653, 1654, 1654, 1654, 1655, 1655,
- 1655, 1656, 1656, 1656, 1657, 1657, 1657, 1658, 1658, 1658,
- 1659, 1659, 1659, 1660, 1660, 1660, 1661, 1661, 1661, 1662,
+ 1624, 1625, 1625, 1625, 1626, 1626, 0, 1626, 1627, 1627,
+ 1627, 0, 1627, 1627, 1628, 1628, 1628, 1629, 1629, 1629,
+ 1630, 1630, 1630, 1631, 1631, 1631, 1632, 1632, 1632, 1633,
+ 1633, 1633, 1634, 1634, 1634, 1635, 1635, 1635, 1636, 1636,
+ 0, 0, 1636, 1637, 1637, 1637, 1638, 1638, 1638, 1639,
+ 1639, 0, 1639, 1640, 1640, 0, 0, 1640, 1641, 1641,
+ 0, 1641, 1642, 1642, 1643, 1643, 0, 0, 1643, 1644,
+ 1644, 1644, 1645, 1645, 1645, 1646, 1646, 0, 1646, 1647,
+ 0, 0, 1647, 1648, 1648, 0, 1648, 1649, 1649, 0,
+ 0, 1649, 1650, 1650, 0, 1650, 1651, 1651, 1652, 1652,
- 0, 1662, 1663, 0, 1663, 1664, 1664, 1664, 1665, 1665,
- 1665, 1666, 1666, 1666, 1667, 0, 1667, 1668, 0, 1668,
- 1669, 0, 1669, 1670, 1670, 1670, 1671, 1671, 1671, 1672,
- 1672, 1672, 1673, 0, 1673, 1674, 0, 1674, 1675, 0,
- 1675, 1676, 0, 1676, 1677, 1677, 1677, 1678, 1678, 1678,
- 1679, 1679, 1679, 1680, 0, 1680, 1681, 0, 1681, 1682,
- 0, 1682, 1683, 0, 1683, 1684, 1684, 1684, 1685, 1685,
- 1685, 1686, 1686, 1686, 1687, 0, 1687, 1688, 0, 1688,
- 1689, 0, 0, 1689, 1690, 1690, 0, 1690, 1691, 1691,
- 0, 0, 1691, 1692, 1692, 0, 1692, 1693, 1693, 1694,
+ 0, 0, 1652, 1653, 1653, 1653, 1654, 1654, 1654, 1655,
+ 1655, 0, 1655, 1656, 0, 1656, 1657, 0, 0, 1657,
+ 1658, 1658, 0, 1658, 1659, 1659, 0, 0, 1659, 1660,
+ 1660, 0, 1660, 1661, 1661, 1662, 1662, 0, 0, 1662,
+ 1663, 1663, 1663, 1664, 1664, 1664, 1665, 1665, 0, 1665,
+ 1666, 0, 1666, 1667, 0, 1667, 1668, 0, 1668, 1669,
+ 1669, 1669, 1670, 1670, 1670, 1671, 0, 1671, 1672, 1672,
+ 1672, 0, 1672, 1672, 1673, 1673, 1673, 1674, 1674, 1674,
+ 1675, 1675, 1675, 1676, 1676, 1676, 1677, 1677, 1677, 1678,
+ 1678, 1678, 1679, 1679, 1679, 1680, 1680, 1680, 1681, 1681,
- 1694, 0, 0, 1694, 1695, 1695, 1695, 1696, 1696, 1696,
- 1697, 1697, 0, 1697, 1698, 1698, 1698, 0, 1698, 1698,
- 1699, 1699, 1699, 1700, 1700, 1700, 1701, 1701, 1701, 1702,
- 1702, 1702, 1703, 1703, 1703, 1704, 1704, 1704, 1705, 1705,
- 1705, 1706, 1706, 1706, 1707, 0, 1707, 1708, 1708, 1708,
- 1709, 1709, 0, 0, 1709, 1710, 1710, 1710, 1711, 1711,
- 1711, 1712, 1712, 0, 1712, 1713, 1713, 0, 0, 1713,
- 1714, 1714, 0, 1714, 1715, 1715, 1716, 1716, 0, 0,
- 1716, 1717, 1717, 1717, 1718, 1718, 1718, 1719, 1719, 0,
- 1719, 1720, 0, 0, 1720, 1721, 1721, 0, 1721, 1722,
+ 1681, 1682, 1682, 1682, 1683, 0, 1683, 1684, 0, 1684,
+ 1685, 1685, 1685, 1686, 1686, 1686, 1687, 1687, 1687, 1688,
+ 0, 1688, 1689, 0, 1689, 1690, 0, 1690, 1691, 1691,
+ 1691, 1692, 1692, 1692, 1693, 1693, 1693, 1694, 0, 1694,
+ 1695, 0, 1695, 1696, 0, 1696, 1697, 0, 1697, 1698,
+ 1698, 1698, 1699, 1699, 1699, 1700, 1700, 1700, 1701, 0,
+ 1701, 1702, 0, 1702, 1703, 0, 1703, 1704, 0, 1704,
+ 1705, 1705, 1705, 1706, 1706, 1706, 1707, 1707, 1707, 1708,
+ 0, 1708, 1709, 0, 1709, 1710, 0, 0, 1710, 1711,
+ 1711, 0, 1711, 1712, 1712, 0, 0, 1712, 1713, 1713,
- 1722, 0, 0, 1722, 1723, 1723, 0, 1723, 1724, 1724,
- 1725, 1725, 0, 0, 1725, 1726, 1726, 1726, 1727, 1727,
- 1727, 1728, 1728, 0, 1728, 1729, 0, 1729, 1730, 0,
- 0, 1730, 1731, 1731, 0, 1731, 1732, 1732, 0, 0,
- 1732, 1733, 1733, 0, 1733, 1734, 1734, 1735, 1735, 0,
- 0, 1735, 1736, 1736, 1736, 1737, 1737, 1737, 1738, 1738,
- 0, 1738, 1739, 0, 1739, 1740, 0, 0, 1740, 1741,
- 1741, 0, 1741, 1742, 1742, 0, 0, 1742, 1743, 1743,
- 0, 1743, 1744, 1744, 1745, 1745, 0, 0, 1745, 1746,
- 1746, 1746, 1747, 1747, 1747, 1748, 1748, 0, 1748, 1749,
+ 0, 1713, 1714, 1714, 1715, 1715, 0, 0, 1715, 1716,
+ 1716, 1716, 1717, 1717, 1717, 1718, 1718, 0, 1718, 1719,
+ 1719, 1719, 0, 1719, 1719, 1720, 1720, 1720, 1721, 1721,
+ 1721, 1722, 1722, 1722, 1723, 1723, 1723, 1724, 1724, 1724,
+ 1725, 1725, 1725, 1726, 1726, 1726, 1727, 1727, 1727, 1728,
+ 0, 1728, 1729, 1729, 1729, 1730, 1730, 0, 0, 1730,
+ 1731, 1731, 1731, 1732, 1732, 1732, 1733, 1733, 0, 1733,
+ 1734, 1734, 0, 0, 1734, 1735, 1735, 0, 1735, 1736,
+ 1736, 1737, 1737, 0, 0, 1737, 1738, 1738, 1738, 1739,
+ 1739, 1739, 1740, 1740, 0, 1740, 1741, 0, 0, 1741,
- 0, 1749, 1750, 0, 1750, 1751, 0, 1751, 1752, 1752,
- 1752, 1753, 0, 1753, 1754, 1754, 1754, 1755, 0, 1755,
- 1756, 1756, 1756, 0, 1756, 1756, 1757, 0, 1757, 1758,
- 1758, 1758, 1759, 0, 1759, 1760, 1760, 1760, 1761, 0,
- 1761, 1762, 1762, 1762, 1763, 0, 1763, 1764, 1764, 1764,
- 1765, 0, 1765, 1766, 1766, 1766, 1767, 0, 1767, 1768,
- 1768, 1768, 1769, 1769, 0, 0, 1769, 1770, 1770, 1770,
- 1771, 1771, 1771, 1772, 1772, 1772, 1773, 1773, 0, 1773,
- 1774, 1774, 1774, 1775, 0, 1775, 1776, 1776, 1776, 1777,
- 1777, 1777, 1778, 0, 1778, 1779, 0, 1779, 1780, 1780,
+ 1742, 1742, 0, 1742, 1743, 1743, 0, 0, 1743, 1744,
+ 1744, 0, 1744, 1745, 1745, 1746, 1746, 0, 0, 1746,
+ 1747, 1747, 1747, 1748, 1748, 1748, 1749, 1749, 0, 1749,
+ 1750, 0, 1750, 1751, 0, 0, 1751, 1752, 1752, 0,
+ 1752, 1753, 1753, 0, 0, 1753, 1754, 1754, 0, 1754,
+ 1755, 1755, 1756, 1756, 0, 0, 1756, 1757, 1757, 1757,
+ 1758, 1758, 1758, 1759, 1759, 0, 1759, 1760, 0, 1760,
+ 1761, 0, 0, 1761, 1762, 1762, 0, 1762, 1763, 1763,
+ 0, 0, 1763, 1764, 1764, 0, 1764, 1765, 1765, 1766,
+ 1766, 0, 0, 1766, 1767, 1767, 1767, 1768, 1768, 1768,
- 1780, 1781, 1781, 1781, 1782, 0, 1782, 1783, 0, 1783,
- 1784, 0, 1784, 1785, 1785, 1785, 1786, 1786, 1786, 1787,
- 0, 1787, 1788, 0, 1788, 1789, 0, 1789, 1790, 1790,
- 1790, 1791, 1791, 1791, 1792, 0, 1792, 1793, 0, 1793,
- 1794, 0, 1794, 1795, 1795, 1795, 1796, 1796, 1796, 1797,
- 0, 1797, 1798, 0, 0, 1798, 1799, 1799, 0, 1799,
- 1800, 1800, 0, 0, 1800, 1801, 1801, 0, 1801, 1802,
- 1802, 1803, 1803, 0, 0, 1803, 1804, 1804, 1804, 1805,
- 0, 1805, 1806, 1806, 0, 1806, 1807, 1807, 1807, 0,
- 1807, 1807, 1808, 1808, 1808, 1809, 1809, 1809, 1810, 0,
+ 1769, 1769, 0, 1769, 1770, 0, 1770, 1771, 0, 1771,
+ 1772, 0, 1772, 1773, 1773, 1773, 1774, 0, 1774, 1775,
+ 1775, 1775, 1776, 0, 1776, 1777, 1777, 1777, 0, 1777,
+ 1777, 1778, 0, 1778, 1779, 1779, 1779, 1780, 0, 1780,
+ 1781, 1781, 1781, 1782, 0, 1782, 1783, 1783, 1783, 1784,
+ 0, 1784, 1785, 1785, 1785, 1786, 0, 1786, 1787, 1787,
+ 1787, 1788, 0, 1788, 1789, 1789, 1789, 1790, 1790, 0,
+ 0, 1790, 1791, 1791, 1791, 1792, 1792, 1792, 1793, 1793,
+ 1793, 1794, 1794, 0, 1794, 1795, 1795, 1795, 1796, 0,
+ 1796, 1797, 1797, 1797, 1798, 1798, 1798, 1799, 0, 1799,
- 1810, 1811, 0, 1811, 1812, 0, 1812, 1813, 0, 1813,
- 1814, 0, 1814, 1815, 0, 1815, 1816, 0, 1816, 1817,
- 1817, 1817, 1818, 1818, 1818, 1819, 0, 1819, 1820, 1820,
- 0, 0, 1820, 1821, 1821, 0, 1821, 1822, 1822, 1823,
- 0, 1823, 1824, 0, 0, 1824, 1825, 1825, 0, 1825,
- 1826, 1826, 0, 0, 1826, 1827, 1827, 0, 1827, 1828,
- 1828, 1829, 0, 1829, 1830, 0, 1830, 1831, 0, 0,
- 1831, 1832, 1832, 0, 1832, 1833, 1833, 0, 0, 1833,
- 1834, 1834, 0, 1834, 1835, 1835, 1836, 0, 1836, 1837,
- 0, 1837, 1838, 0, 0, 1838, 1839, 1839, 0, 1839,
+ 1800, 0, 1800, 1801, 1801, 1801, 1802, 1802, 1802, 1803,
+ 0, 1803, 1804, 0, 1804, 1805, 0, 1805, 1806, 1806,
+ 1806, 1807, 1807, 1807, 1808, 0, 1808, 1809, 0, 1809,
+ 1810, 0, 1810, 1811, 1811, 1811, 1812, 1812, 1812, 1813,
+ 0, 1813, 1814, 0, 1814, 1815, 0, 1815, 1816, 1816,
+ 1816, 1817, 1817, 1817, 1818, 0, 1818, 1819, 0, 0,
+ 1819, 1820, 1820, 0, 1820, 1821, 1821, 0, 0, 1821,
+ 1822, 1822, 0, 1822, 1823, 1823, 1824, 1824, 0, 0,
+ 1824, 1825, 1825, 1825, 1826, 0, 1826, 1827, 1827, 0,
+ 1827, 1828, 1828, 1828, 0, 1828, 1828, 1829, 1829, 1829,
- 1840, 1840, 0, 0, 1840, 1841, 1841, 0, 1841, 1842,
- 1842, 1843, 0, 1843, 1844, 0, 1844, 1845, 0, 0,
+ 1830, 1830, 1830, 1831, 0, 1831, 1832, 0, 1832, 1833,
+ 0, 1833, 1834, 0, 1834, 1835, 0, 1835, 1836, 0,
+ 1836, 1837, 0, 1837, 1838, 1838, 1838, 1839, 1839, 1839,
+ 1840, 0, 1840, 1841, 1841, 0, 0, 1841, 1842, 1842,
+ 0, 1842, 1843, 1843, 1844, 0, 1844, 1845, 0, 0,
1845, 1846, 1846, 0, 1846, 1847, 1847, 0, 0, 1847,
1848, 1848, 0, 1848, 1849, 1849, 1850, 0, 1850, 1851,
- 0, 1851, 1852, 0, 1852, 1853, 0, 1853, 1854, 1854,
- 1854, 1855, 0, 1855, 1856, 1856, 1856, 0, 1856, 1856,
- 1857, 0, 1857, 1858, 0, 1858, 1859, 0, 1859, 1860,
- 0, 1860, 1861, 0, 1861, 1862, 0, 1862, 1863, 0,
- 1863, 1864, 1864, 0, 0, 1864, 1865, 1865, 0, 1865,
- 1866, 1866, 1867, 0, 1867, 1868, 0, 1868, 1869, 0,
+ 0, 1851, 1852, 0, 0, 1852, 1853, 1853, 0, 1853,
+ 1854, 1854, 0, 0, 1854, 1855, 1855, 0, 1855, 1856,
+ 1856, 1857, 0, 1857, 1858, 0, 1858, 1859, 0, 0,
- 1869, 1870, 0, 1870, 1871, 0, 1871, 1872, 0, 1872,
- 1873, 0, 1873, 1874, 0, 1874, 1875, 0, 1875, 1876,
- 0, 1876, 1877, 0, 0, 1877, 1878, 1878, 0, 0,
- 1878, 1879, 0, 1879, 1880, 0, 1880, 1881, 0, 1881,
- 1882, 0, 0, 1882, 1883, 0, 0, 1883, 1884, 0,
- 0, 1884, 1885, 0, 0, 1885, 1886, 0, 0, 1886,
- 1887, 0, 1887, 1888, 0, 1888, 1889, 0, 0, 1889,
- 1890, 0, 1890, 1891, 0, 1891, 1892, 0, 1892, 1893,
- 0, 1893, 1894, 0, 1894, 1895, 0, 0, 1895, 1896,
- 0, 1896, 1897, 0, 1897, 1437, 1437, 1437, 1437, 1437,
+ 1859, 1860, 1860, 0, 1860, 1861, 1861, 0, 0, 1861,
+ 1862, 1862, 0, 1862, 1863, 1863, 1864, 0, 1864, 1865,
+ 0, 1865, 1866, 0, 0, 1866, 1867, 1867, 0, 1867,
+ 1868, 1868, 0, 0, 1868, 1869, 1869, 0, 1869, 1870,
+ 1870, 1871, 0, 1871, 1872, 0, 1872, 1873, 0, 1873,
+ 1874, 0, 1874, 1875, 1875, 1875, 1876, 0, 1876, 1877,
+ 1877, 1877, 0, 1877, 1877, 1878, 0, 1878, 1879, 0,
+ 1879, 1880, 0, 1880, 1881, 0, 1881, 1882, 0, 1882,
+ 1883, 0, 1883, 1884, 0, 1884, 1885, 1885, 0, 0,
+ 1885, 1886, 1886, 0, 1886, 1887, 1887, 1888, 0, 1888,
- 1437, 1437, 1437, 1437, 1437, 1437, 1437, 1437, 1437, 1437,
- 1437, 1437, 1437, 1437, 1437, 1437, 1437, 1437, 1437, 1437,
- 1437, 1437, 1437, 1437, 1437, 1437, 1437, 1437, 1437, 1437,
- 1437, 1437, 1437, 1437, 1437, 1437, 1437, 1437, 1437, 1437,
- 1437, 1437, 1437, 1437, 1437, 1437, 1437, 1437, 1437
+ 1889, 0, 1889, 1890, 0, 1890, 1891, 0, 1891, 1892,
+ 0, 1892, 1893, 0, 1893, 1894, 0, 1894, 1895, 0,
+ 1895, 1896, 0, 1896, 1897, 0, 1897, 1898, 0, 0,
+ 1898, 1899, 1899, 0, 0, 1899, 1900, 0, 1900, 1901,
+ 0, 1901, 1902, 0, 1902, 1903, 0, 0, 1903, 1904,
+ 0, 0, 1904, 1905, 0, 0, 1905, 1906, 0, 0,
+ 1906, 1907, 0, 0, 1907, 1908, 0, 1908, 1909, 0,
+ 1909, 1910, 0, 0, 1910, 1911, 0, 1911, 1912, 0,
+ 1912, 1913, 0, 1913, 1914, 0, 1914, 1915, 0, 1915,
+ 1916, 0, 0, 1916, 1917, 0, 1917, 1918, 0, 1918,
+
+ 1458, 1458, 1458, 1458, 1458, 1458, 1458, 1458, 1458, 1458,
+ 1458, 1458, 1458, 1458, 1458, 1458, 1458, 1458, 1458, 1458,
+ 1458, 1458, 1458, 1458, 1458, 1458, 1458, 1458, 1458, 1458,
+ 1458, 1458, 1458, 1458, 1458, 1458, 1458, 1458, 1458, 1458,
+ 1458, 1458, 1458, 1458, 1458, 1458, 1458, 1458, 1458, 1458,
+ 1458, 1458, 1458, 1458
} ;
static yy_state_type yy_last_accepting_state;
@@ -2784,7 +2792,7 @@
#define yylval pcap_lval
extern YYSTYPE yylval;
-#line 2788 "scanner.c"
+#line 2796 "scanner.c"
#define INITIAL 0
@@ -2955,7 +2963,7 @@
#line 192 "scanner.l"
-#line 2959 "scanner.c"
+#line 2967 "scanner.c"
if ( !(yy_init) )
{
@@ -3008,13 +3016,13 @@
while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
{
yy_current_state = (int) yy_def[yy_current_state];
- if ( yy_current_state >= 1438 )
+ if ( yy_current_state >= 1459 )
yy_c = yy_meta[(unsigned int) yy_c];
}
yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
++yy_cp;
}
- while ( yy_base[yy_current_state] != 7396 );
+ while ( yy_base[yy_current_state] != 7401 );
yy_find_action:
yy_act = yy_accept[yy_current_state];
@@ -3126,183 +3134,171 @@
case 18:
YY_RULE_SETUP
#line 212 "scanner.l"
-{
-#ifdef INET6
- return IPV6;
-#else
- bpf_error("%s not supported", pcap_text);
-#endif
- }
+return IPV6;
YY_BREAK
case 19:
YY_RULE_SETUP
-#line 219 "scanner.l"
-{
-#ifdef INET6
- return ICMPV6;
-#else
- bpf_error("%s not supported", pcap_text);
-#endif
- }
+#line 213 "scanner.l"
+return ICMPV6;
YY_BREAK
case 20:
YY_RULE_SETUP
-#line 226 "scanner.l"
+#line 214 "scanner.l"
return AH;
YY_BREAK
case 21:
YY_RULE_SETUP
-#line 227 "scanner.l"
+#line 215 "scanner.l"
return ESP;
YY_BREAK
case 22:
YY_RULE_SETUP
-#line 229 "scanner.l"
+#line 217 "scanner.l"
return ATALK;
YY_BREAK
case 23:
YY_RULE_SETUP
-#line 230 "scanner.l"
+#line 218 "scanner.l"
return AARP;
YY_BREAK
case 24:
YY_RULE_SETUP
-#line 231 "scanner.l"
+#line 219 "scanner.l"
return DECNET;
YY_BREAK
case 25:
YY_RULE_SETUP
-#line 232 "scanner.l"
+#line 220 "scanner.l"
return LAT;
YY_BREAK
case 26:
YY_RULE_SETUP
-#line 233 "scanner.l"
+#line 221 "scanner.l"
return SCA;
YY_BREAK
case 27:
YY_RULE_SETUP
-#line 234 "scanner.l"
+#line 222 "scanner.l"
return MOPRC;
YY_BREAK
case 28:
YY_RULE_SETUP
-#line 235 "scanner.l"
+#line 223 "scanner.l"
return MOPDL;
YY_BREAK
case 29:
YY_RULE_SETUP
-#line 237 "scanner.l"
+#line 225 "scanner.l"
return ISO;
YY_BREAK
case 30:
YY_RULE_SETUP
-#line 238 "scanner.l"
+#line 226 "scanner.l"
return ESIS;
YY_BREAK
case 31:
YY_RULE_SETUP
-#line 239 "scanner.l"
+#line 227 "scanner.l"
return ESIS;
YY_BREAK
case 32:
YY_RULE_SETUP
-#line 240 "scanner.l"
+#line 228 "scanner.l"
return ISIS;
YY_BREAK
case 33:
YY_RULE_SETUP
-#line 241 "scanner.l"
+#line 229 "scanner.l"
return ISIS;
YY_BREAK
case 34:
YY_RULE_SETUP
-#line 242 "scanner.l"
+#line 230 "scanner.l"
return L1;
YY_BREAK
case 35:
YY_RULE_SETUP
-#line 243 "scanner.l"
+#line 231 "scanner.l"
return L2;
YY_BREAK
case 36:
YY_RULE_SETUP
-#line 244 "scanner.l"
+#line 232 "scanner.l"
return IIH;
YY_BREAK
case 37:
YY_RULE_SETUP
-#line 245 "scanner.l"
+#line 233 "scanner.l"
return LSP;
YY_BREAK
case 38:
YY_RULE_SETUP
-#line 246 "scanner.l"
+#line 234 "scanner.l"
return SNP;
YY_BREAK
case 39:
YY_RULE_SETUP
-#line 247 "scanner.l"
+#line 235 "scanner.l"
return CSNP;
YY_BREAK
case 40:
YY_RULE_SETUP
-#line 248 "scanner.l"
+#line 236 "scanner.l"
return PSNP;
YY_BREAK
case 41:
YY_RULE_SETUP
-#line 250 "scanner.l"
+#line 238 "scanner.l"
return CLNP;
YY_BREAK
case 42:
YY_RULE_SETUP
-#line 252 "scanner.l"
+#line 240 "scanner.l"
return STP;
YY_BREAK
case 43:
YY_RULE_SETUP
-#line 254 "scanner.l"
+#line 242 "scanner.l"
return IPX;
YY_BREAK
case 44:
YY_RULE_SETUP
-#line 256 "scanner.l"
+#line 244 "scanner.l"
return NETBEUI;
YY_BREAK
case 45:
YY_RULE_SETUP
-#line 258 "scanner.l"
+#line 246 "scanner.l"
return HOST;
YY_BREAK
case 46:
YY_RULE_SETUP
-#line 259 "scanner.l"
+#line 247 "scanner.l"
return NET;
YY_BREAK
case 47:
YY_RULE_SETUP
-#line 260 "scanner.l"
+#line 248 "scanner.l"
return NETMASK;
YY_BREAK
case 48:
YY_RULE_SETUP
-#line 261 "scanner.l"
+#line 249 "scanner.l"
return PORT;
YY_BREAK
case 49:
YY_RULE_SETUP
-#line 262 "scanner.l"
+#line 250 "scanner.l"
return PORTRANGE;
YY_BREAK
case 50:
YY_RULE_SETUP
-#line 263 "scanner.l"
+#line 251 "scanner.l"
return PROTO;
YY_BREAK
case 51:
YY_RULE_SETUP
-#line 264 "scanner.l"
+#line 252 "scanner.l"
{
#ifdef NO_PROTOCHAIN
bpf_error("%s not supported", pcap_text);
@@ -3313,336 +3309,375 @@
YY_BREAK
case 52:
YY_RULE_SETUP
-#line 272 "scanner.l"
+#line 260 "scanner.l"
return GATEWAY;
YY_BREAK
case 53:
YY_RULE_SETUP
-#line 274 "scanner.l"
+#line 262 "scanner.l"
return TYPE;
YY_BREAK
case 54:
YY_RULE_SETUP
-#line 275 "scanner.l"
+#line 263 "scanner.l"
return SUBTYPE;
YY_BREAK
case 55:
YY_RULE_SETUP
-#line 276 "scanner.l"
+#line 264 "scanner.l"
return DIR;
YY_BREAK
case 56:
YY_RULE_SETUP
-#line 277 "scanner.l"
+#line 265 "scanner.l"
return ADDR1;
YY_BREAK
case 57:
YY_RULE_SETUP
-#line 278 "scanner.l"
+#line 266 "scanner.l"
return ADDR2;
YY_BREAK
case 58:
YY_RULE_SETUP
-#line 279 "scanner.l"
+#line 267 "scanner.l"
return ADDR3;
YY_BREAK
case 59:
YY_RULE_SETUP
-#line 280 "scanner.l"
+#line 268 "scanner.l"
return ADDR4;
YY_BREAK
case 60:
YY_RULE_SETUP
-#line 281 "scanner.l"
+#line 269 "scanner.l"
return RA;
YY_BREAK
case 61:
YY_RULE_SETUP
-#line 282 "scanner.l"
+#line 270 "scanner.l"
return TA;
YY_BREAK
case 62:
YY_RULE_SETUP
-#line 284 "scanner.l"
+#line 272 "scanner.l"
return LESS;
YY_BREAK
case 63:
YY_RULE_SETUP
-#line 285 "scanner.l"
+#line 273 "scanner.l"
return GREATER;
YY_BREAK
case 64:
YY_RULE_SETUP
-#line 286 "scanner.l"
+#line 274 "scanner.l"
return CBYTE;
YY_BREAK
case 65:
YY_RULE_SETUP
-#line 287 "scanner.l"
+#line 275 "scanner.l"
return TK_BROADCAST;
YY_BREAK
case 66:
YY_RULE_SETUP
-#line 288 "scanner.l"
+#line 276 "scanner.l"
return TK_MULTICAST;
YY_BREAK
case 67:
YY_RULE_SETUP
-#line 290 "scanner.l"
+#line 278 "scanner.l"
return AND;
YY_BREAK
case 68:
YY_RULE_SETUP
-#line 291 "scanner.l"
+#line 279 "scanner.l"
return OR;
YY_BREAK
case 69:
YY_RULE_SETUP
-#line 292 "scanner.l"
+#line 280 "scanner.l"
return '!';
YY_BREAK
case 70:
YY_RULE_SETUP
-#line 294 "scanner.l"
+#line 282 "scanner.l"
return LEN;
YY_BREAK
case 71:
YY_RULE_SETUP
-#line 295 "scanner.l"
+#line 283 "scanner.l"
return INBOUND;
YY_BREAK
case 72:
YY_RULE_SETUP
-#line 296 "scanner.l"
+#line 284 "scanner.l"
return OUTBOUND;
YY_BREAK
case 73:
YY_RULE_SETUP
-#line 298 "scanner.l"
+#line 286 "scanner.l"
return VLAN;
YY_BREAK
case 74:
YY_RULE_SETUP
-#line 299 "scanner.l"
+#line 287 "scanner.l"
return MPLS;
YY_BREAK
case 75:
YY_RULE_SETUP
-#line 300 "scanner.l"
+#line 288 "scanner.l"
return PPPOED;
YY_BREAK
case 76:
YY_RULE_SETUP
-#line 301 "scanner.l"
+#line 289 "scanner.l"
return PPPOES;
YY_BREAK
case 77:
YY_RULE_SETUP
-#line 303 "scanner.l"
+#line 291 "scanner.l"
return LANE;
YY_BREAK
case 78:
YY_RULE_SETUP
-#line 304 "scanner.l"
+#line 292 "scanner.l"
return LLC;
YY_BREAK
case 79:
YY_RULE_SETUP
-#line 305 "scanner.l"
+#line 293 "scanner.l"
return METAC;
YY_BREAK
case 80:
YY_RULE_SETUP
-#line 306 "scanner.l"
+#line 294 "scanner.l"
return BCC;
YY_BREAK
case 81:
YY_RULE_SETUP
-#line 307 "scanner.l"
+#line 295 "scanner.l"
return OAM;
YY_BREAK
case 82:
YY_RULE_SETUP
-#line 308 "scanner.l"
+#line 296 "scanner.l"
return OAMF4;
YY_BREAK
case 83:
YY_RULE_SETUP
-#line 309 "scanner.l"
+#line 297 "scanner.l"
return OAMF4EC;
YY_BREAK
case 84:
YY_RULE_SETUP
-#line 310 "scanner.l"
+#line 298 "scanner.l"
return OAMF4SC;
YY_BREAK
case 85:
YY_RULE_SETUP
-#line 311 "scanner.l"
+#line 299 "scanner.l"
return SC;
YY_BREAK
case 86:
YY_RULE_SETUP
-#line 312 "scanner.l"
+#line 300 "scanner.l"
return ILMIC;
YY_BREAK
case 87:
YY_RULE_SETUP
-#line 313 "scanner.l"
+#line 301 "scanner.l"
return VPI;
YY_BREAK
case 88:
YY_RULE_SETUP
-#line 314 "scanner.l"
+#line 302 "scanner.l"
return VCI;
YY_BREAK
case 89:
YY_RULE_SETUP
-#line 315 "scanner.l"
+#line 303 "scanner.l"
return CONNECTMSG;
YY_BREAK
case 90:
YY_RULE_SETUP
-#line 316 "scanner.l"
+#line 304 "scanner.l"
return METACONNECT;
YY_BREAK
case 91:
YY_RULE_SETUP
-#line 318 "scanner.l"
+#line 306 "scanner.l"
return PF_IFNAME;
YY_BREAK
case 92:
YY_RULE_SETUP
-#line 319 "scanner.l"
+#line 307 "scanner.l"
return PF_RSET;
YY_BREAK
case 93:
YY_RULE_SETUP
-#line 320 "scanner.l"
+#line 308 "scanner.l"
return PF_RNR;
YY_BREAK
case 94:
YY_RULE_SETUP
-#line 321 "scanner.l"
+#line 309 "scanner.l"
return PF_SRNR;
YY_BREAK
case 95:
YY_RULE_SETUP
-#line 322 "scanner.l"
+#line 310 "scanner.l"
return PF_REASON;
YY_BREAK
case 96:
YY_RULE_SETUP
-#line 323 "scanner.l"
+#line 311 "scanner.l"
return PF_ACTION;
YY_BREAK
case 97:
YY_RULE_SETUP
-#line 325 "scanner.l"
+#line 313 "scanner.l"
return FISU;
YY_BREAK
case 98:
YY_RULE_SETUP
-#line 326 "scanner.l"
+#line 314 "scanner.l"
return LSSU;
YY_BREAK
case 99:
YY_RULE_SETUP
-#line 327 "scanner.l"
+#line 315 "scanner.l"
return LSSU;
YY_BREAK
case 100:
YY_RULE_SETUP
-#line 328 "scanner.l"
+#line 316 "scanner.l"
return MSU;
YY_BREAK
case 101:
YY_RULE_SETUP
-#line 329 "scanner.l"
-return SIO;
+#line 317 "scanner.l"
+return HFISU;
YY_BREAK
case 102:
YY_RULE_SETUP
-#line 330 "scanner.l"
-return OPC;
+#line 318 "scanner.l"
+return HLSSU;
YY_BREAK
case 103:
YY_RULE_SETUP
-#line 331 "scanner.l"
-return DPC;
+#line 319 "scanner.l"
+return HMSU;
YY_BREAK
case 104:
YY_RULE_SETUP
-#line 332 "scanner.l"
-return SLS;
+#line 320 "scanner.l"
+return SIO;
YY_BREAK
case 105:
-/* rule 105 can match eol */
YY_RULE_SETUP
-#line 334 "scanner.l"
-;
+#line 321 "scanner.l"
+return OPC;
YY_BREAK
case 106:
YY_RULE_SETUP
-#line 335 "scanner.l"
-return pcap_text[0];
+#line 322 "scanner.l"
+return DPC;
YY_BREAK
case 107:
YY_RULE_SETUP
-#line 336 "scanner.l"
-return GEQ;
+#line 323 "scanner.l"
+return SLS;
YY_BREAK
case 108:
YY_RULE_SETUP
-#line 337 "scanner.l"
-return LEQ;
+#line 324 "scanner.l"
+return HSIO;
YY_BREAK
case 109:
YY_RULE_SETUP
-#line 338 "scanner.l"
-return NEQ;
+#line 325 "scanner.l"
+return HOPC;
YY_BREAK
case 110:
YY_RULE_SETUP
-#line 339 "scanner.l"
-return '=';
+#line 326 "scanner.l"
+return HDPC;
YY_BREAK
case 111:
YY_RULE_SETUP
-#line 340 "scanner.l"
-return LSH;
+#line 327 "scanner.l"
+return HSLS;
YY_BREAK
case 112:
+/* rule 112 can match eol */
YY_RULE_SETUP
-#line 341 "scanner.l"
-return RSH;
+#line 329 "scanner.l"
+;
YY_BREAK
case 113:
YY_RULE_SETUP
-#line 342 "scanner.l"
+#line 330 "scanner.l"
+return pcap_text[0];
+ YY_BREAK
+case 114:
+YY_RULE_SETUP
+#line 331 "scanner.l"
+return GEQ;
+ YY_BREAK
+case 115:
+YY_RULE_SETUP
+#line 332 "scanner.l"
+return LEQ;
+ YY_BREAK
+case 116:
+YY_RULE_SETUP
+#line 333 "scanner.l"
+return NEQ;
+ YY_BREAK
+case 117:
+YY_RULE_SETUP
+#line 334 "scanner.l"
+return '=';
+ YY_BREAK
+case 118:
+YY_RULE_SETUP
+#line 335 "scanner.l"
+return LSH;
+ YY_BREAK
+case 119:
+YY_RULE_SETUP
+#line 336 "scanner.l"
+return RSH;
+ YY_BREAK
+case 120:
+YY_RULE_SETUP
+#line 337 "scanner.l"
{ yylval.e = pcap_ether_aton(((char *)pcap_text)+1);
+ if (yylval.e == NULL)
+ bpf_error("malloc");
return AID; }
YY_BREAK
-case 114:
+case 121:
YY_RULE_SETUP
-#line 344 "scanner.l"
+#line 341 "scanner.l"
{ yylval.e = pcap_ether_aton((char *)pcap_text);
+ if (yylval.e == NULL)
+ bpf_error("malloc");
return EID; }
YY_BREAK
-case 115:
+case 122:
YY_RULE_SETUP
-#line 346 "scanner.l"
+#line 345 "scanner.l"
{ yylval.i = stoi((char *)pcap_text); return NUM; }
YY_BREAK
-case 116:
+case 123:
YY_RULE_SETUP
-#line 347 "scanner.l"
+#line 346 "scanner.l"
{
yylval.s = sdup((char *)pcap_text); return HID; }
YY_BREAK
-case 117:
+case 124:
YY_RULE_SETUP
-#line 349 "scanner.l"
+#line 348 "scanner.l"
{
#ifdef INET6
struct addrinfo hints, *res;
@@ -3660,159 +3695,159 @@
#endif /*INET6*/
}
YY_BREAK
-case 118:
+case 125:
YY_RULE_SETUP
-#line 365 "scanner.l"
+#line 364 "scanner.l"
{ bpf_error("bogus ethernet address %s", pcap_text); }
YY_BREAK
-case 119:
+case 126:
YY_RULE_SETUP
-#line 366 "scanner.l"
+#line 365 "scanner.l"
{ yylval.i = 0; return NUM; }
YY_BREAK
-case 120:
+case 127:
YY_RULE_SETUP
-#line 367 "scanner.l"
+#line 366 "scanner.l"
{ yylval.i = 1; return NUM; }
YY_BREAK
-case 121:
+case 128:
YY_RULE_SETUP
-#line 368 "scanner.l"
+#line 367 "scanner.l"
{ yylval.i = 0; return NUM; }
YY_BREAK
-case 122:
+case 129:
YY_RULE_SETUP
-#line 369 "scanner.l"
+#line 368 "scanner.l"
{ yylval.i = 3; return NUM; }
YY_BREAK
-case 123:
+case 130:
YY_RULE_SETUP
-#line 370 "scanner.l"
+#line 369 "scanner.l"
{ yylval.i = 4; return NUM; }
YY_BREAK
-case 124:
+case 131:
YY_RULE_SETUP
-#line 371 "scanner.l"
+#line 370 "scanner.l"
{ yylval.i = 5; return NUM; }
YY_BREAK
-case 125:
+case 132:
YY_RULE_SETUP
-#line 372 "scanner.l"
+#line 371 "scanner.l"
{ yylval.i = 8; return NUM; }
YY_BREAK
-case 126:
+case 133:
YY_RULE_SETUP
-#line 373 "scanner.l"
+#line 372 "scanner.l"
{ yylval.i = 9; return NUM; }
YY_BREAK
-case 127:
+case 134:
YY_RULE_SETUP
-#line 374 "scanner.l"
+#line 373 "scanner.l"
{ yylval.i = 10; return NUM; }
YY_BREAK
-case 128:
+case 135:
YY_RULE_SETUP
-#line 375 "scanner.l"
+#line 374 "scanner.l"
{ yylval.i = 11; return NUM; }
YY_BREAK
-case 129:
+case 136:
YY_RULE_SETUP
-#line 376 "scanner.l"
+#line 375 "scanner.l"
{ yylval.i = 12; return NUM; }
YY_BREAK
-case 130:
+case 137:
YY_RULE_SETUP
-#line 377 "scanner.l"
+#line 376 "scanner.l"
{ yylval.i = 13; return NUM; }
YY_BREAK
-case 131:
+case 138:
YY_RULE_SETUP
-#line 378 "scanner.l"
+#line 377 "scanner.l"
{ yylval.i = 14; return NUM; }
YY_BREAK
-case 132:
+case 139:
YY_RULE_SETUP
-#line 379 "scanner.l"
+#line 378 "scanner.l"
{ yylval.i = 15; return NUM; }
YY_BREAK
-case 133:
+case 140:
YY_RULE_SETUP
-#line 380 "scanner.l"
+#line 379 "scanner.l"
{ yylval.i = 16; return NUM; }
YY_BREAK
-case 134:
+case 141:
YY_RULE_SETUP
-#line 381 "scanner.l"
+#line 380 "scanner.l"
{ yylval.i = 17; return NUM; }
YY_BREAK
-case 135:
+case 142:
YY_RULE_SETUP
-#line 382 "scanner.l"
+#line 381 "scanner.l"
{ yylval.i = 18; return NUM; }
YY_BREAK
-case 136:
+case 143:
YY_RULE_SETUP
-#line 383 "scanner.l"
+#line 382 "scanner.l"
{ yylval.i = 13; return NUM; }
YY_BREAK
-case 137:
+case 144:
YY_RULE_SETUP
-#line 384 "scanner.l"
+#line 383 "scanner.l"
{ yylval.i = 0x01; return NUM; }
YY_BREAK
-case 138:
+case 145:
YY_RULE_SETUP
-#line 385 "scanner.l"
+#line 384 "scanner.l"
{ yylval.i = 0x02; return NUM; }
YY_BREAK
-case 139:
+case 146:
YY_RULE_SETUP
-#line 386 "scanner.l"
+#line 385 "scanner.l"
{ yylval.i = 0x04; return NUM; }
YY_BREAK
-case 140:
+case 147:
YY_RULE_SETUP
-#line 387 "scanner.l"
+#line 386 "scanner.l"
{ yylval.i = 0x08; return NUM; }
YY_BREAK
-case 141:
+case 148:
YY_RULE_SETUP
-#line 388 "scanner.l"
+#line 387 "scanner.l"
{ yylval.i = 0x10; return NUM; }
YY_BREAK
-case 142:
+case 149:
YY_RULE_SETUP
-#line 389 "scanner.l"
+#line 388 "scanner.l"
{ yylval.i = 0x20; return NUM; }
YY_BREAK
-case 143:
+case 150:
YY_RULE_SETUP
-#line 390 "scanner.l"
+#line 389 "scanner.l"
{
yylval.s = sdup((char *)pcap_text); return ID; }
YY_BREAK
-case 144:
+case 151:
YY_RULE_SETUP
-#line 392 "scanner.l"
+#line 391 "scanner.l"
{ yylval.s = sdup((char *)pcap_text + 1); return ID; }
YY_BREAK
-case 145:
+case 152:
YY_RULE_SETUP
-#line 393 "scanner.l"
+#line 392 "scanner.l"
{
bpf_error("illegal token: %s", pcap_text); }
YY_BREAK
-case 146:
+case 153:
YY_RULE_SETUP
-#line 395 "scanner.l"
+#line 394 "scanner.l"
{ bpf_error("illegal char '%c'", *pcap_text); }
YY_BREAK
-case 147:
+case 154:
YY_RULE_SETUP
-#line 396 "scanner.l"
+#line 395 "scanner.l"
ECHO;
YY_BREAK
-#line 3816 "scanner.c"
+#line 3851 "scanner.c"
case YY_STATE_EOF(INITIAL):
yyterminate();
@@ -4104,7 +4139,7 @@
while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
{
yy_current_state = (int) yy_def[yy_current_state];
- if ( yy_current_state >= 1438 )
+ if ( yy_current_state >= 1459 )
yy_c = yy_meta[(unsigned int) yy_c];
}
yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
@@ -4132,11 +4167,11 @@
while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
{
yy_current_state = (int) yy_def[yy_current_state];
- if ( yy_current_state >= 1438 )
+ if ( yy_current_state >= 1459 )
yy_c = yy_meta[(unsigned int) yy_c];
}
yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
- yy_is_jam = (yy_current_state == 1437);
+ yy_is_jam = (yy_current_state == 1458);
return yy_is_jam ? 0 : yy_current_state;
}
@@ -4709,7 +4744,7 @@
#define YYTABLES_NAME "yytables"
-#line 396 "scanner.l"
+#line 395 "scanner.l"
void
Index: libpcap/Makefile.in
===================================================================
--- libpcap/Makefile.in (revision 32783)
+++ libpcap/Makefile.in (working copy)
@@ -47,6 +47,8 @@
LD = /usr/bin/ld
CC = @CC@
AR = @AR@
+LN_S = @LN_S@
+MKDEP = @MKDEP@
CCOPT = @V_CCOPT@
INCLS = -I. @V_INCLS@
DEFS = @DEFS@ @V_DEFS@
@@ -57,6 +59,7 @@
LDFLAGS = @LDFLAGS@
DYEXT = @DYEXT@
V_RPATH_OPT = @V_RPATH_OPT@
+DEPENDENCY_CFLAG = @DEPENDENCY_CFLAG@
PROG=libpcap
# Standard CFLAGS
@@ -74,7 +77,7 @@
@rm -f $@
$(CC) $(FULL_CFLAGS) -c $(srcdir)/$*.c
-PSRC = pcap-@V_PCAP@.c @USB_SRC@ @BT_SRC@ @CAN_SRC@ @NETFILTER_SRC@
+PSRC = pcap-@V_PCAP@.c @USB_SRC@ @BT_SRC@ @CAN_SRC@ @NETFILTER_SRC@ @CANUSB_SRC@ @DBUS_SRC@
FSRC = fad-@V_FINDALLDEVS@.c
SSRC = @SSRC@
CSRC = pcap.c inet.c gencode.c optimize.c nametoaddr.c etherent.c \
@@ -122,7 +125,8 @@
findalldevstest \
nonblocktest \
opentest \
- selpolltest
+ selpolltest \
+ valgrindtest
TESTS_SRC = \
tests/filtertest.c \
@@ -130,7 +134,8 @@
tests/nonblocktest.c \
tests/opentest.c \
tests/reactivatetest.c \
- tests/selpolltest.c
+ tests/selpolltest.c \
+ tests/valgrindtest.c
GENHDR = \
scanner.h tokdefs.h version.h
@@ -149,10 +154,12 @@
pcap_compile.3pcap.in \
pcap_datalink.3pcap.in \
pcap_dump_open.3pcap.in \
+ pcap_get_tstamp_precision.3pcap.in \
pcap_list_datalinks.3pcap.in \
pcap_list_tstamp_types.3pcap.in \
pcap_open_dead.3pcap.in \
pcap_open_offline.3pcap.in \
+ pcap_set_tstamp_precision.3pcap.in \
pcap_set_tstamp_type.3pcap.in
MAN3PCAP_NOEXPAND = \
@@ -186,6 +193,7 @@
pcap_open_live.3pcap \
pcap_set_buffer_size.3pcap \
pcap_set_datalink.3pcap \
+ pcap_set_immediate_mode.3pcap \
pcap_set_promisc.3pcap \
pcap_set_rfmon.3pcap \
pcap_set_snaplen.3pcap \
@@ -219,6 +227,7 @@
INSTALL.txt \
LICENSE \
Makefile.in \
+ Makefile-devel-adds \
README \
README.aix \
README.dag \
@@ -281,9 +290,13 @@
pcap-bt-linux.h \
pcap-can-linux.c \
pcap-can-linux.h \
+ pcap-canusb-linux.c \
+ pcap-canusb-linux.h \
pcap-config.in \
pcap-dag.c \
pcap-dag.h \
+ pcap-dbus.c \
+ pcap-dbus.h \
pcap-dlpi.c \
pcap-dos.c \
pcap-dos.h \
@@ -518,6 +531,9 @@
selpolltest: tests/selpolltest.c libpcap.a
$(CC) $(FULL_CFLAGS) -I. -L. -o selpolltest $(srcdir)/tests/selpolltest.c libpcap.a $(LIBS)
+valgrindtest: tests/valgrindtest.c libpcap.a
+ $(CC) $(FULL_CFLAGS) -I. -L. -o valgrindtest $(srcdir)/tests/valgrindtest.c libpcap.a $(LIBS)
+
install: install-shared install-archive pcap-config
[ -d $(DESTDIR)$(libdir) ] || \
(mkdir -p $(DESTDIR)$(libdir); chmod 755 $(DESTDIR)$(libdir))
@@ -548,42 +564,39 @@
for i in $(MAN3PCAP_EXPAND:.in=); do \
$(INSTALL_DATA) $$i \
$(DESTDIR)$(mandir)/man3/$$i; done
- rm -f $(DESTDIR)$(mandir)/man3/pcap_datalink_val_to_description.3pcap
- ln $(DESTDIR)$(mandir)/man3/pcap_datalink_val_to_name.3pcap \
- $(DESTDIR)$(mandir)/man3/pcap_datalink_val_to_description.3pcap
- rm -f $(DESTDIR)$(mandir)/man3/pcap_dump_fopen.3pcap
- ln $(DESTDIR)$(mandir)/man3/pcap_dump_open.3pcap \
- $(DESTDIR)$(mandir)/man3/pcap_dump_fopen.3pcap
- rm -f $(DESTDIR)$(mandir)/man3/pcap_freealldevs.3pcap
- ln $(DESTDIR)$(mandir)/man3/pcap_findalldevs.3pcap \
- $(DESTDIR)$(mandir)/man3/pcap_freealldevs.3pcap
- rm -f $(DESTDIR)$(mandir)/man3/pcap_perror.3pcap
- ln $(DESTDIR)$(mandir)/man3/pcap_geterr.3pcap \
- $(DESTDIR)$(mandir)/man3/pcap_perror.3pcap
- rm -f $(DESTDIR)$(mandir)/man3/pcap_sendpacket.3pcap
- ln $(DESTDIR)$(mandir)/man3/pcap_inject.3pcap \
- $(DESTDIR)$(mandir)/man3/pcap_sendpacket.3pcap
- rm -f $(DESTDIR)$(mandir)/man3/pcap_free_datalinks.3pcap
- ln $(DESTDIR)$(mandir)/man3/pcap_list_datalinks.3pcap \
- $(DESTDIR)$(mandir)/man3/pcap_free_datalinks.3pcap
- rm -f $(DESTDIR)$(mandir)/man3/pcap_free_tstamp_types.3pcap
- ln $(DESTDIR)$(mandir)/man3/pcap_list_tstamp_types.3pcap \
- $(DESTDIR)$(mandir)/man3/pcap_free_tstamp_types.3pcap
- rm -f $(DESTDIR)$(mandir)/man3/pcap_dispatch.3pcap
- ln $(DESTDIR)$(mandir)/man3/pcap_loop.3pcap \
- $(DESTDIR)$(mandir)/man3/pcap_dispatch.3pcap
- rm -f $(DESTDIR)$(mandir)/man3/pcap_minor_version.3pcap
- ln $(DESTDIR)$(mandir)/man3/pcap_major_version.3pcap \
- $(DESTDIR)$(mandir)/man3/pcap_minor_version.3pcap
- rm -f $(DESTDIR)$(mandir)/man3/pcap_next.3pcap
- ln $(DESTDIR)$(mandir)/man3/pcap_next_ex.3pcap \
- $(DESTDIR)$(mandir)/man3/pcap_next.3pcap
- rm -f $(DESTDIR)$(mandir)/man3/pcap_fopen_offline.3pcap
- ln $(DESTDIR)$(mandir)/man3/pcap_open_offline.3pcap \
- $(DESTDIR)$(mandir)/man3/pcap_fopen_offline.3pcap
- rm -f $(DESTDIR)$(mandir)/man3/pcap_getnonblock.3pcap
- ln $(DESTDIR)$(mandir)/man3/pcap_setnonblock.3pcap \
- $(DESTDIR)$(mandir)/man3/pcap_getnonblock.3pcap
+ (cd $(DESTDIR)$(mandir)/man3 && \
+ rm -f pcap_datalink_val_to_description.3pcap && \
+ $(LN_S) pcap_datalink_val_to_name.3pcap \
+ pcap_datalink_val_to_description.3pcap && \
+ rm -f pcap_dump_fopen.3pcap && \
+ $(LN_S) pcap_dump_open.3pcap pcap_dump_fopen.3pcap && \
+ rm -f pcap_freealldevs.3pcap && \
+ $(LN_S) pcap_findalldevs.3pcap pcap_freealldevs.3pcap && \
+ rm -f pcap_perror.3pcap && \
+ $(LN_S) pcap_geterr.3pcap pcap_perror.3pcap && \
+ rm -f pcap_sendpacket.3pcap && \
+ $(LN_S) pcap_inject.3pcap pcap_sendpacket.3pcap && \
+ rm -f pcap_free_datalinks.3pcap && \
+ $(LN_S) pcap_list_datalinks.3pcap pcap_free_datalinks.3pcap && \
+ rm -f pcap_free_tstamp_types.3pcap && \
+ $(LN_S) pcap_list_tstamp_types.3pcap pcap_free_tstamp_types.3pcap && \
+ rm -f pcap_dispatch.3pcap && \
+ $(LN_S) pcap_loop.3pcap pcap_dispatch.3pcap && \
+ rm -f pcap_minor_version.3pcap && \
+ $(LN_S) pcap_major_version.3pcap pcap_minor_version.3pcap && \
+ rm -f pcap_next.3pcap && \
+ $(LN_S) pcap_next_ex.3pcap pcap_next.3pcap && \
+ rm -f pcap_open_dead_with_tstamp_precision.3pcap && \
+ $(LN_S) pcap_open_dead.3pcap \
+ pcap_open_dead_with_tstamp_precision.3pcap && \
+ rm -f pcap_open_offline_with_tstamp_precision.3pcap && \
+ $(LN_S) pcap_open_offline.3pcap pcap_open_offline_with_tstamp_precision.3pcap && \
+ rm -f pcap_fopen_offline.3pcap && \
+ $(LN_S) pcap_open_offline.3pcap pcap_fopen_offline.3pcap && \
+ rm -f pcap_fopen_offline_with_tstamp_precision.3pcap && \
+ $(LN_S) pcap_open_offline.3pcap pcap_fopen_offline_with_tstamp_precision.3pcap && \
+ rm -f pcap_getnonblock.3pcap && \
+ $(LN_S) pcap_setnonblock.3pcap pcap_getnonblock.3pcap)
for i in $(MANFILE); do \
$(INSTALL_DATA) `echo $$i | sed 's/.manfile.in/.manfile/'` \
$(DESTDIR)$(mandir)/man@MAN_FILE_FORMATS@/`echo $$i | sed 's/.manfile.in/.@MAN_FILE_FORMATS@/'`; done
@@ -660,7 +673,10 @@
rm -f $(DESTDIR)$(mandir)/man3/pcap_dispatch.3pcap
rm -f $(DESTDIR)$(mandir)/man3/pcap_minor_version.3pcap
rm -f $(DESTDIR)$(mandir)/man3/pcap_next.3pcap
+ rm -f $(DESTDIR)$(mandir)/man3/pcap_open_dead_with_tstamp_precision.3pcap
+ rm -f $(DESTDIR)$(mandir)/man3/pcap_open_offline_with_tstamp_precision.3pcap
rm -f $(DESTDIR)$(mandir)/man3/pcap_fopen_offline.3pcap
+ rm -f $(DESTDIR)$(mandir)/man3/pcap_fopen_offline_with_tstamp_precision.3pcap
rm -f $(DESTDIR)$(mandir)/man3/pcap_getnonblock.3pcap
for i in $(MANFILE); do \
rm -f $(DESTDIR)$(mandir)/man@MAN_FILE_FORMATS@/`echo $$i | sed 's/.manfile.in/.@MAN_FILE_FORMATS@/'`; done
@@ -705,7 +721,7 @@
RPMVERSION=`cat VERSION | sed s/-.*//g`; \
sed -e s/@VERSION@/$$RPMVERSION/ -e s/@NAME@/libpcap-`cat VERSION`/ $< > $@
-releasetar:
+releasetar:
@cwd=`pwd` ; dir=`basename $$cwd` ; name=$(PROG)-`cat VERSION` ; \
mkdir $$name; \
tar cf - $(CSRC) $(HDR) $(MAN1) $(MAN3PCAP_EXPAND) \
@@ -715,9 +731,4 @@
rm -rf $$name
depend: $(GENSRC) $(GENHDR) bpf_filter.c
- ./mkdep -c $(CC) $(DEFS) $(INCLS) $(SRC)
-
-Makefile: Makefile.in config.status
- ./config.status
- @echo your Makefile was out of date, now run $(MAKE) again
- exit 1
+ $(MKDEP) -c $(CC) -m $(DEPENDENCY_CFLAG) $(DEFS) $(INCLS) $(SRC)
Index: libpcap/scanner.l
===================================================================
--- libpcap/scanner.l (revision 32783)
+++ libpcap/scanner.l (working copy)
@@ -209,20 +209,8 @@
carp return CARP;
radio return RADIO;
-ip6 {
-#ifdef INET6
- return IPV6;
-#else
- bpf_error("%s not supported", yytext);
-#endif
- }
-icmp6 {
-#ifdef INET6
- return ICMPV6;
-#else
- bpf_error("%s not supported", yytext);
-#endif
- }
+ip6 return IPV6;
+icmp6 return ICMPV6;
ah return AH;
esp return ESP;
@@ -326,10 +314,17 @@
lssu return LSSU;
lsu return LSSU;
msu return MSU;
+hfisu return HFISU;
+hlssu return HLSSU;
+hmsu return HMSU;
sio return SIO;
opc return OPC;
dpc return DPC;
sls return SLS;
+hsio return HSIO;
+hopc return HOPC;
+hdpc return HDPC;
+hsls return HSLS;
[ \r\n\t] ;
[+\-*/:\[\]!<>()&|=] return yytext[0];
@@ -340,8 +335,12 @@
"<<" return LSH;
">>" return RSH;
${B} { yylval.e = pcap_ether_aton(((char *)yytext)+1);
+ if (yylval.e == NULL)
+ bpf_error("malloc");
return AID; }
{MAC} { yylval.e = pcap_ether_aton((char *)yytext);
+ if (yylval.e == NULL)
+ bpf_error("malloc");
return EID; }
{N} { yylval.i = stoi((char *)yytext); return NUM; }
({N}\.{N})|({N}\.{N}\.{N})|({N}\.{N}\.{N}\.{N}) {
Index: libpcap/Makefile-devel-adds
===================================================================
--- libpcap/Makefile-devel-adds (revision 0)
+++ libpcap/Makefile-devel-adds (working copy)
@@ -0,0 +1,22 @@
+#
+# Auto-regenerate configure script or Makefile when things change.
+# From autoconf.info . Works best with GNU Make.
+#
+${srcdir}/configure: configure.in aclocal.m4
+ cd ${srcdir} && autoconf
+
+# autoheader might not change config.h.in, so touch a stamp file.
+${srcdir}/config.h.in: ${srcdir}/stamp-h.in
+${srcdir}/stamp-h.in: configure.in aclocal.m4
+ cd ${srcdir} && autoheader
+ echo timestamp > ${srcdir}/stamp-h.in
+
+config.h: stamp-h
+stamp-h: ${srcdir}/config.h.in config.status
+ ./config.status
+
+Makefile: Makefile.in config.status
+ ./config.status
+
+config.status: ${srcdir}/configure
+ ./config.status --recheck
Index: libpcap/VERSION
===================================================================
--- libpcap/VERSION (revision 32783)
+++ libpcap/VERSION (working copy)
@@ -1 +1 @@
-1.2.1
+1.5.3
Index: libpcap/pcap_get_tstamp_precision.3pcap.in
===================================================================
--- libpcap/pcap_get_tstamp_precision.3pcap.in (revision 0)
+++ libpcap/pcap_get_tstamp_precision.3pcap.in (working copy)
@@ -0,0 +1,52 @@
+.\"Copyright (c) 2013, Michal Sekletar
+.\"All rights reserved.
+.\"
+.\"Redistribution and use in source and binary forms, with or without
+.\"modification, are permitted provided that the following conditions
+.\"are met:
+.\"
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in
+.\" the documentation and/or other materials provided with the
+.\" distribution.
+.\" 3. The names of the authors may not 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.
+
+.TH PCAP_GET_TSTAMP_PRECISION 3PCAP "27 August 2013"
+.SH NAME
+pcap_get_tstamp_precision \- get the time stamp precision returned in
+captures
+.SH SYNOPSIS
+.nf
+.ft B
+#include <pcap/pcap.h>
+.ft
+.LP
+.ft B
+int pcap_get_tstamp_precision(pcap_t *p);
+.ft
+.fi
+.SH DESCRIPTION
+.B pcap_get_tstamp_precision()
+returns the precision of the time stamp returned in packet captures on the pcap
+descriptor.
+.SH RETURN VALUE
+.B pcap_get_tstamp_precision()
+returns
+.B PCAP_TSTAMP_PRECISION_MICRO
+or
+.BR PCAP_TSTAMP_PRECISION_NANO ,
+which indicates
+that pcap captures contains time stamps in microseconds or nanoseconds
+respectively.
+.SH SEE ALSO
+pcap(3PCAP),
+pcap_set_tstamp_precision(3PCAP),
+pcap-tstamp(@MAN_MISC_INFO@)
Index: libpcap/mkdep
===================================================================
--- libpcap/mkdep (revision 32783)
+++ libpcap/mkdep (working copy)
@@ -18,6 +18,7 @@
MAKE=Makefile # default makefile name is "Makefile"
CC=cc # default C compiler is "cc"
+DEPENDENCY_CFLAG=-M # default dependency-generation flag is -M
while :
do case "$1" in
@@ -31,6 +32,11 @@
MAKE=$2
shift; shift ;;
+ # -m allows you to specify the dependency-generation flag
+ -m)
+ DEPENDENCY_CFLAG=$2
+ shift; shift ;;
+
# the -p flag produces "program: program.c" style dependencies
# so .o's don't get produced
-p)
@@ -42,7 +48,7 @@
done
if [ $# = 0 ] ; then
- echo 'usage: mkdep [-p] [-c cc] [-f makefile] [flags] file ...'
+ echo 'usage: mkdep [-p] [-c cc] [-f makefile] [-m dependency-cflag] [flags] file ...'
exit 1
fi
@@ -74,7 +80,7 @@
# sed -e 's/:[^"]*"\([^"]*\)".*/: \1/' -e 's/\.c/.o/' |
# XXX this doesn't work with things like "-DDECLWAITSTATUS=union\ wait"
-$CC -M $* |
+$CC $DEPENDENCY_CFLAG $* |
sed "
s; \./; ;g
$SED" |
Index: libpcap/pcap-bt-linux.c
===================================================================
--- libpcap/pcap-bt-linux.c (revision 32783)
+++ libpcap/pcap-bt-linux.c (working copy)
@@ -70,15 +70,21 @@
static int bt_setdirection_linux(pcap_t *, pcap_direction_t);
static int bt_stats_linux(pcap_t *, struct pcap_stat *);
+/*
+ * Private data for capturing on Linux Bluetooth devices.
+ */
+struct pcap_bt {
+ int dev_id; /* device ID of device we're bound to */
+};
+
int
-bt_platform_finddevs(pcap_if_t **alldevsp, char *err_str)
+bt_findalldevs(pcap_if_t **alldevsp, char *err_str)
{
- pcap_if_t *found_dev = *alldevsp;
struct hci_dev_list_req *dev_list;
struct hci_dev_req *dev_req;
int i, sock;
int ret = 0;
-
+
sock = socket(AF_BLUETOOTH, SOCK_RAW, BTPROTO_HCI);
if (sock < 0)
{
@@ -117,7 +123,7 @@
snprintf(dev_name, 20, BT_IFACE"%d", dev_req->dev_id);
snprintf(dev_descr, 30, "Bluetooth adapter number %d", i);
- if (pcap_add_if(&found_dev, dev_name, 0,
+ if (pcap_add_if(alldevsp, dev_name, 0,
dev_descr, err_str) < 0)
{
ret = -1;
@@ -135,11 +141,41 @@
}
pcap_t *
-bt_create(const char *device, char *ebuf)
+bt_create(const char *device, char *ebuf, int *is_ours)
{
+ const char *cp;
+ char *cpend;
+ long devnum;
pcap_t *p;
- p = pcap_create_common(device, ebuf);
+ /* Does this look like a Bluetooth device? */
+ cp = strrchr(device, '/');
+ if (cp == NULL)
+ cp = device;
+ /* Does it begin with BT_IFACE? */
+ if (strncmp(cp, BT_IFACE, sizeof BT_IFACE - 1) != 0) {
+ /* Nope, doesn't begin with BT_IFACE */
+ *is_ours = 0;
+ return NULL;
+ }
+ /* Yes - is BT_IFACE followed by a number? */
+ cp += sizeof BT_IFACE - 1;
+ devnum = strtol(cp, &cpend, 10);
+ if (cpend == cp || *cpend != '\0') {
+ /* Not followed by a number. */
+ *is_ours = 0;
+ return NULL;
+ }
+ if (devnum < 0) {
+ /* Followed by a non-valid number. */
+ *is_ours = 0;
+ return NULL;
+ }
+
+ /* OK, it's probably ours. */
+ *is_ours = 1;
+
+ p = pcap_create_common(device, ebuf, sizeof (struct pcap_bt));
if (p == NULL)
return (NULL);
@@ -150,6 +186,7 @@
static int
bt_activate(pcap_t* handle)
{
+ struct pcap_bt *handlep = handle->priv;
struct sockaddr_hci addr;
int opt;
int dev_id;
@@ -178,7 +215,7 @@
handle->getnonblock_op = pcap_getnonblock_fd;
handle->setnonblock_op = pcap_setnonblock_fd;
handle->stats_op = bt_stats_linux;
- handle->md.ifindex = dev_id;
+ handlep->dev_id = dev_id;
/* Create HCI socket */
handle->fd = socket(AF_BLUETOOTH, SOCK_RAW, BTPROTO_HCI);
@@ -223,10 +260,13 @@
/* Bind socket to the HCI device */
addr.hci_family = AF_BLUETOOTH;
- addr.hci_dev = handle->md.ifindex;
+ addr.hci_dev = handlep->dev_id;
+#ifdef SOCKADDR_HCI_HAS_HCI_CHANNEL
+ addr.hci_channel = HCI_CHANNEL_RAW;
+#endif
if (bind(handle->fd, (struct sockaddr *) &addr, sizeof(addr)) < 0) {
snprintf(handle->errbuf, PCAP_ERRBUF_SIZE,
- "Can't attach to device %d: %s", handle->md.ifindex,
+ "Can't attach to device %d: %s", handlep->dev_id,
strerror(errno));
goto close_fail;
}
@@ -341,10 +381,11 @@
static int
bt_stats_linux(pcap_t *handle, struct pcap_stat *stats)
{
+ struct pcap_bt *handlep = handle->priv;
int ret;
struct hci_dev_info dev_info;
struct hci_dev_stats * s = &dev_info.stat;
- dev_info.dev_id = handle->md.ifindex;
+ dev_info.dev_id = handlep->dev_id;
/* ignore eintr */
do {
Index: libpcap/pcap-bt-linux.h
===================================================================
--- libpcap/pcap-bt-linux.h (revision 32783)
+++ libpcap/pcap-bt-linux.h (working copy)
@@ -36,5 +36,5 @@
/*
* Prototypes for Bluetooth-related functions
*/
-int bt_platform_finddevs(pcap_if_t **alldevsp, char *err_str);
-pcap_t *bt_create(const char *device, char *ebuf);
+int bt_findalldevs(pcap_if_t **alldevsp, char *err_str);
+pcap_t *bt_create(const char *device, char *ebuf, int *is_ours);
Index: libpcap/pcap_set_tstamp_precision.3pcap.in
===================================================================
--- libpcap/pcap_set_tstamp_precision.3pcap.in (revision 0)
+++ libpcap/pcap_set_tstamp_precision.3pcap.in (working copy)
@@ -0,0 +1,61 @@
+.\"Copyright (c) 2013, Michal Sekletar
+.\"All rights reserved.
+.\"
+.\"Redistribution and use in source and binary forms, with or without
+.\"modification, are permitted provided that the following conditions
+.\"are met:
+.\"
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in
+.\" the documentation and/or other materials provided with the
+.\" distribution.
+.\" 3. The names of the authors may not 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.
+
+.TH PCAP_SET_TSTAMP_PRECISION 3PCAP "27 August 2013"
+.SH NAME
+pcap_set_tstamp_precision \- set the time stamp precision returned in
+captures
+.SH SYNOPSIS
+.nf
+.ft B
+#include <pcap/pcap.h>
+.ft
+.LP
+.ft B
+int pcap_set_tstamp_precision(pcap_t *p, int tstamp_precision);
+.ft
+.fi
+.SH DESCRIPTION
+.B pcap_set_tstamp_precision()
+sets the precision of the time stamp desired for packets captured on the pcap
+descriptor to the type specified by
+.IR tstamp_precision .
+It must be called on a pcap descriptor created by
+.B pcap_create()
+that has not yet been activated by
+.BR pcap_activate() .
+Two time stamp precisions are supported, microseconds and nanoseconds. One can
+use options
+.B PCAP_TSTAMP_PRECISION_MICRO and
+.B PCAP_TSTAMP_PRECISION_NANO
+to request desired precision. By default, time stamps are in microseconds.
+.SH RETURN VALUE
+.B pcap_set_tstamp_type()
+returns 0 on success if the specified time stamp precision is expected to be
+supported by the operating system,
+.B PCAP_ERROR_TSTAMP_PRECISION_NOTSUP
+if operating system does not support requested time stamp precision,
+.B PCAP_ERROR_ACTIVATED
+if called on a capture handle that has been activated.
+.SH SEE ALSO
+pcap(3PCAP),
+pcap_get_tstamp_precision(3PCAP),
+pcap-tstamp(@MAN_MISC_INFO@)
Index: libpcap/pcap-nit.c
===================================================================
--- libpcap/pcap-nit.c (revision 32783)
+++ libpcap/pcap-nit.c (working copy)
@@ -71,9 +71,17 @@
/* Forwards */
static int nit_setflags(int, int, int, char *);
+/*
+ * Private data for capturing on NIT devices.
+ */
+struct pcap_nit {
+ struct pcap_stat stat;
+};
+
static int
pcap_stats_nit(pcap_t *p, struct pcap_stat *ps)
{
+ struct pcap_nit *pn = p->priv;
/*
* "ps_recv" counts packets handed to the filter, not packets
@@ -91,13 +99,14 @@
* kernel by libpcap or packets not yet read from libpcap by the
* application.
*/
- *ps = p->md.stat;
+ *ps = pn->stat;
return (0);
}
static int
pcap_read_nit(pcap_t *p, int cnt, pcap_handler callback, u_char *user)
{
+ struct pcap_nit *pn = p->priv;
register int cc, n;
register u_char *bp, *cp, *ep;
register struct nit_hdr *nh;
@@ -156,7 +165,7 @@
case NIT_NOMBUF:
case NIT_NOCLUSTER:
case NIT_NOSPACE:
- p->md.stat.ps_drop = nh->nh_dropped;
+ pn->stat.ps_drop = nh->nh_dropped;
continue;
case NIT_SEQNO:
@@ -167,7 +176,7 @@
"bad nit state %d", nh->nh_state);
return (-1);
}
- ++p->md.stat.ps_recv;
+ ++pn->stat.ps_recv;
bp += ((sizeof(struct nit_hdr) + nh->nh_datalen +
sizeof(int) - 1) & ~(sizeof(int) - 1));
@@ -180,7 +189,7 @@
h.len = nh->nh_wirelen;
h.caplen = caplen;
(*callback)(user, &h, cp);
- if (++n >= cnt && cnt > 0) {
+ if (++n >= cnt && !PACKET_COUNT_IS_UNLIMITED(cnt)) {
p->cc = ep - bp;
p->bp = bp;
return (n);
@@ -209,28 +218,42 @@
}
static int
-nit_setflags(int fd, int promisc, int to_ms, char *ebuf)
+nit_setflags(pcap_t *p)
{
struct nit_ioc nioc;
memset(&nioc, 0, sizeof(nioc));
- nioc.nioc_bufspace = BUFSPACE;
- nioc.nioc_chunksize = CHUNKSIZE;
nioc.nioc_typetomatch = NT_ALLTYPES;
nioc.nioc_snaplen = p->snapshot;
nioc.nioc_bufalign = sizeof(int);
nioc.nioc_bufoffset = 0;
- if (to_ms != 0) {
+ if (p->opt.buffer_size != 0)
+ nioc.nioc_bufspace = p->opt.buffer_size;
+ else {
+ /* Default buffer size */
+ nioc.nioc_bufspace = BUFSPACE;
+ }
+
+ if (p->opt.immediate) {
+ /*
+ * XXX - will this cause packets to be delivered immediately?
+ * XXX - given that this is for SunOS prior to 4.0, do
+ * we care?
+ */
+ nioc.nioc_chunksize = 0;
+ } else
+ nioc.nioc_chunksize = CHUNKSIZE;
+ if (p->opt.timeout != 0) {
nioc.nioc_flags |= NF_TIMEOUT;
- nioc.nioc_timeout.tv_sec = to_ms / 1000;
- nioc.nioc_timeout.tv_usec = (to_ms * 1000) % 1000000;
+ nioc.nioc_timeout.tv_sec = p->opt.timeout / 1000;
+ nioc.nioc_timeout.tv_usec = (p->opt.timeout * 1000) % 1000000;
}
- if (promisc)
+ if (p->opt.promisc)
nioc.nioc_flags |= NF_PROMISC;
- if (ioctl(fd, SIOCSNIT, &nioc) < 0) {
- snprintf(ebuf, PCAP_ERRBUF_SIZE, "SIOCSNIT: %s",
+ if (ioctl(p->fd, SIOCSNIT, &nioc) < 0) {
+ snprintf(p->errbuf, PCAP_ERRBUF_SIZE, "SIOCSNIT: %s",
pcap_strerror(errno));
return (-1);
}
@@ -273,7 +296,8 @@
"bind: %s: %s", snit.snit_ifname, pcap_strerror(errno));
goto bad;
}
- nit_setflags(p->fd, p->opt.promisc, p->md.timeout, p->errbuf);
+ if (nit_setflags(p) < 0)
+ goto bad;
/*
* NIT supports only ethernets.
@@ -328,11 +352,11 @@
}
pcap_t *
-pcap_create(const char *device, char *ebuf)
+pcap_create_interface(const char *device, char *ebuf)
{
pcap_t *p;
- p = pcap_create_common(device, ebuf);
+ p = pcap_create_common(device, ebuf, sizeof (struct pcap_nit));
if (p == NULL)
return (NULL);
Index: libpcap/config.h.in
===================================================================
--- libpcap/config.h.in (revision 32783)
+++ libpcap/config.h.in (working copy)
@@ -58,6 +58,15 @@
/* if libnl exists and is version 2.x */
#undef HAVE_LIBNL_2_x
+/* if libnl exists and is version 3.x */
+#undef HAVE_LIBNL_3_x
+
+/* libnl has NLE_FAILURE */
+#undef HAVE_LIBNL_NLE
+
+/* libnl has new-style socket api */
+#undef HAVE_LIBNL_SOCKETS
+
/* Define to 1 if you have the <limits.h> header file. */
#undef HAVE_LIMITS_H
@@ -211,6 +220,9 @@
/* path for device for USB sniffing */
#undef LINUX_USB_MON_DEV
+/* if we need a pcap_parse wrapper around yyparse */
+#undef NEED_YYPARSE_WRAPPER
+
/* Define to 1 if netinet/ether.h declares `ether_hostton' */
#undef NETINET_ETHER_H_DECLARES_ETHER_HOSTTON
@@ -232,6 +244,9 @@
/* Define to the one symbol short name of this package. */
#undef PACKAGE_TARNAME
+/* Define to the home page for this package. */
+#undef PACKAGE_URL
+
/* Define to the version of this package. */
#undef PACKAGE_VERSION
@@ -244,6 +259,12 @@
/* target host supports CAN sniffing */
#undef PCAP_SUPPORT_CAN
+/* target host supports canusb */
+#undef PCAP_SUPPORT_CANUSB
+
+/* support D-Bus sniffing */
+#undef PCAP_SUPPORT_DBUS
+
/* target host supports netfilter sniffing */
#undef PCAP_SUPPORT_NETFILTER
@@ -253,18 +274,23 @@
/* include ACN support */
#undef SITA
+/* if struct sockaddr_hci has hci_channel member */
+#undef SOCKADDR_HCI_HAS_HCI_CHANNEL
+
/* Define to 1 if you have the ANSI C header files. */
#undef STDC_HEADERS
/* Enable parser debugging */
#undef YYDEBUG
+/* Enable large inode numbers on Mac OS X 10.5. */
+#ifndef _DARWIN_USE_64_BIT_INODE
+# define _DARWIN_USE_64_BIT_INODE 1
+#endif
+
/* Number of bits in a file offset, on hosts where this is settable. */
#undef _FILE_OFFSET_BITS
-/* needed on HP-UX */
-#undef _HPUX_SOURCE
-
/* Define to 1 to make fseeko visible on some hosts (e.g. glibc 2.2). */
#undef _LARGEFILE_SOURCE
@@ -274,6 +300,9 @@
/* define on AIX to get certain functions */
#undef _SUN
+/* define if your compiler allows __attribute__((format)) without a warning */
+#undef __ATTRIBUTE___FORMAT_OK
+
/* to handle Ultrix compilers that don't support const in prototypes */
#undef const
Index: libpcap/dlpisubs.c
===================================================================
--- libpcap/dlpisubs.c (revision 32783)
+++ libpcap/dlpisubs.c (working copy)
@@ -66,6 +66,10 @@
#include <stropts.h>
#include <unistd.h>
+#ifdef HAVE_LIBDLPI
+#include <libdlpi.h>
+#endif
+
#include "pcap-int.h"
#include "dlpisubs.h"
@@ -79,6 +83,7 @@
int
pcap_stats_dlpi(pcap_t *p, struct pcap_stat *ps)
{
+ struct pcap_dlpi *pd = p->priv;
/*
* "ps_recv" counts packets handed to the filter, not packets
@@ -103,7 +108,7 @@
* the kernel by libpcap, but they may include packets not
* yet read from libpcap by the application.
*/
- *ps = p->md.stat;
+ *ps = pd->stat;
/*
* Add in the drop count, as per the above comment.
@@ -120,6 +125,7 @@
pcap_process_pkts(pcap_t *p, pcap_handler callback, u_char *user,
int count, u_char *bufp, int len)
{
+ struct pcap_dlpi *pd = p->priv;
int n, caplen, origlen;
u_char *ep, *pk;
struct pcap_pkthdr pkthdr;
@@ -162,7 +168,7 @@
} else
#endif
sbp = (struct sb_hdr *)bufp;
- p->md.stat.ps_drop = sbp->sbh_drops;
+ pd->stat.ps_drop = sbp->sbh_drops;
pk = bufp + sizeof(*sbp);
bufp += sbp->sbh_totlen;
origlen = sbp->sbh_origlen;
@@ -173,7 +179,7 @@
pk = bufp;
bufp += caplen;
#endif
- ++p->md.stat.ps_recv;
+ ++pd->stat.ps_recv;
if (bpf_filter(p->fcode.bf_insns, pk, origlen, caplen)) {
#ifdef HAVE_SYS_BUFMOD_H
pkthdr.ts.tv_sec = sbp->sbh_timestamp.tv_sec;
@@ -187,7 +193,7 @@
if (pkthdr.caplen > p->snapshot)
pkthdr.caplen = p->snapshot;
(*callback)(user, &pkthdr, pk);
- if (++n >= count && count >= 0) {
+ if (++n >= count && !PACKET_COUNT_IS_UNLIMITED(count)) {
p->cc = ep - bufp;
p->bp = bufp;
return (n);
@@ -267,46 +273,53 @@
* Push and configure the buffer module. Returns -1 for error, otherwise 0.
*/
int
-pcap_conf_bufmod(pcap_t *p, int snaplen, int timeout)
+pcap_conf_bufmod(pcap_t *p, int snaplen)
{
- int retv = 0;
-
+ struct timeval to;
bpf_u_int32 ss, chunksize;
/* Non-standard call to get the data nicely buffered. */
if (ioctl(p->fd, I_PUSH, "bufmod") != 0) {
pcap_stream_err("I_PUSH bufmod", errno, p->errbuf);
- retv = -1;
+ return (-1);
}
ss = snaplen;
if (ss > 0 &&
strioctl(p->fd, SBIOCSSNAP, sizeof(ss), (char *)&ss) != 0) {
pcap_stream_err("SBIOCSSNAP", errno, p->errbuf);
- retv = -1;
+ return (-1);
}
- /* Set up the bufmod timeout. */
- if (timeout != 0) {
- struct timeval to;
-
- to.tv_sec = timeout / 1000;
- to.tv_usec = (timeout * 1000) % 1000000;
+ if (p->opt.immediate) {
+ /* Set the timeout to zero, for immediate delivery. */
+ to.tv_sec = 0;
+ to.tv_usec = 0;
if (strioctl(p->fd, SBIOCSTIME, sizeof(to), (char *)&to) != 0) {
pcap_stream_err("SBIOCSTIME", errno, p->errbuf);
- retv = -1;
+ return (-1);
}
- }
+ } else {
+ /* Set up the bufmod timeout. */
+ if (p->opt.timeout != 0) {
+ to.tv_sec = p->opt.timeout / 1000;
+ to.tv_usec = (p->opt.timeout * 1000) % 1000000;
+ if (strioctl(p->fd, SBIOCSTIME, sizeof(to), (char *)&to) != 0) {
+ pcap_stream_err("SBIOCSTIME", errno, p->errbuf);
+ return (-1);
+ }
+ }
- /* Set the chunk length. */
- chunksize = CHUNKSIZE;
- if (strioctl(p->fd, SBIOCSCHUNK, sizeof(chunksize), (char *)&chunksize)
- != 0) {
- pcap_stream_err("SBIOCSCHUNKP", errno, p->errbuf);
- retv = -1;
+ /* Set the chunk length. */
+ chunksize = CHUNKSIZE;
+ if (strioctl(p->fd, SBIOCSCHUNK, sizeof(chunksize), (char *)&chunksize)
+ != 0) {
+ pcap_stream_err("SBIOCSCHUNKP", errno, p->errbuf);
+ return (-1);
+ }
}
- return (retv);
+ return (0);
}
#endif /* HAVE_SYS_BUFMOD_H */
Index: libpcap/dlpisubs.h
===================================================================
--- libpcap/dlpisubs.h (revision 32783)
+++ libpcap/dlpisubs.h (working copy)
@@ -10,13 +10,27 @@
#endif
/*
- * Functions used by dlpisubs.c.
+ * Private data for capturing on DLPI devices.
*/
+struct pcap_dlpi {
+#ifdef HAVE_LIBDLPI
+ dlpi_handle_t dlpi_hd;
+#endif /* HAVE_LIBDLPI */
+#ifdef DL_HP_RAWDLS
+ int send_fd;
+#endif /* DL_HP_RAWDLS */
+
+ struct pcap_stat stat;
+};
+
+/*
+ * Functions defined by dlpisubs.c.
+ */
int pcap_stats_dlpi(pcap_t *, struct pcap_stat *);
int pcap_process_pkts(pcap_t *, pcap_handler, u_char *, int, u_char *, int);
int pcap_process_mactype(pcap_t *, u_int);
#ifdef HAVE_SYS_BUFMOD_H
-int pcap_conf_bufmod(pcap_t *, int, int);
+int pcap_conf_bufmod(pcap_t *, int);
#endif
int pcap_alloc_databuf(pcap_t *);
int strioctl(int, int, int, char *);
Index: libpcap/pcap-netfilter-linux.c
===================================================================
--- libpcap/pcap-netfilter-linux.c (revision 32783)
+++ libpcap/pcap-netfilter-linux.c (working copy)
@@ -51,18 +51,42 @@
#include <linux/types.h>
#include <linux/netlink.h>
+#include <linux/netfilter.h>
#include <linux/netfilter/nfnetlink.h>
#include <linux/netfilter/nfnetlink_log.h>
+#include <linux/netfilter/nfnetlink_queue.h>
+/* NOTE: if your program drops privilages after pcap_activate() it WON'T work with nfqueue.
+ * It took me quite some time to debug ;/
+ *
+ * Sending any data to nfnetlink socket requires CAP_NET_ADMIN privilages,
+ * and in nfqueue we need to send verdict reply after recving packet.
+ *
+ * In tcpdump you can disable dropping privilages with -Z root
+ */
+
#include "pcap-netfilter-linux.h"
#define HDR_LENGTH (NLMSG_LENGTH(NLMSG_ALIGN(sizeof(struct nfgenmsg))))
#define NFLOG_IFACE "nflog"
+#define NFQUEUE_IFACE "nfqueue"
+typedef enum { OTHER = -1, NFLOG, NFQUEUE } nftype_t;
+
+/*
+ * Private data for capturing on Linux netfilter sockets.
+ */
+struct pcap_netfilter {
+ u_int packets_read; /* count of packets read with recvfrom() */
+};
+
+static int nfqueue_send_verdict(const pcap_t *handle, u_int16_t group_id, u_int32_t id, u_int32_t verdict);
+
static int
-nflog_read_linux(pcap_t *handle, int max_packets, pcap_handler callback, u_char *user)
+netfilter_read_linux(pcap_t *handle, int max_packets, pcap_handler callback, u_char *user)
{
+ struct pcap_netfilter *handlep = handle->priv;
const unsigned char *buf;
int count = 0;
int len;
@@ -85,6 +109,7 @@
while (len >= NLMSG_SPACE(0)) {
const struct nlmsghdr *nlh = (const struct nlmsghdr *) buf;
u_int32_t msg_len;
+ nftype_t type = OTHER;
if (nlh->nlmsg_len < sizeof(struct nlmsghdr) || len < nlh->nlmsg_len) {
snprintf(handle->errbuf, PCAP_ERRBUF_SIZE, "Message truncated: (got: %d) (nlmsg_len: %u)", len, nlh->nlmsg_len);
@@ -93,10 +118,19 @@
if (NFNL_SUBSYS_ID(nlh->nlmsg_type) == NFNL_SUBSYS_ULOG &&
NFNL_MSG_TYPE(nlh->nlmsg_type) == NFULNL_MSG_PACKET)
- {
+ type = NFLOG;
+
+ if (NFNL_SUBSYS_ID(nlh->nlmsg_type) == NFNL_SUBSYS_QUEUE &&
+ NFNL_MSG_TYPE(nlh->nlmsg_type) == NFQNL_MSG_PACKET)
+ type = NFQUEUE;
+
+ if (type != OTHER) {
const unsigned char *payload = NULL;
struct pcap_pkthdr pkth;
+ const struct nfgenmsg *nfg;
+ int id = 0;
+
if (handle->linktype != DLT_NFLOG) {
const struct nfattr *payload_attr = NULL;
@@ -105,15 +139,32 @@
return -1;
}
+ nfg = NLMSG_DATA(nlh);
if (nlh->nlmsg_len > HDR_LENGTH) {
- struct nfattr *attr = NFM_NFA(NLMSG_DATA(nlh));
+ struct nfattr *attr = NFM_NFA(nfg);
int attr_len = nlh->nlmsg_len - NLMSG_ALIGN(HDR_LENGTH);
while (NFA_OK(attr, attr_len)) {
- switch (NFA_TYPE(attr)) {
- case NFULA_PAYLOAD:
- payload_attr = attr;
- break;
+ if (type == NFQUEUE) {
+ switch (NFA_TYPE(attr)) {
+ case NFQA_PACKET_HDR:
+ {
+ const struct nfqnl_msg_packet_hdr *pkt_hdr = (const struct nfqnl_msg_packet_hdr *) NFA_DATA(attr);
+
+ id = ntohl(pkt_hdr->packet_id);
+ break;
+ }
+ case NFQA_PAYLOAD:
+ payload_attr = attr;
+ break;
+ }
+
+ } else if (type == NFLOG) {
+ switch (NFA_TYPE(attr)) {
+ case NFULA_PAYLOAD:
+ payload_attr = attr;
+ break;
+ }
}
attr = NFA_NEXT(attr, attr_len);
}
@@ -136,11 +187,16 @@
if (handle->fcode.bf_insns == NULL ||
bpf_filter(handle->fcode.bf_insns, payload, pkth.len, pkth.caplen))
{
- handle->md.packets_read++;
+ handlep->packets_read++;
callback(user, &pkth, payload);
count++;
}
}
+
+ if (type == NFQUEUE) {
+ /* XXX, possible responses: NF_DROP, NF_ACCEPT, NF_STOLEN, NF_QUEUE, NF_REPEAT, NF_STOP */
+ nfqueue_send_verdict(handle, ntohs(nfg->res_id), id, NF_ACCEPT);
+ }
}
msg_len = NLMSG_ALIGN(nlh->nlmsg_len);
@@ -163,7 +219,9 @@
static int
netfilter_stats_linux(pcap_t *handle, struct pcap_stat *stats)
{
- stats->ps_recv = handle->md.packets_read;
+ struct pcap_netfilter *handlep = handle->priv;
+
+ stats->ps_recv = handlep->packets_read;
stats->ps_drop = 0;
stats->ps_ifdrop = 0;
return 0;
@@ -183,7 +241,7 @@
};
static int
-nflog_send_config_msg(const pcap_t *handle, u_int8_t family, u_int16_t res_id, const struct my_nfattr *mynfa)
+netfilter_send_config_msg(const pcap_t *handle, u_int16_t msg_type, int ack, u_int8_t family, u_int16_t res_id, const struct my_nfattr *mynfa)
{
char buf[1024] __attribute__ ((aligned));
@@ -198,8 +256,8 @@
++seq_id;
nlh->nlmsg_len = NLMSG_LENGTH(sizeof(struct nfgenmsg));
- nlh->nlmsg_type = (NFNL_SUBSYS_ULOG << 8) | NFULNL_MSG_CONFIG;
- nlh->nlmsg_flags = NLM_F_REQUEST | NLM_F_ACK;
+ nlh->nlmsg_type = msg_type;
+ nlh->nlmsg_flags = NLM_F_REQUEST | (ack ? NLM_F_ACK : 0);
nlh->nlmsg_pid = 0; /* to kernel */
nlh->nlmsg_seq = seq_id;
@@ -222,6 +280,9 @@
if (sendto(handle->fd, nlh, nlh->nlmsg_len, 0, (struct sockaddr *) &snl, sizeof(snl)) == -1)
return -1;
+ if (!ack)
+ return 0;
+
/* waiting for reply loop */
do {
socklen_t addrlen = sizeof(snl);
@@ -261,6 +322,12 @@
}
static int
+nflog_send_config_msg(const pcap_t *handle, u_int8_t family, u_int16_t group_id, const struct my_nfattr *mynfa)
+{
+ return netfilter_send_config_msg(handle, (NFNL_SUBSYS_ULOG << 8) | NFULNL_MSG_CONFIG, 1, family, group_id, mynfa);
+}
+
+static int
nflog_send_config_cmd(const pcap_t *handle, u_int16_t group_id, u_int8_t cmd, u_int8_t family)
{
struct nfulnl_msg_config_cmd msg;
@@ -292,20 +359,79 @@
}
static int
-nflog_activate(pcap_t* handle)
+nfqueue_send_verdict(const pcap_t *handle, u_int16_t group_id, u_int32_t id, u_int32_t verdict)
{
+ struct nfqnl_msg_verdict_hdr msg;
+ struct my_nfattr nfa;
+
+ msg.id = htonl(id);
+ msg.verdict = htonl(verdict);
+
+ nfa.data = &msg;
+ nfa.nfa_type = NFQA_VERDICT_HDR;
+ nfa.nfa_len = sizeof(msg);
+
+ return netfilter_send_config_msg(handle, (NFNL_SUBSYS_QUEUE << 8) | NFQNL_MSG_VERDICT, 0, AF_UNSPEC, group_id, &nfa);
+}
+
+static int
+nfqueue_send_config_msg(const pcap_t *handle, u_int8_t family, u_int16_t group_id, const struct my_nfattr *mynfa)
+{
+ return netfilter_send_config_msg(handle, (NFNL_SUBSYS_QUEUE << 8) | NFQNL_MSG_CONFIG, 1, family, group_id, mynfa);
+}
+
+static int
+nfqueue_send_config_cmd(const pcap_t *handle, u_int16_t group_id, u_int8_t cmd, u_int16_t pf)
+{
+ struct nfqnl_msg_config_cmd msg;
+ struct my_nfattr nfa;
+
+ msg.command = cmd;
+ msg.pf = htons(pf);
+
+ nfa.data = &msg;
+ nfa.nfa_type = NFQA_CFG_CMD;
+ nfa.nfa_len = sizeof(msg);
+
+ return nfqueue_send_config_msg(handle, AF_UNSPEC, group_id, &nfa);
+}
+
+static int
+nfqueue_send_config_mode(const pcap_t *handle, u_int16_t group_id, u_int8_t copy_mode, u_int32_t copy_range)
+{
+ struct nfqnl_msg_config_params msg;
+ struct my_nfattr nfa;
+
+ msg.copy_range = htonl(copy_range);
+ msg.copy_mode = copy_mode;
+
+ nfa.data = &msg;
+ nfa.nfa_type = NFQA_CFG_PARAMS;
+ nfa.nfa_len = sizeof(msg);
+
+ return nfqueue_send_config_msg(handle, AF_UNSPEC, group_id, &nfa);
+}
+
+static int
+netfilter_activate(pcap_t* handle)
+{
const char *dev = handle->opt.source;
unsigned short groups[32];
int group_count = 0;
+ nftype_t type = OTHER;
int i;
- if (strncmp(dev, NFLOG_IFACE, strlen(NFLOG_IFACE)) == 0) {
- dev += strlen(NFLOG_IFACE);
+ if (strncmp(dev, NFLOG_IFACE, strlen(NFLOG_IFACE)) == 0) {
+ dev += strlen(NFLOG_IFACE);
+ type = NFLOG;
- /* nflog:30,33,42 looks nice, allow it */
- if (*dev == ':')
- dev++;
-
+ } else if (strncmp(dev, NFQUEUE_IFACE, strlen(NFQUEUE_IFACE)) == 0) {
+ dev += strlen(NFQUEUE_IFACE);
+ type = NFQUEUE;
+ }
+
+ if (type != OTHER && *dev == ':') {
+ dev++;
while (*dev) {
long int group_id;
char *end_dev;
@@ -335,7 +461,7 @@
}
}
- if (*dev) {
+ if (type == OTHER || *dev) {
snprintf(handle->errbuf, PCAP_ERRBUF_SIZE,
"Can't get netfilter group(s) index from %s",
handle->opt.source);
@@ -351,12 +477,10 @@
/* Initialize some components of the pcap structure. */
handle->bufsize = 128 + handle->snapshot;
handle->offset = 0;
- handle->linktype = DLT_NFLOG;
- handle->read_op = nflog_read_linux;
+ handle->read_op = netfilter_read_linux;
handle->inject_op = netfilter_inject_linux;
handle->setfilter_op = install_bpf_program; /* no kernel filtering */
handle->setdirection_op = NULL;
- handle->set_datalink_op = NULL;
handle->set_datalink_op = netfilter_set_datalink;
handle->getnonblock_op = pcap_getnonblock_fd;
handle->setnonblock_op = pcap_setnonblock_fd;
@@ -369,40 +493,71 @@
return PCAP_ERROR;
}
- handle->dlt_list = (u_int *) malloc(sizeof(u_int) * 2);
- if (handle->dlt_list != NULL) {
- handle->dlt_list[0] = DLT_NFLOG;
- handle->dlt_list[1] = DLT_IPV4;
- handle->dlt_count = 2;
- }
+ if (type == NFLOG) {
+ handle->linktype = DLT_NFLOG;
+ handle->dlt_list = (u_int *) malloc(sizeof(u_int) * 2);
+ if (handle->dlt_list != NULL) {
+ handle->dlt_list[0] = DLT_NFLOG;
+ handle->dlt_list[1] = DLT_IPV4;
+ handle->dlt_count = 2;
+ }
+ } else
+ handle->linktype = DLT_IPV4;
+
handle->buffer = malloc(handle->bufsize);
if (!handle->buffer) {
snprintf(handle->errbuf, PCAP_ERRBUF_SIZE, "Can't allocate dump buffer: %s", pcap_strerror(errno));
goto close_fail;
}
- if (nflog_send_config_cmd(handle, 0, NFULNL_CFG_CMD_PF_UNBIND, AF_INET) < 0) {
- snprintf(handle->errbuf, PCAP_ERRBUF_SIZE, "NFULNL_CFG_CMD_PF_UNBIND: %s", pcap_strerror(errno));
- goto close_fail;
- }
+ if (type == NFLOG) {
+ if (nflog_send_config_cmd(handle, 0, NFULNL_CFG_CMD_PF_UNBIND, AF_INET) < 0) {
+ snprintf(handle->errbuf, PCAP_ERRBUF_SIZE, "NFULNL_CFG_CMD_PF_UNBIND: %s", pcap_strerror(errno));
+ goto close_fail;
+ }
- if (nflog_send_config_cmd(handle, 0, NFULNL_CFG_CMD_PF_BIND, AF_INET) < 0) {
- snprintf(handle->errbuf, PCAP_ERRBUF_SIZE, "NFULNL_CFG_CMD_PF_BIND: %s", pcap_strerror(errno));
- goto close_fail;
- }
+ if (nflog_send_config_cmd(handle, 0, NFULNL_CFG_CMD_PF_BIND, AF_INET) < 0) {
+ snprintf(handle->errbuf, PCAP_ERRBUF_SIZE, "NFULNL_CFG_CMD_PF_BIND: %s", pcap_strerror(errno));
+ goto close_fail;
+ }
- /* Bind socket to the nflog groups */
- for (i = 0; i < group_count; i++) {
- if (nflog_send_config_cmd(handle, groups[i], NFULNL_CFG_CMD_BIND, AF_UNSPEC) < 0) {
- snprintf(handle->errbuf, PCAP_ERRBUF_SIZE, "Can't listen on group group index: %s", pcap_strerror(errno));
+ /* Bind socket to the nflog groups */
+ for (i = 0; i < group_count; i++) {
+ if (nflog_send_config_cmd(handle, groups[i], NFULNL_CFG_CMD_BIND, AF_UNSPEC) < 0) {
+ snprintf(handle->errbuf, PCAP_ERRBUF_SIZE, "Can't listen on group group index: %s", pcap_strerror(errno));
+ goto close_fail;
+ }
+
+ if (nflog_send_config_mode(handle, groups[i], NFULNL_COPY_PACKET, handle->snapshot) < 0) {
+ snprintf(handle->errbuf, PCAP_ERRBUF_SIZE, "NFULNL_COPY_PACKET: %s", pcap_strerror(errno));
+ goto close_fail;
+ }
+ }
+
+ } else {
+ if (nfqueue_send_config_cmd(handle, 0, NFQNL_CFG_CMD_PF_UNBIND, AF_INET) < 0) {
+ snprintf(handle->errbuf, PCAP_ERRBUF_SIZE, "NFQNL_CFG_CMD_PF_UNBIND: %s", pcap_strerror(errno));
goto close_fail;
}
- if (nflog_send_config_mode(handle, groups[i], NFULNL_COPY_PACKET, handle->snapshot) < 0) {
- snprintf(handle->errbuf, PCAP_ERRBUF_SIZE, "NFULNL_COPY_PACKET: %s", pcap_strerror(errno));
+ if (nfqueue_send_config_cmd(handle, 0, NFQNL_CFG_CMD_PF_BIND, AF_INET) < 0) {
+ snprintf(handle->errbuf, PCAP_ERRBUF_SIZE, "NFQNL_CFG_CMD_PF_BIND: %s", pcap_strerror(errno));
goto close_fail;
}
+
+ /* Bind socket to the nfqueue groups */
+ for (i = 0; i < group_count; i++) {
+ if (nfqueue_send_config_cmd(handle, groups[i], NFQNL_CFG_CMD_BIND, AF_UNSPEC) < 0) {
+ snprintf(handle->errbuf, PCAP_ERRBUF_SIZE, "Can't listen on group group index: %s", pcap_strerror(errno));
+ goto close_fail;
+ }
+
+ if (nfqueue_send_config_mode(handle, groups[i], NFQNL_COPY_PACKET, handle->snapshot) < 0) {
+ snprintf(handle->errbuf, PCAP_ERRBUF_SIZE, "NFQNL_COPY_PACKET: %s", pcap_strerror(errno));
+ goto close_fail;
+ }
+ }
}
if (handle->opt.rfmon) {
@@ -432,28 +587,57 @@
}
pcap_t *
-nflog_create(const char *device, char *ebuf)
+netfilter_create(const char *device, char *ebuf, int *is_ours)
{
+ const char *cp;
pcap_t *p;
- p = pcap_create_common(device, ebuf);
+ /* Does this look like an netfilter device? */
+ cp = strrchr(device, '/');
+ if (cp == NULL)
+ cp = device;
+
+ /* Does it begin with NFLOG_IFACE or NFQUEUE_IFACE? */
+ if (strncmp(cp, NFLOG_IFACE, sizeof NFLOG_IFACE - 1) == 0)
+ cp += sizeof NFLOG_IFACE - 1;
+ else if (strncmp(cp, NFQUEUE_IFACE, sizeof NFQUEUE_IFACE - 1) == 0)
+ cp += sizeof NFQUEUE_IFACE - 1;
+ else {
+ /* Nope, doesn't begin with NFLOG_IFACE nor NFQUEUE_IFACE */
+ *is_ours = 0;
+ return NULL;
+ }
+
+ /*
+ * Yes - is that either the end of the name, or is it followed
+ * by a colon?
+ */
+ if (*cp != ':' && *cp != '\0') {
+ /* Nope */
+ *is_ours = 0;
+ return NULL;
+ }
+
+ /* OK, it's probably ours. */
+ *is_ours = 1;
+
+ p = pcap_create_common(device, ebuf, sizeof (struct pcap_netfilter));
if (p == NULL)
return (NULL);
- p->activate_op = nflog_activate;
+ p->activate_op = netfilter_activate;
return (p);
}
int
-netfilter_platform_finddevs(pcap_if_t **alldevsp, char *err_str)
+netfilter_findalldevs(pcap_if_t **alldevsp, char *err_str)
{
- pcap_if_t *found_dev = *alldevsp;
int sock;
sock = socket(AF_NETLINK, SOCK_RAW, NETLINK_NETFILTER);
if (sock < 0) {
- /* if netlink is not supported this this is not fatal */
- if (errno == EAFNOSUPPORT)
+ /* if netlink is not supported this is not fatal */
+ if (errno == EAFNOSUPPORT || errno == EPROTONOSUPPORT)
return 0;
snprintf(err_str, PCAP_ERRBUF_SIZE, "Can't open netlink socket %d:%s",
errno, pcap_strerror(errno));
@@ -461,8 +645,9 @@
}
close(sock);
- if (pcap_add_if(&found_dev, NFLOG_IFACE, 0, "Linux netfilter log (NFLOG) interface", err_str) < 0)
+ if (pcap_add_if(alldevsp, NFLOG_IFACE, 0, "Linux netfilter log (NFLOG) interface", err_str) < 0)
return -1;
+ if (pcap_add_if(alldevsp, NFQUEUE_IFACE, 0, "Linux netfilter queue (NFQUEUE) interface", err_str) < 0)
+ return -1;
return 0;
}
-
Index: libpcap/CREDITS
===================================================================
--- libpcap/CREDITS (revision 32783)
+++ libpcap/CREDITS (working copy)
@@ -2,6 +2,7 @@
The current maintainers:
Bill Fenner <fenner at research dot att dot com>
+ Denis Ovsienko <infrastation at yandex dot ru>
Fulvio Risso <risso at polito dot it>
Guy Harris <guy at alum dot mit dot edu>
Hannes Gredler <hannes at juniper dot net>
@@ -9,18 +10,23 @@
Additional people who have contributed patches:
+ Akos Vandra <axos88 at gmail dot com>
Alan Bawden <Alan at LCS dot MIT dot EDU>
Albert Chin <china at thewrittenword dot com>
Alexander 'Leo' Bergolth <Leo dot Bergolth at wu-wien dot ac dot at>
Alexey Kuznetsov <kuznet at ms2 dot inr dot ac dot ru>
Alon Bar-Lev <alonbl at sourceforge dot net>
+ Andres Perera <andres dot p at zoho dot com>
Andrew Brown <atatat at atatdot dot net>
<andy-1 at sourceforge dot net>
+ Ani Sinha <ani at aristanetworks dot com>
Antti Kantee <pooka at netbsd dot org>
Arien Vijn <arienvijn at sourceforge dot net>
Arkadiusz Miskiewicz <misiek at pld dot org dot pl>
Armando L. Caro Jr. <acaro at mail dot eecis dot udel dot edu>
Assar Westerlund <assar at sics dot se>
+ Bill Parker <wp02855 at gmail dot com>
+ Brent Cook <brent at boundary dot com>
Brian Ginsbach <ginsbach at cray dot com>
Charles M. Hannum <mycroft at netbsd dot org>
Chris G. Demetriou <cgd at netbsd dot org>
@@ -29,14 +35,21 @@
Chris Pepper <pepper at mail dot reppep dot com>
Christian Bell <csbell at myri dot com>
Christian Peron <csjp at freebsd dot org>
+ Christian Svensson <blue at cmd dot nu>
Daniele Orlandi <daniele at orlandi dot com>
+ Darren Lim <darren dot lim at endace dot com>
Darren Reed <darrenr at sun dot com>
+ David Clark <david dot clark at datasoft dot com>
David Kaelbling <drk at sgi dot com>
+ David Ward <david dot ward at ll dot mit dot edu>
David Young <dyoung at ojctech dot com>
Dean Gaudet <dean at arctic dot org>
+ dhruv <rsrivat at sourceforge dot net>
Don Ebright <Don dot Ebright at compuware dot com>
Dug Song <dugsong at monkey dot org>
Dustin Spicuzza <dustin at virtualroadside dot com>
+ dzejarczech <dzejarczech at sourceforge dot net>
+ Edward Sheldrake <ejs1920 at sourceforge dot net>
Eric Anderson <anderse at hpl dot hp dot com>
Erik de Castro Lopo <erik dot de dot castro dot lopo at sensorynetworks dot com>
Felix Obenhuber <felix at obenhuber dot de>
@@ -45,31 +58,37 @@
frederich <frederich at sourceforge dot net>
Fulko Hew <fulko dot hew at gmail dot com>
Fumiyuki Shimizu <fumifumi at abacustech dot jp>
+ Gabor Tatarka <gabor dot tatarka at ericsson dot com>
Garrett Cooper <yaberauneya at sourceforge dot net>
+ George Neville-Neil <gnn at freebsd dot org>
Gianluca Varenni <gianluca dot varenni at gmail dot com>
Gilbert Hoyek <gil_hoyek at hotmail dot com>
Gisle Vanem <gvanem at broadpark dot no>
Graeme Hewson <ghewson at cix dot compulink dot co dot uk>
+ Gregor Maier <gregor at net dot in dot tum dot de>
Greg Stark <gsstark at mit dot edu>
Greg Troxel <gdt at ir dot bbn dot com>
- Gregor Maier <gregor at net dot in dot tum dot de>
Guillaume Pelat <endymion_ at users dot sourceforge dot net>
+ Gustavo Zacarias <gustavo at zacarias dot com dot ar>
Hagen Paul Pfeifer <hagen at jauu dot net>
Henri Doreau <hdoreau at sourceforge dot net>
Hyung Sik Yoon <hsyn at kr dot ibm dot com>
Igor Khristophorov <igor at atdot dot org>
+ Jakub Zawadzki <darkjames at darkjames dot pl>
Jan-Philip Velders <jpv at veldersjes dot net>
Jason R. Thorpe <thorpej at netbsd dot org>
Javier Achirica <achirica at ttd dot net>
+ Jean-Louis Charton <Jean-Louis dot CHARTON at oikialog dot com>
Jean Tourrilhes <jt at hpl dot hp dot com>
- Jean-Louis Charton <Jean-Louis.CHARTON at oikialog dot com>
Jefferson Ogata <jogata at nodc dot noaa dot gov>
Jesper Dangaard Brouer <hawk at comx dot dk>
Jesper Peterson <jesper at endace dot com>
+ Jiri Slaby <jirislaby at gmail dot com>
Joerg Mayer <jmayer at loplof dot de>
John Bankier <jbankier at rainfinity dot com>
Jon Lindgren <jonl at yubyub dot net>
Jon Smirl <jonsmirl at gmail dot com>
+ Jorge Boncompte [DTI2] <jorge at dti2 dot net>
Juergen Schoenwaelder <schoenw at ibr dot cs dot tu-bs dot de>
Julien Moutinho <julm at savines dot alpes dot fr dot eu dot org>
Jung-uk Kim <jkim at FreeBSD dot org>
@@ -83,6 +102,7 @@
Love Hörnquist-Åstrand <lha at stacken dot kth dot se>
Luis MartinGarcia <luis dot mgarc at gmail dot com>
Maciej W. Rozycki <macro at ds2 dot pg dot gda dot pl>
+ Mansour Behabadi <mansour at oxplot dot com>
Marcus Felipe Pereira <marcus at task dot com dot br>
Mark C. Brown <mbrown at hp dot com>
Mark Pizzolato <List-tcpdump-workers at subscriptions dot pizzolato dot net>
@@ -91,14 +111,17 @@
Márton Németh <nm127 at freemail dot hu>
Matthew Luckie <mjl at luckie dot org dot nz>
Max Laier <max at love2party dot net>
+ Michal Labedzki
+ Michal Sekletar <msekleta at redhat dot com>
Mike Frysinger <vapier at gmail dot com>
Mike Kershaw <dragorn at kismetwireless dot net>
Mike Wiacek <mike at iroot dot net>
Miroslav Lichvar <mlichvar at redhat dot com>
Monroe Williams <monroe at pobox dot com>
+ Nicolas Dade <ndade at nsd dot dyndns dot org>
+ Niko Delarich <niko dot delarich at gmail dot com>
+ N. Leiten <nleiten at sourceforge dot net>
<nvercamm at sourceforge dot net>
- N. Leiten <nleiten at sourceforge dot net>
- Nicolas Dade <ndade at nsd dot dyndns dot org>
Octavian Cerna <tavy at ylabs dot com>
Olaf Kirch <okir at caldera dot de>
Ollie Wild <aaw at users dot sourceforge dot net>
@@ -142,8 +165,8 @@
Xianjie Zhang <xzhang at cup dot hp dot com>
Xin Li <delphij at FreeBSD dot org>
Yen Yen Lim
+ Yoann Vandoorselaere <yoann at prelude-ids dot org>
Yvan Vanhullebus <vanhu at sourceforge dot net>
- Yoann Vandoorselaere <yoann at prelude-ids dot org>
The original LBL crew:
Steve McCanne
@@ -151,4 +174,4 @@
Van Jacobson
Past maintainers:
- Jun-ichiro itojun Hagino <itojun at iijlab dot net>
+ Jun-ichiro itojun Hagino <itojun at iijlab dot net> Also see: http://www.wide.ad.jp/itojun-award/
Index: libpcap/pcap-savefile.manfile.in
===================================================================
--- libpcap/pcap-savefile.manfile.in (revision 32783)
+++ libpcap/pcap-savefile.manfile.in (working copy)
@@ -55,16 +55,24 @@
.RE
.PP
All fields in the per-file header are in the byte order of the host
-writing the file. The first field in the per-file header is a 4-byte
-magic number, with the value 0xa1b2c3d4. The magic number, when read by
-a host with the same byte order as the host that wrote the file, will
-have the value 0xa1b2c3d4, and, when read by a host with the opposite
-byte order as the host that wrote the file, will have the value
+writing the file. Normally, the first field in the per-file header is a
+4-byte magic number, with the value 0xa1b2c3d4. The magic number, when
+read by a host with the same byte order as the host that wrote the file,
+will have the value 0xa1b2c3d4, and, when read by a host with the
+opposite byte order as the host that wrote the file, will have the value
0xd4c3b2a1. That allows software reading the file to determine whether
the byte order of the host that wrote the file is the same as the byte
order of the host on which the file is being read, and thus whether the
values in the per-file and per-packet headers need to be byte-swapped.
.PP
+If the magic number has the value 0xa1b23c4d (with the two nibbles of
+the two lower-order bytes of the magic number swapped), which would be
+read as 0xa1b23c4d by a host with the same byte order as the host that
+wrote the file and as 0x4d3cb2a1 by a host with the opposite byte order
+as the host that wrote the file, the file format is the same as for
+regular files, except that the time stamps for packets are given in
+seconds and nanoseconds rather than seconds and microseconds.
+.PP
Following this are:
.IP
A 2-byte file format major version number; the current version number is
@@ -104,7 +112,7 @@
c.
Time stamp, seconds value
_
-Time stamp, microseconds value
+Time stamp, microseconds or nanoseconds value
_
Length of captured packet data
_
@@ -117,11 +125,12 @@
the approximate time the packet was captured; the time stamp consists of
a 4-byte value, giving the time in seconds since January 1, 1970,
00:00:00 UTC, followed by a 4-byte value, giving the time in
-microseconds since that second. Following that are a 4-byte value
-giving the number of bytes of captured data that follow the per-packet
-header and a 4-byte value giving the number of bytes that would have
-been present had the packet not been truncated by the snapshot length.
-The two lengths will be equal if the number of bytes of packet data are
-less than or equal to the snapshot length.
+microseconds or nanoseconds since that second, depending on the magic
+number in the file header. Following that are a 4-byte value giving the
+number of bytes of captured data that follow the per-packet header and a
+4-byte value giving the number of bytes that would have been present had
+the packet not been truncated by the snapshot length. The two lengths
+will be equal if the number of bytes of packet data are less than or
+equal to the snapshot length.
.SH SEE ALSO
pcap(3PCAP), pcap-linktype(@MAN_MISC_INFO@)
Index: libpcap/pcap-snoop.c
===================================================================
--- libpcap/pcap-snoop.c (revision 32783)
+++ libpcap/pcap-snoop.c (working copy)
@@ -58,9 +58,17 @@
#include "os-proto.h"
#endif
+/*
+ * Private data for capturing on snoop devices.
+ */
+struct pcap_snoop {
+ struct pcap_stat stat;
+};
+
static int
pcap_read_snoop(pcap_t *p, int cnt, pcap_handler callback, u_char *user)
{
+ struct pcap_snoop *psn = p->priv;
int cc;
register struct snoopheader *sh;
register u_int datalen;
@@ -124,7 +132,7 @@
if (p->fcode.bf_insns == NULL ||
bpf_filter(p->fcode.bf_insns, cp, datalen, caplen)) {
struct pcap_pkthdr h;
- ++p->md.stat.ps_recv;
+ ++psn->stat.ps_recv;
h.ts.tv_sec = sh->snoop_timestamp.tv_sec;
h.ts.tv_usec = sh->snoop_timestamp.tv_usec;
h.len = datalen;
@@ -156,6 +164,7 @@
static int
pcap_stats_snoop(pcap_t *p, struct pcap_stat *ps)
{
+ struct pcap_snoop *psn = p->priv;
register struct rawstats *rs;
struct rawstats rawstats;
@@ -180,7 +189,7 @@
* rather than just this socket? If not, why does it have
* both Snoop and Drain statistics?
*/
- p->md.stat.ps_drop =
+ psn->stat.ps_drop =
rs->rs_snoop.ss_ifdrops + rs->rs_snoop.ss_sbdrops +
rs->rs_drain.ds_ifdrops + rs->rs_drain.ds_sbdrops;
@@ -189,7 +198,7 @@
* As filtering is done in userland, this does not include
* packets dropped because we ran out of buffer space.
*/
- *ps = p->md.stat;
+ *ps = psn->stat;
return (0);
}
@@ -394,11 +403,11 @@
}
pcap_t *
-pcap_create(const char *device, char *ebuf)
+pcap_create_interface(const char *device, char *ebuf)
{
pcap_t *p;
- p = pcap_create_common(device, ebuf);
+ p = pcap_create_common(device, ebuf, sizeof (struct pcap_snoop));
if (p == NULL)
return (NULL);
Index: libpcap/pcap-can-linux.c
===================================================================
--- libpcap/pcap-can-linux.c (revision 32783)
+++ libpcap/pcap-can-linux.c (working copy)
@@ -72,12 +72,66 @@
static int can_setdirection_linux(pcap_t *, pcap_direction_t);
static int can_stats_linux(pcap_t *, struct pcap_stat *);
+/*
+ * Private data for capturing on Linux CANbus devices.
+ */
+struct pcap_can {
+ int ifindex; /* interface index of device we're bound to */
+};
+
+int
+can_findalldevs(pcap_if_t **devlistp, char *errbuf)
+{
+ /*
+ * There are no platform-specific devices since each device
+ * exists as a regular network interface.
+ *
+ * XXX - true?
+ */
+ return 0;
+}
+
pcap_t *
-can_create(const char *device, char *ebuf)
+can_create(const char *device, char *ebuf, int *is_ours)
{
+ const char *cp;
+ char *cpend;
+ long devnum;
pcap_t* p;
- p = pcap_create_common(device, ebuf);
+ /* Does this look like a CANbus device? */
+ cp = strrchr(device, '/');
+ if (cp == NULL)
+ cp = device;
+ /* Does it begin with "can" or "vcan"? */
+ if (strncmp(cp, "can", 3) == 0) {
+ /* Begins with "can" */
+ cp += 3; /* skip past "can" */
+ } else if (strncmp(cp, "vcan", 4) == 0) {
+ /* Begins with "vcan" */
+ cp += 4;
+ } else {
+ /* Nope, doesn't begin with "can" or "vcan" */
+ *is_ours = 0;
+ return NULL;
+ }
+ /* Yes - is "can" or "vcan" followed by a number from 0? */
+ devnum = strtol(cp, &cpend, 10);
+ if (cpend == cp || *cpend != '\0') {
+ /* Not followed by a number. */
+ *is_ours = 0;
+ return NULL;
+ }
+ if (devnum < 0) {
+ /* Followed by a non-valid number. */
+ *is_ours = 0;
+ return NULL;
+ }
+
+ /* OK, it's probably ours. */
+ *is_ours = 1;
+
+ p = pcap_create_common(device, ebuf, sizeof (struct pcap_can));
if (p == NULL)
return (NULL);
@@ -89,6 +143,7 @@
static int
can_activate(pcap_t* handle)
{
+ struct pcap_can *handlep = handle->priv;
struct sockaddr_can addr;
struct ifreq ifr;
@@ -125,7 +180,7 @@
pcap_cleanup_live_common(handle);
return PCAP_ERROR;
}
- handle->md.ifindex = ifr.ifr_ifindex;
+ handlep->ifindex = ifr.ifr_ifindex;
/* allocate butter */
handle->buffer = malloc(handle->bufsize);
@@ -139,11 +194,11 @@
/* Bind to the socket */
addr.can_family = AF_CAN;
- addr.can_ifindex = handle->md.ifindex;
+ addr.can_ifindex = handlep->ifindex;
if( bind( handle->fd, (struct sockaddr*)&addr, sizeof(addr) ) < 0 )
{
snprintf(handle->errbuf, PCAP_ERRBUF_SIZE, "Can't attach to device %d %d:%s",
- handle->md.ifindex, errno, strerror(errno));
+ handlep->ifindex, errno, strerror(errno));
pcap_cleanup_live_common(handle);
return PCAP_ERROR;
}
@@ -152,7 +207,7 @@
{
/* Monitor mode doesn't apply to CAN devices. */
pcap_cleanup_live_common(handle);
- return PCAP_ERROR;
+ return PCAP_ERROR_RFMON_NOTSUP;
}
handle->selectable_fd = handle->fd;
Index: libpcap/pcap-netfilter-linux.h
===================================================================
--- libpcap/pcap-netfilter-linux.h (revision 32783)
+++ libpcap/pcap-netfilter-linux.h (working copy)
@@ -31,5 +31,5 @@
/*
* Prototypes for netlink-related functions
*/
-int netfilter_platform_finddevs(pcap_if_t **alldevsp, char *err_str);
-pcap_t *nflog_create(const char *device, char *ebuf);
+int netfilter_findalldevs(pcap_if_t **alldevsp, char *err_str);
+pcap_t *netfilter_create(const char *device, char *ebuf, int *is_ours);
Index: libpcap/pcap-can-linux.h
===================================================================
--- libpcap/pcap-can-linux.h (revision 32783)
+++ libpcap/pcap-can-linux.h (working copy)
@@ -32,4 +32,5 @@
/*
* Prototypes for SocketCAN related functions
*/
-pcap_t* can_create(const char *device, char *ebuf);
+pcap_t* can_create(const char *device, char *ebuf, int *is_ours);
+int can_findalldevs(pcap_if_t **devlistp, char *errbuf);
Index: libpcap/savefile.c
===================================================================
--- libpcap/savefile.c (revision 32783)
+++ libpcap/savefile.c (working copy)
@@ -160,18 +160,19 @@
return (-1);
}
-static void
+void
sf_cleanup(pcap_t *p)
{
- if (p->sf.rfile != stdin)
- (void)fclose(p->sf.rfile);
+ if (p->rfile != stdin)
+ (void)fclose(p->rfile);
if (p->buffer != NULL)
free(p->buffer);
pcap_freecode(&p->fcode);
}
pcap_t *
-pcap_open_offline(const char *fname, char *errbuf)
+pcap_open_offline_with_tstamp_precision(const char *fname, u_int precision,
+ char *errbuf)
{
FILE *fp;
pcap_t *p;
@@ -199,7 +200,7 @@
return (NULL);
}
}
- p = pcap_fopen_offline(fp, errbuf);
+ p = pcap_fopen_offline_with_tstamp_precision(fp, precision, errbuf);
if (p == NULL) {
if (fp != stdin)
fclose(fp);
@@ -207,8 +208,16 @@
return (p);
}
+pcap_t *
+pcap_open_offline(const char *fname, char *errbuf)
+{
+ return (pcap_open_offline_with_tstamp_precision(fname,
+ PCAP_TSTAMP_PRECISION_MICRO, errbuf));
+}
+
#ifdef WIN32
-pcap_t* pcap_hopen_offline(intptr_t osfd, char *errbuf)
+pcap_t* pcap_hopen_offline_with_tstamp_precision(intptr_t osfd, u_int precision,
+ char *errbuf)
{
int fd;
FILE *file;
@@ -227,11 +236,18 @@
return NULL;
}
- return pcap_fopen_offline(file, errbuf);
+ return pcap_fopen_offline_with_tstamp_precision(file, precision,
+ errbuf);
}
+
+pcap_t* pcap_hopen_offline(intptr_t osfd, char *errbuf)
+{
+ return pcap_hopen_offline_with_tstamp_precision(osfd,
+ PCAP_TSTAMP_PRECISION_MICRO, errbuf);
+}
#endif
-static int (*check_headers[])(pcap_t *, bpf_u_int32, FILE *, char *) = {
+static pcap_t *(*check_headers[])(bpf_u_int32, FILE *, u_int, char *, int *) = {
pcap_check_header,
pcap_ng_check_header
};
@@ -242,17 +258,15 @@
static
#endif
pcap_t *
-pcap_fopen_offline(FILE *fp, char *errbuf)
+pcap_fopen_offline_with_tstamp_precision(FILE *fp, u_int precision,
+ char *errbuf)
{
register pcap_t *p;
bpf_u_int32 magic;
size_t amt_read;
u_int i;
+ int err;
- p = pcap_create_common("(savefile)", errbuf);
- if (p == NULL)
- return (NULL);
-
/*
* Read the first 4 bytes of the file; the network analyzer dump
* file formats we support (pcap and pcap-ng), and several other
@@ -272,26 +286,23 @@
(unsigned long)sizeof(magic),
(unsigned long)amt_read);
}
- goto bad;
+ return (NULL);
}
/*
* Try all file types.
*/
for (i = 0; i < N_FILE_TYPES; i++) {
- switch ((*check_headers[i])(p, magic, fp, errbuf)) {
-
- case -1:
+ p = (*check_headers[i])(magic, fp, precision, errbuf, &err);
+ if (p != NULL) {
+ /* Yup, that's it. */
+ goto found;
+ }
+ if (err) {
/*
* Error trying to read the header.
*/
- goto bad;
-
- case 1:
- /*
- * Yup, that's it.
- */
- goto found;
+ return (NULL);
}
}
@@ -299,15 +310,13 @@
* Well, who knows what this mess is....
*/
snprintf(errbuf, PCAP_ERRBUF_SIZE, "unknown file format");
- goto bad;
+ return (NULL);
found:
- p->sf.rfile = fp;
+ p->rfile = fp;
-#ifdef PCAP_FDDIPAD
/* Padding only needed for live capture fcode */
p->fddipad = 0;
-#endif
#if !defined(WIN32) && !defined(MSDOS)
/*
@@ -333,15 +342,28 @@
p->setmode_op = sf_setmode;
p->setmintocopy_op = sf_setmintocopy;
#endif
- p->cleanup_op = sf_cleanup;
+
+ /*
+ * For offline captures, the standard one-shot callback can
+ * be used for pcap_next()/pcap_next_ex().
+ */
+ p->oneshot_callback = pcap_oneshot;
+
p->activated = 1;
return (p);
- bad:
- free(p);
- return (NULL);
}
+#ifdef WIN32
+static
+#endif
+pcap_t *
+pcap_fopen_offline(FILE *fp, char *errbuf)
+{
+ return (pcap_fopen_offline_with_tstamp_precision(fp,
+ PCAP_TSTAMP_PRECISION_MICRO, errbuf));
+}
+
/*
* Read packets from a capture file, and call the callback for each
* packet.
@@ -375,7 +397,7 @@
return (n);
}
- status = p->sf.next_packet_op(p, &h, &data);
+ status = p->next_packet_op(p, &h, &data);
if (status) {
if (status == 1)
return (0);
Index: libpcap/pcap.3pcap.in
===================================================================
--- libpcap/pcap.3pcap.in (revision 32783)
+++ libpcap/pcap.3pcap.in (working copy)
@@ -19,7 +19,7 @@
.\" WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
.\" MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
.\"
-.TH PCAP 3PCAP "4 April 2008"
+.TH PCAP 3PCAP "1 July 2013"
.SH NAME
pcap \- Packet Capture library
.SH SYNOPSIS
@@ -174,9 +174,11 @@
.IP
Not all platforms support a read timeout; on platforms that
don't, the read timeout is ignored. A zero value for the timeout,
-on platforms that support a read timeout,
-will cause a read to wait forever to allow enough packets to
-arrive, with no timeout.
+on platforms that support a read timeout, has platform-dependent
+behavior that could cause a read to wait for an unlimited amount
+of time until the capture buffer fills up or could cause a read timeout
+of 1 millisecond to be used. We recommend that a value of zero not be
+used.
.IP
.BR NOTE :
the read timeout cannot be used to cause calls that read
@@ -309,6 +311,19 @@
lists the values it returns and describes the packet formats that
correspond to those values.
.PP
+Do
+.B NOT
+assume that the packets for a given capture or ``savefile`` will have
+any given link-layer header type, such as
+.B DLT_EN10MB
+for Ethernet. For example, the "any" device on Linux will have a
+link-layer header type of
+.B DLT_LINUX_SLL
+even if all devices on the system at the time the "any" device is opened
+have some other data link type, such as
+.B DLT_EN10MB
+for Ethernet.
+.PP
To obtain the
.B "FILE\ *"
corresponding to a
@@ -510,20 +525,13 @@
is larger than the maximum number of bytes to capture).
.RE
.PP
-.BR pcap_next_ex ()
-supplies that pointer through a pointer argument.
-.BR pcap_next ()
-is passed an argument that points to a
-.I struct pcap_pkthdr
-structure, and fills it in.
-.PP
The callback is also supplied a
.I const u_char
pointer to the first
.B caplen
(as given in the
.I struct pcap_pkthdr
-a pointer to which is passed to the callback routine)
+mentioned above)
bytes of data from the packet. This won't necessarily be the entire
packet; to capture the entire packet, you will have to provide a value
for
@@ -534,10 +542,28 @@
65535 should be sufficient on most if not all networks). When reading
from a ``savefile'', the snapshot length specified when the capture was
performed will limit the amount of packet data available.
+.PP
.BR pcap_next ()
-returns that pointer;
+is passed an argument that points to a
+.I struct pcap_pkthdr
+structure, and fills it in with the time stamp and length values for the
+packet. It returns a
+.I const u_char
+to the first
+.B caplen
+bytes of the packet on success, and NULL on error.
+.PP
.BR pcap_next_ex ()
-supplies that pointer through a pointer argument.
+is passed two pointer arguments, one of which points to a
+.IR struct pcap_pkthdr *
+and one of which points to a
+.IR "const u_char" *.
+It sets the first pointer to point to a
+.I struct pcap_pkthdr
+structure with the time stamp and length values for the packet, and sets
+the second pointer to point to the first
+.B caplen
+bytes of the packet.
.PP
To force the loop in
.BR pcap_dispatch ()
Index: libpcap/fad-glifc.c
===================================================================
--- libpcap/fad-glifc.c (revision 32783)
+++ libpcap/fad-glifc.c (working copy)
@@ -80,7 +80,7 @@
* SIOCGLIFCONF rather than SIOCGIFCONF in order to get IPv6 addresses.)
*/
int
-pcap_findalldevs(pcap_if_t **alldevsp, char *errbuf)
+pcap_findalldevs_interfaces(pcap_if_t **alldevsp, char *errbuf)
{
pcap_if_t *devlist = NULL;
register int fd4, fd6, fd;
@@ -362,15 +362,6 @@
(void)close(fd6);
(void)close(fd4);
- if (ret != -1) {
- /*
- * We haven't had any errors yet; do any platform-specific
- * operations to add devices.
- */
- if (pcap_platform_finddevs(&devlist, errbuf) < 0)
- ret = -1;
- }
-
if (ret == -1) {
/*
* We had an error; free the list we've been constructing.
Index: libpcap/grammar.c
===================================================================
--- libpcap/grammar.c (revision 32783)
+++ libpcap/grammar.c (working copy)
@@ -244,7 +244,7 @@
/* NOTREACHED */
}
-#ifndef YYBISON
+#ifdef NEED_YYPARSE_WRAPPER
int yyparse(void);
int
@@ -448,13 +448,20 @@
FISU = 359,
LSSU = 360,
MSU = 361,
- SIO = 362,
- OPC = 363,
- DPC = 364,
- SLS = 365,
- AND = 366,
- OR = 367,
- UMINUS = 368
+ HFISU = 362,
+ HLSSU = 363,
+ HMSU = 364,
+ SIO = 365,
+ OPC = 366,
+ DPC = 367,
+ SLS = 368,
+ HSIO = 369,
+ HOPC = 370,
+ HDPC = 371,
+ HSLS = 372,
+ AND = 373,
+ OR = 374,
+ UMINUS = 375
};
#endif
/* Tokens. */
@@ -562,13 +569,20 @@
#define FISU 359
#define LSSU 360
#define MSU 361
-#define SIO 362
-#define OPC 363
-#define DPC 364
-#define SLS 365
-#define AND 366
-#define OR 367
-#define UMINUS 368
+#define HFISU 362
+#define HLSSU 363
+#define HMSU 364
+#define SIO 365
+#define OPC 366
+#define DPC 367
+#define SLS 368
+#define HSIO 369
+#define HOPC 370
+#define HDPC 371
+#define HSLS 372
+#define AND 373
+#define OR 374
+#define UMINUS 375
@@ -597,7 +611,7 @@
/* Line 293 of yacc.c */
-#line 601 "y.tab.c"
+#line 615 "y.tab.c"
} YYSTYPE;
# define YYSTYPE_IS_TRIVIAL 1
# define yystype YYSTYPE /* obsolescent; will be withdrawn */
@@ -609,7 +623,7 @@
/* Line 343 of yacc.c */
-#line 613 "y.tab.c"
+#line 627 "y.tab.c"
#ifdef short
# undef short
@@ -828,20 +842,20 @@
/* YYFINAL -- State number of the termination state. */
#define YYFINAL 3
/* YYLAST -- Last index in YYTABLE. */
-#define YYLAST 700
+#define YYLAST 710
/* YYNTOKENS -- Number of terminals. */
-#define YYNTOKENS 129
+#define YYNTOKENS 136
/* YYNNTS -- Number of nonterminals. */
#define YYNNTS 46
/* YYNRULES -- Number of rules. */
-#define YYNRULES 205
+#define YYNRULES 213
/* YYNRULES -- Number of states. */
-#define YYNSTATES 277
+#define YYNSTATES 285
/* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX. */
#define YYUNDEFTOK 2
-#define YYMAXUTOK 368
+#define YYMAXUTOK 375
#define YYTRANSLATE(YYX) \
((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)
@@ -852,16 +866,16 @@
0, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 113, 2, 2, 2, 2, 115, 2,
- 122, 121, 118, 116, 2, 117, 2, 119, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 2, 128, 2,
- 125, 124, 123, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 120, 2, 2, 2, 2, 122, 2,
+ 129, 128, 125, 123, 2, 124, 2, 126, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 135, 2,
+ 132, 131, 130, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 126, 2, 127, 2, 2, 2, 2, 2, 2,
+ 2, 133, 2, 134, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 114, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 121, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
@@ -885,7 +899,8 @@
75, 76, 77, 78, 79, 80, 81, 82, 83, 84,
85, 86, 87, 88, 89, 90, 91, 92, 93, 94,
95, 96, 97, 98, 99, 100, 101, 102, 103, 104,
- 105, 106, 107, 108, 109, 110, 111, 112, 120
+ 105, 106, 107, 108, 109, 110, 111, 112, 113, 114,
+ 115, 116, 117, 118, 119, 127
};
#if YYDEBUG
@@ -905,36 +920,37 @@
224, 226, 228, 230, 232, 234, 236, 238, 240, 242,
244, 246, 248, 250, 252, 254, 256, 258, 260, 263,
266, 269, 272, 277, 279, 281, 284, 286, 289, 291,
- 293, 295, 297, 300, 303, 306, 309, 312, 315, 318,
- 323, 326, 329, 332, 334, 336, 338, 340, 342, 344,
- 346, 348, 350, 352, 354, 356, 358, 360, 362, 364,
- 366, 368, 373, 380, 384, 388, 392, 396, 400, 404,
- 408, 412, 415, 419, 421, 423, 425, 427, 429, 431,
- 433, 437, 439, 441, 443, 445, 447, 449, 451, 453,
- 455, 457, 459, 461, 463, 465, 467, 470, 473, 477,
- 479, 481, 485, 487, 489, 491, 493, 495, 497, 499,
- 501, 504, 507, 511, 513, 515
+ 293, 296, 298, 300, 303, 306, 309, 312, 315, 318,
+ 321, 326, 329, 332, 335, 337, 339, 341, 343, 345,
+ 347, 349, 351, 353, 355, 357, 359, 361, 363, 365,
+ 367, 369, 371, 376, 383, 387, 391, 395, 399, 403,
+ 407, 411, 415, 418, 422, 424, 426, 428, 430, 432,
+ 434, 436, 440, 442, 444, 446, 448, 450, 452, 454,
+ 456, 458, 460, 462, 464, 466, 468, 470, 473, 476,
+ 480, 482, 484, 488, 490, 492, 494, 496, 498, 500,
+ 502, 504, 506, 508, 510, 512, 514, 516, 518, 521,
+ 524, 528, 530, 532
};
/* YYRHS -- A `-1'-separated list of the rules' RHS. */
static const yytype_int16 yyrhs[] =
{
- 130, 0, -1, 131, 132, -1, 131, -1, -1, 141,
- -1, 132, 133, 141, -1, 132, 133, 135, -1, 132,
- 134, 141, -1, 132, 134, 135, -1, 111, -1, 112,
- -1, 136, -1, 163, -1, 138, 139, 121, -1, 59,
- -1, 61, 119, 37, -1, 61, 8, 61, -1, 61,
- -1, 62, 119, 37, -1, 62, -1, 60, -1, 63,
- -1, 137, 135, -1, 113, -1, 122, -1, 136, -1,
- 140, 133, 135, -1, 140, 134, 135, -1, 163, -1,
- 139, -1, 143, -1, 137, 141, -1, 144, 145, 146,
- -1, 144, 145, -1, 144, 146, -1, 144, 13, -1,
- 144, 14, -1, 144, 147, -1, 142, 135, -1, 138,
- 132, 121, -1, 148, -1, 160, 158, 160, -1, 160,
- 159, 160, -1, 149, -1, 164, -1, 165, -1, 166,
- 167, -1, 170, -1, 171, 172, -1, 148, -1, -1,
- 4, -1, 3, -1, 4, 112, 3, -1, 3, 112,
- 4, -1, 4, 111, 3, -1, 3, 111, 4, -1,
+ 137, 0, -1, 138, 139, -1, 138, -1, -1, 148,
+ -1, 139, 140, 148, -1, 139, 140, 142, -1, 139,
+ 141, 148, -1, 139, 141, 142, -1, 118, -1, 119,
+ -1, 143, -1, 170, -1, 145, 146, 128, -1, 59,
+ -1, 61, 126, 37, -1, 61, 8, 61, -1, 61,
+ -1, 62, 126, 37, -1, 62, -1, 60, -1, 63,
+ -1, 144, 142, -1, 120, -1, 129, -1, 143, -1,
+ 147, 140, 142, -1, 147, 141, 142, -1, 170, -1,
+ 146, -1, 150, -1, 144, 148, -1, 151, 152, 153,
+ -1, 151, 152, -1, 151, 153, -1, 151, 13, -1,
+ 151, 14, -1, 151, 154, -1, 149, 142, -1, 145,
+ 139, 128, -1, 155, -1, 167, 165, 167, -1, 167,
+ 166, 167, -1, 156, -1, 171, -1, 172, -1, 173,
+ 174, -1, 177, -1, 178, 179, -1, 155, -1, -1,
+ 4, -1, 3, -1, 4, 119, 3, -1, 3, 119,
+ 4, -1, 4, 118, 3, -1, 3, 118, 4, -1,
49, -1, 50, -1, 51, -1, 52, -1, 53, -1,
54, -1, 5, -1, 7, -1, 9, -1, 10, -1,
6, -1, 55, -1, 18, -1, 16, -1, 17, -1,
@@ -945,58 +961,61 @@
75, -1, 76, -1, 78, -1, 79, -1, 80, -1,
81, -1, 82, -1, 83, -1, 85, -1, 84, -1,
77, -1, 86, -1, 87, -1, 88, -1, 103, -1,
- 144, 35, -1, 144, 36, -1, 11, 37, -1, 12,
- 37, -1, 15, 37, 162, 37, -1, 38, -1, 39,
- -1, 71, 163, -1, 71, -1, 72, 163, -1, 72,
- -1, 73, -1, 74, -1, 150, -1, 144, 151, -1,
- 40, 59, -1, 41, 59, -1, 42, 37, -1, 43,
- 37, -1, 44, 156, -1, 45, 157, -1, 46, 152,
- 47, 153, -1, 46, 152, -1, 47, 154, -1, 48,
- 155, -1, 37, -1, 59, -1, 37, -1, 59, -1,
- 59, -1, 37, -1, 59, -1, 37, -1, 59, -1,
- 59, -1, 123, -1, 56, -1, 124, -1, 57, -1,
- 125, -1, 58, -1, 163, -1, 161, -1, 148, 126,
- 160, 127, -1, 148, 126, 160, 128, 37, 127, -1,
- 160, 116, 160, -1, 160, 117, 160, -1, 160, 118,
- 160, -1, 160, 119, 160, -1, 160, 115, 160, -1,
- 160, 114, 160, -1, 160, 64, 160, -1, 160, 65,
- 160, -1, 117, 160, -1, 138, 161, 121, -1, 66,
- -1, 115, -1, 114, -1, 125, -1, 123, -1, 124,
- -1, 37, -1, 138, 163, 121, -1, 89, -1, 90,
- -1, 91, -1, 92, -1, 95, -1, 96, -1, 93,
- -1, 94, -1, 97, -1, 98, -1, 99, -1, 100,
- -1, 101, -1, 102, -1, 168, -1, 158, 37, -1,
- 159, 37, -1, 138, 169, 121, -1, 37, -1, 168,
- -1, 169, 134, 168, -1, 104, -1, 105, -1, 106,
- -1, 107, -1, 108, -1, 109, -1, 110, -1, 173,
- -1, 158, 37, -1, 159, 37, -1, 138, 174, 121,
- -1, 37, -1, 173, -1, 174, 134, 173, -1
+ 151, 35, -1, 151, 36, -1, 11, 37, -1, 12,
+ 37, -1, 15, 37, 169, 37, -1, 38, -1, 39,
+ -1, 71, 170, -1, 71, -1, 72, 170, -1, 72,
+ -1, 73, -1, 74, 170, -1, 74, -1, 157, -1,
+ 151, 158, -1, 40, 59, -1, 41, 59, -1, 42,
+ 37, -1, 43, 37, -1, 44, 163, -1, 45, 164,
+ -1, 46, 159, 47, 160, -1, 46, 159, -1, 47,
+ 161, -1, 48, 162, -1, 37, -1, 59, -1, 37,
+ -1, 59, -1, 59, -1, 37, -1, 59, -1, 37,
+ -1, 59, -1, 59, -1, 130, -1, 56, -1, 131,
+ -1, 57, -1, 132, -1, 58, -1, 170, -1, 168,
+ -1, 155, 133, 167, 134, -1, 155, 133, 167, 135,
+ 37, 134, -1, 167, 123, 167, -1, 167, 124, 167,
+ -1, 167, 125, 167, -1, 167, 126, 167, -1, 167,
+ 122, 167, -1, 167, 121, 167, -1, 167, 64, 167,
+ -1, 167, 65, 167, -1, 124, 167, -1, 145, 168,
+ 128, -1, 66, -1, 122, -1, 121, -1, 132, -1,
+ 130, -1, 131, -1, 37, -1, 145, 170, 128, -1,
+ 89, -1, 90, -1, 91, -1, 92, -1, 95, -1,
+ 96, -1, 93, -1, 94, -1, 97, -1, 98, -1,
+ 99, -1, 100, -1, 101, -1, 102, -1, 175, -1,
+ 165, 37, -1, 166, 37, -1, 145, 176, 128, -1,
+ 37, -1, 175, -1, 176, 141, 175, -1, 104, -1,
+ 105, -1, 106, -1, 107, -1, 108, -1, 109, -1,
+ 110, -1, 111, -1, 112, -1, 113, -1, 114, -1,
+ 115, -1, 116, -1, 117, -1, 180, -1, 165, 37,
+ -1, 166, 37, -1, 145, 181, 128, -1, 37, -1,
+ 180, -1, 181, 141, 180, -1
};
/* YYRLINE[YYN] -- source line where rule number YYN was defined. */
static const yytype_uint16 yyrline[] =
{
- 0, 315, 315, 319, 321, 323, 324, 325, 326, 327,
- 329, 331, 333, 334, 336, 338, 339, 341, 343, 356,
- 365, 374, 383, 392, 394, 396, 398, 399, 400, 402,
- 404, 406, 407, 409, 410, 411, 412, 413, 414, 416,
- 417, 418, 419, 421, 423, 424, 425, 426, 427, 428,
- 431, 432, 435, 436, 437, 438, 439, 440, 441, 442,
- 443, 444, 445, 446, 449, 450, 451, 452, 455, 457,
- 458, 459, 460, 461, 462, 463, 464, 465, 466, 467,
- 468, 469, 470, 471, 472, 473, 474, 475, 476, 477,
- 478, 479, 480, 481, 482, 483, 484, 485, 486, 487,
- 488, 489, 490, 491, 492, 493, 494, 495, 497, 498,
- 499, 500, 501, 502, 503, 504, 505, 506, 507, 508,
- 509, 510, 511, 514, 515, 516, 517, 518, 519, 522,
- 527, 530, 534, 537, 538, 544, 545, 565, 581, 582,
- 595, 596, 599, 602, 603, 604, 606, 607, 608, 610,
- 611, 613, 614, 615, 616, 617, 618, 619, 620, 621,
- 622, 623, 624, 625, 627, 628, 629, 630, 631, 633,
- 634, 636, 637, 638, 639, 640, 641, 642, 643, 645,
- 646, 647, 648, 651, 652, 654, 655, 656, 657, 659,
- 666, 667, 670, 671, 672, 675, 676, 677, 678, 680,
- 681, 682, 683, 685, 694, 695
+ 0, 316, 316, 320, 322, 324, 325, 326, 327, 328,
+ 330, 332, 334, 335, 337, 339, 340, 342, 344, 357,
+ 366, 375, 384, 393, 395, 397, 399, 400, 401, 403,
+ 405, 407, 408, 410, 411, 412, 413, 414, 415, 417,
+ 418, 419, 420, 422, 424, 425, 426, 427, 428, 429,
+ 432, 433, 436, 437, 438, 439, 440, 441, 442, 443,
+ 444, 445, 446, 447, 450, 451, 452, 453, 456, 458,
+ 459, 460, 461, 462, 463, 464, 465, 466, 467, 468,
+ 469, 470, 471, 472, 473, 474, 475, 476, 477, 478,
+ 479, 480, 481, 482, 483, 484, 485, 486, 487, 488,
+ 489, 490, 491, 492, 493, 494, 495, 496, 498, 499,
+ 500, 501, 502, 503, 504, 505, 506, 507, 508, 509,
+ 510, 511, 512, 513, 516, 517, 518, 519, 520, 521,
+ 524, 529, 532, 536, 539, 540, 546, 547, 567, 583,
+ 584, 597, 598, 601, 604, 605, 606, 608, 609, 610,
+ 612, 613, 615, 616, 617, 618, 619, 620, 621, 622,
+ 623, 624, 625, 626, 627, 629, 630, 631, 632, 633,
+ 635, 636, 638, 639, 640, 641, 642, 643, 644, 645,
+ 647, 648, 649, 650, 653, 654, 656, 657, 658, 659,
+ 661, 668, 669, 672, 673, 674, 675, 676, 677, 680,
+ 681, 682, 683, 684, 685, 686, 687, 689, 690, 691,
+ 692, 694, 707, 708
};
#endif
@@ -1018,11 +1037,12 @@
"L2", "IIH", "LSP", "SNP", "CSNP", "PSNP", "STP", "IPX", "NETBEUI",
"LANE", "LLC", "METAC", "BCC", "SC", "ILMIC", "OAMF4EC", "OAMF4SC",
"OAM", "OAMF4", "CONNECTMSG", "METACONNECT", "VPI", "VCI", "RADIO",
- "FISU", "LSSU", "MSU", "SIO", "OPC", "DPC", "SLS", "AND", "OR", "'!'",
- "'|'", "'&'", "'+'", "'-'", "'*'", "'/'", "UMINUS", "')'", "'('", "'>'",
- "'='", "'<'", "'['", "']'", "':'", "$accept", "prog", "null", "expr",
- "and", "or", "id", "nid", "not", "paren", "pid", "qid", "term", "head",
- "rterm", "pqual", "dqual", "aqual", "ndaqual", "pname", "other", "pfvar",
+ "FISU", "LSSU", "MSU", "HFISU", "HLSSU", "HMSU", "SIO", "OPC", "DPC",
+ "SLS", "HSIO", "HOPC", "HDPC", "HSLS", "AND", "OR", "'!'", "'|'", "'&'",
+ "'+'", "'-'", "'*'", "'/'", "UMINUS", "')'", "'('", "'>'", "'='", "'<'",
+ "'['", "']'", "':'", "$accept", "prog", "null", "expr", "and", "or",
+ "id", "nid", "not", "paren", "pid", "qid", "term", "head", "rterm",
+ "pqual", "dqual", "aqual", "ndaqual", "pname", "other", "pfvar",
"p80211", "type", "subtype", "type_subtype", "dir", "reason", "action",
"relop", "irelop", "arth", "narth", "byteop", "pnum", "atmtype",
"atmmultitype", "atmfield", "atmvalue", "atmfieldvalue", "atmlistvalue",
@@ -1046,35 +1066,37 @@
335, 336, 337, 338, 339, 340, 341, 342, 343, 344,
345, 346, 347, 348, 349, 350, 351, 352, 353, 354,
355, 356, 357, 358, 359, 360, 361, 362, 363, 364,
- 365, 366, 367, 33, 124, 38, 43, 45, 42, 47,
- 368, 41, 40, 62, 61, 60, 91, 93, 58
+ 365, 366, 367, 368, 369, 370, 371, 372, 373, 374,
+ 33, 124, 38, 43, 45, 42, 47, 375, 41, 40,
+ 62, 61, 60, 91, 93, 58
};
# endif
/* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */
static const yytype_uint8 yyr1[] =
{
- 0, 129, 130, 130, 131, 132, 132, 132, 132, 132,
- 133, 134, 135, 135, 135, 136, 136, 136, 136, 136,
- 136, 136, 136, 136, 137, 138, 139, 139, 139, 140,
- 140, 141, 141, 142, 142, 142, 142, 142, 142, 143,
- 143, 143, 143, 143, 143, 143, 143, 143, 143, 143,
- 144, 144, 145, 145, 145, 145, 145, 145, 145, 145,
- 145, 145, 145, 145, 146, 146, 146, 146, 147, 148,
- 148, 148, 148, 148, 148, 148, 148, 148, 148, 148,
- 148, 148, 148, 148, 148, 148, 148, 148, 148, 148,
- 148, 148, 148, 148, 148, 148, 148, 148, 148, 148,
- 148, 148, 148, 148, 148, 148, 148, 148, 149, 149,
- 149, 149, 149, 149, 149, 149, 149, 149, 149, 149,
- 149, 149, 149, 150, 150, 150, 150, 150, 150, 151,
- 151, 151, 151, 152, 152, 153, 153, 154, 155, 155,
- 156, 156, 157, 158, 158, 158, 159, 159, 159, 160,
- 160, 161, 161, 161, 161, 161, 161, 161, 161, 161,
- 161, 161, 161, 161, 162, 162, 162, 162, 162, 163,
- 163, 164, 164, 164, 164, 164, 164, 164, 164, 165,
- 165, 165, 165, 166, 166, 167, 167, 167, 167, 168,
- 169, 169, 170, 170, 170, 171, 171, 171, 171, 172,
- 172, 172, 172, 173, 174, 174
+ 0, 136, 137, 137, 138, 139, 139, 139, 139, 139,
+ 140, 141, 142, 142, 142, 143, 143, 143, 143, 143,
+ 143, 143, 143, 143, 144, 145, 146, 146, 146, 147,
+ 147, 148, 148, 149, 149, 149, 149, 149, 149, 150,
+ 150, 150, 150, 150, 150, 150, 150, 150, 150, 150,
+ 151, 151, 152, 152, 152, 152, 152, 152, 152, 152,
+ 152, 152, 152, 152, 153, 153, 153, 153, 154, 155,
+ 155, 155, 155, 155, 155, 155, 155, 155, 155, 155,
+ 155, 155, 155, 155, 155, 155, 155, 155, 155, 155,
+ 155, 155, 155, 155, 155, 155, 155, 155, 155, 155,
+ 155, 155, 155, 155, 155, 155, 155, 155, 156, 156,
+ 156, 156, 156, 156, 156, 156, 156, 156, 156, 156,
+ 156, 156, 156, 156, 157, 157, 157, 157, 157, 157,
+ 158, 158, 158, 158, 159, 159, 160, 160, 161, 162,
+ 162, 163, 163, 164, 165, 165, 165, 166, 166, 166,
+ 167, 167, 168, 168, 168, 168, 168, 168, 168, 168,
+ 168, 168, 168, 168, 168, 169, 169, 169, 169, 169,
+ 170, 170, 171, 171, 171, 171, 171, 171, 171, 171,
+ 172, 172, 172, 172, 173, 173, 174, 174, 174, 174,
+ 175, 176, 176, 177, 177, 177, 177, 177, 177, 178,
+ 178, 178, 178, 178, 178, 178, 178, 179, 179, 179,
+ 179, 180, 181, 181
};
/* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */
@@ -1092,15 +1114,16 @@
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 2, 2,
2, 2, 4, 1, 1, 2, 1, 2, 1, 1,
- 1, 1, 2, 2, 2, 2, 2, 2, 2, 4,
- 2, 2, 2, 1, 1, 1, 1, 1, 1, 1,
+ 2, 1, 1, 2, 2, 2, 2, 2, 2, 2,
+ 4, 2, 2, 2, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 4, 6, 3, 3, 3, 3, 3, 3, 3,
- 3, 2, 3, 1, 1, 1, 1, 1, 1, 1,
- 3, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 2, 2, 3, 1,
+ 1, 1, 4, 6, 3, 3, 3, 3, 3, 3,
+ 3, 3, 2, 3, 1, 1, 1, 1, 1, 1,
1, 3, 1, 1, 1, 1, 1, 1, 1, 1,
- 2, 2, 3, 1, 1, 3
+ 1, 1, 1, 1, 1, 1, 1, 2, 2, 3,
+ 1, 1, 3, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 2, 2,
+ 3, 1, 1, 3
};
/* YYDEFACT[STATE-NAME] -- Default reduction number in state STATE-NUM.
@@ -1110,87 +1133,89 @@
{
4, 0, 51, 1, 0, 0, 0, 71, 72, 70,
73, 74, 75, 76, 77, 78, 79, 80, 81, 82,
- 83, 84, 85, 86, 88, 87, 169, 113, 114, 0,
- 0, 0, 0, 0, 0, 69, 163, 89, 90, 91,
- 92, 116, 118, 119, 120, 93, 94, 103, 95, 96,
- 97, 98, 99, 100, 102, 101, 104, 105, 106, 171,
- 172, 173, 174, 177, 178, 175, 176, 179, 180, 181,
- 182, 183, 184, 107, 192, 193, 194, 195, 196, 197,
- 198, 24, 0, 25, 2, 51, 51, 5, 0, 31,
- 0, 50, 44, 121, 0, 150, 149, 45, 46, 0,
- 48, 0, 110, 111, 0, 123, 124, 125, 126, 140,
- 141, 127, 142, 128, 0, 115, 117, 0, 0, 161,
- 10, 11, 51, 51, 32, 0, 150, 149, 15, 21,
- 18, 20, 22, 39, 12, 0, 0, 13, 53, 52,
- 64, 68, 65, 66, 67, 36, 37, 108, 109, 0,
- 0, 0, 58, 59, 60, 61, 62, 63, 34, 35,
- 38, 122, 0, 144, 146, 148, 0, 0, 0, 0,
- 0, 0, 0, 0, 143, 145, 147, 0, 0, 189,
- 0, 0, 0, 47, 185, 203, 0, 0, 0, 49,
- 199, 165, 164, 167, 168, 166, 0, 0, 0, 7,
- 51, 51, 6, 149, 9, 8, 40, 162, 170, 0,
- 0, 0, 23, 26, 30, 0, 29, 0, 0, 0,
- 0, 133, 134, 130, 137, 131, 138, 139, 132, 33,
- 0, 159, 160, 158, 157, 153, 154, 155, 156, 42,
- 43, 190, 0, 186, 187, 204, 0, 200, 201, 112,
- 149, 17, 16, 19, 14, 0, 0, 57, 55, 56,
- 54, 0, 151, 0, 188, 0, 202, 0, 27, 28,
- 135, 136, 129, 0, 191, 205, 152
+ 83, 84, 85, 86, 88, 87, 170, 113, 114, 0,
+ 0, 0, 0, 0, 0, 69, 164, 89, 90, 91,
+ 92, 116, 118, 119, 121, 93, 94, 103, 95, 96,
+ 97, 98, 99, 100, 102, 101, 104, 105, 106, 172,
+ 173, 174, 175, 178, 179, 176, 177, 180, 181, 182,
+ 183, 184, 185, 107, 193, 194, 195, 196, 197, 198,
+ 199, 200, 201, 202, 203, 204, 205, 206, 24, 0,
+ 25, 2, 51, 51, 5, 0, 31, 0, 50, 44,
+ 122, 0, 151, 150, 45, 46, 0, 48, 0, 110,
+ 111, 0, 124, 125, 126, 127, 141, 142, 128, 143,
+ 129, 0, 115, 117, 120, 0, 0, 162, 10, 11,
+ 51, 51, 32, 0, 151, 150, 15, 21, 18, 20,
+ 22, 39, 12, 0, 0, 13, 53, 52, 64, 68,
+ 65, 66, 67, 36, 37, 108, 109, 0, 0, 0,
+ 58, 59, 60, 61, 62, 63, 34, 35, 38, 123,
+ 0, 145, 147, 149, 0, 0, 0, 0, 0, 0,
+ 0, 0, 144, 146, 148, 0, 0, 190, 0, 0,
+ 0, 47, 186, 211, 0, 0, 0, 49, 207, 166,
+ 165, 168, 169, 167, 0, 0, 0, 7, 51, 51,
+ 6, 150, 9, 8, 40, 163, 171, 0, 0, 0,
+ 23, 26, 30, 0, 29, 0, 0, 0, 0, 134,
+ 135, 131, 138, 132, 139, 140, 133, 33, 0, 160,
+ 161, 159, 158, 154, 155, 156, 157, 42, 43, 191,
+ 0, 187, 188, 212, 0, 208, 209, 112, 150, 17,
+ 16, 19, 14, 0, 0, 57, 55, 56, 54, 0,
+ 152, 0, 189, 0, 210, 0, 27, 28, 136, 137,
+ 130, 0, 192, 213, 153
};
/* YYDEFGOTO[NTERM-NUM]. */
static const yytype_int16 yydefgoto[] =
{
- -1, 1, 2, 125, 122, 123, 212, 134, 135, 117,
- 214, 215, 87, 88, 89, 90, 158, 159, 160, 118,
- 92, 93, 161, 223, 272, 225, 228, 111, 113, 177,
- 178, 94, 95, 196, 96, 97, 98, 99, 183, 184,
- 242, 100, 101, 189, 190, 246
+ -1, 1, 2, 133, 130, 131, 220, 142, 143, 125,
+ 222, 223, 94, 95, 96, 97, 166, 167, 168, 126,
+ 99, 100, 169, 231, 280, 233, 236, 118, 120, 185,
+ 186, 101, 102, 204, 103, 104, 105, 106, 191, 192,
+ 250, 107, 108, 197, 198, 254
};
/* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
STATE-NUM. */
-#define YYPACT_NINF -193
+#define YYPACT_NINF -208
static const yytype_int16 yypact[] =
{
- -193, 25, 218, -193, -6, 15, 44, -193, -193, -193,
- -193, -193, -193, -193, -193, -193, -193, -193, -193, -193,
- -193, -193, -193, -193, -193, -193, -193, -193, -193, 18,
- 37, 74, 76, -22, 59, -193, -193, -193, -193, -193,
- -193, -20, -20, -193, -193, -193, -193, -193, -193, -193,
- -193, -193, -193, -193, -193, -193, -193, -193, -193, -193,
- -193, -193, -193, -193, -193, -193, -193, -193, -193, -193,
- -193, -193, -193, -193, -193, -193, -193, -193, -193, -193,
- -193, -193, 541, -193, -55, 434, 434, -193, -15, -193,
- 646, 11, -193, -193, 523, -193, -193, -193, -193, 48,
- -193, 52, -193, -193, -95, -193, -193, -193, -193, -193,
- -193, -193, -193, -193, -20, -193, -193, 541, -1, -193,
- -193, -193, 326, 326, -193, -53, 17, 28, -193, -193,
- -3, 34, -193, -193, -193, -15, -15, -193, -39, 36,
- -193, -193, -193, -193, -193, -193, -193, -193, -193, -21,
- 77, -16, -193, -193, -193, -193, -193, -193, 147, -193,
- -193, -193, 541, -193, -193, -193, 541, 541, 541, 541,
- 541, 541, 541, 541, -193, -193, -193, 541, 541, -193,
- 118, 125, 126, -193, -193, -193, 127, 130, 149, -193,
- -193, -193, -193, -193, -193, -193, 150, 28, 96, -193,
- 326, 326, -193, 3, -193, -193, -193, -193, -193, 128,
- 151, 153, -193, -193, 70, -55, 28, 188, 189, 191,
- 192, -193, -193, 154, -193, -193, -193, -193, -193, -193,
- -52, 66, 66, 152, 62, 40, 40, -193, -193, 96,
- 96, -193, -43, -193, -193, -193, -41, -193, -193, -193,
- -51, -193, -193, -193, -193, -15, -15, -193, -193, -193,
- -193, -10, -193, 159, -193, 118, -193, 127, -193, -193,
- -193, -193, -193, 73, -193, -193, -193
+ -208, 20, 226, -208, -10, -3, 1, -208, -208, -208,
+ -208, -208, -208, -208, -208, -208, -208, -208, -208, -208,
+ -208, -208, -208, -208, -208, -208, -208, -208, -208, -28,
+ -15, 49, 68, -18, 62, -208, -208, -208, -208, -208,
+ -208, -26, -26, -208, -26, -208, -208, -208, -208, -208,
+ -208, -208, -208, -208, -208, -208, -208, -208, -208, -208,
+ -208, -208, -208, -208, -208, -208, -208, -208, -208, -208,
+ -208, -208, -208, -208, -208, -208, -208, -208, -208, -208,
+ -208, -208, -208, -208, -208, -208, -208, -208, -208, 570,
+ -208, -42, 456, 456, -208, 19, -208, 656, 12, -208,
+ -208, 153, -208, -208, -208, -208, 55, -208, 59, -208,
+ -208, -69, -208, -208, -208, -208, -208, -208, -208, -208,
+ -208, -26, -208, -208, -208, 570, -19, -208, -208, -208,
+ 341, 341, -208, -93, -1, 21, -208, -208, -6, 34,
+ -208, -208, -208, 19, 19, -208, -9, 6, -208, -208,
+ -208, -208, -208, -208, -208, -208, -208, -14, 74, -13,
+ -208, -208, -208, -208, -208, -208, 23, -208, -208, -208,
+ 570, -208, -208, -208, 570, 570, 570, 570, 570, 570,
+ 570, 570, -208, -208, -208, 570, 570, -208, 81, 134,
+ 139, -208, -208, -208, 140, 141, 142, -208, -208, -208,
+ -208, -208, -208, -208, 143, 21, 79, -208, 341, 341,
+ -208, 4, -208, -208, -208, -208, -208, 86, 144, 145,
+ -208, -208, 64, -42, 21, 179, 189, 191, 192, -208,
+ -208, 149, -208, -208, -208, -208, -208, -208, -51, 42,
+ 42, 99, 110, 33, 33, -208, -208, 79, 79, -208,
+ -61, -208, -208, -208, -59, -208, -208, -208, -64, -208,
+ -208, -208, -208, 19, 19, -208, -208, -208, -208, -8,
+ -208, 160, -208, 81, -208, 140, -208, -208, -208, -208,
+ -208, 65, -208, -208, -208
};
/* YYPGOTO[NTERM-NUM]. */
static const yytype_int16 yypgoto[] =
{
- -193, -193, -193, 195, -13, -192, -87, -127, 6, -2,
- -193, -193, -81, -193, -193, -193, -193, 45, -193, 8,
- -193, -193, -193, -193, -193, -193, -193, -193, -193, -75,
- -67, -27, -84, -193, -35, -193, -193, -193, -193, -162,
- -193, -193, -193, -193, -172, -193
+ -208, -208, -208, 196, -11, -207, -94, -122, 5, -2,
+ -208, -208, -82, -208, -208, -208, -208, 53, -208, 7,
+ -208, -208, -208, -208, -208, -208, -208, -208, -208, -91,
+ -40, -24, -75, -208, -36, -208, -208, -208, -208, -185,
+ -208, -208, -208, -208, -173, -208
};
/* YYTABLE[YYPACT[STATE-NUM]]. What to do in state STATE-NUM. If
@@ -1199,156 +1224,158 @@
#define YYTABLE_NINF -42
static const yytype_int16 yytable[] =
{
- 86, 133, 126, -13, 124, 209, 115, 116, 85, 213,
- 91, -41, 166, 167, 245, 109, 221, 26, 241, 191,
- 192, 226, 26, 256, 181, 3, 187, 270, 193, 194,
- 195, 102, 182, 126, 188, 199, 204, 110, 222, 114,
- 114, 202, 205, 227, 128, 129, 130, 131, 132, 271,
- 265, 127, 103, 137, 267, 119, 120, 121, 120, 121,
- -29, -29, 168, 169, 170, 171, 172, 173, 206, 121,
- 208, 121, 217, 218, 213, 262, 263, 105, 264, 197,
- 266, 104, 127, 86, 86, 179, 136, 203, 203, 185,
- 198, 85, 85, 91, 91, 275, 106, 180, 81, 186,
- 137, 216, 83, 274, 163, 164, 165, 83, 163, 164,
- 165, 107, 114, 108, -13, -13, 210, 126, 112, 124,
- 201, 201, -41, -41, -13, 162, 166, 167, 200, 200,
- 91, 91, -41, 136, 114, 230, 224, 162, 207, 231,
- 232, 233, 234, 235, 236, 237, 238, 219, 220, 208,
- 239, 240, 140, 211, 142, 179, 143, 144, 172, 173,
- 166, 167, 243, 244, 185, 203, 250, 247, 268, 269,
- 83, 174, 175, 176, 83, 174, 175, 176, 170, 171,
- 172, 173, 170, 171, 172, 173, 248, 249, 252, 251,
- 253, 254, 257, 258, 259, 260, 273, 84, 201, 86,
- 276, 261, 255, 229, 0, 0, 200, 200, 91, 91,
- 168, 169, 170, 171, 172, 173, 166, 167, -3, 0,
- 137, 137, 0, 0, 0, 0, 0, 0, 0, 4,
- 5, 0, 0, 6, 7, 8, 9, 10, 11, 12,
- 13, 14, 15, 16, 17, 18, 19, 20, 21, 22,
- 23, 24, 25, 136, 136, 26, 27, 28, 29, 30,
- 31, 32, 33, 34, 0, 0, 0, 169, 170, 171,
- 172, 173, 0, 35, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 36, 37, 38, 39, 40, 41,
- 42, 43, 44, 45, 46, 47, 48, 49, 50, 51,
- 52, 53, 54, 55, 56, 57, 58, 59, 60, 61,
- 62, 63, 64, 65, 66, 67, 68, 69, 70, 71,
- 72, 73, 74, 75, 76, 77, 78, 79, 80, 0,
- 0, 81, 0, 0, 0, 82, 0, 4, 5, 0,
- 83, 6, 7, 8, 9, 10, 11, 12, 13, 14,
+ 93, 141, 217, 249, -13, 122, 123, 92, 124, 98,
+ 132, 26, -41, 174, 175, 189, 264, 195, 134, 116,
+ 3, 253, 221, 229, 234, 128, 129, 109, 148, 278,
+ 150, 112, 151, 152, 110, 214, 207, 212, 111, 121,
+ 121, 117, 121, 273, 113, 230, 235, 275, 210, 213,
+ 134, 279, 199, 200, -29, -29, 26, 135, 129, 145,
+ 129, 201, 202, 203, 216, 127, 190, 272, 196, 274,
+ 176, 177, 178, 179, 180, 181, 128, 129, 136, 137,
+ 138, 139, 140, 270, 271, 205, 114, 221, 282, 135,
+ 93, 93, 187, 144, 211, 211, 193, 92, 92, 98,
+ 98, 206, 283, 90, 188, 115, 194, 145, 224, 225,
+ 226, 171, 172, 173, 170, 171, 172, 173, 187, 121,
+ 218, 119, -13, -13, 227, 228, 132, 215, 209, 209,
+ -41, -41, -13, 232, 134, 208, 208, 98, 98, 88,
+ -41, 144, 121, 174, 175, 170, 238, 259, 90, 216,
+ 239, 240, 241, 242, 243, 244, 245, 246, 180, 181,
+ 219, 247, 248, 174, 175, 178, 179, 180, 181, 276,
+ 277, 251, 211, 258, 174, 175, 252, 193, 255, 256,
+ 257, 260, 261, 265, 90, 182, 183, 184, 90, 182,
+ 183, 184, 262, 266, 267, 268, 269, 281, 91, 284,
+ 176, 177, 178, 179, 180, 181, 209, 93, 0, 171,
+ 172, 173, 263, 208, 208, 98, 98, 174, 175, 237,
+ 0, 177, 178, 179, 180, 181, -3, 145, 145, 0,
+ 0, 0, 0, 178, 179, 180, 181, 4, 5, 0,
+ 0, 6, 7, 8, 9, 10, 11, 12, 13, 14,
15, 16, 17, 18, 19, 20, 21, 22, 23, 24,
- 25, 0, 0, 26, 27, 28, 29, 30, 31, 32,
- 33, 34, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 35, 0, 0, 0, 128, 129, 130, 131, 132,
+ 25, 144, 144, 26, 27, 28, 29, 30, 31, 32,
+ 33, 34, 0, 0, 176, 177, 178, 179, 180, 181,
+ 0, 35, 0, 182, 183, 184, 0, 0, 0, 0,
0, 0, 36, 37, 38, 39, 40, 41, 42, 43,
44, 45, 46, 47, 48, 49, 50, 51, 52, 53,
54, 55, 56, 57, 58, 59, 60, 61, 62, 63,
64, 65, 66, 67, 68, 69, 70, 71, 72, 73,
- 74, 75, 76, 77, 78, 79, 80, 0, 0, 81,
- 0, 0, 0, 82, 0, 4, 5, 0, 83, 6,
- 7, 8, 9, 10, 11, 12, 13, 14, 15, 16,
- 17, 18, 19, 20, 21, 22, 23, 24, 25, 0,
- 0, 26, 27, 28, 29, 30, 31, 32, 33, 34,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 35,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 36, 37, 38, 39, 40, 41, 42, 43, 44, 45,
- 46, 47, 48, 49, 50, 51, 52, 53, 54, 55,
- 56, 57, 58, 59, 60, 61, 62, 63, 64, 65,
- 66, 67, 68, 69, 70, 71, 72, 73, 74, 75,
- 76, 77, 78, 79, 80, 0, 0, 81, 0, 0,
- 0, 82, 0, 0, 0, 0, 83, 7, 8, 9,
+ 74, 75, 76, 77, 78, 79, 80, 81, 82, 83,
+ 84, 85, 86, 87, 0, 0, 88, 0, 0, 0,
+ 89, 0, 4, 5, 0, 90, 6, 7, 8, 9,
10, 11, 12, 13, 14, 15, 16, 17, 18, 19,
- 20, 21, 22, 23, 24, 25, 0, 0, 26, 163,
- 164, 165, 0, 0, 0, 0, 0, 166, 167, 0,
+ 20, 21, 22, 23, 24, 25, 0, 0, 26, 27,
+ 28, 29, 30, 31, 32, 33, 34, 0, 0, 0,
0, 0, 0, 0, 0, 0, 35, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 36, 37, 38,
- 39, 40, 0, 0, 0, 0, 45, 46, 47, 48,
+ 136, 137, 138, 139, 140, 0, 0, 36, 37, 38,
+ 39, 40, 41, 42, 43, 44, 45, 46, 47, 48,
49, 50, 51, 52, 53, 54, 55, 56, 57, 58,
- 0, 0, 0, 0, 0, 0, 0, 168, 169, 170,
- 171, 172, 173, 0, 73, 0, 174, 175, 176, 138,
- 139, 140, 141, 142, 0, 143, 144, 0, 82, 145,
- 146, 0, 0, 83, 0, 0, 0, 0, 0, 0,
+ 59, 60, 61, 62, 63, 64, 65, 66, 67, 68,
+ 69, 70, 71, 72, 73, 74, 75, 76, 77, 78,
+ 79, 80, 81, 82, 83, 84, 85, 86, 87, 0,
+ 0, 88, 0, 0, 0, 89, 0, 4, 5, 0,
+ 90, 6, 7, 8, 9, 10, 11, 12, 13, 14,
+ 15, 16, 17, 18, 19, 20, 21, 22, 23, 24,
+ 25, 0, 0, 26, 27, 28, 29, 30, 31, 32,
+ 33, 34, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 35, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 36, 37, 38, 39, 40, 41, 42, 43,
+ 44, 45, 46, 47, 48, 49, 50, 51, 52, 53,
+ 54, 55, 56, 57, 58, 59, 60, 61, 62, 63,
+ 64, 65, 66, 67, 68, 69, 70, 71, 72, 73,
+ 74, 75, 76, 77, 78, 79, 80, 81, 82, 83,
+ 84, 85, 86, 87, 0, 0, 88, 0, 0, 0,
+ 89, 0, 0, 0, 0, 90, 7, 8, 9, 10,
+ 11, 12, 13, 14, 15, 16, 17, 18, 19, 20,
+ 21, 22, 23, 24, 25, 0, 0, 26, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 147, 148, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 149, 150, 151, 152, 153, 154, 155, 156,
- 157
+ 0, 0, 0, 0, 0, 35, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 36, 37, 38, 39,
+ 40, 0, 0, 0, 0, 45, 46, 47, 48, 49,
+ 50, 51, 52, 53, 54, 55, 56, 57, 58, 146,
+ 147, 148, 149, 150, 0, 151, 152, 0, 0, 153,
+ 154, 0, 0, 73, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 155, 156, 0, 89, 0, 0, 0, 0, 90,
+ 0, 0, 157, 158, 159, 160, 161, 162, 163, 164,
+ 165
};
#define yypact_value_is_default(yystate) \
- ((yystate) == (-193))
+ ((yystate) == (-208))
#define yytable_value_is_error(yytable_value) \
YYID (0)
static const yytype_int16 yycheck[] =
{
- 2, 88, 86, 0, 85, 8, 41, 42, 2, 136,
- 2, 0, 64, 65, 186, 37, 37, 37, 180, 114,
- 115, 37, 37, 215, 99, 0, 101, 37, 123, 124,
- 125, 37, 99, 117, 101, 122, 123, 59, 59, 41,
- 42, 122, 123, 59, 59, 60, 61, 62, 63, 59,
- 242, 86, 37, 88, 246, 82, 111, 112, 111, 112,
- 111, 112, 114, 115, 116, 117, 118, 119, 121, 112,
- 121, 112, 111, 112, 201, 127, 128, 59, 121, 114,
- 121, 37, 117, 85, 86, 37, 88, 122, 123, 37,
- 117, 85, 86, 85, 86, 267, 59, 99, 113, 101,
- 135, 136, 122, 265, 56, 57, 58, 122, 56, 57,
- 58, 37, 114, 37, 111, 112, 119, 201, 59, 200,
- 122, 123, 111, 112, 121, 126, 64, 65, 122, 123,
- 122, 123, 121, 135, 136, 162, 59, 126, 121, 166,
- 167, 168, 169, 170, 171, 172, 173, 111, 112, 121,
- 177, 178, 5, 119, 7, 37, 9, 10, 118, 119,
- 64, 65, 37, 37, 37, 200, 201, 37, 255, 256,
- 122, 123, 124, 125, 122, 123, 124, 125, 116, 117,
- 118, 119, 116, 117, 118, 119, 37, 37, 37, 61,
- 37, 121, 4, 4, 3, 3, 37, 2, 200, 201,
- 127, 47, 215, 158, -1, -1, 200, 201, 200, 201,
- 114, 115, 116, 117, 118, 119, 64, 65, 0, -1,
- 255, 256, -1, -1, -1, -1, -1, -1, -1, 11,
- 12, -1, -1, 15, 16, 17, 18, 19, 20, 21,
- 22, 23, 24, 25, 26, 27, 28, 29, 30, 31,
- 32, 33, 34, 255, 256, 37, 38, 39, 40, 41,
- 42, 43, 44, 45, -1, -1, -1, 115, 116, 117,
- 118, 119, -1, 55, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, 66, 67, 68, 69, 70, 71,
- 72, 73, 74, 75, 76, 77, 78, 79, 80, 81,
- 82, 83, 84, 85, 86, 87, 88, 89, 90, 91,
- 92, 93, 94, 95, 96, 97, 98, 99, 100, 101,
- 102, 103, 104, 105, 106, 107, 108, 109, 110, -1,
- -1, 113, -1, -1, -1, 117, -1, 11, 12, -1,
- 122, 15, 16, 17, 18, 19, 20, 21, 22, 23,
+ 2, 95, 8, 188, 0, 41, 42, 2, 44, 2,
+ 92, 37, 0, 64, 65, 106, 223, 108, 93, 37,
+ 0, 194, 144, 37, 37, 118, 119, 37, 5, 37,
+ 7, 59, 9, 10, 37, 128, 130, 131, 37, 41,
+ 42, 59, 44, 250, 59, 59, 59, 254, 130, 131,
+ 125, 59, 121, 122, 118, 119, 37, 93, 119, 95,
+ 119, 130, 131, 132, 128, 89, 106, 128, 108, 128,
+ 121, 122, 123, 124, 125, 126, 118, 119, 59, 60,
+ 61, 62, 63, 134, 135, 121, 37, 209, 273, 125,
+ 92, 93, 37, 95, 130, 131, 37, 92, 93, 92,
+ 93, 125, 275, 129, 106, 37, 108, 143, 144, 118,
+ 119, 56, 57, 58, 133, 56, 57, 58, 37, 121,
+ 126, 59, 118, 119, 118, 119, 208, 128, 130, 131,
+ 118, 119, 128, 59, 209, 130, 131, 130, 131, 120,
+ 128, 143, 144, 64, 65, 133, 170, 61, 129, 128,
+ 174, 175, 176, 177, 178, 179, 180, 181, 125, 126,
+ 126, 185, 186, 64, 65, 123, 124, 125, 126, 263,
+ 264, 37, 208, 209, 64, 65, 37, 37, 37, 37,
+ 37, 37, 37, 4, 129, 130, 131, 132, 129, 130,
+ 131, 132, 128, 4, 3, 3, 47, 37, 2, 134,
+ 121, 122, 123, 124, 125, 126, 208, 209, -1, 56,
+ 57, 58, 223, 208, 209, 208, 209, 64, 65, 166,
+ -1, 122, 123, 124, 125, 126, 0, 263, 264, -1,
+ -1, -1, -1, 123, 124, 125, 126, 11, 12, -1,
+ -1, 15, 16, 17, 18, 19, 20, 21, 22, 23,
24, 25, 26, 27, 28, 29, 30, 31, 32, 33,
- 34, -1, -1, 37, 38, 39, 40, 41, 42, 43,
- 44, 45, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, 55, -1, -1, -1, 59, 60, 61, 62, 63,
+ 34, 263, 264, 37, 38, 39, 40, 41, 42, 43,
+ 44, 45, -1, -1, 121, 122, 123, 124, 125, 126,
+ -1, 55, -1, 130, 131, 132, -1, -1, -1, -1,
-1, -1, 66, 67, 68, 69, 70, 71, 72, 73,
74, 75, 76, 77, 78, 79, 80, 81, 82, 83,
84, 85, 86, 87, 88, 89, 90, 91, 92, 93,
94, 95, 96, 97, 98, 99, 100, 101, 102, 103,
- 104, 105, 106, 107, 108, 109, 110, -1, -1, 113,
- -1, -1, -1, 117, -1, 11, 12, -1, 122, 15,
- 16, 17, 18, 19, 20, 21, 22, 23, 24, 25,
- 26, 27, 28, 29, 30, 31, 32, 33, 34, -1,
- -1, 37, 38, 39, 40, 41, 42, 43, 44, 45,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, 55,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- 66, 67, 68, 69, 70, 71, 72, 73, 74, 75,
- 76, 77, 78, 79, 80, 81, 82, 83, 84, 85,
- 86, 87, 88, 89, 90, 91, 92, 93, 94, 95,
- 96, 97, 98, 99, 100, 101, 102, 103, 104, 105,
- 106, 107, 108, 109, 110, -1, -1, 113, -1, -1,
- -1, 117, -1, -1, -1, -1, 122, 16, 17, 18,
+ 104, 105, 106, 107, 108, 109, 110, 111, 112, 113,
+ 114, 115, 116, 117, -1, -1, 120, -1, -1, -1,
+ 124, -1, 11, 12, -1, 129, 15, 16, 17, 18,
19, 20, 21, 22, 23, 24, 25, 26, 27, 28,
- 29, 30, 31, 32, 33, 34, -1, -1, 37, 56,
- 57, 58, -1, -1, -1, -1, -1, 64, 65, -1,
+ 29, 30, 31, 32, 33, 34, -1, -1, 37, 38,
+ 39, 40, 41, 42, 43, 44, 45, -1, -1, -1,
-1, -1, -1, -1, -1, -1, 55, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, 66, 67, 68,
- 69, 70, -1, -1, -1, -1, 75, 76, 77, 78,
+ 59, 60, 61, 62, 63, -1, -1, 66, 67, 68,
+ 69, 70, 71, 72, 73, 74, 75, 76, 77, 78,
79, 80, 81, 82, 83, 84, 85, 86, 87, 88,
- -1, -1, -1, -1, -1, -1, -1, 114, 115, 116,
- 117, 118, 119, -1, 103, -1, 123, 124, 125, 3,
- 4, 5, 6, 7, -1, 9, 10, -1, 117, 13,
- 14, -1, -1, 122, -1, -1, -1, -1, -1, -1,
+ 89, 90, 91, 92, 93, 94, 95, 96, 97, 98,
+ 99, 100, 101, 102, 103, 104, 105, 106, 107, 108,
+ 109, 110, 111, 112, 113, 114, 115, 116, 117, -1,
+ -1, 120, -1, -1, -1, 124, -1, 11, 12, -1,
+ 129, 15, 16, 17, 18, 19, 20, 21, 22, 23,
+ 24, 25, 26, 27, 28, 29, 30, 31, 32, 33,
+ 34, -1, -1, 37, 38, 39, 40, 41, 42, 43,
+ 44, 45, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 55, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 66, 67, 68, 69, 70, 71, 72, 73,
+ 74, 75, 76, 77, 78, 79, 80, 81, 82, 83,
+ 84, 85, 86, 87, 88, 89, 90, 91, 92, 93,
+ 94, 95, 96, 97, 98, 99, 100, 101, 102, 103,
+ 104, 105, 106, 107, 108, 109, 110, 111, 112, 113,
+ 114, 115, 116, 117, -1, -1, 120, -1, -1, -1,
+ 124, -1, -1, -1, -1, 129, 16, 17, 18, 19,
+ 20, 21, 22, 23, 24, 25, 26, 27, 28, 29,
+ 30, 31, 32, 33, 34, -1, -1, 37, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, 35, 36, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 55, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 66, 67, 68, 69,
+ 70, -1, -1, -1, -1, 75, 76, 77, 78, 79,
+ 80, 81, 82, 83, 84, 85, 86, 87, 88, 3,
+ 4, 5, 6, 7, -1, 9, 10, -1, -1, 13,
+ 14, -1, -1, 103, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 35, 36, -1, 124, -1, -1, -1, -1, 129,
-1, -1, 46, 47, 48, 49, 50, 51, 52, 53,
54
};
@@ -1357,7 +1384,7 @@
symbol of state STATE-NUM. */
static const yytype_uint8 yystos[] =
{
- 0, 130, 131, 0, 11, 12, 15, 16, 17, 18,
+ 0, 137, 138, 0, 11, 12, 15, 16, 17, 18,
19, 20, 21, 22, 23, 24, 25, 26, 27, 28,
29, 30, 31, 32, 33, 34, 37, 38, 39, 40,
41, 42, 43, 44, 45, 55, 66, 67, 68, 69,
@@ -1365,26 +1392,27 @@
80, 81, 82, 83, 84, 85, 86, 87, 88, 89,
90, 91, 92, 93, 94, 95, 96, 97, 98, 99,
100, 101, 102, 103, 104, 105, 106, 107, 108, 109,
- 110, 113, 117, 122, 132, 137, 138, 141, 142, 143,
- 144, 148, 149, 150, 160, 161, 163, 164, 165, 166,
- 170, 171, 37, 37, 37, 59, 59, 37, 37, 37,
- 59, 156, 59, 157, 138, 163, 163, 138, 148, 160,
- 111, 112, 133, 134, 141, 132, 161, 163, 59, 60,
- 61, 62, 63, 135, 136, 137, 138, 163, 3, 4,
- 5, 6, 7, 9, 10, 13, 14, 35, 36, 46,
- 47, 48, 49, 50, 51, 52, 53, 54, 145, 146,
- 147, 151, 126, 56, 57, 58, 64, 65, 114, 115,
- 116, 117, 118, 119, 123, 124, 125, 158, 159, 37,
- 138, 158, 159, 167, 168, 37, 138, 158, 159, 172,
- 173, 114, 115, 123, 124, 125, 162, 163, 160, 135,
- 137, 138, 141, 163, 135, 141, 121, 121, 121, 8,
- 119, 119, 135, 136, 139, 140, 163, 111, 112, 111,
- 112, 37, 59, 152, 59, 154, 37, 59, 155, 146,
- 160, 160, 160, 160, 160, 160, 160, 160, 160, 160,
- 160, 168, 169, 37, 37, 173, 174, 37, 37, 37,
- 163, 61, 37, 37, 121, 133, 134, 4, 4, 3,
- 3, 47, 127, 128, 121, 134, 121, 134, 135, 135,
- 37, 59, 153, 37, 168, 173, 127
+ 110, 111, 112, 113, 114, 115, 116, 117, 120, 124,
+ 129, 139, 144, 145, 148, 149, 150, 151, 155, 156,
+ 157, 167, 168, 170, 171, 172, 173, 177, 178, 37,
+ 37, 37, 59, 59, 37, 37, 37, 59, 163, 59,
+ 164, 145, 170, 170, 170, 145, 155, 167, 118, 119,
+ 140, 141, 148, 139, 168, 170, 59, 60, 61, 62,
+ 63, 142, 143, 144, 145, 170, 3, 4, 5, 6,
+ 7, 9, 10, 13, 14, 35, 36, 46, 47, 48,
+ 49, 50, 51, 52, 53, 54, 152, 153, 154, 158,
+ 133, 56, 57, 58, 64, 65, 121, 122, 123, 124,
+ 125, 126, 130, 131, 132, 165, 166, 37, 145, 165,
+ 166, 174, 175, 37, 145, 165, 166, 179, 180, 121,
+ 122, 130, 131, 132, 169, 170, 167, 142, 144, 145,
+ 148, 170, 142, 148, 128, 128, 128, 8, 126, 126,
+ 142, 143, 146, 147, 170, 118, 119, 118, 119, 37,
+ 59, 159, 59, 161, 37, 59, 162, 153, 167, 167,
+ 167, 167, 167, 167, 167, 167, 167, 167, 167, 175,
+ 176, 37, 37, 180, 181, 37, 37, 37, 170, 61,
+ 37, 37, 128, 140, 141, 4, 4, 3, 3, 47,
+ 134, 135, 128, 141, 128, 141, 142, 142, 37, 59,
+ 160, 37, 175, 180, 134
};
#define yyerrok (yyerrstatus = 0)
@@ -2221,7 +2249,7 @@
case 2:
/* Line 1806 of yacc.c */
-#line 316 "grammar.y"
+#line 317 "grammar.y"
{
finish_parse((yyvsp[(2) - (2)].blk).b);
}
@@ -2230,56 +2258,56 @@
case 4:
/* Line 1806 of yacc.c */
-#line 321 "grammar.y"
+#line 322 "grammar.y"
{ (yyval.blk).q = qerr; }
break;
case 6:
/* Line 1806 of yacc.c */
-#line 324 "grammar.y"
+#line 325 "grammar.y"
{ gen_and((yyvsp[(1) - (3)].blk).b, (yyvsp[(3) - (3)].blk).b); (yyval.blk) = (yyvsp[(3) - (3)].blk); }
break;
case 7:
/* Line 1806 of yacc.c */
-#line 325 "grammar.y"
+#line 326 "grammar.y"
{ gen_and((yyvsp[(1) - (3)].blk).b, (yyvsp[(3) - (3)].blk).b); (yyval.blk) = (yyvsp[(3) - (3)].blk); }
break;
case 8:
/* Line 1806 of yacc.c */
-#line 326 "grammar.y"
+#line 327 "grammar.y"
{ gen_or((yyvsp[(1) - (3)].blk).b, (yyvsp[(3) - (3)].blk).b); (yyval.blk) = (yyvsp[(3) - (3)].blk); }
break;
case 9:
/* Line 1806 of yacc.c */
-#line 327 "grammar.y"
+#line 328 "grammar.y"
{ gen_or((yyvsp[(1) - (3)].blk).b, (yyvsp[(3) - (3)].blk).b); (yyval.blk) = (yyvsp[(3) - (3)].blk); }
break;
case 10:
/* Line 1806 of yacc.c */
-#line 329 "grammar.y"
+#line 330 "grammar.y"
{ (yyval.blk) = (yyvsp[(0) - (1)].blk); }
break;
case 11:
/* Line 1806 of yacc.c */
-#line 331 "grammar.y"
+#line 332 "grammar.y"
{ (yyval.blk) = (yyvsp[(0) - (1)].blk); }
break;
case 13:
/* Line 1806 of yacc.c */
-#line 334 "grammar.y"
+#line 335 "grammar.y"
{ (yyval.blk).b = gen_ncode(NULL, (bpf_u_int32)(yyvsp[(1) - (1)].i),
(yyval.blk).q = (yyvsp[(0) - (1)].blk).q); }
break;
@@ -2287,21 +2315,21 @@
case 14:
/* Line 1806 of yacc.c */
-#line 336 "grammar.y"
+#line 337 "grammar.y"
{ (yyval.blk) = (yyvsp[(2) - (3)].blk); }
break;
case 15:
/* Line 1806 of yacc.c */
-#line 338 "grammar.y"
+#line 339 "grammar.y"
{ (yyval.blk).b = gen_scode((yyvsp[(1) - (1)].s), (yyval.blk).q = (yyvsp[(0) - (1)].blk).q); }
break;
case 16:
/* Line 1806 of yacc.c */
-#line 339 "grammar.y"
+#line 340 "grammar.y"
{ (yyval.blk).b = gen_mcode((yyvsp[(1) - (3)].s), NULL, (yyvsp[(3) - (3)].i),
(yyval.blk).q = (yyvsp[(0) - (3)].blk).q); }
break;
@@ -2309,7 +2337,7 @@
case 17:
/* Line 1806 of yacc.c */
-#line 341 "grammar.y"
+#line 342 "grammar.y"
{ (yyval.blk).b = gen_mcode((yyvsp[(1) - (3)].s), (yyvsp[(3) - (3)].s), 0,
(yyval.blk).q = (yyvsp[(0) - (3)].blk).q); }
break;
@@ -2317,7 +2345,7 @@
case 18:
/* Line 1806 of yacc.c */
-#line 343 "grammar.y"
+#line 344 "grammar.y"
{
/* Decide how to parse HID based on proto */
(yyval.blk).q = (yyvsp[(0) - (1)].blk).q;
@@ -2336,7 +2364,7 @@
case 19:
/* Line 1806 of yacc.c */
-#line 356 "grammar.y"
+#line 357 "grammar.y"
{
#ifdef INET6
(yyval.blk).b = gen_mcode6((yyvsp[(1) - (3)].s), NULL, (yyvsp[(3) - (3)].i),
@@ -2351,7 +2379,7 @@
case 20:
/* Line 1806 of yacc.c */
-#line 365 "grammar.y"
+#line 366 "grammar.y"
{
#ifdef INET6
(yyval.blk).b = gen_mcode6((yyvsp[(1) - (1)].s), 0, 128,
@@ -2366,7 +2394,7 @@
case 21:
/* Line 1806 of yacc.c */
-#line 374 "grammar.y"
+#line 375 "grammar.y"
{
(yyval.blk).b = gen_ecode((yyvsp[(1) - (1)].e), (yyval.blk).q = (yyvsp[(0) - (1)].blk).q);
/*
@@ -2381,7 +2409,7 @@
case 22:
/* Line 1806 of yacc.c */
-#line 383 "grammar.y"
+#line 384 "grammar.y"
{
(yyval.blk).b = gen_acode((yyvsp[(1) - (1)].e), (yyval.blk).q = (yyvsp[(0) - (1)].blk).q);
/*
@@ -2396,42 +2424,42 @@
case 23:
/* Line 1806 of yacc.c */
-#line 392 "grammar.y"
+#line 393 "grammar.y"
{ gen_not((yyvsp[(2) - (2)].blk).b); (yyval.blk) = (yyvsp[(2) - (2)].blk); }
break;
case 24:
/* Line 1806 of yacc.c */
-#line 394 "grammar.y"
+#line 395 "grammar.y"
{ (yyval.blk) = (yyvsp[(0) - (1)].blk); }
break;
case 25:
/* Line 1806 of yacc.c */
-#line 396 "grammar.y"
+#line 397 "grammar.y"
{ (yyval.blk) = (yyvsp[(0) - (1)].blk); }
break;
case 27:
/* Line 1806 of yacc.c */
-#line 399 "grammar.y"
+#line 400 "grammar.y"
{ gen_and((yyvsp[(1) - (3)].blk).b, (yyvsp[(3) - (3)].blk).b); (yyval.blk) = (yyvsp[(3) - (3)].blk); }
break;
case 28:
/* Line 1806 of yacc.c */
-#line 400 "grammar.y"
+#line 401 "grammar.y"
{ gen_or((yyvsp[(1) - (3)].blk).b, (yyvsp[(3) - (3)].blk).b); (yyval.blk) = (yyvsp[(3) - (3)].blk); }
break;
case 29:
/* Line 1806 of yacc.c */
-#line 402 "grammar.y"
+#line 403 "grammar.y"
{ (yyval.blk).b = gen_ncode(NULL, (bpf_u_int32)(yyvsp[(1) - (1)].i),
(yyval.blk).q = (yyvsp[(0) - (1)].blk).q); }
break;
@@ -2439,77 +2467,77 @@
case 32:
/* Line 1806 of yacc.c */
-#line 407 "grammar.y"
+#line 408 "grammar.y"
{ gen_not((yyvsp[(2) - (2)].blk).b); (yyval.blk) = (yyvsp[(2) - (2)].blk); }
break;
case 33:
/* Line 1806 of yacc.c */
-#line 409 "grammar.y"
+#line 410 "grammar.y"
{ QSET((yyval.blk).q, (yyvsp[(1) - (3)].i), (yyvsp[(2) - (3)].i), (yyvsp[(3) - (3)].i)); }
break;
case 34:
/* Line 1806 of yacc.c */
-#line 410 "grammar.y"
+#line 411 "grammar.y"
{ QSET((yyval.blk).q, (yyvsp[(1) - (2)].i), (yyvsp[(2) - (2)].i), Q_DEFAULT); }
break;
case 35:
/* Line 1806 of yacc.c */
-#line 411 "grammar.y"
+#line 412 "grammar.y"
{ QSET((yyval.blk).q, (yyvsp[(1) - (2)].i), Q_DEFAULT, (yyvsp[(2) - (2)].i)); }
break;
case 36:
/* Line 1806 of yacc.c */
-#line 412 "grammar.y"
+#line 413 "grammar.y"
{ QSET((yyval.blk).q, (yyvsp[(1) - (2)].i), Q_DEFAULT, Q_PROTO); }
break;
case 37:
/* Line 1806 of yacc.c */
-#line 413 "grammar.y"
+#line 414 "grammar.y"
{ QSET((yyval.blk).q, (yyvsp[(1) - (2)].i), Q_DEFAULT, Q_PROTOCHAIN); }
break;
case 38:
/* Line 1806 of yacc.c */
-#line 414 "grammar.y"
+#line 415 "grammar.y"
{ QSET((yyval.blk).q, (yyvsp[(1) - (2)].i), Q_DEFAULT, (yyvsp[(2) - (2)].i)); }
break;
case 39:
/* Line 1806 of yacc.c */
-#line 416 "grammar.y"
+#line 417 "grammar.y"
{ (yyval.blk) = (yyvsp[(2) - (2)].blk); }
break;
case 40:
/* Line 1806 of yacc.c */
-#line 417 "grammar.y"
+#line 418 "grammar.y"
{ (yyval.blk).b = (yyvsp[(2) - (3)].blk).b; (yyval.blk).q = (yyvsp[(1) - (3)].blk).q; }
break;
case 41:
/* Line 1806 of yacc.c */
-#line 418 "grammar.y"
+#line 419 "grammar.y"
{ (yyval.blk).b = gen_proto_abbrev((yyvsp[(1) - (1)].i)); (yyval.blk).q = qerr; }
break;
case 42:
/* Line 1806 of yacc.c */
-#line 419 "grammar.y"
+#line 420 "grammar.y"
{ (yyval.blk).b = gen_relation((yyvsp[(2) - (3)].i), (yyvsp[(1) - (3)].a), (yyvsp[(3) - (3)].a), 0);
(yyval.blk).q = qerr; }
break;
@@ -2517,7 +2545,7 @@
case 43:
/* Line 1806 of yacc.c */
-#line 421 "grammar.y"
+#line 422 "grammar.y"
{ (yyval.blk).b = gen_relation((yyvsp[(2) - (3)].i), (yyvsp[(1) - (3)].a), (yyvsp[(3) - (3)].a), 1);
(yyval.blk).q = qerr; }
break;
@@ -2525,641 +2553,648 @@
case 44:
/* Line 1806 of yacc.c */
-#line 423 "grammar.y"
+#line 424 "grammar.y"
{ (yyval.blk).b = (yyvsp[(1) - (1)].rblk); (yyval.blk).q = qerr; }
break;
case 45:
/* Line 1806 of yacc.c */
-#line 424 "grammar.y"
+#line 425 "grammar.y"
{ (yyval.blk).b = gen_atmtype_abbrev((yyvsp[(1) - (1)].i)); (yyval.blk).q = qerr; }
break;
case 46:
/* Line 1806 of yacc.c */
-#line 425 "grammar.y"
+#line 426 "grammar.y"
{ (yyval.blk).b = gen_atmmulti_abbrev((yyvsp[(1) - (1)].i)); (yyval.blk).q = qerr; }
break;
case 47:
/* Line 1806 of yacc.c */
-#line 426 "grammar.y"
+#line 427 "grammar.y"
{ (yyval.blk).b = (yyvsp[(2) - (2)].blk).b; (yyval.blk).q = qerr; }
break;
case 48:
/* Line 1806 of yacc.c */
-#line 427 "grammar.y"
+#line 428 "grammar.y"
{ (yyval.blk).b = gen_mtp2type_abbrev((yyvsp[(1) - (1)].i)); (yyval.blk).q = qerr; }
break;
case 49:
/* Line 1806 of yacc.c */
-#line 428 "grammar.y"
+#line 429 "grammar.y"
{ (yyval.blk).b = (yyvsp[(2) - (2)].blk).b; (yyval.blk).q = qerr; }
break;
case 51:
/* Line 1806 of yacc.c */
-#line 432 "grammar.y"
+#line 433 "grammar.y"
{ (yyval.i) = Q_DEFAULT; }
break;
case 52:
/* Line 1806 of yacc.c */
-#line 435 "grammar.y"
+#line 436 "grammar.y"
{ (yyval.i) = Q_SRC; }
break;
case 53:
/* Line 1806 of yacc.c */
-#line 436 "grammar.y"
+#line 437 "grammar.y"
{ (yyval.i) = Q_DST; }
break;
case 54:
/* Line 1806 of yacc.c */
-#line 437 "grammar.y"
+#line 438 "grammar.y"
{ (yyval.i) = Q_OR; }
break;
case 55:
/* Line 1806 of yacc.c */
-#line 438 "grammar.y"
+#line 439 "grammar.y"
{ (yyval.i) = Q_OR; }
break;
case 56:
/* Line 1806 of yacc.c */
-#line 439 "grammar.y"
+#line 440 "grammar.y"
{ (yyval.i) = Q_AND; }
break;
case 57:
/* Line 1806 of yacc.c */
-#line 440 "grammar.y"
+#line 441 "grammar.y"
{ (yyval.i) = Q_AND; }
break;
case 58:
/* Line 1806 of yacc.c */
-#line 441 "grammar.y"
+#line 442 "grammar.y"
{ (yyval.i) = Q_ADDR1; }
break;
case 59:
/* Line 1806 of yacc.c */
-#line 442 "grammar.y"
+#line 443 "grammar.y"
{ (yyval.i) = Q_ADDR2; }
break;
case 60:
/* Line 1806 of yacc.c */
-#line 443 "grammar.y"
+#line 444 "grammar.y"
{ (yyval.i) = Q_ADDR3; }
break;
case 61:
/* Line 1806 of yacc.c */
-#line 444 "grammar.y"
+#line 445 "grammar.y"
{ (yyval.i) = Q_ADDR4; }
break;
case 62:
/* Line 1806 of yacc.c */
-#line 445 "grammar.y"
+#line 446 "grammar.y"
{ (yyval.i) = Q_RA; }
break;
case 63:
/* Line 1806 of yacc.c */
-#line 446 "grammar.y"
+#line 447 "grammar.y"
{ (yyval.i) = Q_TA; }
break;
case 64:
/* Line 1806 of yacc.c */
-#line 449 "grammar.y"
+#line 450 "grammar.y"
{ (yyval.i) = Q_HOST; }
break;
case 65:
/* Line 1806 of yacc.c */
-#line 450 "grammar.y"
+#line 451 "grammar.y"
{ (yyval.i) = Q_NET; }
break;
case 66:
/* Line 1806 of yacc.c */
-#line 451 "grammar.y"
+#line 452 "grammar.y"
{ (yyval.i) = Q_PORT; }
break;
case 67:
/* Line 1806 of yacc.c */
-#line 452 "grammar.y"
+#line 453 "grammar.y"
{ (yyval.i) = Q_PORTRANGE; }
break;
case 68:
/* Line 1806 of yacc.c */
-#line 455 "grammar.y"
+#line 456 "grammar.y"
{ (yyval.i) = Q_GATEWAY; }
break;
case 69:
/* Line 1806 of yacc.c */
-#line 457 "grammar.y"
+#line 458 "grammar.y"
{ (yyval.i) = Q_LINK; }
break;
case 70:
/* Line 1806 of yacc.c */
-#line 458 "grammar.y"
+#line 459 "grammar.y"
{ (yyval.i) = Q_IP; }
break;
case 71:
/* Line 1806 of yacc.c */
-#line 459 "grammar.y"
+#line 460 "grammar.y"
{ (yyval.i) = Q_ARP; }
break;
case 72:
/* Line 1806 of yacc.c */
-#line 460 "grammar.y"
+#line 461 "grammar.y"
{ (yyval.i) = Q_RARP; }
break;
case 73:
/* Line 1806 of yacc.c */
-#line 461 "grammar.y"
+#line 462 "grammar.y"
{ (yyval.i) = Q_SCTP; }
break;
case 74:
/* Line 1806 of yacc.c */
-#line 462 "grammar.y"
+#line 463 "grammar.y"
{ (yyval.i) = Q_TCP; }
break;
case 75:
/* Line 1806 of yacc.c */
-#line 463 "grammar.y"
+#line 464 "grammar.y"
{ (yyval.i) = Q_UDP; }
break;
case 76:
/* Line 1806 of yacc.c */
-#line 464 "grammar.y"
+#line 465 "grammar.y"
{ (yyval.i) = Q_ICMP; }
break;
case 77:
/* Line 1806 of yacc.c */
-#line 465 "grammar.y"
+#line 466 "grammar.y"
{ (yyval.i) = Q_IGMP; }
break;
case 78:
/* Line 1806 of yacc.c */
-#line 466 "grammar.y"
+#line 467 "grammar.y"
{ (yyval.i) = Q_IGRP; }
break;
case 79:
/* Line 1806 of yacc.c */
-#line 467 "grammar.y"
+#line 468 "grammar.y"
{ (yyval.i) = Q_PIM; }
break;
case 80:
/* Line 1806 of yacc.c */
-#line 468 "grammar.y"
+#line 469 "grammar.y"
{ (yyval.i) = Q_VRRP; }
break;
case 81:
/* Line 1806 of yacc.c */
-#line 469 "grammar.y"
+#line 470 "grammar.y"
{ (yyval.i) = Q_CARP; }
break;
case 82:
/* Line 1806 of yacc.c */
-#line 470 "grammar.y"
+#line 471 "grammar.y"
{ (yyval.i) = Q_ATALK; }
break;
case 83:
/* Line 1806 of yacc.c */
-#line 471 "grammar.y"
+#line 472 "grammar.y"
{ (yyval.i) = Q_AARP; }
break;
case 84:
/* Line 1806 of yacc.c */
-#line 472 "grammar.y"
+#line 473 "grammar.y"
{ (yyval.i) = Q_DECNET; }
break;
case 85:
/* Line 1806 of yacc.c */
-#line 473 "grammar.y"
+#line 474 "grammar.y"
{ (yyval.i) = Q_LAT; }
break;
case 86:
/* Line 1806 of yacc.c */
-#line 474 "grammar.y"
+#line 475 "grammar.y"
{ (yyval.i) = Q_SCA; }
break;
case 87:
/* Line 1806 of yacc.c */
-#line 475 "grammar.y"
+#line 476 "grammar.y"
{ (yyval.i) = Q_MOPDL; }
break;
case 88:
/* Line 1806 of yacc.c */
-#line 476 "grammar.y"
+#line 477 "grammar.y"
{ (yyval.i) = Q_MOPRC; }
break;
case 89:
/* Line 1806 of yacc.c */
-#line 477 "grammar.y"
+#line 478 "grammar.y"
{ (yyval.i) = Q_IPV6; }
break;
case 90:
/* Line 1806 of yacc.c */
-#line 478 "grammar.y"
+#line 479 "grammar.y"
{ (yyval.i) = Q_ICMPV6; }
break;
case 91:
/* Line 1806 of yacc.c */
-#line 479 "grammar.y"
+#line 480 "grammar.y"
{ (yyval.i) = Q_AH; }
break;
case 92:
/* Line 1806 of yacc.c */
-#line 480 "grammar.y"
+#line 481 "grammar.y"
{ (yyval.i) = Q_ESP; }
break;
case 93:
/* Line 1806 of yacc.c */
-#line 481 "grammar.y"
+#line 482 "grammar.y"
{ (yyval.i) = Q_ISO; }
break;
case 94:
/* Line 1806 of yacc.c */
-#line 482 "grammar.y"
+#line 483 "grammar.y"
{ (yyval.i) = Q_ESIS; }
break;
case 95:
/* Line 1806 of yacc.c */
-#line 483 "grammar.y"
+#line 484 "grammar.y"
{ (yyval.i) = Q_ISIS; }
break;
case 96:
/* Line 1806 of yacc.c */
-#line 484 "grammar.y"
+#line 485 "grammar.y"
{ (yyval.i) = Q_ISIS_L1; }
break;
case 97:
/* Line 1806 of yacc.c */
-#line 485 "grammar.y"
+#line 486 "grammar.y"
{ (yyval.i) = Q_ISIS_L2; }
break;
case 98:
/* Line 1806 of yacc.c */
-#line 486 "grammar.y"
+#line 487 "grammar.y"
{ (yyval.i) = Q_ISIS_IIH; }
break;
case 99:
/* Line 1806 of yacc.c */
-#line 487 "grammar.y"
+#line 488 "grammar.y"
{ (yyval.i) = Q_ISIS_LSP; }
break;
case 100:
/* Line 1806 of yacc.c */
-#line 488 "grammar.y"
+#line 489 "grammar.y"
{ (yyval.i) = Q_ISIS_SNP; }
break;
case 101:
/* Line 1806 of yacc.c */
-#line 489 "grammar.y"
+#line 490 "grammar.y"
{ (yyval.i) = Q_ISIS_PSNP; }
break;
case 102:
/* Line 1806 of yacc.c */
-#line 490 "grammar.y"
+#line 491 "grammar.y"
{ (yyval.i) = Q_ISIS_CSNP; }
break;
case 103:
/* Line 1806 of yacc.c */
-#line 491 "grammar.y"
+#line 492 "grammar.y"
{ (yyval.i) = Q_CLNP; }
break;
case 104:
/* Line 1806 of yacc.c */
-#line 492 "grammar.y"
+#line 493 "grammar.y"
{ (yyval.i) = Q_STP; }
break;
case 105:
/* Line 1806 of yacc.c */
-#line 493 "grammar.y"
+#line 494 "grammar.y"
{ (yyval.i) = Q_IPX; }
break;
case 106:
/* Line 1806 of yacc.c */
-#line 494 "grammar.y"
+#line 495 "grammar.y"
{ (yyval.i) = Q_NETBEUI; }
break;
case 107:
/* Line 1806 of yacc.c */
-#line 495 "grammar.y"
+#line 496 "grammar.y"
{ (yyval.i) = Q_RADIO; }
break;
case 108:
/* Line 1806 of yacc.c */
-#line 497 "grammar.y"
+#line 498 "grammar.y"
{ (yyval.rblk) = gen_broadcast((yyvsp[(1) - (2)].i)); }
break;
case 109:
/* Line 1806 of yacc.c */
-#line 498 "grammar.y"
+#line 499 "grammar.y"
{ (yyval.rblk) = gen_multicast((yyvsp[(1) - (2)].i)); }
break;
case 110:
/* Line 1806 of yacc.c */
-#line 499 "grammar.y"
+#line 500 "grammar.y"
{ (yyval.rblk) = gen_less((yyvsp[(2) - (2)].i)); }
break;
case 111:
/* Line 1806 of yacc.c */
-#line 500 "grammar.y"
+#line 501 "grammar.y"
{ (yyval.rblk) = gen_greater((yyvsp[(2) - (2)].i)); }
break;
case 112:
/* Line 1806 of yacc.c */
-#line 501 "grammar.y"
+#line 502 "grammar.y"
{ (yyval.rblk) = gen_byteop((yyvsp[(3) - (4)].i), (yyvsp[(2) - (4)].i), (yyvsp[(4) - (4)].i)); }
break;
case 113:
/* Line 1806 of yacc.c */
-#line 502 "grammar.y"
+#line 503 "grammar.y"
{ (yyval.rblk) = gen_inbound(0); }
break;
case 114:
/* Line 1806 of yacc.c */
-#line 503 "grammar.y"
+#line 504 "grammar.y"
{ (yyval.rblk) = gen_inbound(1); }
break;
case 115:
/* Line 1806 of yacc.c */
-#line 504 "grammar.y"
+#line 505 "grammar.y"
{ (yyval.rblk) = gen_vlan((yyvsp[(2) - (2)].i)); }
break;
case 116:
/* Line 1806 of yacc.c */
-#line 505 "grammar.y"
+#line 506 "grammar.y"
{ (yyval.rblk) = gen_vlan(-1); }
break;
case 117:
/* Line 1806 of yacc.c */
-#line 506 "grammar.y"
+#line 507 "grammar.y"
{ (yyval.rblk) = gen_mpls((yyvsp[(2) - (2)].i)); }
break;
case 118:
/* Line 1806 of yacc.c */
-#line 507 "grammar.y"
+#line 508 "grammar.y"
{ (yyval.rblk) = gen_mpls(-1); }
break;
case 119:
/* Line 1806 of yacc.c */
-#line 508 "grammar.y"
+#line 509 "grammar.y"
{ (yyval.rblk) = gen_pppoed(); }
break;
case 120:
/* Line 1806 of yacc.c */
-#line 509 "grammar.y"
- { (yyval.rblk) = gen_pppoes(); }
+#line 510 "grammar.y"
+ { (yyval.rblk) = gen_pppoes((yyvsp[(2) - (2)].i)); }
break;
case 121:
/* Line 1806 of yacc.c */
-#line 510 "grammar.y"
- { (yyval.rblk) = (yyvsp[(1) - (1)].rblk); }
+#line 511 "grammar.y"
+ { (yyval.rblk) = gen_pppoes(-1); }
break;
case 122:
/* Line 1806 of yacc.c */
-#line 511 "grammar.y"
- { (yyval.rblk) = (yyvsp[(2) - (2)].rblk); }
+#line 512 "grammar.y"
+ { (yyval.rblk) = (yyvsp[(1) - (1)].rblk); }
break;
case 123:
/* Line 1806 of yacc.c */
-#line 514 "grammar.y"
- { (yyval.rblk) = gen_pf_ifname((yyvsp[(2) - (2)].s)); }
+#line 513 "grammar.y"
+ { (yyval.rblk) = (yyvsp[(2) - (2)].rblk); }
break;
case 124:
/* Line 1806 of yacc.c */
-#line 515 "grammar.y"
- { (yyval.rblk) = gen_pf_ruleset((yyvsp[(2) - (2)].s)); }
+#line 516 "grammar.y"
+ { (yyval.rblk) = gen_pf_ifname((yyvsp[(2) - (2)].s)); }
break;
case 125:
/* Line 1806 of yacc.c */
-#line 516 "grammar.y"
- { (yyval.rblk) = gen_pf_rnr((yyvsp[(2) - (2)].i)); }
+#line 517 "grammar.y"
+ { (yyval.rblk) = gen_pf_ruleset((yyvsp[(2) - (2)].s)); }
break;
case 126:
/* Line 1806 of yacc.c */
-#line 517 "grammar.y"
- { (yyval.rblk) = gen_pf_srnr((yyvsp[(2) - (2)].i)); }
+#line 518 "grammar.y"
+ { (yyval.rblk) = gen_pf_rnr((yyvsp[(2) - (2)].i)); }
break;
case 127:
/* Line 1806 of yacc.c */
-#line 518 "grammar.y"
- { (yyval.rblk) = gen_pf_reason((yyvsp[(2) - (2)].i)); }
+#line 519 "grammar.y"
+ { (yyval.rblk) = gen_pf_srnr((yyvsp[(2) - (2)].i)); }
break;
case 128:
/* Line 1806 of yacc.c */
-#line 519 "grammar.y"
- { (yyval.rblk) = gen_pf_action((yyvsp[(2) - (2)].i)); }
+#line 520 "grammar.y"
+ { (yyval.rblk) = gen_pf_reason((yyvsp[(2) - (2)].i)); }
break;
case 129:
/* Line 1806 of yacc.c */
-#line 523 "grammar.y"
+#line 521 "grammar.y"
+ { (yyval.rblk) = gen_pf_action((yyvsp[(2) - (2)].i)); }
+ break;
+
+ case 130:
+
+/* Line 1806 of yacc.c */
+#line 525 "grammar.y"
{ (yyval.rblk) = gen_p80211_type((yyvsp[(2) - (4)].i) | (yyvsp[(4) - (4)].i),
IEEE80211_FC0_TYPE_MASK |
IEEE80211_FC0_SUBTYPE_MASK);
}
break;
- case 130:
+ case 131:
/* Line 1806 of yacc.c */
-#line 527 "grammar.y"
+#line 529 "grammar.y"
{ (yyval.rblk) = gen_p80211_type((yyvsp[(2) - (2)].i),
IEEE80211_FC0_TYPE_MASK);
}
break;
- case 131:
+ case 132:
/* Line 1806 of yacc.c */
-#line 530 "grammar.y"
+#line 532 "grammar.y"
{ (yyval.rblk) = gen_p80211_type((yyvsp[(2) - (2)].i),
IEEE80211_FC0_TYPE_MASK |
IEEE80211_FC0_SUBTYPE_MASK);
}
break;
- case 132:
+ case 133:
/* Line 1806 of yacc.c */
-#line 534 "grammar.y"
+#line 536 "grammar.y"
{ (yyval.rblk) = gen_p80211_fcdir((yyvsp[(2) - (2)].i)); }
break;
- case 134:
+ case 135:
/* Line 1806 of yacc.c */
-#line 538 "grammar.y"
+#line 540 "grammar.y"
{ (yyval.i) = str2tok((yyvsp[(1) - (1)].s), ieee80211_types);
if ((yyval.i) == -1)
bpf_error("unknown 802.11 type name");
}
break;
- case 136:
+ case 137:
/* Line 1806 of yacc.c */
-#line 545 "grammar.y"
+#line 547 "grammar.y"
{ const struct tok *types = NULL;
int i;
for (i = 0;; i++) {
@@ -3180,10 +3215,10 @@
}
break;
- case 137:
+ case 138:
/* Line 1806 of yacc.c */
-#line 565 "grammar.y"
+#line 567 "grammar.y"
{ int i;
for (i = 0;; i++) {
if (ieee80211_type_subtypes[i].tok == NULL) {
@@ -3200,10 +3235,10 @@
}
break;
- case 139:
+ case 140:
/* Line 1806 of yacc.c */
-#line 582 "grammar.y"
+#line 584 "grammar.y"
{ if (pcap_strcasecmp((yyvsp[(1) - (1)].s), "nods") == 0)
(yyval.i) = IEEE80211_FC1_DIR_NODS;
else if (pcap_strcasecmp((yyvsp[(1) - (1)].s), "tods") == 0)
@@ -3217,332 +3252,332 @@
}
break;
- case 140:
+ case 141:
/* Line 1806 of yacc.c */
-#line 595 "grammar.y"
+#line 597 "grammar.y"
{ (yyval.i) = (yyvsp[(1) - (1)].i); }
break;
- case 141:
+ case 142:
/* Line 1806 of yacc.c */
-#line 596 "grammar.y"
+#line 598 "grammar.y"
{ (yyval.i) = pfreason_to_num((yyvsp[(1) - (1)].s)); }
break;
- case 142:
+ case 143:
/* Line 1806 of yacc.c */
-#line 599 "grammar.y"
+#line 601 "grammar.y"
{ (yyval.i) = pfaction_to_num((yyvsp[(1) - (1)].s)); }
break;
- case 143:
+ case 144:
/* Line 1806 of yacc.c */
-#line 602 "grammar.y"
+#line 604 "grammar.y"
{ (yyval.i) = BPF_JGT; }
break;
- case 144:
+ case 145:
/* Line 1806 of yacc.c */
-#line 603 "grammar.y"
+#line 605 "grammar.y"
{ (yyval.i) = BPF_JGE; }
break;
- case 145:
+ case 146:
/* Line 1806 of yacc.c */
-#line 604 "grammar.y"
+#line 606 "grammar.y"
{ (yyval.i) = BPF_JEQ; }
break;
- case 146:
+ case 147:
/* Line 1806 of yacc.c */
-#line 606 "grammar.y"
+#line 608 "grammar.y"
{ (yyval.i) = BPF_JGT; }
break;
- case 147:
+ case 148:
/* Line 1806 of yacc.c */
-#line 607 "grammar.y"
+#line 609 "grammar.y"
{ (yyval.i) = BPF_JGE; }
break;
- case 148:
+ case 149:
/* Line 1806 of yacc.c */
-#line 608 "grammar.y"
+#line 610 "grammar.y"
{ (yyval.i) = BPF_JEQ; }
break;
- case 149:
+ case 150:
/* Line 1806 of yacc.c */
-#line 610 "grammar.y"
+#line 612 "grammar.y"
{ (yyval.a) = gen_loadi((yyvsp[(1) - (1)].i)); }
break;
- case 151:
+ case 152:
/* Line 1806 of yacc.c */
-#line 613 "grammar.y"
+#line 615 "grammar.y"
{ (yyval.a) = gen_load((yyvsp[(1) - (4)].i), (yyvsp[(3) - (4)].a), 1); }
break;
- case 152:
+ case 153:
/* Line 1806 of yacc.c */
-#line 614 "grammar.y"
+#line 616 "grammar.y"
{ (yyval.a) = gen_load((yyvsp[(1) - (6)].i), (yyvsp[(3) - (6)].a), (yyvsp[(5) - (6)].i)); }
break;
- case 153:
+ case 154:
/* Line 1806 of yacc.c */
-#line 615 "grammar.y"
+#line 617 "grammar.y"
{ (yyval.a) = gen_arth(BPF_ADD, (yyvsp[(1) - (3)].a), (yyvsp[(3) - (3)].a)); }
break;
- case 154:
+ case 155:
/* Line 1806 of yacc.c */
-#line 616 "grammar.y"
+#line 618 "grammar.y"
{ (yyval.a) = gen_arth(BPF_SUB, (yyvsp[(1) - (3)].a), (yyvsp[(3) - (3)].a)); }
break;
- case 155:
+ case 156:
/* Line 1806 of yacc.c */
-#line 617 "grammar.y"
+#line 619 "grammar.y"
{ (yyval.a) = gen_arth(BPF_MUL, (yyvsp[(1) - (3)].a), (yyvsp[(3) - (3)].a)); }
break;
- case 156:
+ case 157:
/* Line 1806 of yacc.c */
-#line 618 "grammar.y"
+#line 620 "grammar.y"
{ (yyval.a) = gen_arth(BPF_DIV, (yyvsp[(1) - (3)].a), (yyvsp[(3) - (3)].a)); }
break;
- case 157:
+ case 158:
/* Line 1806 of yacc.c */
-#line 619 "grammar.y"
+#line 621 "grammar.y"
{ (yyval.a) = gen_arth(BPF_AND, (yyvsp[(1) - (3)].a), (yyvsp[(3) - (3)].a)); }
break;
- case 158:
+ case 159:
/* Line 1806 of yacc.c */
-#line 620 "grammar.y"
+#line 622 "grammar.y"
{ (yyval.a) = gen_arth(BPF_OR, (yyvsp[(1) - (3)].a), (yyvsp[(3) - (3)].a)); }
break;
- case 159:
+ case 160:
/* Line 1806 of yacc.c */
-#line 621 "grammar.y"
+#line 623 "grammar.y"
{ (yyval.a) = gen_arth(BPF_LSH, (yyvsp[(1) - (3)].a), (yyvsp[(3) - (3)].a)); }
break;
- case 160:
+ case 161:
/* Line 1806 of yacc.c */
-#line 622 "grammar.y"
+#line 624 "grammar.y"
{ (yyval.a) = gen_arth(BPF_RSH, (yyvsp[(1) - (3)].a), (yyvsp[(3) - (3)].a)); }
break;
- case 161:
+ case 162:
/* Line 1806 of yacc.c */
-#line 623 "grammar.y"
+#line 625 "grammar.y"
{ (yyval.a) = gen_neg((yyvsp[(2) - (2)].a)); }
break;
- case 162:
+ case 163:
/* Line 1806 of yacc.c */
-#line 624 "grammar.y"
+#line 626 "grammar.y"
{ (yyval.a) = (yyvsp[(2) - (3)].a); }
break;
- case 163:
+ case 164:
/* Line 1806 of yacc.c */
-#line 625 "grammar.y"
+#line 627 "grammar.y"
{ (yyval.a) = gen_loadlen(); }
break;
- case 164:
+ case 165:
/* Line 1806 of yacc.c */
-#line 627 "grammar.y"
+#line 629 "grammar.y"
{ (yyval.i) = '&'; }
break;
- case 165:
+ case 166:
/* Line 1806 of yacc.c */
-#line 628 "grammar.y"
+#line 630 "grammar.y"
{ (yyval.i) = '|'; }
break;
- case 166:
+ case 167:
/* Line 1806 of yacc.c */
-#line 629 "grammar.y"
+#line 631 "grammar.y"
{ (yyval.i) = '<'; }
break;
- case 167:
+ case 168:
/* Line 1806 of yacc.c */
-#line 630 "grammar.y"
+#line 632 "grammar.y"
{ (yyval.i) = '>'; }
break;
- case 168:
+ case 169:
/* Line 1806 of yacc.c */
-#line 631 "grammar.y"
+#line 633 "grammar.y"
{ (yyval.i) = '='; }
break;
- case 170:
+ case 171:
/* Line 1806 of yacc.c */
-#line 634 "grammar.y"
+#line 636 "grammar.y"
{ (yyval.i) = (yyvsp[(2) - (3)].i); }
break;
- case 171:
+ case 172:
/* Line 1806 of yacc.c */
-#line 636 "grammar.y"
+#line 638 "grammar.y"
{ (yyval.i) = A_LANE; }
break;
- case 172:
+ case 173:
/* Line 1806 of yacc.c */
-#line 637 "grammar.y"
+#line 639 "grammar.y"
{ (yyval.i) = A_LLC; }
break;
- case 173:
+ case 174:
/* Line 1806 of yacc.c */
-#line 638 "grammar.y"
+#line 640 "grammar.y"
{ (yyval.i) = A_METAC; }
break;
- case 174:
+ case 175:
/* Line 1806 of yacc.c */
-#line 639 "grammar.y"
+#line 641 "grammar.y"
{ (yyval.i) = A_BCC; }
break;
- case 175:
+ case 176:
/* Line 1806 of yacc.c */
-#line 640 "grammar.y"
+#line 642 "grammar.y"
{ (yyval.i) = A_OAMF4EC; }
break;
- case 176:
+ case 177:
/* Line 1806 of yacc.c */
-#line 641 "grammar.y"
+#line 643 "grammar.y"
{ (yyval.i) = A_OAMF4SC; }
break;
- case 177:
+ case 178:
/* Line 1806 of yacc.c */
-#line 642 "grammar.y"
+#line 644 "grammar.y"
{ (yyval.i) = A_SC; }
break;
- case 178:
+ case 179:
/* Line 1806 of yacc.c */
-#line 643 "grammar.y"
+#line 645 "grammar.y"
{ (yyval.i) = A_ILMIC; }
break;
- case 179:
+ case 180:
/* Line 1806 of yacc.c */
-#line 645 "grammar.y"
+#line 647 "grammar.y"
{ (yyval.i) = A_OAM; }
break;
- case 180:
+ case 181:
/* Line 1806 of yacc.c */
-#line 646 "grammar.y"
+#line 648 "grammar.y"
{ (yyval.i) = A_OAMF4; }
break;
- case 181:
+ case 182:
/* Line 1806 of yacc.c */
-#line 647 "grammar.y"
+#line 649 "grammar.y"
{ (yyval.i) = A_CONNECTMSG; }
break;
- case 182:
+ case 183:
/* Line 1806 of yacc.c */
-#line 648 "grammar.y"
+#line 650 "grammar.y"
{ (yyval.i) = A_METACONNECT; }
break;
- case 183:
+ case 184:
/* Line 1806 of yacc.c */
-#line 651 "grammar.y"
+#line 653 "grammar.y"
{ (yyval.blk).atmfieldtype = A_VPI; }
break;
- case 184:
+ case 185:
/* Line 1806 of yacc.c */
-#line 652 "grammar.y"
+#line 654 "grammar.y"
{ (yyval.blk).atmfieldtype = A_VCI; }
break;
- case 186:
+ case 187:
/* Line 1806 of yacc.c */
-#line 655 "grammar.y"
+#line 657 "grammar.y"
{ (yyval.blk).b = gen_atmfield_code((yyvsp[(0) - (2)].blk).atmfieldtype, (bpf_int32)(yyvsp[(2) - (2)].i), (bpf_u_int32)(yyvsp[(1) - (2)].i), 0); }
break;
- case 187:
+ case 188:
/* Line 1806 of yacc.c */
-#line 656 "grammar.y"
+#line 658 "grammar.y"
{ (yyval.blk).b = gen_atmfield_code((yyvsp[(0) - (2)].blk).atmfieldtype, (bpf_int32)(yyvsp[(2) - (2)].i), (bpf_u_int32)(yyvsp[(1) - (2)].i), 1); }
break;
- case 188:
+ case 189:
/* Line 1806 of yacc.c */
-#line 657 "grammar.y"
+#line 659 "grammar.y"
{ (yyval.blk).b = (yyvsp[(2) - (3)].blk).b; (yyval.blk).q = qerr; }
break;
- case 189:
+ case 190:
/* Line 1806 of yacc.c */
-#line 659 "grammar.y"
+#line 661 "grammar.y"
{
(yyval.blk).atmfieldtype = (yyvsp[(0) - (1)].blk).atmfieldtype;
if ((yyval.blk).atmfieldtype == A_VPI ||
@@ -3551,108 +3586,161 @@
}
break;
- case 191:
+ case 192:
/* Line 1806 of yacc.c */
-#line 667 "grammar.y"
+#line 669 "grammar.y"
{ gen_or((yyvsp[(1) - (3)].blk).b, (yyvsp[(3) - (3)].blk).b); (yyval.blk) = (yyvsp[(3) - (3)].blk); }
break;
- case 192:
+ case 193:
/* Line 1806 of yacc.c */
-#line 670 "grammar.y"
+#line 672 "grammar.y"
{ (yyval.i) = M_FISU; }
break;
- case 193:
+ case 194:
/* Line 1806 of yacc.c */
-#line 671 "grammar.y"
+#line 673 "grammar.y"
{ (yyval.i) = M_LSSU; }
break;
- case 194:
+ case 195:
/* Line 1806 of yacc.c */
-#line 672 "grammar.y"
+#line 674 "grammar.y"
{ (yyval.i) = M_MSU; }
break;
- case 195:
+ case 196:
/* Line 1806 of yacc.c */
#line 675 "grammar.y"
- { (yyval.blk).mtp3fieldtype = M_SIO; }
+ { (yyval.i) = MH_FISU; }
break;
- case 196:
+ case 197:
/* Line 1806 of yacc.c */
#line 676 "grammar.y"
- { (yyval.blk).mtp3fieldtype = M_OPC; }
+ { (yyval.i) = MH_LSSU; }
break;
- case 197:
+ case 198:
/* Line 1806 of yacc.c */
#line 677 "grammar.y"
- { (yyval.blk).mtp3fieldtype = M_DPC; }
+ { (yyval.i) = MH_MSU; }
break;
- case 198:
+ case 199:
/* Line 1806 of yacc.c */
-#line 678 "grammar.y"
- { (yyval.blk).mtp3fieldtype = M_SLS; }
+#line 680 "grammar.y"
+ { (yyval.blk).mtp3fieldtype = M_SIO; }
break;
case 200:
/* Line 1806 of yacc.c */
#line 681 "grammar.y"
- { (yyval.blk).b = gen_mtp3field_code((yyvsp[(0) - (2)].blk).mtp3fieldtype, (u_int)(yyvsp[(2) - (2)].i), (u_int)(yyvsp[(1) - (2)].i), 0); }
+ { (yyval.blk).mtp3fieldtype = M_OPC; }
break;
case 201:
/* Line 1806 of yacc.c */
#line 682 "grammar.y"
- { (yyval.blk).b = gen_mtp3field_code((yyvsp[(0) - (2)].blk).mtp3fieldtype, (u_int)(yyvsp[(2) - (2)].i), (u_int)(yyvsp[(1) - (2)].i), 1); }
+ { (yyval.blk).mtp3fieldtype = M_DPC; }
break;
case 202:
/* Line 1806 of yacc.c */
#line 683 "grammar.y"
- { (yyval.blk).b = (yyvsp[(2) - (3)].blk).b; (yyval.blk).q = qerr; }
+ { (yyval.blk).mtp3fieldtype = M_SLS; }
break;
case 203:
/* Line 1806 of yacc.c */
+#line 684 "grammar.y"
+ { (yyval.blk).mtp3fieldtype = MH_SIO; }
+ break;
+
+ case 204:
+
+/* Line 1806 of yacc.c */
#line 685 "grammar.y"
+ { (yyval.blk).mtp3fieldtype = MH_OPC; }
+ break;
+
+ case 205:
+
+/* Line 1806 of yacc.c */
+#line 686 "grammar.y"
+ { (yyval.blk).mtp3fieldtype = MH_DPC; }
+ break;
+
+ case 206:
+
+/* Line 1806 of yacc.c */
+#line 687 "grammar.y"
+ { (yyval.blk).mtp3fieldtype = MH_SLS; }
+ break;
+
+ case 208:
+
+/* Line 1806 of yacc.c */
+#line 690 "grammar.y"
+ { (yyval.blk).b = gen_mtp3field_code((yyvsp[(0) - (2)].blk).mtp3fieldtype, (u_int)(yyvsp[(2) - (2)].i), (u_int)(yyvsp[(1) - (2)].i), 0); }
+ break;
+
+ case 209:
+
+/* Line 1806 of yacc.c */
+#line 691 "grammar.y"
+ { (yyval.blk).b = gen_mtp3field_code((yyvsp[(0) - (2)].blk).mtp3fieldtype, (u_int)(yyvsp[(2) - (2)].i), (u_int)(yyvsp[(1) - (2)].i), 1); }
+ break;
+
+ case 210:
+
+/* Line 1806 of yacc.c */
+#line 692 "grammar.y"
+ { (yyval.blk).b = (yyvsp[(2) - (3)].blk).b; (yyval.blk).q = qerr; }
+ break;
+
+ case 211:
+
+/* Line 1806 of yacc.c */
+#line 694 "grammar.y"
{
(yyval.blk).mtp3fieldtype = (yyvsp[(0) - (1)].blk).mtp3fieldtype;
if ((yyval.blk).mtp3fieldtype == M_SIO ||
(yyval.blk).mtp3fieldtype == M_OPC ||
(yyval.blk).mtp3fieldtype == M_DPC ||
- (yyval.blk).mtp3fieldtype == M_SLS )
+ (yyval.blk).mtp3fieldtype == M_SLS ||
+ (yyval.blk).mtp3fieldtype == MH_SIO ||
+ (yyval.blk).mtp3fieldtype == MH_OPC ||
+ (yyval.blk).mtp3fieldtype == MH_DPC ||
+ (yyval.blk).mtp3fieldtype == MH_SLS)
(yyval.blk).b = gen_mtp3field_code((yyval.blk).mtp3fieldtype, (u_int) (yyvsp[(1) - (1)].i), BPF_JEQ, 0);
}
break;
- case 205:
+ case 213:
/* Line 1806 of yacc.c */
-#line 695 "grammar.y"
+#line 708 "grammar.y"
{ gen_or((yyvsp[(1) - (3)].blk).b, (yyvsp[(3) - (3)].blk).b); (yyval.blk) = (yyvsp[(3) - (3)].blk); }
break;
/* Line 1806 of yacc.c */
-#line 3656 "y.tab.c"
+#line 3744 "y.tab.c"
default: break;
}
/* User semantic actions sometimes alter yychar, and that requires
@@ -3883,6 +3971,6 @@
/* Line 2067 of yacc.c */
-#line 697 "grammar.y"
+#line 710 "grammar.y"
Index: libpcap/pcap_next_ex.3pcap
===================================================================
--- libpcap/pcap_next_ex.3pcap (revision 32783)
+++ libpcap/pcap_next_ex.3pcap (working copy)
@@ -77,6 +77,41 @@
structure pointed to by
.I h
is filled in with the appropriate values for the packet.
+.PP
+The bytes of data from the packet begin with a link-layer header. The
+format of the link-layer header is indicated by the return value of the
+.B pcap_datalink()
+routine when handed the
+.B pcap_t
+value also passed to
+.B pcap_loop()
+or
+.BR pcap_dispatch() .
+.I http://www.tcpdump.org/linktypes.html
+lists the values
+.B pcap_datalink()
+can return and describes the packet formats that
+correspond to those values. The value it returns will be valid for all
+packets received unless and until
+.B pcap_set_datalink()
+is called; after a successful call to
+.BR pcap_set_datalink() ,
+all subsequent packets will have a link-layer header of the type
+specified by the link-layer header type value passed to
+.BR pcap_set_datalink() .
+.PP
+Do
+.B NOT
+assume that the packets for a given capture or ``savefile`` will have
+any given link-layer header type, such as
+.B DLT_EN10MB
+for Ethernet. For example, the "any" device on Linux will have a
+link-layer header type of
+.B DLT_LINUX_SLL
+even if all devices on the system at the time the "any" device is opened
+have some other data link type, such as
+.B DLT_EN10MB
+for Ethernet.
.SH RETURN VALUE
.B pcap_next_ex()
returns 1 if the packet was read without problems, 0
@@ -104,4 +139,5 @@
more packets are available in a ``savefile.'' Unfortunately, there is
no way to determine whether an error occurred or not.
.SH SEE ALSO
-pcap(3PCAP), pcap_geterr(3PCAP), pcap_dispatch(3PCAP)
+pcap(3PCAP), pcap_geterr(3PCAP), pcap_dispatch(3PCAP),
+pcap_datalink(3PCAP)
Index: libpcap/fad-null.c
===================================================================
--- libpcap/fad-null.c (revision 32783)
+++ libpcap/fad-null.c (working copy)
@@ -53,7 +53,7 @@
* packet capture.
*/
int
-pcap_findalldevs(pcap_if_t **alldevsp, char *errbuf)
+pcap_findalldevs_interfaces(pcap_if_t **alldevsp, char *errbuf)
{
/*
* Succeed, but don't return any interfaces; we return only those
Index: libpcap/pcap_tstamp_type_val_to_name.3pcap
===================================================================
--- libpcap/pcap_tstamp_type_val_to_name.3pcap (revision 32783)
+++ libpcap/pcap_tstamp_type_val_to_name.3pcap (working copy)
@@ -36,10 +36,14 @@
.SH DESCRIPTION
.B pcap_tstamp_type_val_to_name()
translates a time stamp type value to the corresponding time stamp type
-name. NULL is returned on failure.
+name.
+.B NULL
+is returned on failure.
.PP
.B pcap_tstamp_type_val_to_description()
translates a time stamp type value to a short description of that time
-stamp type. NULL is returned on failure.
+stamp type.
+.B NULL
+is returned on failure.
.SH SEE ALSO
pcap(3PCAP), pcap_tstamp_type_name_to_val(3PCAP)
Index: libpcap/README.dag
===================================================================
--- libpcap/README.dag (revision 32783)
+++ libpcap/README.dag (working copy)
@@ -96,13 +96,21 @@
DAG cards by default capture entire packets including the L2
CRC/FCS. If the card is not configured to discard the CRC/FCS, this
can confuse applications that use libpcap if they're not prepared for
-packets to have an FCS. Libpcap now reads the environment variable
-ERF_FCS_BITS to determine how many bits of CRC/FCS to strip from the
-end of the captured frame. This defaults to 32 for use with
-Ethernet. If the card is configured to strip the CRC/FCS, then set
-ERF_FCS_BITS=0. If used with a HDLC/PoS/PPP/Frame Relay link with 16
-bit CRC/FCS, then set ERF_FCS_BITS=16.
+packets to have an FCS.
+Libpcap now reads the environment variable ERF_FCS_BITS to determine
+how many bits of CRC/FCS to strip from the end of the captured
+frame. This defaults to 32 for use with Ethernet. If the card is
+configured to strip the CRC/FCS, then set ERF_FCS_BITS=0. If used with
+a HDLC/PoS/PPP/Frame Relay link with 16 bit CRC/FCS, then set
+ERF_FCS_BITS=16.
+
+If you wish to create a pcap file that DOES contain the Ethernet FCS,
+specify the environment variable ERF_DONT_STRIP_FCS. This will cause
+the existing FCS to be captured into the pcap file. Note some
+applications may incorrectly report capture errors or oversize packets
+when reading these files.
+
----------------------------------------------------------------------
Please submit bug reports via <support@endace.com>.
Index: libpcap/grammar.y
===================================================================
--- libpcap/grammar.y (revision 32783)
+++ libpcap/grammar.y (working copy)
@@ -167,7 +167,7 @@
/* NOTREACHED */
}
-#ifndef YYBISON
+#ifdef NEED_YYPARSE_WRAPPER
int yyparse(void);
int
@@ -294,8 +294,9 @@
%token OAM OAMF4 CONNECTMSG METACONNECT
%token VPI VCI
%token RADIO
-%token FISU LSSU MSU
-%token SIO OPC DPC SLS
+%token FISU LSSU MSU HFISU HLSSU HMSU
+%token SIO OPC DPC SLS HSIO HOPC HDPC HSLS
+
%type <s> ID
%type <e> EID
@@ -506,7 +507,8 @@
| MPLS pnum { $$ = gen_mpls($2); }
| MPLS { $$ = gen_mpls(-1); }
| PPPOED { $$ = gen_pppoed(); }
- | PPPOES { $$ = gen_pppoes(); }
+ | PPPOES pnum { $$ = gen_pppoes($2); }
+ | PPPOES { $$ = gen_pppoes(-1); }
| pfvar { $$ = $1; }
| pqual p80211 { $$ = $2; }
;
@@ -670,12 +672,19 @@
mtp2type: FISU { $$ = M_FISU; }
| LSSU { $$ = M_LSSU; }
| MSU { $$ = M_MSU; }
+ | HFISU { $$ = MH_FISU; }
+ | HLSSU { $$ = MH_LSSU; }
+ | HMSU { $$ = MH_MSU; }
;
/* MTP3 field types quantifier */
mtp3field: SIO { $$.mtp3fieldtype = M_SIO; }
| OPC { $$.mtp3fieldtype = M_OPC; }
| DPC { $$.mtp3fieldtype = M_DPC; }
| SLS { $$.mtp3fieldtype = M_SLS; }
+ | HSIO { $$.mtp3fieldtype = MH_SIO; }
+ | HOPC { $$.mtp3fieldtype = MH_OPC; }
+ | HDPC { $$.mtp3fieldtype = MH_DPC; }
+ | HSLS { $$.mtp3fieldtype = MH_SLS; }
;
mtp3value: mtp3fieldvalue
| relop NUM { $$.b = gen_mtp3field_code($<blk>0.mtp3fieldtype, (u_int)$2, (u_int)$1, 0); }
@@ -687,7 +696,11 @@
if ($$.mtp3fieldtype == M_SIO ||
$$.mtp3fieldtype == M_OPC ||
$$.mtp3fieldtype == M_DPC ||
- $$.mtp3fieldtype == M_SLS )
+ $$.mtp3fieldtype == M_SLS ||
+ $$.mtp3fieldtype == MH_SIO ||
+ $$.mtp3fieldtype == MH_OPC ||
+ $$.mtp3fieldtype == MH_DPC ||
+ $$.mtp3fieldtype == MH_SLS)
$$.b = gen_mtp3field_code($$.mtp3fieldtype, (u_int) $1, BPF_JEQ, 0);
}
;
Index: libpcap/pcap-dbus.c
===================================================================
--- libpcap/pcap-dbus.c (revision 0)
+++ libpcap/pcap-dbus.c (working copy)
@@ -0,0 +1,279 @@
+/*
+ * Copyright (c) 2012 Jakub Zawadzki
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * 3. The name of the author may not be used to endorse or promote
+ * products derived from this software without specific prior written
+ * permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <string.h>
+
+#include <time.h>
+#include <sys/time.h>
+
+#include <dbus/dbus.h>
+
+#include "pcap-int.h"
+#include "pcap-dbus.h"
+
+/*
+ * Private data for capturing on D-Bus.
+ */
+struct pcap_dbus {
+ DBusConnection *conn;
+ u_int packets_read; /* count of packets read */
+};
+
+static int
+dbus_read(pcap_t *handle, int max_packets, pcap_handler callback, u_char *user)
+{
+ struct pcap_dbus *handlep = handle->priv;
+
+ struct pcap_pkthdr pkth;
+ DBusMessage *message;
+
+ char *raw_msg;
+ int raw_msg_len;
+
+ int count = 0;
+
+ message = dbus_connection_pop_message(handlep->conn);
+
+ while (!message) {
+ // XXX handle->opt.timeout = timeout_ms;
+ if (!dbus_connection_read_write(handlep->conn, 100)) {
+ snprintf(handle->errbuf, PCAP_ERRBUF_SIZE, "Connection closed");
+ return -1;
+ }
+
+ if (handle->break_loop) {
+ handle->break_loop = 0;
+ return -2;
+ }
+
+ message = dbus_connection_pop_message(handlep->conn);
+ }
+
+ if (dbus_message_is_signal(message, DBUS_INTERFACE_LOCAL, "Disconnected")) {
+ snprintf(handle->errbuf, PCAP_ERRBUF_SIZE, "Disconnected");
+ return -1;
+ }
+
+ if (dbus_message_marshal(message, &raw_msg, &raw_msg_len)) {
+ pkth.caplen = pkth.len = raw_msg_len;
+ /* pkth.caplen = min (payload_len, handle->snapshot); */
+
+ gettimeofday(&pkth.ts, NULL);
+ if (handle->fcode.bf_insns == NULL ||
+ bpf_filter(handle->fcode.bf_insns, (u_char *)raw_msg, pkth.len, pkth.caplen)) {
+ handlep->packets_read++;
+ callback(user, &pkth, (u_char *)raw_msg);
+ count++;
+ }
+
+ dbus_free(raw_msg);
+ }
+ return count;
+}
+
+static int
+dbus_write(pcap_t *handle, const void *buf, size_t size)
+{
+ /* XXX, not tested */
+ struct pcap_dbus *handlep = handle->priv;
+
+ DBusError error = DBUS_ERROR_INIT;
+ DBusMessage *msg;
+
+ if (!(msg = dbus_message_demarshal(buf, size, &error))) {
+ snprintf(handle->errbuf, PCAP_ERRBUF_SIZE, "dbus_message_demarshal() failed: %s", error.message);
+ dbus_error_free(&error);
+ return -1;
+ }
+
+ dbus_connection_send(handlep->conn, msg, NULL);
+ dbus_connection_flush(handlep->conn);
+
+ dbus_message_unref(msg);
+ return 0;
+}
+
+static int
+dbus_stats(pcap_t *handle, struct pcap_stat *stats)
+{
+ struct pcap_dbus *handlep = handle->priv;
+
+ stats->ps_recv = handlep->packets_read;
+ stats->ps_drop = 0;
+ stats->ps_ifdrop = 0;
+ return 0;
+}
+
+static void
+dbus_cleanup(pcap_t *handle)
+{
+ struct pcap_dbus *handlep = handle->priv;
+
+ dbus_connection_unref(handlep->conn);
+
+ pcap_cleanup_live_common(handle);
+}
+
+static int
+dbus_activate(pcap_t *handle)
+{
+#define EAVESDROPPING_RULE "eavesdrop=true,"
+
+ static const char *rules[] = {
+ EAVESDROPPING_RULE "type='signal'",
+ EAVESDROPPING_RULE "type='method_call'",
+ EAVESDROPPING_RULE "type='method_return'",
+ EAVESDROPPING_RULE "type='error'",
+ };
+
+ #define N_RULES sizeof(rules)/sizeof(rules[0])
+
+ struct pcap_dbus *handlep = handle->priv;
+ const char *dev = handle->opt.source;
+
+ DBusError error = DBUS_ERROR_INIT;
+ int i;
+
+ if (strcmp(dev, "dbus-system") == 0) {
+ if (!(handlep->conn = dbus_bus_get(DBUS_BUS_SYSTEM, &error))) {
+ snprintf(handle->errbuf, PCAP_ERRBUF_SIZE, "Failed to get system bus: %s", error.message);
+ dbus_error_free(&error);
+ return PCAP_ERROR;
+ }
+
+ } else if (strcmp(dev, "dbus-session") == 0) {
+ if (!(handlep->conn = dbus_bus_get(DBUS_BUS_SESSION, &error))) {
+ snprintf(handle->errbuf, PCAP_ERRBUF_SIZE, "Failed to get session bus: %s", error.message);
+ dbus_error_free(&error);
+ return PCAP_ERROR;
+ }
+
+ } else if (strncmp(dev, "dbus://", 7) == 0) {
+ const char *addr = dev + 7;
+
+ if (!(handlep->conn = dbus_connection_open(addr, &error))) {
+ snprintf(handle->errbuf, PCAP_ERRBUF_SIZE, "Failed to open connection to: %s: %s", addr, error.message);
+ dbus_error_free(&error);
+ return PCAP_ERROR;
+ }
+
+ if (!dbus_bus_register(handlep->conn, &error)) {
+ snprintf(handle->errbuf, PCAP_ERRBUF_SIZE, "Failed to register bus %s: %s\n", addr, error.message);
+ dbus_error_free(&error);
+ return PCAP_ERROR;
+ }
+
+ } else {
+ snprintf(handle->errbuf, PCAP_ERRBUF_SIZE, "Can't get bus address from %s", handle->opt.source);
+ return PCAP_ERROR;
+ }
+
+ /* Initialize some components of the pcap structure. */
+ handle->bufsize = 0;
+ handle->offset = 0;
+ handle->linktype = DLT_DBUS;
+ handle->read_op = dbus_read;
+ handle->inject_op = dbus_write;
+ handle->setfilter_op = install_bpf_program; /* XXX, later add support for dbus_bus_add_match() */
+ handle->setdirection_op = NULL;
+ handle->set_datalink_op = NULL; /* can't change data link type */
+ handle->getnonblock_op = pcap_getnonblock_fd;
+ handle->setnonblock_op = pcap_setnonblock_fd;
+ handle->stats_op = dbus_stats;
+
+ handle->selectable_fd = handle->fd = -1;
+
+ if (handle->opt.rfmon) {
+ /*
+ * Monitor mode doesn't apply to dbus connections.
+ */
+ dbus_cleanup(handle);
+ return PCAP_ERROR_RFMON_NOTSUP;
+ }
+
+ /* dbus_connection_set_max_message_size(handlep->conn, handle->snapshot); */
+ if (handle->opt.buffer_size != 0)
+ dbus_connection_set_max_received_size(handlep->conn, handle->opt.buffer_size);
+
+ for (i = 0; i < N_RULES; i++) {
+ dbus_bus_add_match(handlep->conn, rules[i], &error);
+ if (dbus_error_is_set(&error)) {
+ dbus_error_free(&error);
+
+ /* try without eavesdrop */
+ dbus_bus_add_match(handlep->conn, rules[i] + strlen(EAVESDROPPING_RULE), &error);
+ if (dbus_error_is_set(&error)) {
+ snprintf(handle->errbuf, PCAP_ERRBUF_SIZE, "Failed to add bus match: %s\n", error.message);
+ dbus_error_free(&error);
+ dbus_cleanup(handle);
+ return PCAP_ERROR;
+ }
+ }
+ }
+
+ return 0;
+}
+
+pcap_t *
+dbus_create(const char *device, char *ebuf, int *is_ours)
+{
+ pcap_t *p;
+
+ if (strcmp(device, "dbus-system") &&
+ strcmp(device, "dbus-session") &&
+ strncmp(device, "dbus://", 7))
+ {
+ *is_ours = 0;
+ return NULL;
+ }
+
+ *is_ours = 1;
+ p = pcap_create_common(device, ebuf, sizeof (struct pcap_dbus));
+ if (p == NULL)
+ return (NULL);
+
+ p->activate_op = dbus_activate;
+ return (p);
+}
+
+int
+dbus_findalldevs(pcap_if_t **alldevsp, char *err_str)
+{
+ if (pcap_add_if(alldevsp, "dbus-system", 0, "D-Bus system bus", err_str) < 0)
+ return -1;
+ if (pcap_add_if(alldevsp, "dbus-session", 0, "D-Bus session bus", err_str) < 0)
+ return -1;
+ return 0;
+}
+
Index: libpcap/pcap-sita.c
===================================================================
--- libpcap/pcap-sita.c (revision 32783)
+++ libpcap/pcap-sita.c (working copy)
@@ -55,40 +55,37 @@
#define LIVE 1
typedef struct iface {
- struct iface *next; /* a pointer to the next interface */
- char *name; /* this interface's name on Wireshark */
- char *IOPname; /* this interface's name on an IOP */
- uint32_t iftype; /* the type of interface (DLT values) */
+ struct iface *next; /* a pointer to the next interface */
+ char *name; /* this interface's name */
+ char *IOPname; /* this interface's name on an IOP */
+ uint32_t iftype; /* the type of interface (DLT values) */
} iface_t;
typedef struct unit {
- char *ip; /* this unit's IP address (as extracted from /etc/hosts) */
- int fd; /* the connection to this unit (if it exists) */
- int find_fd; /* a big kludge to avoid my programming limitations since I could have this unit open for findalldevs purposes */
- int first_time; /* 0 = just opened via acn_open_live(), ie. the first time, NZ = nth time */
- struct sockaddr_in *serv_addr; /* the address control block for comms to this unit */
- int chassis;
- int geoslot;
- iface_t *iface; /* a pointer to a linked list of interface structures */
- char *imsg; /* a pointer to an inbound message */
- int len; /* the current size of the inbound message */
+ char *ip; /* this unit's IP address (as extracted from /etc/hosts) */
+ int fd; /* the connection to this unit (if it exists) */
+ int find_fd; /* a big kludge to avoid my programming limitations since I could have this unit open for findalldevs purposes */
+ int first_time; /* 0 = just opened via acn_open_live(), ie. the first time, NZ = nth time */
+ struct sockaddr_in *serv_addr; /* the address control block for comms to this unit */
+ int chassis;
+ int geoslot;
+ iface_t *iface; /* a pointer to a linked list of interface structures */
+ char *imsg; /* a pointer to an inbound message */
+ int len; /* the current size of the inbound message */
} unit_t;
-static char *errorString;
static unit_t units[MAX_CHASSIS+1][MAX_GEOSLOT+1]; /* we use indexes of 1 through 8, but we reserve/waste index 0 */
-static fd_set readfds; /* a place to store the file descriptors for the connections to the IOPs */
-static fd_set working_set;
-static int max_fs;
-static char static_buf[32];
+static fd_set readfds; /* a place to store the file descriptors for the connections to the IOPs */
+static int max_fs;
-pcap_if_t *acn_if_list; /* pcap's list of available interfaces */
+pcap_if_t *acn_if_list; /* pcap's list of available interfaces */
static void dump_interface_list(void) {
pcap_if_t *iff;
pcap_addr_t *addr;
- int longest_name_len = 0;
+ int longest_name_len = 0;
char *n, *d, *f;
- int if_number = 0;
+ int if_number = 0;
iff = acn_if_list;
while (iff) {
@@ -214,6 +211,9 @@
empty_unit_iface(u);
if (u->imsg) { /* then if an inbound message buffer exists */
u->imsg = (char *)realloc(u->imsg, 1); /* and re-allocate the old large buffer into a new small one */
+ if (u->imsg == NULL) { /* oops, realloc call failed */
+ fprintf(stderr, "Warning...call to realloc() failed, value of errno is %d\n", errno);
+
}
}
@@ -311,9 +311,17 @@
if (u->serv_addr == NULL) {
u->serv_addr = malloc(sizeof(struct sockaddr_in));
+
+ /* since we called malloc(), lets check to see if we actually got the memory */
+ if (u->serv_addr == NULL) { /* oops, we didn't get the memory requested */
+ fprintf(stderr, "malloc() request for u->serv_addr failed, value of errno is: %d\n", errno);
+ return 0;
+ }
+
}
ip = u->ip;
- bzero((char *)u->serv_addr, sizeof(struct sockaddr_in));
+ /* bzero() is deprecated, replaced with memset() */
+ memset((char *)u->serv_addr, 0, sizeof(struct sockaddr_in));
u->serv_addr->sin_family = AF_INET;
u->serv_addr->sin_addr.s_addr = inet_addr(ip);
u->serv_addr->sin_port = htons(IOP_SNIFFER_PORT);
@@ -394,18 +402,16 @@
}
}
-static char *nonUnified_port_num(unit_t *u, int IOPportnum) {
+static void nonUnified_IOP_port_name(char *buf, size_t bufsize, const char *proto, unit_t *u) {
- sprintf(static_buf, "%d_%d", u->chassis, u->geoslot);
- return static_buf;
+ snprintf(buf, bufsize, "%s_%d_%d", proto, u->chassis, u->geoslot);
}
-static char *unified_port_num(unit_t *u, int IOPportnum) {
+static void unified_IOP_port_name(char *buf, size_t bufsize, const char *proto, unit_t *u, int IOPportnum) {
int portnum;
portnum = ((u->chassis - 1) * 64) + ((u->geoslot - 1) * 8) + IOPportnum + 1;
- sprintf(static_buf, "%d", portnum);
- return static_buf;
+ snprintf(buf, bufsize, "%s_%d", proto, portnum);
}
static char *translate_IOP_to_pcap_name(unit_t *u, char *IOPname, bpf_u_int32 iftype) {
@@ -417,36 +423,64 @@
int IOPportnum = 0;
iface = malloc(sizeof(iface_t)); /* get memory for a structure */
- bzero((char *)iface, sizeof(iface_t));
+ if (iface == NULL) { /* oops, we didn't get the memory requested */
+ fprintf(stderr, "Error...couldn't allocate memory for interface structure...value of errno is: %d\n", errno);
+ return NULL;
+ }
+ memset((char *)iface, 0, sizeof(iface_t)); /* bzero is deprecated(), replaced with memset() */
iface->iftype = iftype; /* remember the interface type of this interface */
name = malloc(strlen(IOPname) + 1); /* get memory for the IOP's name */
+ if (name == NULL) { /* oops, we didn't get the memory requested */
+ fprintf(stderr, "Error...couldn't allocate memory for IOPname...value of errno is: %d\n", errno);
+ return NULL;
+ }
+
strcpy(name, IOPname); /* and copy it in */
iface->IOPname = name; /* and stick it into the structure */
if (strncmp(IOPname, "lo", 2) == 0) {
IOPportnum = atoi(&IOPname[2]);
switch (iftype) {
- case DLT_EN10MB: proto = "lo"; port = nonUnified_port_num(u, IOPportnum); break;
- default: proto = "???"; port = unified_port_num(u, IOPportnum); break;
+ case DLT_EN10MB:
+ nonUnified_IOP_port_name(buf, sizeof buf, "lo", u);
+ break;
+ default:
+ unified_IOP_port_name(buf, sizeof buf, "???", u, IOPportnum);
+ break;
}
} else if (strncmp(IOPname, "eth", 3) == 0) {
IOPportnum = atoi(&IOPname[3]);
switch (iftype) {
- case DLT_EN10MB: proto = "eth"; port = nonUnified_port_num(u, IOPportnum); break;
- default: proto = "???"; port = unified_port_num(u, IOPportnum); break;
+ case DLT_EN10MB:
+ nonUnified_IOP_port_name(buf, sizeof buf, "eth", u);
+ break;
+ default:
+ unified_IOP_port_name(buf, sizeof buf, "???", u, IOPportnum);
+ break;
}
} else if (strncmp(IOPname, "wan", 3) == 0) {
IOPportnum = atoi(&IOPname[3]);
switch (iftype) {
- case DLT_SITA: proto = "wan"; port = unified_port_num(u, IOPportnum); break;
- default: proto = "???"; port = unified_port_num(u, IOPportnum); break;
+ case DLT_SITA:
+ unified_IOP_port_name(buf, sizeof buf, "wan", u, IOPportnum);
+ break;
+ default:
+ unified_IOP_port_name(buf, sizeof buf, "???", u, IOPportnum);
+ break;
}
+ } else {
+ fprintf(stderr, "Error... invalid IOP name %s\n", IOPname);
+ return NULL;
}
- sprintf(buf, "%s_%s", proto, port); /* compose the user's name for that IOP port name */
name = malloc(strlen(buf) + 1); /* get memory for that name */
+ if (name == NULL) { /* oops, we didn't get the memory requested */
+ fprintf(stderr, "Error...couldn't allocate memory for IOP port name...value of errno is: %d\n", errno);
+ return NULL;
+ }
+
strcpy(name, buf); /* and copy it in */
iface->name = name; /* and stick it into the structure */
@@ -548,7 +582,7 @@
snprintf(errbuf, PCAP_ERRBUF_SIZE, "malloc: %s", pcap_strerror(errno));
return -1;
}
- bzero((char *)iff, sizeof(pcap_if_t));
+ memset((char *)iff, 0, sizeof(pcap_if_t)); /* bzero() is deprecated, replaced with memset() */
if (acn_if_list == 0) acn_if_list = iff; /* remember the head of the list */
if (prev_iff) prev_iff->next = iff; /* insert a forward link */
@@ -588,7 +622,7 @@
snprintf(errbuf, PCAP_ERRBUF_SIZE, "malloc: %s", pcap_strerror(errno));
return -1;
}
- bzero((char *)addr, sizeof(pcap_addr_t));
++ memset((char *)addr, 0, sizeof(pcap_addr_t)); /* bzero() is deprecated, replaced with memset() */
if (iff->addresses == 0) iff->addresses = addr;
if (prev_addr) prev_addr->next = addr; /* insert a forward link */
if (*ptr) { /* if there is a count for the address */
@@ -596,7 +630,7 @@
snprintf(errbuf, PCAP_ERRBUF_SIZE, "malloc: %s", pcap_strerror(errno));
return -1;
}
- bzero((char *)s, sizeof(struct sockaddr_in));
+ memset((char *)s, 0, sizeof(struct sockaddr_in)); /* bzero() is deprecated, replaced with memset() */
addr->addr = (struct sockaddr *)s;
s->sin_family = AF_INET;
s->sin_addr.s_addr = *(bpf_u_int32 *)(ptr + 1); /* copy the address in */
@@ -608,7 +642,9 @@
snprintf(errbuf, PCAP_ERRBUF_SIZE, "malloc: %s", pcap_strerror(errno));
return -1;
}
- bzero((char *)s, sizeof(struct sockaddr_in));
+ /* bzero() is deprecated, replaced with memset() */
+ memset((char *)s, 0, sizeof(struct sockaddr_in));
+
addr->netmask = (struct sockaddr *)s;
s->sin_family = AF_INET;
s->sin_addr.s_addr = *(bpf_u_int32*)(ptr + 1);
@@ -620,7 +656,9 @@
snprintf(errbuf, PCAP_ERRBUF_SIZE, "malloc: %s", pcap_strerror(errno));
return -1;
}
- bzero((char *)s, sizeof(struct sockaddr_in));
+ /* bzero() is deprecated, replaced with memset() */
+ memset((char *)s, 0, sizeof(struct sockaddr_in));
+
addr->broadaddr = (struct sockaddr *)s;
s->sin_family = AF_INET;
s->sin_addr.s_addr = *(bpf_u_int32*)(ptr + 1);
@@ -632,7 +670,9 @@
snprintf(errbuf, PCAP_ERRBUF_SIZE, "malloc: %s", pcap_strerror(errno));
return -1;
}
- bzero((char *)s, sizeof(struct sockaddr_in));
+ /* bzero() is deprecated, replaced with memset() */
+ memset((char *)s, 0, sizeof(struct sockaddr_in));
+
addr->dstaddr = (struct sockaddr *)s;
s->sin_family = AF_INET;
s->sin_addr.s_addr = *(bpf_u_int32*)(ptr + 1);
@@ -683,6 +723,8 @@
while (1) {
int flag = 0;
+ fd_set working_set;
+
for (fd = 0; fd <= max_fs; fd++) { /* scan the list of descriptors we may be listening to */
if (FD_ISSET(fd, &readfds)) flag = 1; /* and see if there are any still set */
}
@@ -776,7 +818,7 @@
iface_t *p;
pcap_if_t *alldevsp;
- pcap_findalldevs(&alldevsp, errbuf);
+ pcap_findalldevs_interfaces(&alldevsp, errbuf);
for (chassis = 0; chassis <= MAX_CHASSIS; chassis++) { /* scan the table... */
for (geoslot = 0; geoslot <= MAX_GEOSLOT; geoslot++) {
u = &units[chassis][geoslot];
@@ -900,7 +942,7 @@
struct pcap_pkthdr pcap_header;
//printf("pcap_read_acn()\n"); // fulko
- acn_start_monitor(handle->fd, handle->snapshot, handle->md.timeout, handle->md.clear_promisc, handle->direction); /* maybe tell him to start monitoring */
+ acn_start_monitor(handle->fd, handle->snapshot, handle->opt.timeout, handle->opt.promisc, handle->direction); /* maybe tell him to start monitoring */
//printf("pcap_read_acn() after start monitor\n"); // fulko
handle->bp = packet_header;
@@ -945,7 +987,6 @@
&handle->linktype);
if (fd == -1)
return PCAP_ERROR;
- handle->md.clear_promisc = handle->md.promisc;
handle->fd = fd;
handle->bufsize = handle->snapshot;
@@ -968,10 +1009,10 @@
return 0;
}
-pcap_t *pcap_create(const char *device, char *ebuf) {
+pcap_t *pcap_create_interface(const char *device, char *ebuf) {
pcap_t *p;
- p = pcap_create_common(device, ebuf);
+ p = pcap_create_common(device, ebuf, 0);
if (p == NULL)
return (NULL);
Index: libpcap/pcap-dbus.h
===================================================================
--- libpcap/pcap-dbus.h (revision 0)
+++ libpcap/pcap-dbus.h (working copy)
@@ -0,0 +1,2 @@
+pcap_t *dbus_create(const char *, char *, int *);
+int dbus_findalldevs(pcap_if_t **devlistp, char *errbuf);
Index: libpcap/pcap-pf.c
===================================================================
--- libpcap/pcap-pf.c (revision 32783)
+++ libpcap/pcap-pf.c (working copy)
@@ -74,6 +74,24 @@
#include "os-proto.h"
#endif
+/*
+ * FDDI packets are padded to make everything line up on a nice boundary.
+ */
+#define PCAP_FDDIPAD 3
+
+/*
+ * Private data for capturing on Ultrix and DEC OSF/1^WDigital UNIX^W^W
+ * Tru64 UNIX packetfilter devices.
+ */
+struct pcap_pf {
+ int filtering_in_kernel; /* using kernel filter */
+ u_long TotPkts; /* can't oflow for 79 hrs on ether */
+ u_long TotAccepted; /* count accepted by filter */
+ u_long TotDrops; /* count of dropped packets */
+ long TotMissed; /* missed by i/f during this run */
+ long OrigMissed; /* missed by i/f before this run */
+};
+
static int pcap_setfilter_pf(pcap_t *, struct bpf_program *);
/*
@@ -87,15 +105,14 @@
static int
pcap_read_pf(pcap_t *pc, int cnt, pcap_handler callback, u_char *user)
{
+ struct pcap_pf *pf = pc->priv;
register u_char *p, *bp;
register int cc, n, buflen, inc;
register struct enstamp *sp;
#ifdef LBL_ALIGN
struct enstamp stamp;
#endif
-#ifdef PCAP_FDDIPAD
register int pad;
-#endif
again:
cc = pc->cc;
@@ -126,9 +143,7 @@
* Loop through each packet.
*/
n = 0;
-#ifdef PCAP_FDDIPAD
pad = pc->fddipad;
-#endif
while (cc > 0) {
/*
* Has "pcap_breakloop()" been called?
@@ -177,42 +192,34 @@
inc = ENALIGN(buflen + sp->ens_stamplen);
cc -= inc;
bp += inc;
- pc->md.TotPkts++;
- pc->md.TotDrops += sp->ens_dropped;
- pc->md.TotMissed = sp->ens_ifoverflows;
- if (pc->md.OrigMissed < 0)
- pc->md.OrigMissed = pc->md.TotMissed;
+ pf->TotPkts++;
+ pf->TotDrops += sp->ens_dropped;
+ pf->TotMissed = sp->ens_ifoverflows;
+ if (pf->OrigMissed < 0)
+ pf->OrigMissed = pf->TotMissed;
/*
* Short-circuit evaluation: if using BPF filter
* in kernel, no need to do it now - we already know
* the packet passed the filter.
*
-#ifdef PCAP_FDDIPAD
* Note: the filter code was generated assuming
* that pc->fddipad was the amount of padding
* before the header, as that's what's required
* in the kernel, so we run the filter before
* skipping that padding.
-#endif
*/
- if (pc->md.use_bpf ||
+ if (pf->filtering_in_kernel ||
bpf_filter(pc->fcode.bf_insns, p, sp->ens_count, buflen)) {
struct pcap_pkthdr h;
- pc->md.TotAccepted++;
+ pf->TotAccepted++;
h.ts = sp->ens_tstamp;
-#ifdef PCAP_FDDIPAD
h.len = sp->ens_count - pad;
-#else
- h.len = sp->ens_count;
-#endif
-#ifdef PCAP_FDDIPAD
p += pad;
buflen -= pad;
-#endif
h.caplen = buflen;
(*callback)(user, &h, p);
- if (++n >= cnt && cnt > 0) {
+ if (++n >= cnt && !PACKET_COUNT_IS_UNLIMITED(cnt)) {
pc->cc = cc;
pc->bp = bp;
return (n);
@@ -240,6 +247,7 @@
static int
pcap_stats_pf(pcap_t *p, struct pcap_stat *ps)
{
+ struct pcap_pf *pf = p->priv;
/*
* If packet filtering is being done in the kernel:
@@ -277,9 +285,9 @@
* the kernel by libpcap, but they may include packets not
* yet read from libpcap by the application.
*/
- ps->ps_recv = p->md.TotAccepted;
- ps->ps_drop = p->md.TotDrops;
- ps->ps_ifdrop = p->md.TotMissed - p->md.OrigMissed;
+ ps->ps_recv = pf->TotAccepted;
+ ps->ps_drop = pf->TotDrops;
+ ps->ps_ifdrop = pf->TotMissed - pf->OrigMissed;
return (0);
}
@@ -294,6 +302,7 @@
static int
pcap_activate_pf(pcap_t *p)
{
+ struct pcap_pf *pf = p->priv;
short enmode;
int backlog = -1; /* request the most */
struct enfilter Filter;
@@ -327,8 +336,10 @@
p->opt.source, pcap_strerror(errno));
goto bad;
}
- p->md.OrigMissed = -1;
- enmode = ENTSTAMP|ENBATCH|ENNONEXCL;
+ pf->OrigMissed = -1;
+ enmode = ENTSTAMP|ENNONEXCL;
+ if (!p->opt.immediate)
+ enmode |= ENBATCH;
if (p->opt.promisc)
enmode |= ENPROMISC;
if (ioctl(p->fd, EIOCMBIS, (caddr_t)&enmode) < 0) {
@@ -436,7 +447,6 @@
goto bad;
}
/* set truncation */
-#ifdef PCAP_FDDIPAD
if (p->linktype == DLT_FDDI) {
p->fddipad = PCAP_FDDIPAD;
@@ -444,7 +454,6 @@
p->snapshot += PCAP_FDDIPAD;
} else
p->fddipad = 0;
-#endif
if (ioctl(p->fd, EIOCTRUNCATE, (caddr_t)&p->snapshot) < 0) {
snprintf(p->errbuf, PCAP_ERRBUF_SIZE, "EIOCTRUNCATE: %s",
pcap_strerror(errno));
@@ -460,10 +469,10 @@
goto bad;
}
- if (p->md.timeout != 0) {
+ if (p->opt.timeout != 0) {
struct timeval timeout;
- timeout.tv_sec = p->md.timeout / 1000;
- timeout.tv_usec = (p->md.timeout * 1000) % 1000000;
+ timeout.tv_sec = p->opt.timeout / 1000;
+ timeout.tv_usec = (p->opt.timeout * 1000) % 1000000;
if (ioctl(p->fd, EIOCSRTIMEOUT, (caddr_t)&timeout) < 0) {
snprintf(p->errbuf, PCAP_ERRBUF_SIZE, "EIOCSRTIMEOUT: %s",
pcap_strerror(errno));
@@ -499,11 +508,11 @@
}
pcap_t *
-pcap_create(const char *device, char *ebuf)
+pcap_create_interface(const char *device, char *ebuf)
{
pcap_t *p;
- p = pcap_create_common(device, ebuf);
+ p = pcap_create_common(device, ebuf, sizeof (struct pcap_pf));
if (p == NULL)
return (NULL);
@@ -520,6 +529,7 @@
static int
pcap_setfilter_pf(pcap_t *p, struct bpf_program *fp)
{
+ struct pcap_pf *pf = p->priv;
struct bpf_version bv;
/*
@@ -561,7 +571,7 @@
* a window to annoy the user.
*/
fprintf(stderr, "tcpdump: Using kernel BPF filter\n");
- p->md.use_bpf = 1;
+ pf->filtering_in_kernel = 1;
/*
* Discard any previously-received packets,
@@ -599,6 +609,6 @@
* a warning of some sort.
*/
fprintf(stderr, "tcpdump: Filtering in user process\n");
- p->md.use_bpf = 0;
+ pf->filtering_in_kernel = 0;
return (0);
}
Index: libpcap/pcap_open_offline.3pcap.in
===================================================================
--- libpcap/pcap_open_offline.3pcap.in (revision 32783)
+++ libpcap/pcap_open_offline.3pcap.in (working copy)
@@ -19,9 +19,10 @@
.\" WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
.\" MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
.\"
-.TH PCAP_OPEN_OFFLINE 3PCAP "5 April 2008"
+.TH PCAP_OPEN_OFFLINE 3PCAP "1 July 2013"
.SH NAME
-pcap_open_offline, pcap_fopen_offline \- open a saved capture file for reading
+pcap_open_offline, pcap_open_offline_with_tstamp_precision,
+pcap_fopen_offline, pcap_fopen_offline_with_tstamp_precision \- open a saved capture file for reading
.SH SYNOPSIS
.nf
.ft B
@@ -35,12 +36,18 @@
.LP
.ft B
pcap_t *pcap_open_offline(const char *fname, char *errbuf);
+pcap_t *pcap_open_offline_with_tstamp_precision(const char *fname,
+ u_int precision, char *errbuf);
pcap_t *pcap_fopen_offline(FILE *fp, char *errbuf);
+pcap_t *pcap_fopen_offline_with_tstamp_precision(FILE *fp,
+ u_int precision, char *errbuf);
.ft
.fi
.SH DESCRIPTION
.B pcap_open_offline()
-is called to open a ``savefile'' for reading.
+and
+.B pcap_open_offline_with_tstamp_precision()
+are called to open a ``savefile'' for reading.
.PP
.I fname
specifies the name of the file to open. The file can have the pcap file
@@ -55,15 +62,37 @@
The name "-" in a synonym for
.BR stdin .
.PP
+.B pcap_open_offline_with_tstamp_precision()
+takes an additional
+.I precision
+argument specifying the time stamp precision desired;
+if
+.B PCAP_TSTAMP_PRECISION_MICRO
+is specified, packet time stamps will be supplied in seconds and
+microseconds,
+and if
+.B PCAP_TSTAMP_PRECISION_NANO
+is specified, packet time stamps will be supplied in seconds and
+nanoseconds. If the time stamps in the file do not have the same
+precision as the requested precision, they will be scaled up or down as
+necessary before being supplied.
+.PP
Alternatively, you may call
.B pcap_fopen_offline()
+or
+.B pcap_fopen_offline_with_tstamp_precision()
to read dumped data from an existing open stream
.IR fp .
+.B pcap_fopen_offline_with_tstamp_precision() takes an additional
+.I precision
+argument as described above.
Note that on Windows, that stream should be opened in binary mode.
.SH RETURN VALUE
-.B pcap_open_offline()
+.BR pcap_open_offline() ,
+.BR pcap_open_offline_with_tstamp_precision() ,
+.BR pcap_fopen_offline() ,
and
-.B pcap_fopen_offline()
+.B pcap_fopen_offline_with_tstamp_precision()
return a
.I pcap_t *
on success and
Index: libpcap/pcap_loop.3pcap
===================================================================
--- libpcap/pcap_loop.3pcap (revision 32783)
+++ libpcap/pcap_loop.3pcap (working copy)
@@ -84,7 +84,7 @@
\fIcnt\fP
was 0 was undefined; different platforms and devices behaved
differently, so code that must work with older versions of libpcap
-should use \-1, nor 0, as the value of
+should use \-1, not 0, as the value of
\fIcnt\fP.)
.ft R
.PP
@@ -115,12 +115,48 @@
not guaranteed to be valid after the callback routine returns; if the
code needs them to be valid after the callback, it must make a copy of
them.
+.PP
+The bytes of data from the packet begin with a link-layer header. The
+format of the link-layer header is indicated by the return value of the
+.B pcap_datalink()
+routine when handed the
+.B pcap_t
+value also passed to
+.B pcap_loop()
+or
+.BR pcap_dispatch() .
+.I http://www.tcpdump.org/linktypes.html
+lists the values
+.B pcap_datalink()
+can return and describes the packet formats that
+correspond to those values. The value it returns will be valid for all
+packets received unless and until
+.B pcap_set_datalink()
+is called; after a successful call to
+.BR pcap_set_datalink() ,
+all subsequent packets will have a link-layer header of the type
+specified by the link-layer header type value passed to
+.BR pcap_set_datalink() .
+.PP
+Do
+.B NOT
+assume that the packets for a given capture or ``savefile`` will have
+any given link-layer header type, such as
+.B DLT_EN10MB
+for Ethernet. For example, the "any" device on Linux will have a
+link-layer header type of
+.B DLT_LINUX_SLL
+even if all devices on the system at the time the "any" device is opened
+have some other data link type, such as
+.B DLT_EN10MB
+for Ethernet.
.SH RETURN VALUE
.B pcap_loop()
returns 0 if
.I cnt
-is exhausted, \-1 if an error occurs, or \-2 if the loop terminated due
-to a call to
+is exhausted or if, when reading from a ``savefile'', no more packets
+are available. It returns \-1 if an error occurs or \-2 if the loop
+terminated due to a call to
.B pcap_breakloop()
before any packets were processed.
It does
@@ -154,4 +190,5 @@
.I p
as an argument to fetch or display the error text.
.SH SEE ALSO
-pcap(3PCAP), pcap_geterr(3PCAP), pcap_breakloop(3PCAP)
+pcap(3PCAP), pcap_geterr(3PCAP), pcap_breakloop(3PCAP),
+pcap_datalink(3PCAP)
Index: libpcap/pcap_list_datalinks.3pcap.in
===================================================================
--- libpcap/pcap_list_datalinks.3pcap.in (revision 32783)
+++ libpcap/pcap_list_datalinks.3pcap.in (working copy)
@@ -47,11 +47,22 @@
.BR pcap_free_datalinks() ,
which frees the list of link-layer header types pointed to by
.IR dlt_list .
+.LP
+It must not be called on a pcap descriptor created by
+.B pcap_create()
+that has not yet been activated by
+.BR pcap_activate() .
.SH RETURN VALUE
.B pcap_list_datalinks()
-returns the number of link-layer header types in the array on success
-and \-1 on failure.
-If \-1 is returned,
+returns the number of link-layer header types in the array on success,
+.B PCAP_ERROR_NOT_ACTIVATED
+if called on a capture handle that has been created but not activated,
+and
+.B PCAP_ERROR
+(\-1) on other errors.
+If
+.B PCAP_ERROR
+is returned,
.B pcap_geterr()
or
.B pcap_perror()
Index: libpcap/pcap.c
===================================================================
--- libpcap/pcap.c (revision 32783)
+++ libpcap/pcap.c (working copy)
@@ -74,17 +74,56 @@
#include "pcap-int.h"
#ifdef HAVE_DAG_API
-#include <dagnew.h>
-#include <dagapi.h>
+#include "pcap-dag.h"
+#endif /* HAVE_DAG_API */
+
+#ifdef HAVE_SEPTEL_API
+#include "pcap-septel.h"
+#endif /* HAVE_SEPTEL_API */
+
+#ifdef HAVE_SNF_API
+#include "pcap-snf.h"
+#endif /* HAVE_SNF_API */
+
+#ifdef PCAP_SUPPORT_USB
+#include "pcap-usb-linux.h"
#endif
+#ifdef PCAP_SUPPORT_BT
+#include "pcap-bt-linux.h"
+#endif
+
+#ifdef PCAP_SUPPORT_CAN
+#include "pcap-can-linux.h"
+#endif
+
+#ifdef PCAP_SUPPORT_CANUSB
+#include "pcap-canusb-linux.h"
+#endif
+
+#ifdef PCAP_SUPPORT_NETFILTER
+#include "pcap-netfilter-linux.h"
+#endif
+
+#ifdef PCAP_SUPPORT_DBUS
+#include "pcap-dbus.h"
+#endif
+
int
-pcap_not_initialized(pcap_t *pcap)
+pcap_not_initialized(pcap_t *pcap _U_)
{
/* this means 'not initialized' */
return (PCAP_ERROR_NOT_ACTIVATED);
}
+#ifdef WIN32
+Adapter *
+pcap_no_adapter(pcap_t *pcap _U_)
+{
+ return (NULL);
+}
+#endif
+
/*
* Returns 1 if rfmon mode can be set on the pcap_t, 0 if it can't,
* a PCAP_ERROR value on an error.
@@ -159,7 +198,7 @@
* packet data cannot be guaranteed to be available after the callback
* returns, so that a copy must be made.
*/
-static void
+void
pcap_oneshot(u_char *user, const struct pcap_pkthdr *h, const u_char *pkt)
{
struct oneshot_userdata *sp = (struct oneshot_userdata *)user;
@@ -195,7 +234,7 @@
/* Saves a pointer to the packet headers */
*pkt_header= &p->pcap_header;
- if (p->sf.rfile != NULL) {
+ if (p->rfile != NULL) {
int status;
/* We are on an offline capture */
@@ -232,6 +271,176 @@
return (p->read_op(p, 1, p->oneshot_callback, (u_char *)&s));
}
+#if defined(DAG_ONLY)
+int
+pcap_findalldevs(pcap_if_t **alldevsp, char *errbuf)
+{
+ return (dag_findalldevs(alldevsp, errbuf));
+}
+
+pcap_t *
+pcap_create(const char *source, char *errbuf)
+{
+ return (dag_create(source, errbuf));
+}
+#elif defined(SEPTEL_ONLY)
+int
+pcap_findalldevs(pcap_if_t **alldevsp, char *errbuf)
+{
+ return (septel_findalldevs(alldevsp, errbuf));
+}
+
+pcap_t *
+pcap_create(const char *source, char *errbuf)
+{
+ return (septel_create(source, errbuf));
+}
+#elif defined(SNF_ONLY)
+int
+pcap_findalldevs(pcap_if_t **alldevsp, char *errbuf)
+{
+ return (snf_findalldevs(alldevsp, errbuf));
+}
+
+pcap_t *
+pcap_create(const char *source, char *errbuf)
+{
+ return (snf_create(source, errbuf));
+}
+#else /* regular pcap */
+struct capture_source_type {
+ int (*findalldevs_op)(pcap_if_t **, char *);
+ pcap_t *(*create_op)(const char *, char *, int *);
+} capture_source_types[] = {
+#ifdef HAVE_DAG_API
+ { dag_findalldevs, dag_create },
+#endif
+#ifdef HAVE_SEPTEL_API
+ { septel_findalldevs, septel_create },
+#endif
+#ifdef HAVE_SNF_API
+ { snf_findalldevs, snf_create },
+#endif
+#ifdef PCAP_SUPPORT_BT
+ { bt_findalldevs, bt_create },
+#endif
+#if PCAP_SUPPORT_CANUSB
+ { canusb_findalldevs, canusb_create },
+#endif
+#ifdef PCAP_SUPPORT_CAN
+ { can_findalldevs, can_create },
+#endif
+#ifdef PCAP_SUPPORT_USB
+ { usb_findalldevs, usb_create },
+#endif
+#ifdef PCAP_SUPPORT_NETFILTER
+ { netfilter_findalldevs, netfilter_create },
+#endif
+#ifdef PCAP_SUPPORT_DBUS
+ { dbus_findalldevs, dbus_create },
+#endif
+ { NULL, NULL }
+};
+
+/*
+ * Get a list of all capture sources that are up and that we can open.
+ * Returns -1 on error, 0 otherwise.
+ * The list, as returned through "alldevsp", may be null if no interfaces
+ * were up and could be opened.
+ */
+int
+pcap_findalldevs(pcap_if_t **alldevsp, char *errbuf)
+{
+ size_t i;
+
+ /*
+ * Get the list of regular interfaces first.
+ */
+ if (pcap_findalldevs_interfaces(alldevsp, errbuf) == -1)
+ return (-1); /* failure */
+
+ /*
+ * Add any interfaces that need a platform-specific mechanism
+ * to find.
+ */
+ if (pcap_platform_finddevs(alldevsp, errbuf) == -1) {
+ /*
+ * We had an error; free the list we've been
+ * constructing.
+ */
+ if (*alldevsp != NULL) {
+ pcap_freealldevs(*alldevsp);
+ *alldevsp = NULL;
+ }
+ return (-1);
+ }
+
+ /*
+ * Ask each of the non-local-network-interface capture
+ * source types what interfaces they have.
+ */
+ for (i = 0; capture_source_types[i].findalldevs_op != NULL; i++) {
+ if (capture_source_types[i].findalldevs_op(alldevsp, errbuf) == -1) {
+ /*
+ * We had an error; free the list we've been
+ * constructing.
+ */
+ if (*alldevsp != NULL) {
+ pcap_freealldevs(*alldevsp);
+ *alldevsp = NULL;
+ }
+ return (-1);
+ }
+ }
+ return (0);
+}
+
+pcap_t *
+pcap_create(const char *source, char *errbuf)
+{
+ size_t i;
+ int is_theirs;
+ pcap_t *p;
+
+ /*
+ * A null source name is equivalent to the "any" device -
+ * which might not be supported on this platform, but
+ * this means that you'll get a "not supported" error
+ * rather than, say, a crash when we try to dereference
+ * the null pointer.
+ */
+ if (source == NULL)
+ source = "any";
+
+ /*
+ * Try each of the non-local-network-interface capture
+ * source types until we find one that works for this
+ * device or run out of types.
+ */
+ for (i = 0; capture_source_types[i].create_op != NULL; i++) {
+ is_theirs = 0;
+ p = capture_source_types[i].create_op(source, errbuf, &is_theirs);
+ if (is_theirs) {
+ /*
+ * The device name refers to a device of the
+ * type in question; either it succeeded,
+ * in which case p refers to a pcap_t to
+ * later activate for the device, or it
+ * failed, in which case p is null and we
+ * should return that to report the failure
+ * to create.
+ */
+ return (p);
+ }
+ }
+
+ /*
+ * OK, try it as a regular network interface.
+ */
+ return (pcap_create_interface(source, errbuf));
+}
+#endif
+
static void
initialize_ops(pcap_t *p)
{
@@ -252,6 +461,7 @@
p->setbuff_op = (setbuff_op_t)pcap_not_initialized;
p->setmode_op = (setmode_op_t)pcap_not_initialized;
p->setmintocopy_op = (setmintocopy_op_t)pcap_not_initialized;
+ p->getadapter_op = pcap_no_adapter;
#endif
/*
@@ -262,30 +472,65 @@
p->cleanup_op = pcap_cleanup_live_common;
/*
- * In most cases, the standard one-short callback can
+ * In most cases, the standard one-shot callback can
* be used for pcap_next()/pcap_next_ex().
*/
p->oneshot_callback = pcap_oneshot;
}
-pcap_t *
-pcap_create_common(const char *source, char *ebuf)
+static pcap_t *
+pcap_alloc_pcap_t(char *ebuf, size_t size)
{
+ char *chunk;
pcap_t *p;
- p = malloc(sizeof(*p));
- if (p == NULL) {
+ /*
+ * Allocate a chunk of memory big enough for a pcap_t
+ * plus a structure following it of size "size". The
+ * structure following it is a private data structure
+ * for the routines that handle this pcap_t.
+ */
+ chunk = malloc(sizeof (pcap_t) + size);
+ if (chunk == NULL) {
snprintf(ebuf, PCAP_ERRBUF_SIZE, "malloc: %s",
pcap_strerror(errno));
return (NULL);
}
- memset(p, 0, sizeof(*p));
+ memset(chunk, 0, sizeof (pcap_t) + size);
+
+ /*
+ * Get a pointer to the pcap_t at the beginning.
+ */
+ p = (pcap_t *)chunk;
+
#ifndef WIN32
p->fd = -1; /* not opened yet */
p->selectable_fd = -1;
- p->send_fd = -1;
#endif
+ if (size == 0) {
+ /* No private data was requested. */
+ p->priv = NULL;
+ } else {
+ /*
+ * Set the pointer to the private data; that's the structure
+ * of size "size" following the pcap_t.
+ */
+ p->priv = (void *)(chunk + sizeof (pcap_t));
+ }
+
+ return (p);
+}
+
+pcap_t *
+pcap_create_common(const char *source, char *ebuf, size_t size)
+{
+ pcap_t *p;
+
+ p = pcap_alloc_pcap_t(ebuf, size);
+ if (p == NULL)
+ return (NULL);
+
p->opt.source = strdup(source);
if (p->opt.source == NULL) {
snprintf(ebuf, PCAP_ERRBUF_SIZE, "malloc: %s",
@@ -305,11 +550,14 @@
initialize_ops(p);
/* put in some defaults*/
- pcap_set_timeout(p, 0);
- pcap_set_snaplen(p, 65535); /* max packet size */
+ pcap_set_snaplen(p, 65535); /* max packet size */
+ p->opt.timeout = 0; /* no timeout specified */
+ p->opt.buffer_size = 0; /* use the platform's default */
p->opt.promisc = 0;
- p->opt.buffer_size = 0;
+ p->opt.rfmon = 0;
+ p->opt.immediate = 0;
p->opt.tstamp_type = -1; /* default to not setting time stamp type */
+ p->opt.tstamp_precision = PCAP_TSTAMP_PRECISION_MICRO;
return (p);
}
@@ -356,7 +604,7 @@
{
if (pcap_check_activated(p))
return (PCAP_ERROR_ACTIVATED);
- p->md.timeout = timeout_ms;
+ p->opt.timeout = timeout_ms;
return (0);
}
@@ -369,33 +617,45 @@
return (PCAP_ERROR_ACTIVATED);
/*
- * If p->tstamp_type_count is 0, we don't support setting
- * the time stamp type at all.
+ * If p->tstamp_type_count is 0, we only support PCAP_TSTAMP_HOST;
+ * the default time stamp type is PCAP_TSTAMP_HOST.
*/
- if (p->tstamp_type_count == 0)
- return (PCAP_ERROR_CANTSET_TSTAMP_TYPE);
-
- /*
- * Check whether we claim to support this type of time stamp.
- */
- for (i = 0; i < p->tstamp_type_count; i++) {
- if (p->tstamp_type_list[i] == tstamp_type) {
- /*
- * Yes.
- */
+ if (p->tstamp_type_count == 0) {
+ if (tstamp_type == PCAP_TSTAMP_HOST) {
p->opt.tstamp_type = tstamp_type;
return (0);
}
+ } else {
+ /*
+ * Check whether we claim to support this type of time stamp.
+ */
+ for (i = 0; i < p->tstamp_type_count; i++) {
+ if (p->tstamp_type_list[i] == tstamp_type) {
+ /*
+ * Yes.
+ */
+ p->opt.tstamp_type = tstamp_type;
+ return (0);
+ }
+ }
}
/*
- * No. We support setting the time stamp type, but not to this
- * particular value.
+ * We don't support this type of time stamp.
*/
return (PCAP_WARNING_TSTAMP_TYPE_NOTSUP);
}
int
+pcap_set_immediate_mode(pcap_t *p, int immediate)
+{
+ if (pcap_check_activated(p))
+ return (PCAP_ERROR_ACTIVATED);
+ p->opt.immediate = immediate;
+ return (0);
+}
+
+int
pcap_set_buffer_size(pcap_t *p, int buffer_size)
{
if (pcap_check_activated(p))
@@ -405,6 +665,54 @@
}
int
+pcap_set_tstamp_precision(pcap_t *p, int tstamp_precision)
+{
+ int i;
+
+ if (pcap_check_activated(p))
+ return (PCAP_ERROR_ACTIVATED);
+
+ /*
+ * If p->tstamp_precision_count is 0, we only support setting
+ * the time stamp precision to microsecond precision; every
+ * pcap module *MUST* support microsecond precision, even if
+ * it does so by converting the native precision to
+ * microseconds.
+ */
+ if (p->tstamp_precision_count == 0) {
+ if (tstamp_precision == PCAP_TSTAMP_PRECISION_MICRO) {
+ p->opt.tstamp_precision = tstamp_precision;
+ return (0);
+ }
+ } else {
+ /*
+ * Check whether we claim to support this precision of
+ * time stamp.
+ */
+ for (i = 0; i < p->tstamp_precision_count; i++) {
+ if (p->tstamp_precision_list[i] == tstamp_precision) {
+ /*
+ * Yes.
+ */
+ p->opt.tstamp_precision = tstamp_precision;
+ return (0);
+ }
+ }
+ }
+
+ /*
+ * We don't support this time stamp precision.
+ */
+ return (PCAP_ERROR_TSTAMP_PRECISION_NOTSUP);
+}
+
+int
+pcap_get_tstamp_precision(pcap_t *p)
+{
+ return (p->opt.tstamp_precision);
+}
+
+int
pcap_activate(pcap_t *p)
{
int status;
@@ -491,6 +799,27 @@
return (NULL);
}
+pcap_t *
+pcap_open_offline_common(char *ebuf, size_t size)
+{
+ pcap_t *p;
+
+ p = pcap_alloc_pcap_t(ebuf, size);
+ if (p == NULL)
+ return (NULL);
+
+ p->opt.tstamp_precision = PCAP_TSTAMP_PRECISION_MICRO;
+ p->opt.source = strdup("(savefile)");
+ if (p->opt.source == NULL) {
+ snprintf(ebuf, PCAP_ERRBUF_SIZE, "malloc: %s",
+ pcap_strerror(errno));
+ free(p);
+ return (NULL);
+ }
+
+ return (p);
+}
+
int
pcap_dispatch(pcap_t *p, int cnt, pcap_handler callback, u_char *user)
{
@@ -513,7 +842,7 @@
register int n;
for (;;) {
- if (p->sf.rfile != NULL) {
+ if (p->rfile != NULL) {
/*
* 0 means EOF, so don't loop if we get 0.
*/
@@ -529,7 +858,7 @@
}
if (n <= 0)
return (n);
- if (cnt > 0) {
+ if (!PACKET_COUNT_IS_UNLIMITED(cnt)) {
cnt -= n;
if (cnt <= 0)
return (0);
@@ -549,18 +878,24 @@
int
pcap_datalink(pcap_t *p)
{
+ if (!p->activated)
+ return (PCAP_ERROR_NOT_ACTIVATED);
return (p->linktype);
}
int
pcap_datalink_ext(pcap_t *p)
{
+ if (!p->activated)
+ return (PCAP_ERROR_NOT_ACTIVATED);
return (p->linktype_ext);
}
int
pcap_list_datalinks(pcap_t *p, int **dlt_buffer)
{
+ if (!p->activated)
+ return (PCAP_ERROR_NOT_ACTIVATED);
if (p->dlt_count == 0) {
/*
* We couldn't fetch the list of DLTs, which means
@@ -572,7 +907,7 @@
if (*dlt_buffer == NULL) {
(void)snprintf(p->errbuf, sizeof(p->errbuf),
"malloc: %s", pcap_strerror(errno));
- return (-1);
+ return (PCAP_ERROR);
}
**dlt_buffer = p->linktype;
return (1);
@@ -581,7 +916,7 @@
if (*dlt_buffer == NULL) {
(void)snprintf(p->errbuf, sizeof(p->errbuf),
"malloc: %s", pcap_strerror(errno));
- return (-1);
+ return (PCAP_ERROR);
}
(void)memcpy(*dlt_buffer, p->dlt_list,
sizeof(**dlt_buffer) * p->dlt_count);
@@ -786,6 +1121,7 @@
DLT_CHOICE(DLT_LINUX_SLL, "Linux cooked"),
DLT_CHOICE(DLT_LTALK, "Localtalk"),
DLT_CHOICE(DLT_PFLOG, "OpenBSD pflog file"),
+ DLT_CHOICE(DLT_PFSYNC, "Packet filter state syncing"),
DLT_CHOICE(DLT_PRISM_HEADER, "802.11 plus Prism header"),
DLT_CHOICE(DLT_IP_OVER_FC, "RFC 2625 IP-over-Fibre Channel"),
DLT_CHOICE(DLT_SUNATM, "Sun raw ATM"),
@@ -808,6 +1144,7 @@
DLT_CHOICE(DLT_LINUX_IRDA, "Linux IrDA"),
DLT_CHOICE(DLT_IEEE802_11_RADIO_AVS, "802.11 plus AVS radio information header"),
DLT_CHOICE(DLT_JUNIPER_MONITOR, "Juniper Passive Monitor PIC"),
+ DLT_CHOICE(DLT_BACNET_MS_TP, "BACnet MS/TP"),
DLT_CHOICE(DLT_PPP_PPPD, "PPP for pppd, with direction flag"),
DLT_CHOICE(DLT_JUNIPER_PPPOE, "Juniper PPPoE"),
DLT_CHOICE(DLT_JUNIPER_PPPOE_ATM, "Juniper PPPoE/ATM"),
@@ -865,6 +1202,7 @@
DLT_CHOICE(DLT_NETANALYZER, "Ethernet with Hilscher netANALYZER pseudo-header"),
DLT_CHOICE(DLT_NETANALYZER_TRANSPARENT, "Ethernet with Hilscher netANALYZER pseudo-header and with preamble and SFD"),
DLT_CHOICE(DLT_IPOIB, "RFC 4391 IP-over-Infiniband"),
+ DLT_CHOICE(DLT_DBUS, "D-Bus"),
DLT_CHOICE_SENTINEL
};
@@ -959,31 +1297,39 @@
int
pcap_snapshot(pcap_t *p)
{
+ if (!p->activated)
+ return (PCAP_ERROR_NOT_ACTIVATED);
return (p->snapshot);
}
int
pcap_is_swapped(pcap_t *p)
{
- return (p->sf.swapped);
+ if (!p->activated)
+ return (PCAP_ERROR_NOT_ACTIVATED);
+ return (p->swapped);
}
int
pcap_major_version(pcap_t *p)
{
- return (p->sf.version_major);
+ if (!p->activated)
+ return (PCAP_ERROR_NOT_ACTIVATED);
+ return (p->version_major);
}
int
pcap_minor_version(pcap_t *p)
{
- return (p->sf.version_minor);
+ if (!p->activated)
+ return (PCAP_ERROR_NOT_ACTIVATED);
+ return (p->version_minor);
}
FILE *
pcap_file(pcap_t *p)
{
- return (p->sf.rfile);
+ return (p->rfile);
}
int
@@ -995,7 +1341,7 @@
if (p->adapter != NULL)
return ((int)(DWORD)p->adapter->hFile);
else
- return (-1);
+ return (PCAP_ERROR);
#endif
}
@@ -1022,7 +1368,18 @@
int
pcap_getnonblock(pcap_t *p, char *errbuf)
{
- return (p->getnonblock_op(p, errbuf));
+ int ret;
+
+ ret = p->getnonblock_op(p, errbuf);
+ if (ret == -1) {
+ /*
+ * In case somebody depended on the bug wherein
+ * the error message was put into p->errbuf
+ * by pcap_getnonblock_fd().
+ */
+ strlcpy(p->errbuf, errbuf, PCAP_ERRBUF_SIZE);
+ }
+ return (ret);
}
/*
@@ -1040,7 +1397,7 @@
fdflags = fcntl(p->fd, F_GETFL, 0);
if (fdflags == -1) {
- snprintf(p->errbuf, PCAP_ERRBUF_SIZE, "F_GETFL: %s",
+ snprintf(errbuf, PCAP_ERRBUF_SIZE, "F_GETFL: %s",
pcap_strerror(errno));
return (-1);
}
@@ -1054,7 +1411,18 @@
int
pcap_setnonblock(pcap_t *p, int nonblock, char *errbuf)
{
- return (p->setnonblock_op(p, nonblock, errbuf));
+ int ret;
+
+ ret = p->setnonblock_op(p, nonblock, errbuf);
+ if (ret == -1) {
+ /*
+ * In case somebody depended on the bug wherein
+ * the error message was put into p->errbuf
+ * by pcap_setnonblock_fd().
+ */
+ strlcpy(p->errbuf, errbuf, PCAP_ERRBUF_SIZE);
+ }
+ return (ret);
}
#if !defined(WIN32) && !defined(MSDOS)
@@ -1071,7 +1439,7 @@
fdflags = fcntl(p->fd, F_GETFL, 0);
if (fdflags == -1) {
- snprintf(p->errbuf, PCAP_ERRBUF_SIZE, "F_GETFL: %s",
+ snprintf(errbuf, PCAP_ERRBUF_SIZE, "F_GETFL: %s",
pcap_strerror(errno));
return (-1);
}
@@ -1080,7 +1448,7 @@
else
fdflags &= ~O_NONBLOCK;
if (fcntl(p->fd, F_SETFL, fdflags) == -1) {
- snprintf(p->errbuf, PCAP_ERRBUF_SIZE, "F_SETFL: %s",
+ snprintf(errbuf, PCAP_ERRBUF_SIZE, "F_SETFL: %s",
pcap_strerror(errno));
return (-1);
}
@@ -1172,6 +1540,9 @@
case PCAP_ERROR_PROMISC_PERM_DENIED:
return ("You don't have permission to capture in promiscuous mode on that device");
+
+ case PCAP_ERROR_TSTAMP_PRECISION_NOTSUP:
+ return ("That device doesn't support that time stamp precision");
}
(void)snprintf(ebuf, sizeof ebuf, "Unknown error: %d", errnum);
return(ebuf);
@@ -1269,6 +1640,12 @@
return (p->setmintocopy_op(p, size));
}
+Adapter *
+pcap_get_adapter(pcap_t *p)
+{
+ return (p->getadapter_op(p));
+}
+
static int
pcap_setmintocopy_dead(pcap_t *p, int size)
{
@@ -1336,7 +1713,7 @@
void
pcap_add_to_pcaps_to_close(pcap_t *p)
{
- p->md.next = pcaps_to_close;
+ p->next = pcaps_to_close;
pcaps_to_close = p;
}
@@ -1346,7 +1723,7 @@
pcap_t *pc, *prevpc;
for (pc = pcaps_to_close, prevpc = NULL; pc != NULL;
- prevpc = pc, pc = pc->md.next) {
+ prevpc = pc, pc = pc->next) {
if (pc == p) {
/*
* Found it. Remove it from the list.
@@ -1355,12 +1732,12 @@
/*
* It was at the head of the list.
*/
- pcaps_to_close = pc->md.next;
+ pcaps_to_close = pc->next;
} else {
/*
* It was in the middle of the list.
*/
- prevpc->md.next = pc->md.next;
+ prevpc->next = pc->next;
}
break;
}
@@ -1384,6 +1761,11 @@
p->tstamp_type_list = NULL;
p->tstamp_type_count = 0;
}
+ if (p->tstamp_precision_list != NULL) {
+ free(p->tstamp_precision_list);
+ p->tstamp_precision_list = NULL;
+ p->tstamp_precision_count = 0;
+ }
pcap_freecode(&p->fcode);
#if !defined(WIN32) && !defined(MSDOS)
if (p->fd >= 0) {
@@ -1391,7 +1773,6 @@
p->fd = -1;
}
p->selectable_fd = -1;
- p->send_fd = -1;
#endif
}
@@ -1402,16 +1783,26 @@
}
pcap_t *
-pcap_open_dead(int linktype, int snaplen)
+pcap_open_dead_with_tstamp_precision(int linktype, int snaplen, u_int precision)
{
pcap_t *p;
+ switch (precision) {
+
+ case PCAP_TSTAMP_PRECISION_MICRO:
+ case PCAP_TSTAMP_PRECISION_NANO:
+ break;
+
+ default:
+ return NULL;
+ }
p = malloc(sizeof(*p));
if (p == NULL)
return NULL;
memset (p, 0, sizeof(*p));
p->snapshot = snaplen;
p->linktype = linktype;
+ p->opt.tstamp_precision = precision;
p->stats_op = pcap_stats_dead;
#ifdef WIN32
p->setbuff_op = pcap_setbuff_dead;
@@ -1423,6 +1814,13 @@
return (p);
}
+pcap_t *
+pcap_open_dead(int linktype, int snaplen)
+{
+ return (pcap_open_dead_with_tstamp_precision(linktype, snaplen,
+ PCAP_TSTAMP_PRECISION_MICRO));
+}
+
/*
* API compatible with WinPcap's "send a packet" routine - returns -1
* on error, 0 otherwise.
@@ -1463,10 +1861,10 @@
* the packet doesn't pass and non-zero if the packet does pass.
*/
int
-pcap_offline_filter(struct bpf_program *fp, const struct pcap_pkthdr *h,
+pcap_offline_filter(const struct bpf_program *fp, const struct pcap_pkthdr *h,
const u_char *pkt)
{
- struct bpf_insn *fcode = fp->bf_insns;
+ const struct bpf_insn *fcode = fp->bf_insns;
if (fcode != NULL)
return (bpf_filter(fcode, pkt, h->len, h->caplen));
@@ -1528,6 +1926,8 @@
strlen(pcap_version_string);
full_pcap_version_string =
malloc(full_pcap_version_string_len);
+ if (full_pcap_version_string == NULL)
+ return (NULL);
sprintf(full_pcap_version_string,
pcap_version_string_fmt, wpcap_version_string,
pcap_version_string);
@@ -1545,7 +1945,8 @@
strlen(packet_version_string) +
strlen(pcap_version_string);
full_pcap_version_string = malloc(full_pcap_version_string_len);
-
+ if (full_pcap_version_string == NULL)
+ return (NULL);
sprintf(full_pcap_version_string,
pcap_version_string_packet_dll_fmt,
wpcap_version_string, packet_version_string,
@@ -1574,6 +1975,8 @@
sizeof dospfx + strlen(pcap_version_string);
full_pcap_version_string =
malloc(full_pcap_version_string_len);
+ if (full_pcap_version_string == NULL)
+ return (NULL);
strcpy(full_pcap_version_string, dospfx);
strcat(full_pcap_version_string, pcap_version_string);
}
Index: libpcap/sf-pcap-ng.c
===================================================================
--- libpcap/sf-pcap-ng.c (revision 32783)
+++ libpcap/sf-pcap-ng.c (working copy)
@@ -201,6 +201,29 @@
bpf_u_int32 block_type;
};
+typedef enum {
+ PASS_THROUGH,
+ SCALE_UP,
+ SCALE_DOWN
+} tstamp_scale_type_t;
+
+/*
+ * Per-interface information.
+ */
+struct pcap_ng_if {
+ u_int tsresol; /* time stamp resolution */
+ u_int64_t tsoffset; /* time stamp offset */
+ tstamp_scale_type_t scale_type; /* how to scale */
+};
+
+struct pcap_ng_sf {
+ u_int user_tsresol; /* time stamp resolution requested by the user */
+ bpf_u_int32 ifcount; /* number of interfaces seen in this capture */
+ bpf_u_int32 ifaces_size; /* size of arrary below */
+ struct pcap_ng_if *ifaces; /* array of interface information */
+};
+
+static void pcap_ng_cleanup(pcap_t *p);
static int pcap_ng_next_packet(pcap_t *p, struct pcap_pkthdr *hdr,
u_char **data);
@@ -239,7 +262,7 @@
if (status <= 0)
return (status); /* error or EOF */
- if (p->sf.swapped) {
+ if (p->swapped) {
bhdr.block_type = SWAPLONG(bhdr.block_type);
bhdr.total_length = SWAPLONG(bhdr.total_length);
}
@@ -346,7 +369,7 @@
/*
* Byte-swap it if necessary.
*/
- if (p->sf.swapped) {
+ if (p->swapped) {
opthdr->option_code = SWAPSHORT(opthdr->option_code);
opthdr->option_length = SWAPSHORT(opthdr->option_length);
}
@@ -481,7 +504,7 @@
}
saw_tsoffset = 1;
memcpy(tsoffset, optvalue, sizeof(*tsoffset));
- if (p->sf.swapped)
+ if (p->swapped)
*tsoffset = SWAPLL(*tsoffset);
break;
@@ -494,23 +517,152 @@
return (0);
}
+static int
+add_interface(pcap_t *p, struct block_cursor *cursor, char *errbuf)
+{
+ struct pcap_ng_sf *ps;
+ u_int tsresol;
+ u_int64_t tsoffset;
+
+ ps = p->priv;
+
+ /*
+ * Count this interface.
+ */
+ ps->ifcount++;
+
+ /*
+ * Grow the array of per-interface information as necessary.
+ */
+ if (ps->ifcount > ps->ifaces_size) {
+ /*
+ * We need to grow the array.
+ */
+ if (ps->ifaces == NULL) {
+ /*
+ * It's currently empty.
+ */
+ ps->ifaces_size = 1;
+ ps->ifaces = malloc(sizeof (struct pcap_ng_if));
+ } else {
+ /*
+ * It's not currently empty; double its size.
+ * (Perhaps overkill once we have a lot of interfaces.)
+ */
+ ps->ifaces_size *= 2;
+ ps->ifaces = realloc(ps->ifaces, ps->ifaces_size * sizeof (struct pcap_ng_if));
+ }
+ if (ps->ifaces == NULL) {
+ /*
+ * We ran out of memory.
+ * Give up.
+ */
+ snprintf(errbuf, PCAP_ERRBUF_SIZE,
+ "out of memory for per-interface information (%u interfaces)",
+ ps->ifcount);
+ return (0);
+ }
+ }
+
+ /*
+ * Set the default time stamp resolution and offset.
+ */
+ tsresol = 1000000; /* microsecond resolution */
+ tsoffset = 0; /* absolute timestamps */
+
+ /*
+ * Now look for various time stamp options, so we know
+ * how to interpret the time stamps for this interface.
+ */
+ if (process_idb_options(p, cursor, &tsresol, &tsoffset, errbuf) == -1)
+ return (0);
+
+ ps->ifaces[ps->ifcount - 1].tsresol = tsresol;
+ ps->ifaces[ps->ifcount - 1].tsoffset = tsoffset;
+
+ /*
+ * Determine whether we're scaling up or down or not
+ * at all for this interface.
+ */
+ switch (p->opt.tstamp_precision) {
+
+ case PCAP_TSTAMP_PRECISION_MICRO:
+ if (tsresol == 1000000) {
+ /*
+ * The resolution is 1 microsecond,
+ * so we don't have to do scaling.
+ */
+ ps->ifaces[ps->ifcount - 1].scale_type = PASS_THROUGH;
+ } else if (tsresol > 1000000) {
+ /*
+ * The resolution is greater than
+ * 1 microsecond, so we have to
+ * scale the timestamps down.
+ */
+ ps->ifaces[ps->ifcount - 1].scale_type = SCALE_DOWN;
+ } else {
+ /*
+ * The resolution is less than 1
+ * microsecond, so we have to scale
+ * the timestamps up.
+ */
+ ps->ifaces[ps->ifcount - 1].scale_type = SCALE_UP;
+ }
+ break;
+
+ case PCAP_TSTAMP_PRECISION_NANO:
+ if (tsresol == 1000000000) {
+ /*
+ * The resolution is 1 nanosecond,
+ * so we don't have to do scaling.
+ */
+ ps->ifaces[ps->ifcount - 1].scale_type = PASS_THROUGH;
+ } else if (tsresol > 1000000000) {
+ /*
+ * The resolution is greater than
+ * 1 nanosecond, so we have to
+ * scale the timestamps down.
+ */
+ ps->ifaces[ps->ifcount - 1].scale_type = SCALE_DOWN;
+ } else {
+ /*
+ * The resolution is less than 1
+ * nanosecond, so we have to scale
+ * the timestamps up.
+ */
+ ps->ifaces[ps->ifcount - 1].scale_type = SCALE_UP;
+ }
+ break;
+ }
+ return (1);
+}
+
/*
* Check whether this is a pcap-ng savefile and, if it is, extract the
* relevant information from the header.
*/
-int
-pcap_ng_check_header(pcap_t *p, bpf_u_int32 magic, FILE *fp, char *errbuf)
+pcap_t *
+pcap_ng_check_header(bpf_u_int32 magic, FILE *fp, u_int precision, char *errbuf,
+ int *err)
{
size_t amt_read;
bpf_u_int32 total_length;
bpf_u_int32 byte_order_magic;
struct block_header *bhdrp;
struct section_header_block *shbp;
+ pcap_t *p;
+ int swapped = 0;
+ struct pcap_ng_sf *ps;
int status;
struct block_cursor cursor;
struct interface_description_block *idbp;
/*
+ * Assume no read errors.
+ */
+ *err = 0;
+
+ /*
* Check whether the first 4 bytes of the file are the block
* type for a pcap-ng savefile.
*/
@@ -524,7 +676,7 @@
* this as possibly being a pcap-ng file transferred
* between UN*X and Windows in text file format?
*/
- return (0); /* nope */
+ return (NULL); /* nope */
}
/*
@@ -544,14 +696,15 @@
snprintf(errbuf, PCAP_ERRBUF_SIZE,
"error reading dump file: %s",
pcap_strerror(errno));
- return (-1); /* fail */
+ *err = 1;
+ return (NULL); /* fail */
}
/*
* Possibly a weird short text file, so just say
* "not pcap-ng".
*/
- return (0);
+ return (NULL);
}
amt_read = fread(&byte_order_magic, 1, sizeof(byte_order_magic), fp);
if (amt_read < sizeof(byte_order_magic)) {
@@ -559,14 +712,15 @@
snprintf(errbuf, PCAP_ERRBUF_SIZE,
"error reading dump file: %s",
pcap_strerror(errno));
- return (-1); /* fail */
+ *err = 1;
+ return (NULL); /* fail */
}
/*
* Possibly a weird short text file, so just say
* "not pcap-ng".
*/
- return (0);
+ return (NULL);
}
if (byte_order_magic != BYTE_ORDER_MAGIC) {
byte_order_magic = SWAPLONG(byte_order_magic);
@@ -574,9 +728,9 @@
/*
* Not a pcap-ng file.
*/
- return (0);
+ return (NULL);
}
- p->sf.swapped = 1;
+ swapped = 1;
total_length = SWAPLONG(total_length);
}
@@ -588,10 +742,47 @@
"Section Header Block in pcap-ng dump file has a length of %u < %lu",
total_length,
(unsigned long)(sizeof(*bhdrp) + sizeof(*shbp) + sizeof(struct block_trailer)));
- return (-1);
+ *err = 1;
+ return (NULL);
}
/*
+ * OK, this is a good pcap-ng file.
+ * Allocate a pcap_t for it.
+ */
+ p = pcap_open_offline_common(errbuf, sizeof (struct pcap_ng_sf));
+ if (p == NULL) {
+ /* Allocation failed. */
+ *err = 1;
+ return (NULL);
+ }
+ p->swapped = swapped;
+ ps = p->priv;
+
+ /*
+ * What precision does the user want?
+ */
+ switch (precision) {
+
+ case PCAP_TSTAMP_PRECISION_MICRO:
+ ps->user_tsresol = 1000000;
+ break;
+
+ case PCAP_TSTAMP_PRECISION_NANO:
+ ps->user_tsresol = 1000000000;
+ break;
+
+ default:
+ snprintf(errbuf, PCAP_ERRBUF_SIZE,
+ "unknown time stamp resolution %u", precision);
+ free(p);
+ *err = 1;
+ return (NULL);
+ }
+
+ p->opt.tstamp_precision = precision;
+
+ /*
* Allocate a buffer into which to read blocks. We default to
* the maximum of:
*
@@ -609,7 +800,9 @@
p->buffer = malloc(p->bufsize);
if (p->buffer == NULL) {
snprintf(errbuf, PCAP_ERRBUF_SIZE, "out of memory");
- return (-1);
+ free(p);
+ *err = 1;
+ return (NULL);
}
/*
@@ -627,7 +820,7 @@
1, errbuf) == -1)
goto fail;
- if (p->sf.swapped) {
+ if (p->swapped) {
/*
* Byte-swap the fields we've read.
*/
@@ -644,15 +837,13 @@
shbp->major_version);
goto fail;
}
- p->sf.version_major = shbp->major_version;
- p->sf.version_minor = shbp->minor_version;
+ p->version_major = shbp->major_version;
+ p->version_minor = shbp->minor_version;
/*
- * Set the default time stamp resolution and offset.
+ * Save the time stamp resolution the user requested.
*/
- p->sf.tsresol = 1000000; /* microsecond resolution */
- p->sf.tsscale = 1; /* multiply by 1 to scale to microseconds */
- p->sf.tsoffset = 0; /* absolute timestamps */
+ p->opt.tstamp_precision = precision;
/*
* Now start looking for an Interface Description Block.
@@ -664,7 +855,7 @@
status = read_block(fp, p, &cursor, errbuf);
if (status == 0) {
/* EOF - no IDB in this file */
- snprintf(p->errbuf, PCAP_ERRBUF_SIZE,
+ snprintf(errbuf, PCAP_ERRBUF_SIZE,
"the capture file has no Interface Description Blocks");
goto fail;
}
@@ -685,42 +876,16 @@
/*
* Byte-swap it if necessary.
*/
- if (p->sf.swapped) {
+ if (p->swapped) {
idbp->linktype = SWAPSHORT(idbp->linktype);
idbp->snaplen = SWAPLONG(idbp->snaplen);
}
/*
- * Count this interface.
+ * Try to add this interface.
*/
- p->sf.ifcount++;
-
- /*
- * Now look for various time stamp options, so
- * we know how to interpret the time stamps.
- */
- if (process_idb_options(p, &cursor, &p->sf.tsresol,
- &p->sf.tsoffset, errbuf) == -1)
+ if (!add_interface(p, &cursor, errbuf))
goto fail;
-
- /*
- * Compute the scaling factor to convert the
- * sub-second part of the time stamp to
- * microseconds.
- */
- if (p->sf.tsresol > 1000000) {
- /*
- * Higher than microsecond resolution;
- * scale down to microseconds.
- */
- p->sf.tsscale = (p->sf.tsresol / 1000000);
- } else {
- /*
- * Lower than microsecond resolution;
- * scale up to microseconds.
- */
- p->sf.tsscale = (1000000 / p->sf.tsresol);
- }
goto done;
case BT_EPB:
@@ -731,7 +896,7 @@
* not valid, as we don't know what link-layer
* encapsulation the packet has.
*/
- snprintf(p->errbuf, PCAP_ERRBUF_SIZE,
+ snprintf(errbuf, PCAP_ERRBUF_SIZE,
"the capture file has a packet block before any Interface Description Blocks");
goto fail;
@@ -749,15 +914,28 @@
p->linktype = linktype_to_dlt(idbp->linktype);
p->linktype_ext = 0;
- p->sf.next_packet_op = pcap_ng_next_packet;
+ p->next_packet_op = pcap_ng_next_packet;
+ p->cleanup_op = pcap_ng_cleanup;
- return (1);
+ return (p);
fail:
+ free(ps->ifaces);
free(p->buffer);
- return (-1);
+ free(p);
+ *err = 1;
+ return (NULL);
}
+static void
+pcap_ng_cleanup(pcap_t *p)
+{
+ struct pcap_ng_sf *ps = p->priv;
+
+ free(ps->ifaces);
+ sf_cleanup(p);
+}
+
/*
* Read and return the next packet from the savefile. Return the header
* in hdr and a pointer to the contents in data. Return 0 on success, 1
@@ -766,6 +944,7 @@
static int
pcap_ng_next_packet(pcap_t *p, struct pcap_pkthdr *hdr, u_char **data)
{
+ struct pcap_ng_sf *ps = p->priv;
struct block_cursor cursor;
int status;
struct enhanced_packet_block *epbp;
@@ -774,9 +953,7 @@
bpf_u_int32 interface_id = 0xFFFFFFFF;
struct interface_description_block *idbp;
struct section_header_block *shbp;
- FILE *fp = p->sf.rfile;
- u_int tsresol;
- u_int64_t tsoffset;
+ FILE *fp = p->rfile;
u_int64_t t, sec, frac;
/*
@@ -808,7 +985,7 @@
/*
* Byte-swap it if necessary.
*/
- if (p->sf.swapped) {
+ if (p->swapped) {
/* these were written in opposite byte order */
interface_id = SWAPLONG(epbp->interface_id);
hdr->caplen = SWAPLONG(epbp->caplen);
@@ -843,7 +1020,7 @@
/*
* Byte-swap it if necessary.
*/
- if (p->sf.swapped) {
+ if (p->swapped) {
/* these were written in opposite byte order */
hdr->len = SWAPLONG(spbp->len);
} else
@@ -873,7 +1050,7 @@
/*
* Byte-swap it if necessary.
*/
- if (p->sf.swapped) {
+ if (p->swapped) {
/* these were written in opposite byte order */
interface_id = SWAPSHORT(pbp->interface_id);
hdr->caplen = SWAPLONG(pbp->caplen);
@@ -902,7 +1079,7 @@
/*
* Byte-swap it if necessary.
*/
- if (p->sf.swapped) {
+ if (p->swapped) {
idbp->linktype = SWAPSHORT(idbp->linktype);
idbp->snaplen = SWAPLONG(idbp->snaplen);
}
@@ -929,37 +1106,10 @@
}
/*
- * Count this interface.
+ * Try to add this interface.
*/
- p->sf.ifcount++;
-
- /*
- * Set the default time stamp resolution and offset.
- */
- tsresol = 1000000; /* microsecond resolution */
- tsoffset = 0; /* absolute timestamps */
-
- /*
- * Now look for various time stamp options, to
- * make sure they're the same.
- *
- * XXX - we could, in theory, handle multiple
- * different resolutions and offsets, but we
- * don't do so for now.
- */
- if (process_idb_options(p, &cursor, &tsresol, &tsoffset,
- p->errbuf) == -1)
+ if (!add_interface(p, &cursor, p->errbuf))
return (-1);
- if (tsresol != p->sf.tsresol) {
- snprintf(p->errbuf, PCAP_ERRBUF_SIZE,
- "an interface has a time stamp resolution different from the time stamp resolution of the first interface");
- return (-1);
- }
- if (tsoffset != p->sf.tsoffset) {
- snprintf(p->errbuf, PCAP_ERRBUF_SIZE,
- "an interface has a time stamp offset different from the time stamp offset of the first interface");
- return (-1);
- }
break;
case BT_SHB:
@@ -977,7 +1127,7 @@
* the same as that of the previous section.
* We'll check for that later.
*/
- if (p->sf.swapped) {
+ if (p->swapped) {
shbp->byte_order_magic =
SWAPLONG(shbp->byte_order_magic);
shbp->major_version =
@@ -1034,7 +1184,7 @@
* any IDBs, we'll fail when we see a packet
* block.)
*/
- p->sf.ifcount = 0;
+ ps->ifcount = 0;
break;
default:
@@ -1049,7 +1199,7 @@
/*
* Is the interface ID an interface we know?
*/
- if (interface_id >= p->sf.ifcount) {
+ if (interface_id >= ps->ifcount) {
/*
* Yes. Fail.
*/
@@ -1062,20 +1212,52 @@
/*
* Convert the time stamp to a struct timeval.
*/
- sec = t / p->sf.tsresol + p->sf.tsoffset;
- frac = t % p->sf.tsresol;
- if (p->sf.tsresol > 1000000) {
+ sec = t / ps->ifaces[interface_id].tsresol + ps->ifaces[interface_id].tsoffset;
+ frac = t % ps->ifaces[interface_id].tsresol;
+ switch (ps->ifaces[interface_id].scale_type) {
+
+ case PASS_THROUGH:
/*
- * Higher than microsecond resolution; scale down to
- * microseconds.
+ * The interface resolution is what the user wants,
+ * so we're done.
*/
- frac /= p->sf.tsscale;
- } else {
+ break;
+
+ case SCALE_UP:
/*
- * Lower than microsecond resolution; scale up to
- * microseconds.
+ * The interface resolution is less than what the user
+ * wants; scale up to that resolution.
+ *
+ * XXX - if ps->ifaces[interface_id].tsresol is a power
+ * of 10, we could just multiply by the quotient of
+ * ps->ifaces[interface_id].tsresol and ps->user_tsresol,
+ * as we know that's an integer. That runs less risk of
+ * overflow.
+ *
+ * Is there something clever we could do if
+ * ps->ifaces[interface_id].tsresol is a power of 2?
*/
- frac *= p->sf.tsscale;
+ frac *= ps->ifaces[interface_id].tsresol;
+ frac /= ps->user_tsresol;
+ break;
+
+ case SCALE_DOWN:
+ /*
+ * The interface resolution is greater than what the user
+ * wants; scale down to that resolution.
+ *
+ * XXX - if ps->ifaces[interface_id].tsresol is a power
+ * of 10, we could just divide by the quotient of
+ * ps->user_tsresol and ps->ifaces[interface_id].tsresol,
+ * as we know that's an integer. That runs less risk of
+ * overflow.
+ *
+ * Is there something clever we could do if
+ * ps->ifaces[interface_id].tsresol is a power of 2?
+ */
+ frac *= ps->user_tsresol;
+ frac /= ps->ifaces[interface_id].tsresol;
+ break;
}
hdr->ts.tv_sec = sec;
hdr->ts.tv_usec = frac;
@@ -1087,7 +1269,7 @@
if (*data == NULL)
return (-1);
- if (p->sf.swapped) {
+ if (p->swapped) {
/*
* Convert pseudo-headers from the byte order of
* the host on which the file was saved to our
Index: libpcap/sf-pcap-ng.h
===================================================================
--- libpcap/sf-pcap-ng.h (revision 32783)
+++ libpcap/sf-pcap-ng.h (working copy)
@@ -26,6 +26,7 @@
#ifndef sf_pcap_ng_h
#define sf_pcap_ng_h
-extern int pcap_ng_check_header(pcap_t *, bpf_u_int32, FILE *, char *);
+extern pcap_t *pcap_ng_check_header(bpf_u_int32 magic, FILE *fp,
+ u_int precision, char *errbuf, int *err);
#endif
Index: libpcap/configure.in
===================================================================
--- libpcap/configure.in (revision 32783)
+++ libpcap/configure.in (working copy)
@@ -15,8 +15,7 @@
# config.sub.
#
-AC_REVISION($Revision: 1.168 $)
-AC_PREREQ(2.50)
+AC_PREREQ(2.61)
AC_INIT(pcap.c)
AC_CANONICAL_SYSTEM
@@ -27,6 +26,10 @@
AC_LBL_SHLIBS_INIT
AC_LBL_C_INLINE
AC_C___ATTRIBUTE__
+if test "$ac_cv___attribute__" = "yes"; then
+ AC_C___ATTRIBUTE___UNUSED
+ AC_C___ATTRIBUTE___FORMAT
+fi
AC_CHECK_HEADERS(sys/bitypes.h)
@@ -346,6 +349,16 @@
case "$V_PCAP" in
dlpi)
#
+ # Needed for common functions used by pcap-[dlpi,libdlpi].c
+ #
+ SSRC="dlpisubs.c"
+
+ #
+ # Checks for some header files.
+ #
+ AC_CHECK_HEADERS(sys/bufmod.h sys/dlpi_ext.h)
+
+ #
# Checks to see if Solaris has the public libdlpi(3LIB) library.
# Note: The existence of /usr/include/libdlpi.h does not mean it is the
# public libdlpi(3LIB) version. Before libdlpi was made public, a
@@ -359,9 +372,11 @@
saved_ldflags=$LDFLAGS
LDFLAGS="$LIBS -L/lib"
AC_CHECK_LIB(dlpi, dlpi_walk,
- LIBS="-ldlpi $LIBS"
- V_PCAP=libdlpi
- AC_DEFINE(HAVE_LIBDLPI,1,[if libdlpi exists]),
+ [
+ LIBS="-ldlpi $LIBS"
+ V_PCAP=libdlpi
+ AC_DEFINE(HAVE_LIBDLPI,1,[if libdlpi exists])
+ ],
V_PCAP=dlpi)
LDFLAGS=$saved_ldflags
@@ -430,20 +445,45 @@
with_libnl=$withval,,)
if test x$with_libnl != xno ; then
+ have_any_nl="no"
+
#
- # Try libnl 2.x first.
+ # Try libnl 3.x first.
#
- AC_CHECK_LIB(nl, nl_socket_alloc,
+ AC_CHECK_LIB(nl-3, nl_socket_alloc,
[
#
- # Yes, we have libnl 2.x.
+ # Yes, we have libnl 3.x.
#
- LIBS="-lnl-genl -lnl $LIBS"
+ LIBS="-lnl-genl-3 -lnl-3 $LIBS"
AC_DEFINE(HAVE_LIBNL,1,[if libnl exists])
- AC_DEFINE(HAVE_LIBNL_2_x,1,[if libnl exists and is version 2.x])
- ],
- [
+ AC_DEFINE(HAVE_LIBNL_3_x,1,[if libnl exists and is version 3.x])
+ AC_DEFINE(HAVE_LIBNL_NLE,1,[libnl has NLE_FAILURE])
+ AC_DEFINE(HAVE_LIBNL_SOCKETS,1,[libnl has new-style socket api])
+ V_INCLS="$V_INCLS -I/usr/include/libnl3"
+ have_any_nl="yes"
+ ])
+
+ if test x$have_any_nl = xno ; then
#
+ # Try libnl 2.x
+ #
+ AC_CHECK_LIB(nl, nl_socket_alloc,
+ [
+ #
+ # Yes, we have libnl 2.x.
+ #
+ LIBS="-lnl-genl -lnl $LIBS"
+ AC_DEFINE(HAVE_LIBNL,1,[if libnl exists])
+ AC_DEFINE(HAVE_LIBNL_2_x,1,[if libnl exists and is version 2.x])
+ AC_DEFINE(HAVE_LIBNL_NLE,1,[libnl has NLE_FAILURE])
+ AC_DEFINE(HAVE_LIBNL_SOCKETS,1,[libnl has new-style socket api])
+ have_any_nl="yes"
+ ])
+ fi
+
+ if test x$have_any_nl = xno ; then
+ #
# No, we don't; do we have libnl 1.x?
#
AC_CHECK_LIB(nl, nl_handle_alloc,
@@ -453,16 +493,18 @@
#
LIBS="-lnl $LIBS"
AC_DEFINE(HAVE_LIBNL,1,[if libnl exists])
- ],
- [
- #
- # No, we don't have libnl at all.
- #
- if test x$with_libnl = xyes ; then
- AC_MSG_ERROR([libnl support requested but libnl not found])
- fi
+ have_any_nl="yes"
])
- ])
+ fi
+
+ if test x$have_any_nl = xno ; then
+ #
+ # No, we don't have libnl at all.
+ #
+ if test x$with_libnl = xyes ; then
+ AC_MSG_ERROR([libnl support requested but libnl not found])
+ fi
+ fi
fi
AC_CHECK_HEADERS(linux/ethtool.h,,,
@@ -573,7 +615,6 @@
case "$V_PCAP" in
dlpi|libdlpi)
- AC_CHECK_HEADERS(sys/bufmod.h sys/dlpi_ext.h)
#
# This might be Solaris 8 or later, with
# SIOCGLIFCONF, or it might be some other OS
@@ -597,10 +638,6 @@
else
V_FINDALLDEVS=gifc
fi
- #
- # Needed for common functions used by pcap-[dlpi,libdlpi].c
- #
- SSRC="dlpisubs.c"
;;
*)
@@ -1058,6 +1095,45 @@
if test "$enable_universal" != "no"; then
case "$host_os" in
+ darwin[0-7].*)
+ #
+ # Pre-Tiger. Build only for 32-bit PowerPC; no
+ # need for any special compiler or linker flags.
+ #
+ ;;
+
+ darwin8.[0123]*)
+ #
+ # Tiger, prior to Intel support. Build for 32-bit
+ # PowerPC and 64-bit PowerPC, with 32-bit PowerPC
+ # first. (I'm guessing that's what Apple does.)
+ #
+ V_CCOPT="$V_CCOPT -arch ppc -arch ppc64"
+ LDFLAGS="$LDFLAGS -arch ppc -arch ppc64"
+ ;;
+
+ darwin8.[456]*)
+ #
+ # Tiger, subsequent to Intel support but prior to
+ # x86-64 support. Build for 32-bit PowerPC, 64-bit
+ # PowerPC, and x86, with 32-bit PowerPC first.
+ # (I'm guessing that's what Apple does.)
+ #
+ V_CCOPT="$V_CCOPT -arch ppc -arch ppc64 -arch i386"
+ LDFLAGS="$LDFLAGS -arch ppc -arch ppc64 -arch i386"
+ ;;
+
+ darwin8.*)
+ #
+ # All other Tiger, so subsequent to x86-64
+ # support. Build for 32-bit PowerPC, 64-bit
+ # PowerPC, x86, and x86-64, and with 32-bit PowerPC
+ # first. (I'm guessing that's what Apple does.)
+ #
+ V_CCOPT="$V_CCOPT -arch ppc -arch ppc64 -arch i386 -arch x86_64"
+ LDFLAGS="$LDFLAGS -arch ppc -arch ppc64 -arch i386 -arch x86_64"
+ ;;
+
darwin9.*)
#
# Leopard. Build for 32-bit PowerPC, 64-bit
@@ -1082,11 +1158,13 @@
LDFLAGS="$LDFLAGS -arch x86_64 -arch i386 -arch ppc"
;;
- darwin11.*)
+ darwin*)
#
- # Lion. Build for x86-64 and x86, with x86-64
- # first. (That's probably what Apple does,
- # given that Rosetta is gone.)
+ # Post-Snow Leopard. Build for x86-64 and
+ # x86, with x86-64 first. (That's probably what
+ # Apple does, given that Rosetta is gone.)
+ # XXX - update if and when Apple drops support
+ # for 32-bit x86 code.
#
V_CCOPT="$V_CCOPT -arch x86_64 -arch i386"
LDFLAGS="$LDFLAGS -arch x86_64 -arch i386"
@@ -1206,9 +1284,16 @@
;;
esac
+AC_ARG_ENABLE(shared,
+AC_HELP_STRING([--enable-shared],[build shared libraries @<:@default=yes, if support available@:>@]))
+test "x$enable_shared" = "xno" && DYEXT="none"
+
AC_PROG_RANLIB
AC_CHECK_TOOL([AR], [ar])
+AC_PROG_LN_S
+AC_SUBST(LN_S)
+
AC_LBL_DEVEL(V_CCOPT)
AC_LBL_SOCKADDR_SA_LEN
@@ -1323,11 +1408,14 @@
AC_TRY_COMPILE([
AC_INCLUDES_DEFAULT
#include <sys/socket.h>
+#include <netinet/in.h>
#include <linux/types.h>
#include <linux/netlink.h>
+#include <linux/netfilter.h>
#include <linux/netfilter/nfnetlink.h>
-#include <linux/netfilter/nfnetlink_log.h>],
+#include <linux/netfilter/nfnetlink_log.h>
+#include <linux/netfilter/nfnetlink_queue.h>],
[],
ac_cv_netfilter_can_compile=yes,
ac_cv_netfilter_can_compile=no))
@@ -1347,7 +1435,8 @@
AC_ARG_ENABLE([bluetooth],
[AC_HELP_STRING([--enable-bluetooth],[enable Bluetooth support @<:@default=yes, if support available@:>@])],
-,enable_bluetooth=yes)
+ [],
+ [enable_bluetooth=yes])
if test "x$enable_bluetooth" != "xno" ; then
dnl check for Bluetooth sniffing support
@@ -1358,6 +1447,26 @@
AC_DEFINE(PCAP_SUPPORT_BT, 1, [target host supports Bluetooth sniffing])
BT_SRC=pcap-bt-linux.c
AC_MSG_NOTICE(Bluetooth sniffing is supported)
+
+ #
+ # OK, does struct sockaddr_hci have an hci_channel
+ # member?
+ #
+ AC_MSG_CHECKING(if struct sockaddr_hci has hci_channel member)
+ AC_CACHE_VAL(ac_cv_lbl_sockaddr_hci_has_hci_channel,
+ AC_TRY_COMPILE(
+[
+#include <bluetooth/bluetooth.h>
+#include <bluetooth/hci.h>
+],
+ [u_int i = sizeof(((struct sockaddr_hci *)0)->hci_channel)],
+ ac_cv_lbl_sockaddr_hci_has_hci_channel=yes,
+ ac_cv_lbl_sockaddr_hci_has_hci_channel=no))
+ AC_MSG_RESULT($ac_cv_lbl_sockaddr_hci_has_hci_channel)
+ if test $ac_cv_lbl_sockaddr_hci_has_hci_channel = yes ; then
+ AC_DEFINE(SOCKADDR_HCI_HAS_HCI_CHANNEL,,
+ [if struct sockaddr_hci has hci_channel member])
+ fi
],
AC_MSG_NOTICE(Bluetooth sniffing is not supported; install bluez-lib devel to enable it)
)
@@ -1370,9 +1479,37 @@
AC_SUBST(BT_SRC)
fi
+AC_ARG_ENABLE([canusb],
+[AC_HELP_STRING([--enable-canusb],[enable canusb support @<:@default=yes, if support available@:>@])],
+ [],
+ [enable_canusb=yes])
+
+if test "x$enable_canusb" != "xno" ; then
+ dnl check for canusb support
+ case "$host_os" in
+ linux*)
+ AC_CHECK_HEADER(libusb-1.0/libusb.h,
+ [
+ AC_DEFINE(PCAP_SUPPORT_CANUSB, 1, [target host supports canusb])
+ CANUSB_SRC=pcap-canusb-linux.c
+ LIBS="-lusb-1.0 -lpthread $LIBS"
+ AC_MSG_NOTICE(canusb sniffing is supported)
+ ],
+ AC_MSG_NOTICE(canusb sniffing is not supported; install libusb1.0 lib devel to enable it)
+ )
+ ;;
+ *)
+ AC_MSG_NOTICE(no canusb support implemented for $host_os)
+ ;;
+ esac
+ AC_SUBST(PCAP_SUPPORT_CANUSB)
+ AC_SUBST(CANUSB_SRC)
+fi
+
AC_ARG_ENABLE([can],
[AC_HELP_STRING([--enable-can],[enable CAN support @<:@default=yes, if support available@:>@])],
-,enable_can=yes)
+ [],
+ [enable_can=yes])
if test "x$enable_can" != "xno" ; then
dnl check for CAN sniffing support
@@ -1394,6 +1531,57 @@
AC_SUBST(CAN_SRC)
fi
+AC_ARG_ENABLE([dbus],
+[AC_HELP_STRING([--enable-dbus],[enable D-Bus capture support @<:@default=yes, if support available@:>@])],
+ [],
+ [enable_dbus=ifavailable])
+
+if test "x$enable_dbus" != "xno"; then
+ AC_CHECK_PROG([PKGCONFIG], [pkg-config], [pkg-config], [no])
+ if test "x$PKGCONFIG" != "xno"; then
+ AC_MSG_CHECKING([for D-Bus])
+ if "$PKGCONFIG" dbus-1; then
+ AC_MSG_RESULT([yes])
+ DBUS_CFLAGS=`"$PKGCONFIG" --cflags dbus-1`
+ DBUS_LIBS=`"$PKGCONFIG" --libs dbus-1`
+ save_CFLAGS="$CFLAGS"
+ save_LIBS="$LIBS"
+ CFLAGS="$CFLAGS $DBUS_CFLAGS"
+ LIBS="$LIBS $DBUS_LIBS"
+ AC_MSG_CHECKING(whether the D-Bus library defines dbus_connection_read_write)
+ AC_TRY_LINK(
+ [#include <string.h>
+
+ #include <time.h>
+ #include <sys/time.h>
+
+ #include <dbus/dbus.h>],
+ [return dbus_connection_read_write(NULL, 0);],
+ [
+ AC_MSG_RESULT([yes])
+ AC_DEFINE(PCAP_SUPPORT_DBUS, 1, [support D-Bus sniffing])
+ DBUS_SRC=pcap-dbus.c
+ V_INCLS="$V_INCLS $DBUS_CFLAGS"
+ ],
+ [
+ AC_MSG_RESULT([no])
+ if test "x$enable_dbus" = "xyes"; then
+ AC_MSG_ERROR([--enable-dbus was given, but the D-Bus library doesn't define dbus_connection_read_write()])
+ fi
+ LIBS="$save_LIBS"
+ ])
+ CFLAGS="$save_CFLAGS"
+ else
+ AC_MSG_RESULT([no])
+ if test "x$enable_dbus" = "xyes"; then
+ AC_MSG_ERROR([--enable-dbus was given, but the dbus-1 package is not installed])
+ fi
+ fi
+ fi
+ AC_SUBST(PCAP_SUPPORT_DBUS)
+ AC_SUBST(DBUS_SRC)
+fi
+
dnl check for hardware timestamp support
case "$host_os" in
linux*)
@@ -1426,14 +1614,16 @@
AC_CONFIG_HEADER(config.h)
+AC_OUTPUT_COMMANDS([if test -f .devel; then
+ echo timestamp > stamp-h
+ cat Makefile-devel-adds >> Makefile
+ make depend
+fi])
AC_OUTPUT(Makefile pcap-filter.manmisc pcap-linktype.manmisc
pcap-tstamp.manmisc pcap-savefile.manfile pcap.3pcap
pcap_compile.3pcap pcap_datalink.3pcap pcap_dump_open.3pcap
- pcap_list_datalinks.3pcap pcap_list_tstamp_types.3pcap
- pcap_open_dead.3pcap pcap_open_offline.3pcap
+ pcap_get_tstamp_precision.3pcap pcap_list_datalinks.3pcap
+ pcap_list_tstamp_types.3pcap pcap_open_dead.3pcap
+ pcap_open_offline.3pcap pcap_set_tstamp_precision.3pcap
pcap_set_tstamp_type.3pcap)
-
-if test -f .devel ; then
- make depend
-fi
exit 0
Index: libpcap/pcap-dag.c
===================================================================
--- libpcap/pcap-dag.c (revision 32783)
+++ libpcap/pcap-dag.c (working copy)
@@ -48,6 +48,15 @@
#include "pcap-dag.h"
+/*
+ * DAG devices have names beginning with "dag", followed by a number
+ * from 0 to DAG_MAX_BOARDS, then optionally a colon and a stream number
+ * from 0 to DAG_STREAM_MAX.
+ */
+#ifndef DAG_MAX_BOARDS
+#define DAG_MAX_BOARDS 32
+#endif
+
#define ATM_CELL_SIZE 52
#define ATM_HDR_SIZE 4
@@ -70,6 +79,27 @@
unsigned short vci; /* VCI */
};
+/*
+ * Private data for capturing on DAG devices.
+ */
+struct pcap_dag {
+ struct pcap_stat stat;
+#ifdef HAVE_DAG_STREAMS_API
+ u_char *dag_mem_bottom; /* DAG card current memory bottom pointer */
+ u_char *dag_mem_top; /* DAG card current memory top pointer */
+#else /* HAVE_DAG_STREAMS_API */
+ void *dag_mem_base; /* DAG card memory base address */
+ u_int dag_mem_bottom; /* DAG card current memory bottom offset */
+ u_int dag_mem_top; /* DAG card current memory top offset */
+#endif /* HAVE_DAG_STREAMS_API */
+ int dag_fcs_bits; /* Number of checksum bits from link layer */
+ int dag_offset_flags; /* Flags to pass to dag_offset(). */
+ int dag_stream; /* DAG stream number */
+ int dag_timeout; /* timeout specified to pcap_open_live.
+ * Same as in linux above, introduce
+ * generally? */
+};
+
typedef struct pcap_dag_node {
struct pcap_dag_node *next;
pcap_t *p;
@@ -82,15 +112,6 @@
#define IS_BIGENDIAN() (*((unsigned char *)&endian_test_word))
-
-#ifdef DAG_ONLY
-/* This code is required when compiling for a DAG device only. */
-
-/* Replace dag function names with pcap equivalent. */
-#define dag_create pcap_create
-#define dag_platform_finddevs pcap_platform_finddevs
-#endif /* DAG_ONLY */
-
#define MAX_DAG_PACKET 65536
static unsigned char TempPkt[MAX_DAG_PACKET];
@@ -127,13 +148,15 @@
static void
dag_platform_cleanup(pcap_t *p)
{
-
+ struct pcap_dag *pd;
+
if (p != NULL) {
+ pd = p->priv;
#ifdef HAVE_DAG_STREAMS_API
- if(dag_stop_stream(p->fd, p->md.dag_stream) < 0)
+ if(dag_stop_stream(p->fd, pd->dag_stream) < 0)
fprintf(stderr,"dag_stop_stream: %s\n", strerror(errno));
- if(dag_detach_stream(p->fd, p->md.dag_stream) < 0)
+ if(dag_detach_stream(p->fd, pd->dag_stream) < 0)
fprintf(stderr,"dag_detach_stream: %s\n", strerror(errno));
#else
if(dag_stop(p->fd) < 0)
@@ -205,7 +228,7 @@
do {
/* sanity check we have enough bytes */
- if ( len <= (24 + (hdr_num * 8)) )
+ if ( len < (24 + (hdr_num * 8)) )
return hdr_num;
/* get the header type */
@@ -225,13 +248,14 @@
static int
dag_read(pcap_t *p, int cnt, pcap_handler callback, u_char *user)
{
+ struct pcap_dag *pd = p->priv;
unsigned int processed = 0;
- int flags = p->md.dag_offset_flags;
+ int flags = pd->dag_offset_flags;
unsigned int nonblocking = flags & DAGF_NONBLOCK;
unsigned int num_ext_hdr = 0;
/* Get the next bufferful of packets (if necessary). */
- while (p->md.dag_mem_top - p->md.dag_mem_bottom < dag_record_size) {
+ while (pd->dag_mem_top - pd->dag_mem_bottom < dag_record_size) {
/*
* Has "pcap_breakloop()" been called?
@@ -258,23 +282,23 @@
* If non-block is specified it will return immediately. The user
* is then responsible for efficiency.
*/
- if ( NULL == (p->md.dag_mem_top = dag_advance_stream(p->fd, p->md.dag_stream, &(p->md.dag_mem_bottom))) ) {
+ if ( NULL == (pd->dag_mem_top = dag_advance_stream(p->fd, pd->dag_stream, &(pd->dag_mem_bottom))) ) {
return -1;
}
#else
/* dag_offset does not support timeouts */
- p->md.dag_mem_top = dag_offset(p->fd, &(p->md.dag_mem_bottom), flags);
+ pd->dag_mem_top = dag_offset(p->fd, &(pd->dag_mem_bottom), flags);
#endif /* HAVE_DAG_STREAMS_API */
- if (nonblocking && (p->md.dag_mem_top - p->md.dag_mem_bottom < dag_record_size))
+ if (nonblocking && (pd->dag_mem_top - pd->dag_mem_bottom < dag_record_size))
{
/* Pcap is configured to process only available packets, and there aren't any, return immediately. */
return 0;
}
if(!nonblocking &&
- p->md.dag_timeout &&
- (p->md.dag_mem_top - p->md.dag_mem_bottom < dag_record_size))
+ pd->dag_timeout &&
+ (pd->dag_mem_top - pd->dag_mem_bottom < dag_record_size))
{
/* Blocking mode, but timeout set and no data has arrived, return anyway.*/
return 0;
@@ -283,16 +307,16 @@
}
/* Process the packets. */
- while (p->md.dag_mem_top - p->md.dag_mem_bottom >= dag_record_size) {
+ while (pd->dag_mem_top - pd->dag_mem_bottom >= dag_record_size) {
unsigned short packet_len = 0;
int caplen = 0;
struct pcap_pkthdr pcap_header;
#ifdef HAVE_DAG_STREAMS_API
- dag_record_t *header = (dag_record_t *)(p->md.dag_mem_bottom);
+ dag_record_t *header = (dag_record_t *)(pd->dag_mem_bottom);
#else
- dag_record_t *header = (dag_record_t *)(p->md.dag_mem_base + p->md.dag_mem_bottom);
+ dag_record_t *header = (dag_record_t *)(pd->dag_mem_base + pd->dag_mem_bottom);
#endif /* HAVE_DAG_STREAMS_API */
u_char *dp = ((u_char *)header); /* + dag_record_size; */
@@ -317,7 +341,7 @@
strncpy(p->errbuf, "dag_read: record too small", PCAP_ERRBUF_SIZE);
return -1;
}
- p->md.dag_mem_bottom += rlen;
+ pd->dag_mem_bottom += rlen;
/* Count lost packets. */
switch((header->type & 0x7f)) {
@@ -333,10 +357,10 @@
default:
if (header->lctr) {
- if (p->md.stat.ps_drop > (UINT_MAX - ntohs(header->lctr))) {
- p->md.stat.ps_drop = UINT_MAX;
+ if (pd->stat.ps_drop > (UINT_MAX - ntohs(header->lctr))) {
+ pd->stat.ps_drop = UINT_MAX;
} else {
- p->md.stat.ps_drop += ntohs(header->lctr);
+ pd->stat.ps_drop += ntohs(header->lctr);
}
}
}
@@ -444,7 +468,7 @@
case TYPE_COLOR_ETH:
case TYPE_ETH:
packet_len = ntohs(header->wlen);
- packet_len -= (p->md.dag_fcs_bits >> 3);
+ packet_len -= (pd->dag_fcs_bits >> 3);
caplen = rlen - dag_record_size - 2;
if (caplen > packet_len) {
caplen = packet_len;
@@ -457,7 +481,7 @@
case TYPE_COLOR_HDLC_POS:
case TYPE_HDLC_POS:
packet_len = ntohs(header->wlen);
- packet_len -= (p->md.dag_fcs_bits >> 3);
+ packet_len -= (pd->dag_fcs_bits >> 3);
caplen = rlen - dag_record_size;
if (caplen > packet_len) {
caplen = packet_len;
@@ -467,7 +491,7 @@
case TYPE_COLOR_MC_HDLC_POS:
case TYPE_MC_HDLC:
packet_len = ntohs(header->wlen);
- packet_len -= (p->md.dag_fcs_bits >> 3);
+ packet_len -= (pd->dag_fcs_bits >> 3);
caplen = rlen - dag_record_size - 4;
if (caplen > packet_len) {
caplen = packet_len;
@@ -548,14 +572,14 @@
pcap_header.len = packet_len;
/* Count the packet. */
- p->md.stat.ps_recv++;
+ pd->stat.ps_recv++;
/* Call the user supplied callback function */
callback(user, &pcap_header, dp);
/* Only count packets that pass the filter, for consistency with standard Linux behaviour. */
processed++;
- if (processed == cnt && cnt > 0)
+ if (processed == cnt && !PACKET_COUNT_IS_UNLIMITED(cnt))
{
/* Reached the user-specified limit. */
return cnt;
@@ -587,6 +611,7 @@
*/
static int dag_activate(pcap_t* handle)
{
+ struct pcap_dag *handlep = handle->priv;
#if 0
char conf[30]; /* dag configure string */
#endif
@@ -616,13 +641,13 @@
}
/* Parse input name to get dag device and stream number if provided */
- if (dag_parse_name(device, newDev, strlen(device) + 16, &handle->md.dag_stream) < 0) {
+ if (dag_parse_name(device, newDev, strlen(device) + 16, &handlep->dag_stream) < 0) {
snprintf(handle->errbuf, PCAP_ERRBUF_SIZE, "dag_parse_name: %s\n", pcap_strerror(errno));
goto fail;
}
device = newDev;
- if (handle->md.dag_stream%2) {
+ if (handlep->dag_stream%2) {
snprintf(handle->errbuf, PCAP_ERRBUF_SIZE, "dag_parse_name: tx (even numbered) streams not supported for capture\n");
goto fail;
}
@@ -647,7 +672,7 @@
#ifdef HAVE_DAG_STREAMS_API
/* Open requested stream. Can fail if already locked or on error */
- if (dag_attach_stream(handle->fd, handle->md.dag_stream, 0, 0) < 0) {
+ if (dag_attach_stream(handle->fd, handlep->dag_stream, 0, 0) < 0) {
snprintf(handle->errbuf, PCAP_ERRBUF_SIZE, "dag_attach_stream: %s\n", pcap_strerror(errno));
goto failclose;
}
@@ -655,32 +680,39 @@
/* Set up default poll parameters for stream
* Can be overridden by pcap_set_nonblock()
*/
- if (dag_get_stream_poll(handle->fd, handle->md.dag_stream,
+ if (dag_get_stream_poll(handle->fd, handlep->dag_stream,
&mindata, &maxwait, &poll) < 0) {
snprintf(handle->errbuf, PCAP_ERRBUF_SIZE, "dag_get_stream_poll: %s\n", pcap_strerror(errno));
goto faildetach;
}
- /* Amount of data to collect in Bytes before calling callbacks.
- * Important for efficiency, but can introduce latency
- * at low packet rates if to_ms not set!
- */
- mindata = 65536;
+ if (handle->opt.immediate) {
+ /* Call callback immediately.
+ * XXX - is this the right way to handle this?
+ */
+ mindata = 0;
+ } else {
+ /* Amount of data to collect in Bytes before calling callbacks.
+ * Important for efficiency, but can introduce latency
+ * at low packet rates if to_ms not set!
+ */
+ mindata = 65536;
+ }
- /* Obey md.timeout (was to_ms) if supplied. This is a good idea!
+ /* Obey opt.timeout (was to_ms) if supplied. This is a good idea!
* Recommend 10-100ms. Calls will time out even if no data arrived.
*/
- maxwait.tv_sec = handle->md.timeout/1000;
- maxwait.tv_usec = (handle->md.timeout%1000) * 1000;
+ maxwait.tv_sec = handle->opt.timeout/1000;
+ maxwait.tv_usec = (handle->opt.timeout%1000) * 1000;
- if (dag_set_stream_poll(handle->fd, handle->md.dag_stream,
+ if (dag_set_stream_poll(handle->fd, handlep->dag_stream,
mindata, &maxwait, &poll) < 0) {
snprintf(handle->errbuf, PCAP_ERRBUF_SIZE, "dag_set_stream_poll: %s\n", pcap_strerror(errno));
goto faildetach;
}
#else
- if((handle->md.dag_mem_base = dag_mmap(handle->fd)) == MAP_FAILED) {
+ if((handlep->dag_mem_base = dag_mmap(handle->fd)) == MAP_FAILED) {
snprintf(handle->errbuf, PCAP_ERRBUF_SIZE,"dag_mmap %s: %s\n", device, pcap_strerror(errno));
goto failclose;
}
@@ -710,7 +742,7 @@
#endif
#ifdef HAVE_DAG_STREAMS_API
- if(dag_start_stream(handle->fd, handle->md.dag_stream) < 0) {
+ if(dag_start_stream(handle->fd, handlep->dag_stream) < 0) {
snprintf(handle->errbuf, PCAP_ERRBUF_SIZE, "dag_start_stream %s: %s\n", device, pcap_strerror(errno));
goto faildetach;
}
@@ -726,8 +758,8 @@
* initialized to zero on startup, it won't give you
* a compiler warning if you make this mistake!
*/
- handle->md.dag_mem_bottom = 0;
- handle->md.dag_mem_top = 0;
+ handlep->dag_mem_bottom = 0;
+ handlep->dag_mem_top = 0;
/*
* Find out how many FCS bits we should strip.
@@ -736,7 +768,7 @@
daginf = dag_info(handle->fd);
if ((0x4200 == daginf->device_code) || (0x4230 == daginf->device_code)) {
/* DAG 4.2S and 4.23S already strip the FCS. Stripping the final word again truncates the packet. */
- handle->md.dag_fcs_bits = 0;
+ handlep->dag_fcs_bits = 0;
/* Note that no FCS will be supplied. */
handle->linktype_ext = LT_FCS_DATALINK_EXT(0);
@@ -744,12 +776,12 @@
/*
* Start out assuming it's 32 bits.
*/
- handle->md.dag_fcs_bits = 32;
+ handlep->dag_fcs_bits = 32;
/* Allow an environment variable to override. */
if ((s = getenv("ERF_FCS_BITS")) != NULL) {
if ((n = atoi(s)) == 0 || n == 16 || n == 32) {
- handle->md.dag_fcs_bits = n;
+ handlep->dag_fcs_bits = n;
} else {
snprintf(handle->errbuf, PCAP_ERRBUF_SIZE,
"pcap_activate %s: bad ERF_FCS_BITS value (%d) in environment\n", device, n);
@@ -763,14 +795,14 @@
if ((s = getenv("ERF_DONT_STRIP_FCS")) != NULL) {
/* Yes. Note the number of bytes that will be
supplied. */
- handle->linktype_ext = LT_FCS_DATALINK_EXT(handle->md.dag_fcs_bits/16);
+ handle->linktype_ext = LT_FCS_DATALINK_EXT(handlep->dag_fcs_bits/16);
/* And don't strip them. */
- handle->md.dag_fcs_bits = 0;
+ handlep->dag_fcs_bits = 0;
}
}
- handle->md.dag_timeout = handle->md.timeout;
+ handlep->dag_timeout = handle->opt.timeout;
handle->linktype = -1;
if (dag_get_datalink(handle) < 0)
@@ -801,19 +833,19 @@
handle->setnonblock_op = dag_setnonblock;
handle->stats_op = dag_stats;
handle->cleanup_op = dag_platform_cleanup;
- handle->md.stat.ps_drop = 0;
- handle->md.stat.ps_recv = 0;
- handle->md.stat.ps_ifdrop = 0;
+ handlep->stat.ps_drop = 0;
+ handlep->stat.ps_recv = 0;
+ handlep->stat.ps_ifdrop = 0;
return 0;
#ifdef HAVE_DAG_STREAMS_API
failstop:
- if (dag_stop_stream(handle->fd, handle->md.dag_stream) < 0) {
+ if (dag_stop_stream(handle->fd, handlep->dag_stream) < 0) {
fprintf(stderr,"dag_stop_stream: %s\n", strerror(errno));
}
faildetach:
- if (dag_detach_stream(handle->fd, handle->md.dag_stream) < 0)
+ if (dag_detach_stream(handle->fd, handlep->dag_stream) < 0)
fprintf(stderr,"dag_detach_stream: %s\n", strerror(errno));
#else
failstop:
@@ -835,11 +867,57 @@
return PCAP_ERROR;
}
-pcap_t *dag_create(const char *device, char *ebuf)
+pcap_t *dag_create(const char *device, char *ebuf, int *is_ours)
{
+ const char *cp;
+ char *cpend;
+ long devnum;
pcap_t *p;
+#ifdef HAVE_DAG_STREAMS_API
+ long stream = 0;
+#endif
- p = pcap_create_common(device, ebuf);
+ /* Does this look like a DAG device? */
+ cp = strrchr(device, '/');
+ if (cp == NULL)
+ cp = device;
+ /* Does it begin with "dag"? */
+ if (strncmp(cp, "dag", 3) != 0) {
+ /* Nope, doesn't begin with "dag" */
+ *is_ours = 0;
+ return NULL;
+ }
+ /* Yes - is "dag" followed by a number from 0 to DAG_MAX_BOARDS-1 */
+ cp += 3;
+ devnum = strtol(cp, &cpend, 10);
+#ifdef HAVE_DAG_STREAMS_API
+ if (*cpend == ':') {
+ /* Followed by a stream number. */
+ stream = strtol(++cpend, &cpend, 10);
+ }
+#endif
+ if (cpend == cp || *cpend != '\0') {
+ /* Not followed by a number. */
+ *is_ours = 0;
+ return NULL;
+ }
+ if (devnum < 0 || devnum >= DAG_MAX_BOARDS) {
+ /* Followed by a non-valid number. */
+ *is_ours = 0;
+ return NULL;
+ }
+#ifdef HAVE_DAG_STREAMS_API
+ if (stream <0 || stream >= DAG_STREAM_MAX) {
+ /* Followed by a non-valid stream number. */
+ *is_ours = 0;
+ return NULL;
+ }
+#endif
+
+ /* OK, it's probably ours. */
+ *is_ours = 1;
+
+ p = pcap_create_common(device, ebuf, sizeof (struct pcap_dag));
if (p == NULL)
return NULL;
@@ -849,13 +927,15 @@
static int
dag_stats(pcap_t *p, struct pcap_stat *ps) {
+ struct pcap_dag *pd = p->priv;
+
/* This needs to be filled out correctly. Hopefully a dagapi call will
provide all necessary information.
*/
- /*p->md.stat.ps_recv = 0;*/
- /*p->md.stat.ps_drop = 0;*/
+ /*pd->stat.ps_recv = 0;*/
+ /*pd->stat.ps_drop = 0;*/
- *ps = p->md.stat;
+ *ps = pd->stat;
return 0;
}
@@ -870,7 +950,7 @@
* open attempts will still be much less than the naive approach.
*/
int
-dag_platform_finddevs(pcap_if_t **devlistp, char *errbuf)
+dag_findalldevs(pcap_if_t **devlistp, char *errbuf)
{
char name[12]; /* XXX - pick a size */
int ret = 0;
@@ -879,8 +959,8 @@
int dagstream;
int dagfd;
- /* Try all the DAGs 0-31 */
- for (c = 0; c < 32; c++) {
+ /* Try all the DAGs 0-DAG_MAX_BOARDS */
+ for (c = 0; c < DAG_MAX_BOARDS; c++) {
snprintf(name, 12, "dag%d", c);
if (-1 == dag_parse_name(name, dagname, DAGNAME_BUFSIZE, &dagstream))
{
@@ -945,8 +1025,6 @@
if (install_bpf_program(p, fp) < 0)
return -1;
- p->md.use_bpf = 0;
-
return (0);
}
@@ -961,11 +1039,13 @@
static int
dag_setnonblock(pcap_t *p, int nonblock, char *errbuf)
{
+ struct pcap_dag *pd = p->priv;
+
/*
* Set non-blocking mode on the FD.
* XXX - is that necessary? If not, don't bother calling it,
* and have a "dag_getnonblock()" function that looks at
- * "p->md.dag_offset_flags".
+ * "pd->dag_offset_flags".
*/
if (pcap_setnonblock_fd(p, nonblock, errbuf) < 0)
return (-1);
@@ -975,7 +1055,7 @@
struct timeval maxwait;
struct timeval poll;
- if (dag_get_stream_poll(p->fd, p->md.dag_stream,
+ if (dag_get_stream_poll(p->fd, pd->dag_stream,
&mindata, &maxwait, &poll) < 0) {
snprintf(errbuf, PCAP_ERRBUF_SIZE, "dag_get_stream_poll: %s\n", pcap_strerror(errno));
return -1;
@@ -990,7 +1070,7 @@
else
mindata = 65536;
- if (dag_set_stream_poll(p->fd, p->md.dag_stream,
+ if (dag_set_stream_poll(p->fd, pd->dag_stream,
mindata, &maxwait, &poll) < 0) {
snprintf(errbuf, PCAP_ERRBUF_SIZE, "dag_set_stream_poll: %s\n", pcap_strerror(errno));
return -1;
@@ -998,9 +1078,9 @@
}
#endif /* HAVE_DAG_STREAMS_API */
if (nonblock) {
- p->md.dag_offset_flags |= DAGF_NONBLOCK;
+ pd->dag_offset_flags |= DAGF_NONBLOCK;
} else {
- p->md.dag_offset_flags &= ~DAGF_NONBLOCK;
+ pd->dag_offset_flags &= ~DAGF_NONBLOCK;
}
return (0);
}
@@ -1008,6 +1088,7 @@
static int
dag_get_datalink(pcap_t *p)
{
+ struct pcap_dag *pd = p->priv;
int index=0, dlt_index=0;
uint8_t types[255];
@@ -1022,7 +1103,7 @@
#ifdef HAVE_DAG_GET_STREAM_ERF_TYPES
/* Get list of possible ERF types for this card */
- if (dag_get_stream_erf_types(p->fd, p->md.dag_stream, types, 255) < 0) {
+ if (dag_get_stream_erf_types(p->fd, pd->dag_stream, types, 255) < 0) {
snprintf(p->errbuf, sizeof(p->errbuf), "dag_get_stream_erf_types: %s", pcap_strerror(errno));
return (-1);
}
Index: libpcap/pcap_offline_filter.3pcap
===================================================================
--- libpcap/pcap_offline_filter.3pcap (revision 32783)
+++ libpcap/pcap_offline_filter.3pcap (working copy)
@@ -29,7 +29,7 @@
.ft
.LP
.ft B
-int pcap_offline_filter(struct bpf_program *fp,
+int pcap_offline_filter(const struct bpf_program *fp,
.ti +8
const struct pcap_pkthdr *h, const u_char *pkt)
.ft
Index: libpcap/pcap-dag.h
===================================================================
--- libpcap/pcap-dag.h (revision 32783)
+++ libpcap/pcap-dag.h (working copy)
@@ -10,8 +10,8 @@
* @(#) $Header: /tcpdump/master/libpcap/pcap-dag.h,v 1.7 2008-04-04 19:37:45 guy Exp $ (LBL)
*/
-pcap_t *dag_create(const char *, char *);
-int dag_platform_finddevs(pcap_if_t **devlistp, char *errbuf);
+pcap_t *dag_create(const char *, char *, int *);
+int dag_findalldevs(pcap_if_t **devlistp, char *errbuf);
#ifndef TYPE_AAL5
#define TYPE_AAL5 4
Index: libpcap/aclocal.m4
===================================================================
--- libpcap/aclocal.m4 (revision 32783)
+++ libpcap/aclocal.m4 (working copy)
@@ -38,16 +38,15 @@
dnl and AC_LBL_C_INIT at the top level.
dnl
AC_DEFUN(AC_LBL_C_INIT_BEFORE_CC,
- [AC_PREREQ(2.50)
+[
AC_BEFORE([$0], [AC_LBL_C_INIT])
AC_BEFORE([$0], [AC_PROG_CC])
AC_BEFORE([$0], [AC_LBL_FIXINCLUDES])
AC_BEFORE([$0], [AC_LBL_DEVEL])
AC_ARG_WITH(gcc, [ --without-gcc don't use gcc])
- $1="-O"
- $2=""
+ $1=""
if test "${srcdir}" != "." ; then
- $2="-I\$(srcdir)"
+ $1="-I\$(srcdir)"
fi
if test "${CFLAGS+set}" = set; then
LBL_CFLAGS="$CFLAGS"
@@ -73,10 +72,16 @@
dnl
dnl Determine which compiler we're using (cc or gcc)
dnl If using gcc, determine the version number
-dnl If using cc, require that it support ansi prototypes
-dnl If using gcc, use -O2 (otherwise use -O)
-dnl If using cc, explicitly specify /usr/local/include
+dnl If using cc:
+dnl require that it support ansi prototypes
+dnl use -O (AC_PROG_CC will use -g -O2 on gcc, so we don't need to
+dnl do that ourselves for gcc)
+dnl add -g flags, as appropriate
+dnl explicitly specify /usr/local/include
dnl
+dnl NOTE WELL: with newer versions of autoconf, "gcc" means any compiler
+dnl that defines __GNUC__, which means clang, for example, counts as "gcc".
+dnl
dnl usage:
dnl
dnl AC_LBL_C_INIT(copt, incls)
@@ -87,102 +92,106 @@
dnl $2 (incls set)
dnl CC
dnl LDFLAGS
-dnl ac_cv_lbl_gcc_vers
dnl LBL_CFLAGS
dnl
AC_DEFUN(AC_LBL_C_INIT,
- [AC_PREREQ(2.50)
+[
AC_BEFORE([$0], [AC_LBL_FIXINCLUDES])
AC_BEFORE([$0], [AC_LBL_DEVEL])
AC_BEFORE([$0], [AC_LBL_SHLIBS_INIT])
if test "$GCC" = yes ; then
- if test "$SHLICC2" = yes ; then
- ac_cv_lbl_gcc_vers=2
- $1="-O2"
- else
- AC_MSG_CHECKING(gcc version)
- AC_CACHE_VAL(ac_cv_lbl_gcc_vers,
- ac_cv_lbl_gcc_vers=`$CC -v 2>&1 | \
- sed -e '/^gcc version /!d' \
- -e 's/^gcc version //' \
- -e 's/ .*//' -e 's/^[[[^0-9]]]*//' \
- -e 's/\..*//'`)
- AC_MSG_RESULT($ac_cv_lbl_gcc_vers)
- if test $ac_cv_lbl_gcc_vers -gt 1 ; then
- $1="-O2"
- fi
- fi
+ #
+ # -Werror forces warnings to be errors.
+ #
+ ac_lbl_cc_force_warning_errors=-Werror
else
- AC_MSG_CHECKING(that $CC handles ansi prototypes)
- AC_CACHE_VAL(ac_cv_lbl_cc_ansi_prototypes,
- AC_TRY_COMPILE(
- [#include <sys/types.h>],
- [int frob(int, char *)],
- ac_cv_lbl_cc_ansi_prototypes=yes,
- ac_cv_lbl_cc_ansi_prototypes=no))
- AC_MSG_RESULT($ac_cv_lbl_cc_ansi_prototypes)
- if test $ac_cv_lbl_cc_ansi_prototypes = no ; then
- case "$host_os" in
-
- hpux*)
- AC_MSG_CHECKING(for HP-UX ansi compiler ($CC -Aa -D_HPUX_SOURCE))
- savedcflags="$CFLAGS"
- CFLAGS="-Aa -D_HPUX_SOURCE $CFLAGS"
- AC_CACHE_VAL(ac_cv_lbl_cc_hpux_cc_aa,
- AC_TRY_COMPILE(
- [#include <sys/types.h>],
- [int frob(int, char *)],
- ac_cv_lbl_cc_hpux_cc_aa=yes,
- ac_cv_lbl_cc_hpux_cc_aa=no))
- AC_MSG_RESULT($ac_cv_lbl_cc_hpux_cc_aa)
- if test $ac_cv_lbl_cc_hpux_cc_aa = no ; then
- AC_MSG_ERROR(see the INSTALL doc for more info)
- fi
- CFLAGS="$savedcflags"
- $1="-Aa $$1"
- AC_DEFINE(_HPUX_SOURCE,1,[needed on HP-UX])
- ;;
-
- osf*)
- AC_MSG_CHECKING(for ansi mode in DEC compiler ($CC -std1))
- savedcflags="$CFLAGS"
- CFLAGS="-std1"
- AC_CACHE_VAL(ac_cv_lbl_cc_osf1_cc_std1,
- AC_TRY_COMPILE(
- [#include <sys/types.h>],
- [int frob(int, char *)],
- ac_cv_lbl_cc_osf1_cc_std1=yes,
- ac_cv_lbl_cc_osf1_cc_std1=no))
- AC_MSG_RESULT($ac_cv_lbl_cc_osf1_cc_std1)
- if test $ac_cv_lbl_cc_osf1_cc_std1 = no ; then
- AC_MSG_ERROR(see the INSTALL doc for more info)
- fi
- CFLAGS="$savedcflags"
- $1="-std1 $$1"
- ;;
-
- *)
- AC_MSG_ERROR(see the INSTALL doc for more info)
- ;;
- esac
- fi
$2="$$2 -I/usr/local/include"
LDFLAGS="$LDFLAGS -L/usr/local/lib"
case "$host_os" in
+ darwin*)
+ #
+ # This is assumed either to be GCC or clang, both
+ # of which use -Werror to force warnings to be errors.
+ #
+ ac_lbl_cc_force_warning_errors=-Werror
+ ;;
+
+ hpux*)
+ #
+ # HP C, which is what we presume we're using, doesn't
+ # exit with a non-zero exit status if we hand it an
+ # invalid -W flag, can't be forced to do so even with
+ # +We, and doesn't handle GCC-style -W flags, so we
+ # don't want to try using GCC-style -W flags.
+ #
+ ac_lbl_cc_dont_try_gcc_dashW=yes
+ ;;
+
irix*)
+ #
+ # MIPS C, which is what we presume we're using, doesn't
+ # necessarily exit with a non-zero exit status if we
+ # hand it an invalid -W flag, can't be forced to do
+ # so, and doesn't handle GCC-style -W flags, so we
+ # don't want to try using GCC-style -W flags.
+ #
+ ac_lbl_cc_dont_try_gcc_dashW=yes
+ #
+ # It also, apparently, defaults to "char" being
+ # unsigned, unlike most other C implementations;
+ # I suppose we could say "signed char" whenever
+ # we want to guarantee a signed "char", but let's
+ # just force signed chars.
+ #
+ # -xansi is normally the default, but the
+ # configure script was setting it; perhaps -cckr
+ # was the default in the Old Days. (Then again,
+ # that would probably be for backwards compatibility
+ # in the days when ANSI C was Shiny and New, i.e.
+ # 1989 and the early '90's, so maybe we can just
+ # drop support for those compilers.)
+ #
+ # -g is equivalent to -g2, which turns off
+ # optimization; we choose -g3, which generates
+ # debugging information but doesn't turn off
+ # optimization (even if the optimization would
+ # cause inaccuracies in debugging).
+ #
$1="$$1 -xansi -signed -g3"
;;
osf*)
- #
+ #
# Presumed to be DEC OSF/1, Digital UNIX, or
# Tru64 UNIX.
#
+ # The DEC C compiler, which is what we presume we're
+ # using, doesn't exit with a non-zero exit status if we
+ # hand it an invalid -W flag, can't be forced to do
+ # so, and doesn't handle GCC-style -W flags, so we
+ # don't want to try using GCC-style -W flags.
+ #
+ ac_lbl_cc_dont_try_gcc_dashW=yes
+ #
+ # -g is equivalent to -g2, which turns off
+ # optimization; we choose -g3, which generates
+ # debugging information but doesn't turn off
+ # optimization (even if the optimization would
+ # cause inaccuracies in debugging).
+ #
$1="$$1 -g3"
;;
+ solaris*)
+ #
+ # Assumed to be Sun C, which requires -errwarn to force
+ # warnings to be treated as errors.
+ #
+ ac_lbl_cc_force_warning_errors=-errwarn
+ ;;
+
ultrix*)
AC_MSG_CHECKING(that Ultrix $CC hacks const in prototypes)
AC_CACHE_VAL(ac_cv_lbl_cc_const_proto,
@@ -199,10 +208,179 @@
fi
;;
esac
+ $1="$$1 -O"
fi
])
dnl
+dnl Check whether, if you pass an unknown warning option to the
+dnl compiler, it fails or just prints a warning message and succeeds.
+dnl Set ac_lbl_unknown_warning_option_error to the appropriate flag
+dnl to force an error if it would otherwise just print a warning message
+dnl and succeed.
+dnl
+AC_DEFUN(AC_LBL_CHECK_UNKNOWN_WARNING_OPTION_ERROR,
+ [
+ AC_MSG_CHECKING([whether the compiler fails when given an unknown warning option])
+ save_CFLAGS="$CFLAGS"
+ CFLAGS="$CFLAGS -Wxyzzy-this-will-never-succeed-xyzzy"
+ AC_TRY_COMPILE(
+ [],
+ [return 0],
+ [
+ AC_MSG_RESULT([no])
+ #
+ # We're assuming this is clang, where
+ # -Werror=unknown-warning-option is the appropriate
+ # option to force the compiler to fail.
+ #
+ ac_lbl_unknown_warning_option_error="-Werror=unknown-warning-option"
+ ],
+ [
+ AC_MSG_RESULT([yes])
+ ])
+ CFLAGS="$save_CFLAGS"
+ ])
+
+dnl
+dnl Check whether the compiler option specified as the second argument
+dnl is supported by the compiler and, if so, add it to the macro
+dnl specified as the first argument
+dnl
+AC_DEFUN(AC_LBL_CHECK_COMPILER_OPT,
+ [
+ AC_MSG_CHECKING([whether the compiler supports the $2 option])
+ save_CFLAGS="$CFLAGS"
+ CFLAGS="$CFLAGS $ac_lbl_unknown_warning_option_error $2"
+ AC_TRY_COMPILE(
+ [],
+ [return 0],
+ [
+ AC_MSG_RESULT([yes])
+ CFLAGS="$save_CFLAGS"
+ $1="$$1 $2"
+ ],
+ [
+ AC_MSG_RESULT([no])
+ CFLAGS="$save_CFLAGS"
+ ])
+ ])
+
+dnl
+dnl Check whether the compiler supports an option to generate
+dnl Makefile-style dependency lines
+dnl
+dnl GCC uses -M for this. Non-GCC compilers that support this
+dnl use a variety of flags, including but not limited to -M.
+dnl
+dnl We test whether the flag in question is supported, as older
+dnl versions of compilers might not support it.
+dnl
+dnl We don't try all the possible flags, just in case some flag means
+dnl "generate dependencies" on one compiler but means something else
+dnl on another compiler.
+dnl
+dnl Most compilers that support this send the output to the standard
+dnl output by default. IBM's XLC, however, supports -M but sends
+dnl the output to {sourcefile-basename}.u, and AIX has no /dev/stdout
+dnl to work around that, so we don't bother with XLC.
+dnl
+AC_DEFUN(AC_LBL_CHECK_DEPENDENCY_GENERATION_OPT,
+ [
+ AC_MSG_CHECKING([whether the compiler supports generating dependencies])
+ if test "$GCC" = yes ; then
+ #
+ # GCC, or a compiler deemed to be GCC by AC_PROG_CC (even
+ # though it's not); we assume that, in this case, the flag
+ # would be -M.
+ #
+ ac_lbl_dependency_flag="-M"
+ else
+ #
+ # Not GCC or a compiler deemed to be GCC; what platform is
+ # this? (We're assuming that if the compiler isn't GCC
+ # it's the compiler from the vendor of the OS; that won't
+ # necessarily be true for x86 platforms, where it might be
+ # the Intel C compiler.)
+ #
+ case "$host_os" in
+
+ irix*|osf*|darwin*)
+ #
+ # MIPS C for IRIX, DEC C, and clang all use -M.
+ #
+ ac_lbl_dependency_flag="-M"
+ ;;
+
+ solaris*)
+ #
+ # Sun C uses -xM.
+ #
+ ac_lbl_dependency_flag="-xM"
+ ;;
+
+ hpux*)
+ #
+ # HP's older C compilers don't support this.
+ # HP's newer C compilers support this with
+ # either +M or +Make; the older compilers
+ # interpret +M as something completely
+ # different, so we use +Make so we don't
+ # think it works with the older compilers.
+ #
+ ac_lbl_dependency_flag="+Make"
+ ;;
+
+ *)
+ #
+ # Not one of the above; assume no support for
+ # generating dependencies.
+ #
+ ac_lbl_dependency_flag=""
+ ;;
+ esac
+ fi
+
+ #
+ # Is ac_lbl_dependency_flag defined and, if so, does the compiler
+ # complain about it?
+ #
+ # Note: clang doesn't seem to exit with an error status when handed
+ # an unknown non-warning error, even if you pass it
+ # -Werror=unknown-warning-option. However, it always supports
+ # -M, so the fact that this test always succeeds with clang
+ # isn't an issue.
+ #
+ if test ! -z "$ac_lbl_dependency_flag"; then
+ AC_LANG_CONFTEST(
+ [AC_LANG_SOURCE([[int main(void) { return 0; }]])])
+ echo "$CC" $ac_lbl_dependency_flag conftest.c >&5
+ if "$CC" $ac_lbl_dependency_flag conftest.c >/dev/null 2>&1; then
+ AC_MSG_RESULT([yes, with $ac_lbl_dependency_flag])
+ DEPENDENCY_CFLAG="$ac_lbl_dependency_flag"
+ MKDEP='${srcdir}/mkdep'
+ else
+ AC_MSG_RESULT([no])
+ #
+ # We can't run mkdep, so have "make depend" do
+ # nothing.
+ #
+ MKDEP=:
+ fi
+ rm -rf conftest*
+ else
+ AC_MSG_RESULT([no])
+ #
+ # We can't run mkdep, so have "make depend" do
+ # nothing.
+ #
+ MKDEP=:
+ fi
+ AC_SUBST(DEPENDENCY_CFLAG)
+ AC_SUBST(MKDEP)
+ ])
+
+dnl
dnl Determine what options are needed to build a shared library
dnl
dnl usage:
@@ -256,7 +434,7 @@
sparc64*)
case "$host_os" in
- freebsd*)
+ freebsd*|openbsd*)
PIC_OPT=-fPIC
;;
esac
@@ -458,8 +636,23 @@
dnl Require flex 2.4 or higher
dnl Check for bison, default to yacc
dnl Default to lex/yacc if both flex and bison are not available
-dnl Define the yy prefix string if using flex and bison
dnl
+dnl If we're using flex and bison, pass -P to flex and -p to bison
+dnl to define a prefix string for the lexer and parser
+dnl
+dnl If we're not using flex and bison, don't pass those options
+dnl (as they might not work - although if "lex" is a wrapper for
+dnl Flex and "yacc" is a wrapper for Bison, they will work), and
+dnl define NEED_YYPARSE_WRAPPER (we *CANNOT* use YYBISON to check
+dnl whether the wrapper is needed, as some people apparently, for
+dnl some unknown reason, choose to use --without-flex and
+dnl --without-bison on systems that have Flex and Bison, which
+dnl means that the "yacc" they end up using is a wrapper that
+dnl runs "bison -y", and at least some versions of Bison define
+dnl YYBISON even if run with "-y", so we end up not compiling
+dnl the yyparse wrapper and end up with a libpcap that doesn't
+dnl define pcap_parse())
+dnl
dnl usage:
dnl
dnl AC_LBL_LEX_AND_YACC(lex, yacc, yyprefix)
@@ -510,6 +703,8 @@
if test "$$1" = flex -a -n "$3" ; then
$1="$$1 -P$3"
$2="$$2 -p $3"
+ else
+ AC_DEFINE(NEED_YYPARSE_WRAPPER,1,[if we need a pcap_parse wrapper around yyparse])
fi])
dnl
@@ -751,9 +946,8 @@
fi])
dnl
-dnl If using gcc and the file .devel exists:
-dnl Compile with -g (if supported) and -Wall
-dnl If using gcc 2 or later, do extra prototype checking
+dnl If the file .devel exists:
+dnl Add some warning flags if the compiler supports them
dnl If an os prototype include exists, symlink os-proto.h to it
dnl
dnl usage:
@@ -772,27 +966,24 @@
$1="$$1 ${LBL_CFLAGS}"
fi
if test -f .devel ; then
- if test "$GCC" = yes ; then
- if test "${LBL_CFLAGS+set}" != set; then
- if test "$ac_cv_prog_cc_g" = yes ; then
- $1="-g $$1"
- fi
- $1="$$1 -Wall"
- if test $ac_cv_lbl_gcc_vers -gt 1 ; then
- $1="$$1 -Wmissing-prototypes -Wstrict-prototypes"
- fi
- fi
- else
- case "$host_os" in
-
- irix6*)
- V_CCOPT="$V_CCOPT -n32"
- ;;
-
- *)
- ;;
- esac
+ #
+ # Skip all the warning option stuff on some compilers.
+ #
+ if test "$ac_lbl_cc_dont_try_gcc_dashW" != yes; then
+ AC_LBL_CHECK_UNKNOWN_WARNING_OPTION_ERROR()
+ AC_LBL_CHECK_COMPILER_OPT($1, -Wall)
+ AC_LBL_CHECK_COMPILER_OPT($1, -Wmissing-prototypes)
+ AC_LBL_CHECK_COMPILER_OPT($1, -Wstrict-prototypes)
fi
+ AC_LBL_CHECK_DEPENDENCY_GENERATION_OPT()
+ #
+ # We used to set -n32 for IRIX 6 when not using GCC (presumed
+ # to mean that we're using MIPS C or MIPSpro C); it specified
+ # the "new" faster 32-bit ABI, introduced in IRIX 6.2. I'm
+ # not sure why that would be something to do *only* with a
+ # .devel file; why should the ABI for which we produce code
+ # depend on .devel?
+ #
os=`echo $host_os | sed -e 's/\([[0-9]][[0-9]]*\)[[^0-9]].*$/\1/'`
name="lbl/os-$os.h"
if test -f $name ; then
@@ -929,7 +1120,7 @@
AC_DEFUN(AC_C___ATTRIBUTE__, [
AC_MSG_CHECKING(for __attribute__)
AC_CACHE_VAL(ac_cv___attribute__, [
-AC_COMPILE_IFELSE(
+AC_COMPILE_IFELSE([
AC_LANG_SOURCE([[
#include <stdlib.h>
@@ -946,19 +1137,86 @@
{
foo();
}
- ]]),
+ ]])],
ac_cv___attribute__=yes,
ac_cv___attribute__=no)])
if test "$ac_cv___attribute__" = "yes"; then
AC_DEFINE(HAVE___ATTRIBUTE__, 1, [define if your compiler has __attribute__])
- V_DEFS="$V_DEFS -D_U_=\"__attribute__((unused))\""
else
+ #
+ # We can't use __attribute__, so we can't use __attribute__((unused)),
+ # so we define _U_ to an empty string.
+ #
V_DEFS="$V_DEFS -D_U_=\"\""
fi
AC_MSG_RESULT($ac_cv___attribute__)
])
dnl
+dnl Test whether __attribute__((unused)) can be used without warnings
+dnl
+
+AC_DEFUN(AC_C___ATTRIBUTE___UNUSED, [
+AC_MSG_CHECKING([whether __attribute__((unused)) can be used without warnings])
+AC_CACHE_VAL(ac_cv___attribute___unused, [
+save_CFLAGS="$CFLAGS"
+CFLAGS="$CFLAGS $ac_lbl_cc_force_warning_errors"
+AC_COMPILE_IFELSE([
+ AC_LANG_SOURCE([[
+#include <stdlib.h>
+#include <stdio.h>
+
+int
+main(int argc __attribute((unused)), char **argv __attribute((unused)))
+{
+ printf("Hello, world!\n");
+ return 0;
+}
+ ]])],
+ac_cv___attribute___unused=yes,
+ac_cv___attribute___unused=no)])
+CFLAGS="$save_CFLAGS"
+if test "$ac_cv___attribute___unused" = "yes"; then
+ V_DEFS="$V_DEFS -D_U_=\"__attribute__((unused))\""
+else
+ V_DEFS="$V_DEFS -D_U_=\"\""
+fi
+AC_MSG_RESULT($ac_cv___attribute___unused)
+])
+
+dnl
+dnl Test whether __attribute__((format)) can be used without warnings
+dnl
+
+AC_DEFUN(AC_C___ATTRIBUTE___FORMAT, [
+AC_MSG_CHECKING([whether __attribute__((format)) can be used without warnings])
+AC_CACHE_VAL(ac_cv___attribute___format, [
+save_CFLAGS="$CFLAGS"
+CFLAGS="$CFLAGS $ac_lbl_cc_force_warning_errors"
+AC_COMPILE_IFELSE([
+ AC_LANG_SOURCE([[
+#include <stdlib.h>
+
+extern int foo(const char *fmt, ...)
+ __attribute__ ((format (printf, 1, 2)));
+
+int
+main(int argc, char **argv)
+{
+ foo("%s", "test");
+}
+ ]])],
+ac_cv___attribute___format=yes,
+ac_cv___attribute___format=no)])
+CFLAGS="$save_CFLAGS"
+if test "$ac_cv___attribute___format" = "yes"; then
+ AC_DEFINE(__ATTRIBUTE___FORMAT_OK, 1,
+ [define if your compiler allows __attribute__((format)) without a warning])
+fi
+AC_MSG_RESULT($ac_cv___attribute___format)
+])
+
+dnl
dnl Checks to see if tpacket_stats is defined in linux/if_packet.h
dnl If so then pcap-linux.c can use this to report proper statistics.
dnl
Index: libpcap/README.aix
===================================================================
--- libpcap/README.aix (revision 32783)
+++ libpcap/README.aix (working copy)
@@ -19,11 +19,13 @@
possible a description of the symptoms, including indications of the
network link-layer type being wrong or time stamps being wrong).
- If you fix the problems yourself, please submit a patch to
+ If you fix the problems yourself, please submit a patch by forking
+ the branch at
- http://sourceforge.net/projects/libpcap/
+ https://github.com/the-tcpdump-group/libpcap/issues
- so we can incorporate them into the next release.
+ and issuing a pull request, so we can incorporate the fixes into the
+ next release.
If you don't fix the problems yourself, you can, as a workaround,
make libpcap use DLPI instead of BPF.
Index: libpcap/tokdefs.h
===================================================================
--- libpcap/tokdefs.h (revision 32783)
+++ libpcap/tokdefs.h (working copy)
@@ -141,13 +141,20 @@
FISU = 359,
LSSU = 360,
MSU = 361,
- SIO = 362,
- OPC = 363,
- DPC = 364,
- SLS = 365,
- AND = 366,
- OR = 367,
- UMINUS = 368
+ HFISU = 362,
+ HLSSU = 363,
+ HMSU = 364,
+ SIO = 365,
+ OPC = 366,
+ DPC = 367,
+ SLS = 368,
+ HSIO = 369,
+ HOPC = 370,
+ HDPC = 371,
+ HSLS = 372,
+ AND = 373,
+ OR = 374,
+ UMINUS = 375
};
#endif
/* Tokens. */
@@ -255,13 +262,20 @@
#define FISU 359
#define LSSU 360
#define MSU 361
-#define SIO 362
-#define OPC 363
-#define DPC 364
-#define SLS 365
-#define AND 366
-#define OR 367
-#define UMINUS 368
+#define HFISU 362
+#define HLSSU 363
+#define HMSU 364
+#define SIO 365
+#define OPC 366
+#define DPC 367
+#define SLS 368
+#define HSIO 369
+#define HOPC 370
+#define HDPC 371
+#define HSLS 372
+#define AND 373
+#define OR 374
+#define UMINUS 375
@@ -290,7 +304,7 @@
/* Line 2068 of yacc.c */
-#line 294 "y.tab.h"
+#line 308 "y.tab.h"
} YYSTYPE;
# define YYSTYPE_IS_TRIVIAL 1
# define yystype YYSTYPE /* obsolescent; will be withdrawn */
Index: libpcap/configure
===================================================================
--- libpcap/configure (revision 32783)
+++ libpcap/configure (working copy)
@@ -1,12 +1,9 @@
#! /bin/sh
-# From configure.in Revision: 1.168 .
# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.68.
+# Generated by GNU Autoconf 2.69.
#
#
-# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
-# 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software
-# Foundation, Inc.
+# Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc.
#
#
# This configure script is free software; the Free Software Foundation
@@ -135,6 +132,31 @@
# CDPATH.
(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
+# Use a proper internal environment variable to ensure we don't fall
+ # into an infinite loop, continuously re-executing ourselves.
+ if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then
+ _as_can_reexec=no; export _as_can_reexec;
+ # We cannot yet assume a decent shell, so we have to provide a
+# neutralization value for shells without unset; and this also
+# works around shells that cannot unset nonexistent variables.
+# Preserve -v and -x to the replacement shell.
+BASH_ENV=/dev/null
+ENV=/dev/null
+(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
+case $- in # ((((
+ *v*x* | *x*v* ) as_opts=-vx ;;
+ *v* ) as_opts=-v ;;
+ *x* ) as_opts=-x ;;
+ * ) as_opts= ;;
+esac
+exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
+# Admittedly, this is quite paranoid, since all the known shells bail
+# out after a failed `exec'.
+$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
+as_fn_exit 255
+ fi
+ # We don't want this to propagate to other subprocesses.
+ { _as_can_reexec=; unset _as_can_reexec;}
if test "x$CONFIG_SHELL" = x; then
as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then :
emulate sh
@@ -168,7 +190,8 @@
else
exitcode=1; echo positional parameters were not saved.
fi
-test x\$exitcode = x0 || exit 1"
+test x\$exitcode = x0 || exit 1
+test -x / || exit 1"
as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO
as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
@@ -213,21 +236,25 @@
if test "x$CONFIG_SHELL" != x; then :
- # We cannot yet assume a decent shell, so we have to provide a
- # neutralization value for shells without unset; and this also
- # works around shells that cannot unset nonexistent variables.
- # Preserve -v and -x to the replacement shell.
- BASH_ENV=/dev/null
- ENV=/dev/null
- (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
- export CONFIG_SHELL
- case $- in # ((((
- *v*x* | *x*v* ) as_opts=-vx ;;
- *v* ) as_opts=-v ;;
- *x* ) as_opts=-x ;;
- * ) as_opts= ;;
- esac
- exec "$CONFIG_SHELL" $as_opts "$as_myself" ${1+"$@"}
+ export CONFIG_SHELL
+ # We cannot yet assume a decent shell, so we have to provide a
+# neutralization value for shells without unset; and this also
+# works around shells that cannot unset nonexistent variables.
+# Preserve -v and -x to the replacement shell.
+BASH_ENV=/dev/null
+ENV=/dev/null
+(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
+case $- in # ((((
+ *v*x* | *x*v* ) as_opts=-vx ;;
+ *v* ) as_opts=-v ;;
+ *x* ) as_opts=-x ;;
+ * ) as_opts= ;;
+esac
+exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
+# Admittedly, this is quite paranoid, since all the known shells bail
+# out after a failed `exec'.
+$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
+exit 255
fi
if test x$as_have_required = xno; then :
@@ -329,6 +356,14 @@
} # as_fn_mkdir_p
+
+# as_fn_executable_p FILE
+# -----------------------
+# Test if FILE is an executable regular file.
+as_fn_executable_p ()
+{
+ test -f "$1" && test -x "$1"
+} # as_fn_executable_p
# as_fn_append VAR VALUE
# ----------------------
# Append the text in VALUE to the end of the definition contained in VAR. Take
@@ -450,6 +485,10 @@
chmod +x "$as_me.lineno" ||
{ $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
+ # If we had to re-execute with $CONFIG_SHELL, we're ensured to have
+ # already done that, so ensure we don't try to do so again and fall
+ # in an infinite loop. This has already happened in practice.
+ _as_can_reexec=no; export _as_can_reexec
# Don't try to exec as it changes $[0], causing all sort of problems
# (the dirname of $[0] is not the place where we might find the
# original and so on. Autoconf is especially sensitive to this).
@@ -484,16 +523,16 @@
# ... but there are two gotchas:
# 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
# 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
- # In both cases, we have to default to `cp -p'.
+ # In both cases, we have to default to `cp -pR'.
ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
- as_ln_s='cp -p'
+ as_ln_s='cp -pR'
elif ln conf$$.file conf$$ 2>/dev/null; then
as_ln_s=ln
else
- as_ln_s='cp -p'
+ as_ln_s='cp -pR'
fi
else
- as_ln_s='cp -p'
+ as_ln_s='cp -pR'
fi
rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
rmdir conf$$.dir 2>/dev/null
@@ -505,28 +544,8 @@
as_mkdir_p=false
fi
-if test -x / >/dev/null 2>&1; then
- as_test_x='test -x'
-else
- if ls -dL / >/dev/null 2>&1; then
- as_ls_L_option=L
- else
- as_ls_L_option=
- fi
- as_test_x='
- eval sh -c '\''
- if test -d "$1"; then
- test -d "$1/.";
- else
- case $1 in #(
- -*)set "./$1";;
- esac;
- case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
- ???[sx]*):;;*)false;;esac;fi
- '\'' sh
- '
-fi
-as_executable_p=$as_test_x
+as_test_x='test -x'
+as_executable_p=as_fn_executable_p
# Sed expression to map a string onto a valid CPP name.
as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
@@ -605,8 +624,13 @@
INSTALL_SCRIPT
INSTALL_PROGRAM
PCAP_SUPPORT_PACKET_RING
+DBUS_SRC
+PCAP_SUPPORT_DBUS
+PKGCONFIG
CAN_SRC
PCAP_SUPPORT_CAN
+CANUSB_SRC
+PCAP_SUPPORT_CANUSB
BT_SRC
PCAP_SUPPORT_BT
NETFILTER_SRC
@@ -628,6 +652,9 @@
V_FINDALLDEVS
V_DEFS
V_CCOPT
+MKDEP
+DEPENDENCY_CFLAG
+LN_S
AR
RANLIB
HAVE_LINUX_TPACKET_AUXDATA
@@ -713,8 +740,11 @@
with_snf_includes
with_snf_libraries
enable_universal
+enable_shared
enable_bluetooth
+enable_canusb
enable_can
+enable_dbus
enable_packet_ring
'
ac_precious_vars='build_alias
@@ -1181,8 +1211,6 @@
if test "x$host_alias" != x; then
if test "x$build_alias" = x; then
cross_compiling=maybe
- $as_echo "$as_me: WARNING: if you wanted to set the --build type, don't use --host.
- If a cross compiler is detected then cross compile mode will be used" >&2
elif test "x$build_alias" != "x$host_alias"; then
cross_compiling=yes
fi
@@ -1347,10 +1375,16 @@
--enable-optimizer-dbg build optimizer debugging code
--enable-yydebug build parser debugging code
--disable-universal don't build universal on OS X
+ --enable-shared build shared libraries [default=yes, if support
+ available]
--enable-bluetooth enable Bluetooth support [default=yes, if support
available]
+ --enable-canusb enable canusb support [default=yes, if support
+ available]
--enable-can enable CAN support [default=yes, if support
available]
+ --enable-dbus enable D-Bus capture support [default=yes, if
+ support available]
--enable-packet-ring enable Linux packet ring support [default=yes]
Optional Packages:
@@ -1451,9 +1485,9 @@
if $ac_init_version; then
cat <<\_ACEOF
configure
-generated by GNU Autoconf 2.68
+generated by GNU Autoconf 2.69
-Copyright (C) 2010 Free Software Foundation, Inc.
+Copyright (C) 2012 Free Software Foundation, Inc.
This configure script is free software; the Free Software Foundation
gives unlimited permission to copy, distribute and modify it.
_ACEOF
@@ -1780,7 +1814,7 @@
test ! -s conftest.err
} && test -s conftest$ac_exeext && {
test "$cross_compiling" = yes ||
- $as_test_x conftest$ac_exeext
+ test -x conftest$ac_exeext
}; then :
ac_retval=0
else
@@ -1916,7 +1950,7 @@
running configure, to aid debugging if configure makes a mistake.
It was created by $as_me, which was
-generated by GNU Autoconf 2.68. Invocation command line was
+generated by GNU Autoconf 2.69. Invocation command line was
$ $0 $@
@@ -2416,10 +2450,9 @@
withval=$with_gcc;
fi
- V_CCOPT="-O"
- V_INCLS=""
+ V_CCOPT=""
if test "${srcdir}" != "." ; then
- V_INCLS="-I\$(srcdir)"
+ V_CCOPT="-I\$(srcdir)"
fi
if test "${CFLAGS+set}" = set; then
LBL_CFLAGS="$CFLAGS"
@@ -2444,7 +2477,7 @@
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_SHLICC2="yes"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -2500,7 +2533,7 @@
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_CC="${ac_tool_prefix}gcc"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -2540,7 +2573,7 @@
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_ac_ct_CC="gcc"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -2593,7 +2626,7 @@
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_CC="${ac_tool_prefix}cc"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -2634,7 +2667,7 @@
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
ac_prog_rejected=yes
continue
@@ -2692,7 +2725,7 @@
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -2736,7 +2769,7 @@
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_ac_ct_CC="$ac_prog"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -3182,8 +3215,7 @@
/* end confdefs.h. */
#include <stdarg.h>
#include <stdio.h>
-#include <sys/types.h>
-#include <sys/stat.h>
+struct stat;
/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
struct buf { int x; };
FILE * (*rcsopen) (struct buf *, struct stat *, int);
@@ -3273,163 +3305,106 @@
if test "$GCC" = yes ; then
- if test "$SHLICC2" = yes ; then
- ac_cv_lbl_gcc_vers=2
- V_CCOPT="-O2"
- else
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking gcc version" >&5
-$as_echo_n "checking gcc version... " >&6; }
- if ${ac_cv_lbl_gcc_vers+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- ac_cv_lbl_gcc_vers=`$CC -v 2>&1 | \
- sed -e '/^gcc version /!d' \
- -e 's/^gcc version //' \
- -e 's/ .*//' -e 's/^[^0-9]*//' \
- -e 's/\..*//'`
-fi
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lbl_gcc_vers" >&5
-$as_echo "$ac_cv_lbl_gcc_vers" >&6; }
- if test $ac_cv_lbl_gcc_vers -gt 1 ; then
- V_CCOPT="-O2"
- fi
- fi
+ #
+ # -Werror forces warnings to be errors.
+ #
+ ac_lbl_cc_force_warning_errors=-Werror
else
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking that $CC handles ansi prototypes" >&5
-$as_echo_n "checking that $CC handles ansi prototypes... " >&6; }
- if ${ac_cv_lbl_cc_ansi_prototypes+:} false; then :
- $as_echo_n "(cached) " >&6
-else
-
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-#include <sys/types.h>
-int
-main ()
-{
-int frob(int, char *)
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
- ac_cv_lbl_cc_ansi_prototypes=yes
-else
- ac_cv_lbl_cc_ansi_prototypes=no
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lbl_cc_ansi_prototypes" >&5
-$as_echo "$ac_cv_lbl_cc_ansi_prototypes" >&6; }
- if test $ac_cv_lbl_cc_ansi_prototypes = no ; then
- case "$host_os" in
-
- hpux*)
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HP-UX ansi compiler ($CC -Aa -D_HPUX_SOURCE)" >&5
-$as_echo_n "checking for HP-UX ansi compiler ($CC -Aa -D_HPUX_SOURCE)... " >&6; }
- savedcflags="$CFLAGS"
- CFLAGS="-Aa -D_HPUX_SOURCE $CFLAGS"
- if ${ac_cv_lbl_cc_hpux_cc_aa+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-#include <sys/types.h>
-int
-main ()
-{
-int frob(int, char *)
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
- ac_cv_lbl_cc_hpux_cc_aa=yes
-else
- ac_cv_lbl_cc_hpux_cc_aa=no
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lbl_cc_hpux_cc_aa" >&5
-$as_echo "$ac_cv_lbl_cc_hpux_cc_aa" >&6; }
- if test $ac_cv_lbl_cc_hpux_cc_aa = no ; then
- as_fn_error $? "see the INSTALL doc for more info" "$LINENO" 5
- fi
- CFLAGS="$savedcflags"
- V_CCOPT="-Aa $V_CCOPT"
-
-$as_echo "#define _HPUX_SOURCE 1" >>confdefs.h
-
- ;;
-
- osf*)
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ansi mode in DEC compiler ($CC -std1)" >&5
-$as_echo_n "checking for ansi mode in DEC compiler ($CC -std1)... " >&6; }
- savedcflags="$CFLAGS"
- CFLAGS="-std1"
- if ${ac_cv_lbl_cc_osf1_cc_std1+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-#include <sys/types.h>
-int
-main ()
-{
-int frob(int, char *)
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
- ac_cv_lbl_cc_osf1_cc_std1=yes
-else
- ac_cv_lbl_cc_osf1_cc_std1=no
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lbl_cc_osf1_cc_std1" >&5
-$as_echo "$ac_cv_lbl_cc_osf1_cc_std1" >&6; }
- if test $ac_cv_lbl_cc_osf1_cc_std1 = no ; then
- as_fn_error $? "see the INSTALL doc for more info" "$LINENO" 5
- fi
- CFLAGS="$savedcflags"
- V_CCOPT="-std1 $V_CCOPT"
- ;;
-
- *)
- as_fn_error $? "see the INSTALL doc for more info" "$LINENO" 5
- ;;
- esac
- fi
V_INCLS="$V_INCLS -I/usr/local/include"
LDFLAGS="$LDFLAGS -L/usr/local/lib"
case "$host_os" in
+ darwin*)
+ #
+ # This is assumed either to be GCC or clang, both
+ # of which use -Werror to force warnings to be errors.
+ #
+ ac_lbl_cc_force_warning_errors=-Werror
+ ;;
+
+ hpux*)
+ #
+ # HP C, which is what we presume we're using, doesn't
+ # exit with a non-zero exit status if we hand it an
+ # invalid -W flag, can't be forced to do so even with
+ # +We, and doesn't handle GCC-style -W flags, so we
+ # don't want to try using GCC-style -W flags.
+ #
+ ac_lbl_cc_dont_try_gcc_dashW=yes
+ ;;
+
irix*)
+ #
+ # MIPS C, which is what we presume we're using, doesn't
+ # necessarily exit with a non-zero exit status if we
+ # hand it an invalid -W flag, can't be forced to do
+ # so, and doesn't handle GCC-style -W flags, so we
+ # don't want to try using GCC-style -W flags.
+ #
+ ac_lbl_cc_dont_try_gcc_dashW=yes
+ #
+ # It also, apparently, defaults to "char" being
+ # unsigned, unlike most other C implementations;
+ # I suppose we could say "signed char" whenever
+ # we want to guarantee a signed "char", but let's
+ # just force signed chars.
+ #
+ # -xansi is normally the default, but the
+ # configure script was setting it; perhaps -cckr
+ # was the default in the Old Days. (Then again,
+ # that would probably be for backwards compatibility
+ # in the days when ANSI C was Shiny and New, i.e.
+ # 1989 and the early '90's, so maybe we can just
+ # drop support for those compilers.)
+ #
+ # -g is equivalent to -g2, which turns off
+ # optimization; we choose -g3, which generates
+ # debugging information but doesn't turn off
+ # optimization (even if the optimization would
+ # cause inaccuracies in debugging).
+ #
V_CCOPT="$V_CCOPT -xansi -signed -g3"
;;
osf*)
- #
+ #
# Presumed to be DEC OSF/1, Digital UNIX, or
# Tru64 UNIX.
#
+ # The DEC C compiler, which is what we presume we're
+ # using, doesn't exit with a non-zero exit status if we
+ # hand it an invalid -W flag, can't be forced to do
+ # so, and doesn't handle GCC-style -W flags, so we
+ # don't want to try using GCC-style -W flags.
+ #
+ ac_lbl_cc_dont_try_gcc_dashW=yes
+ #
+ # -g is equivalent to -g2, which turns off
+ # optimization; we choose -g3, which generates
+ # debugging information but doesn't turn off
+ # optimization (even if the optimization would
+ # cause inaccuracies in debugging).
+ #
V_CCOPT="$V_CCOPT -g3"
;;
+ solaris*)
+ #
+ # Assumed to be Sun C, which requires -errwarn to force
+ # warnings to be treated as errors.
+ #
+ ac_lbl_cc_force_warning_errors=-errwarn
+ ;;
+
ultrix*)
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking that Ultrix $CC hacks const in prototypes" >&5
$as_echo_n "checking that Ultrix $CC hacks const in prototypes... " >&6; }
if ${ac_cv_lbl_cc_const_proto+:} false; then :
$as_echo_n "(cached) " >&6
else
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include <sys/types.h>
int
@@ -3458,6 +3433,7 @@
fi
;;
esac
+ V_CCOPT="$V_CCOPT -O"
fi
@@ -3498,7 +3474,7 @@
sparc64*)
case "$host_os" in
- freebsd*)
+ freebsd*|openbsd*)
PIC_OPT=-fPIC
;;
esac
@@ -3679,6 +3655,7 @@
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
+
#include <stdlib.h>
static void foo(void) __attribute__ ((noreturn));
@@ -3708,14 +3685,102 @@
$as_echo "#define HAVE___ATTRIBUTE__ 1" >>confdefs.h
- V_DEFS="$V_DEFS -D_U_=\"__attribute__((unused))\""
else
+ #
+ # We can't use __attribute__, so we can't use __attribute__((unused)),
+ # so we define _U_ to an empty string.
+ #
V_DEFS="$V_DEFS -D_U_=\"\""
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv___attribute__" >&5
$as_echo "$ac_cv___attribute__" >&6; }
+if test "$ac_cv___attribute__" = "yes"; then
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether __attribute__((unused)) can be used without warnings" >&5
+$as_echo_n "checking whether __attribute__((unused)) can be used without warnings... " >&6; }
+if ${ac_cv___attribute___unused+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+
+save_CFLAGS="$CFLAGS"
+CFLAGS="$CFLAGS $ac_lbl_cc_force_warning_errors"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+
+#include <stdlib.h>
+#include <stdio.h>
+
+int
+main(int argc __attribute((unused)), char **argv __attribute((unused)))
+{
+ printf("Hello, world!\n");
+ return 0;
+}
+
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ ac_cv___attribute___unused=yes
+else
+ ac_cv___attribute___unused=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+
+CFLAGS="$save_CFLAGS"
+if test "$ac_cv___attribute___unused" = "yes"; then
+ V_DEFS="$V_DEFS -D_U_=\"__attribute__((unused))\""
+else
+ V_DEFS="$V_DEFS -D_U_=\"\""
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv___attribute___unused" >&5
+$as_echo "$ac_cv___attribute___unused" >&6; }
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether __attribute__((format)) can be used without warnings" >&5
+$as_echo_n "checking whether __attribute__((format)) can be used without warnings... " >&6; }
+if ${ac_cv___attribute___format+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+
+save_CFLAGS="$CFLAGS"
+CFLAGS="$CFLAGS $ac_lbl_cc_force_warning_errors"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+
+#include <stdlib.h>
+
+extern int foo(const char *fmt, ...)
+ __attribute__ ((format (printf, 1, 2)));
+
+int
+main(int argc, char **argv)
+{
+ foo("%s", "test");
+}
+
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ ac_cv___attribute___format=yes
+else
+ ac_cv___attribute___format=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+
+CFLAGS="$save_CFLAGS"
+if test "$ac_cv___attribute___format" = "yes"; then
+
+$as_echo "#define __ATTRIBUTE___FORMAT_OK 1" >>confdefs.h
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv___attribute___format" >&5
+$as_echo "$ac_cv___attribute___format" >&6; }
+
+fi
+
ac_ext=c
ac_cpp='$CPP $CPPFLAGS'
ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
@@ -3870,7 +3935,7 @@
for ac_prog in grep ggrep; do
for ac_exec_ext in '' $ac_executable_extensions; do
ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
- { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue
+ as_fn_executable_p "$ac_path_GREP" || continue
# Check for GNU ac_path_GREP and select it if it is found.
# Check for GNU $ac_path_GREP
case `"$ac_path_GREP" --version 2>&1` in
@@ -3936,7 +4001,7 @@
for ac_prog in egrep; do
for ac_exec_ext in '' $ac_executable_extensions; do
ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
- { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue
+ as_fn_executable_p "$ac_path_EGREP" || continue
# Check for GNU ac_path_EGREP and select it if it is found.
# Check for GNU $ac_path_EGREP
case `"$ac_path_EGREP" --version 2>&1` in
@@ -4430,6 +4495,8 @@
esac
rm -rf conftest*
fi
+
+
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGEFILE_SOURCE value needed for large files" >&5
@@ -5214,6 +5281,28 @@
case "$V_PCAP" in
dlpi)
#
+ # Needed for common functions used by pcap-[dlpi,libdlpi].c
+ #
+ SSRC="dlpisubs.c"
+
+ #
+ # Checks for some header files.
+ #
+ for ac_header in sys/bufmod.h sys/dlpi_ext.h
+do :
+ as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
+ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
+if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
+ cat >>confdefs.h <<_ACEOF
+#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+
+done
+
+
+ #
# Checks to see if Solaris has the public libdlpi(3LIB) library.
# Note: The existence of /usr/include/libdlpi.h does not mean it is the
# public libdlpi(3LIB) version. Before libdlpi was made public, a
@@ -5263,11 +5352,13 @@
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dlpi_dlpi_walk" >&5
$as_echo "$ac_cv_lib_dlpi_dlpi_walk" >&6; }
if test "x$ac_cv_lib_dlpi_dlpi_walk" = xyes; then :
- LIBS="-ldlpi $LIBS"
- V_PCAP=libdlpi
+ LIBS="-ldlpi $LIBS"
+ V_PCAP=libdlpi
+
$as_echo "#define HAVE_LIBDLPI 1" >>confdefs.h
+
else
V_PCAP=dlpi
fi
@@ -5415,10 +5506,76 @@
if test x$with_libnl != xno ; then
+ have_any_nl="no"
+
#
- # Try libnl 2.x first.
+ # Try libnl 3.x first.
#
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for nl_socket_alloc in -lnl" >&5
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for nl_socket_alloc in -lnl-3" >&5
+$as_echo_n "checking for nl_socket_alloc in -lnl-3... " >&6; }
+if ${ac_cv_lib_nl_3_nl_socket_alloc+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-lnl-3 $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char nl_socket_alloc ();
+int
+main ()
+{
+return nl_socket_alloc ();
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ ac_cv_lib_nl_3_nl_socket_alloc=yes
+else
+ ac_cv_lib_nl_3_nl_socket_alloc=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nl_3_nl_socket_alloc" >&5
+$as_echo "$ac_cv_lib_nl_3_nl_socket_alloc" >&6; }
+if test "x$ac_cv_lib_nl_3_nl_socket_alloc" = xyes; then :
+
+ #
+ # Yes, we have libnl 3.x.
+ #
+ LIBS="-lnl-genl-3 -lnl-3 $LIBS"
+
+$as_echo "#define HAVE_LIBNL 1" >>confdefs.h
+
+
+$as_echo "#define HAVE_LIBNL_3_x 1" >>confdefs.h
+
+
+$as_echo "#define HAVE_LIBNL_NLE 1" >>confdefs.h
+
+
+$as_echo "#define HAVE_LIBNL_SOCKETS 1" >>confdefs.h
+
+ V_INCLS="$V_INCLS -I/usr/include/libnl3"
+ have_any_nl="yes"
+
+fi
+
+
+ if test x$have_any_nl = xno ; then
+ #
+ # Try libnl 2.x
+ #
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for nl_socket_alloc in -lnl" >&5
$as_echo_n "checking for nl_socket_alloc in -lnl... " >&6; }
if ${ac_cv_lib_nl_nl_socket_alloc+:} false; then :
$as_echo_n "(cached) " >&6
@@ -5456,10 +5613,10 @@
$as_echo "$ac_cv_lib_nl_nl_socket_alloc" >&6; }
if test "x$ac_cv_lib_nl_nl_socket_alloc" = xyes; then :
- #
- # Yes, we have libnl 2.x.
- #
- LIBS="-lnl-genl -lnl $LIBS"
+ #
+ # Yes, we have libnl 2.x.
+ #
+ LIBS="-lnl-genl -lnl $LIBS"
$as_echo "#define HAVE_LIBNL 1" >>confdefs.h
@@ -5467,8 +5624,18 @@
$as_echo "#define HAVE_LIBNL_2_x 1" >>confdefs.h
-else
+$as_echo "#define HAVE_LIBNL_NLE 1" >>confdefs.h
+
+$as_echo "#define HAVE_LIBNL_SOCKETS 1" >>confdefs.h
+
+ have_any_nl="yes"
+
+fi
+
+ fi
+
+ if test x$have_any_nl = xno ; then
#
# No, we don't; do we have libnl 1.x?
#
@@ -5517,21 +5684,20 @@
$as_echo "#define HAVE_LIBNL 1" >>confdefs.h
+ have_any_nl="yes"
-else
-
- #
- # No, we don't have libnl at all.
- #
- if test x$with_libnl = xyes ; then
- as_fn_error $? "libnl support requested but libnl not found" "$LINENO" 5
- fi
-
fi
+ fi
-fi
-
+ if test x$have_any_nl = xno ; then
+ #
+ # No, we don't have libnl at all.
+ #
+ if test x$with_libnl = xyes ; then
+ as_fn_error $? "libnl support requested but libnl not found" "$LINENO" 5
+ fi
+ fi
fi
for ac_header in linux/ethtool.h
@@ -5762,19 +5928,6 @@
case "$V_PCAP" in
dlpi|libdlpi)
- for ac_header in sys/bufmod.h sys/dlpi_ext.h
-do :
- as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
-ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
-if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
- cat >>confdefs.h <<_ACEOF
-#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
-_ACEOF
-
-fi
-
-done
-
#
# This might be Solaris 8 or later, with
# SIOCGLIFCONF, or it might be some other OS
@@ -5816,10 +5969,6 @@
else
V_FINDALLDEVS=gifc
fi
- #
- # Needed for common functions used by pcap-[dlpi,libdlpi].c
- #
- SSRC="dlpisubs.c"
;;
*)
@@ -6581,6 +6730,45 @@
if test "$enable_universal" != "no"; then
case "$host_os" in
+ darwin0-7.*)
+ #
+ # Pre-Tiger. Build only for 32-bit PowerPC; no
+ # need for any special compiler or linker flags.
+ #
+ ;;
+
+ darwin8.0123*)
+ #
+ # Tiger, prior to Intel support. Build for 32-bit
+ # PowerPC and 64-bit PowerPC, with 32-bit PowerPC
+ # first. (I'm guessing that's what Apple does.)
+ #
+ V_CCOPT="$V_CCOPT -arch ppc -arch ppc64"
+ LDFLAGS="$LDFLAGS -arch ppc -arch ppc64"
+ ;;
+
+ darwin8.456*)
+ #
+ # Tiger, subsequent to Intel support but prior to
+ # x86-64 support. Build for 32-bit PowerPC, 64-bit
+ # PowerPC, and x86, with 32-bit PowerPC first.
+ # (I'm guessing that's what Apple does.)
+ #
+ V_CCOPT="$V_CCOPT -arch ppc -arch ppc64 -arch i386"
+ LDFLAGS="$LDFLAGS -arch ppc -arch ppc64 -arch i386"
+ ;;
+
+ darwin8.*)
+ #
+ # All other Tiger, so subsequent to x86-64
+ # support. Build for 32-bit PowerPC, 64-bit
+ # PowerPC, x86, and x86-64, and with 32-bit PowerPC
+ # first. (I'm guessing that's what Apple does.)
+ #
+ V_CCOPT="$V_CCOPT -arch ppc -arch ppc64 -arch i386 -arch x86_64"
+ LDFLAGS="$LDFLAGS -arch ppc -arch ppc64 -arch i386 -arch x86_64"
+ ;;
+
darwin9.*)
#
# Leopard. Build for 32-bit PowerPC, 64-bit
@@ -6605,11 +6793,13 @@
LDFLAGS="$LDFLAGS -arch x86_64 -arch i386 -arch ppc"
;;
- darwin11.*)
+ darwin*)
#
- # Lion. Build for x86-64 and x86, with x86-64
- # first. (That's probably what Apple does,
- # given that Rosetta is gone.)
+ # Post-Snow Leopard. Build for x86-64 and
+ # x86, with x86-64 first. (That's probably what
+ # Apple does, given that Rosetta is gone.)
+ # XXX - update if and when Apple drops support
+ # for 32-bit x86 code.
#
V_CCOPT="$V_CCOPT -arch x86_64 -arch i386"
LDFLAGS="$LDFLAGS -arch x86_64 -arch i386"
@@ -6749,6 +6939,13 @@
;;
esac
+# Check whether --enable-shared was given.
+if test "${enable_shared+set}" = set; then :
+ enableval=$enable_shared;
+fi
+
+test "x$enable_shared" = "xno" && DYEXT="none"
+
if test -n "$ac_tool_prefix"; then
# Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
set dummy ${ac_tool_prefix}ranlib; ac_word=$2
@@ -6766,7 +6963,7 @@
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -6806,7 +7003,7 @@
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_ac_ct_RANLIB="ranlib"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -6858,7 +7055,7 @@
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_AR="${ac_tool_prefix}ar"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -6898,7 +7095,7 @@
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_ac_ct_AR="ar"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -6934,32 +7131,268 @@
fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5
+$as_echo_n "checking whether ln -s works... " >&6; }
+LN_S=$as_ln_s
+if test "$LN_S" = "ln -s"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5
+$as_echo "no, using $LN_S" >&6; }
+fi
+
+
+
rm -f os-proto.h
if test "${LBL_CFLAGS+set}" = set; then
V_CCOPT="$V_CCOPT ${LBL_CFLAGS}"
fi
if test -f .devel ; then
- if test "$GCC" = yes ; then
- if test "${LBL_CFLAGS+set}" != set; then
- if test "$ac_cv_prog_cc_g" = yes ; then
- V_CCOPT="-g $V_CCOPT"
- fi
- V_CCOPT="$V_CCOPT -Wall"
- if test $ac_cv_lbl_gcc_vers -gt 1 ; then
- V_CCOPT="$V_CCOPT -Wmissing-prototypes -Wstrict-prototypes"
- fi
- fi
- else
- case "$host_os" in
+ #
+ # Skip all the warning option stuff on some compilers.
+ #
+ if test "$ac_lbl_cc_dont_try_gcc_dashW" != yes; then
- irix6*)
- V_CCOPT="$V_CCOPT -n32"
- ;;
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the compiler fails when given an unknown warning option" >&5
+$as_echo_n "checking whether the compiler fails when given an unknown warning option... " >&6; }
+ save_CFLAGS="$CFLAGS"
+ CFLAGS="$CFLAGS -Wxyzzy-this-will-never-succeed-xyzzy"
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
- *)
- ;;
- esac
+int
+main ()
+{
+return 0
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+ #
+ # We're assuming this is clang, where
+ # -Werror=unknown-warning-option is the appropriate
+ # option to force the compiler to fail.
+ #
+ ac_lbl_unknown_warning_option_error="-Werror=unknown-warning-option"
+
+else
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ CFLAGS="$save_CFLAGS"
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports the -Wall option" >&5
+$as_echo_n "checking whether the compiler supports the -Wall option... " >&6; }
+ save_CFLAGS="$CFLAGS"
+ CFLAGS="$CFLAGS $ac_lbl_unknown_warning_option_error -Wall"
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+int
+main ()
+{
+return 0
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+ CFLAGS="$save_CFLAGS"
+ V_CCOPT="$V_CCOPT -Wall"
+
+else
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+ CFLAGS="$save_CFLAGS"
+
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports the -Wmissing-prototypes option" >&5
+$as_echo_n "checking whether the compiler supports the -Wmissing-prototypes option... " >&6; }
+ save_CFLAGS="$CFLAGS"
+ CFLAGS="$CFLAGS $ac_lbl_unknown_warning_option_error -Wmissing-prototypes"
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+int
+main ()
+{
+return 0
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+ CFLAGS="$save_CFLAGS"
+ V_CCOPT="$V_CCOPT -Wmissing-prototypes"
+
+else
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+ CFLAGS="$save_CFLAGS"
+
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports the -Wstrict-prototypes option" >&5
+$as_echo_n "checking whether the compiler supports the -Wstrict-prototypes option... " >&6; }
+ save_CFLAGS="$CFLAGS"
+ CFLAGS="$CFLAGS $ac_lbl_unknown_warning_option_error -Wstrict-prototypes"
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+int
+main ()
+{
+return 0
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+ CFLAGS="$save_CFLAGS"
+ V_CCOPT="$V_CCOPT -Wstrict-prototypes"
+
+else
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+ CFLAGS="$save_CFLAGS"
+
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+
fi
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports generating dependencies" >&5
+$as_echo_n "checking whether the compiler supports generating dependencies... " >&6; }
+ if test "$GCC" = yes ; then
+ #
+ # GCC, or a compiler deemed to be GCC by AC_PROG_CC (even
+ # though it's not); we assume that, in this case, the flag
+ # would be -M.
+ #
+ ac_lbl_dependency_flag="-M"
+ else
+ #
+ # Not GCC or a compiler deemed to be GCC; what platform is
+ # this? (We're assuming that if the compiler isn't GCC
+ # it's the compiler from the vendor of the OS; that won't
+ # necessarily be true for x86 platforms, where it might be
+ # the Intel C compiler.)
+ #
+ case "$host_os" in
+
+ irix*|osf*|darwin*)
+ #
+ # MIPS C for IRIX, DEC C, and clang all use -M.
+ #
+ ac_lbl_dependency_flag="-M"
+ ;;
+
+ solaris*)
+ #
+ # Sun C uses -xM.
+ #
+ ac_lbl_dependency_flag="-xM"
+ ;;
+
+ hpux*)
+ #
+ # HP's older C compilers don't support this.
+ # HP's newer C compilers support this with
+ # either +M or +Make; the older compilers
+ # interpret +M as something completely
+ # different, so we use +Make so we don't
+ # think it works with the older compilers.
+ #
+ ac_lbl_dependency_flag="+Make"
+ ;;
+
+ *)
+ #
+ # Not one of the above; assume no support for
+ # generating dependencies.
+ #
+ ac_lbl_dependency_flag=""
+ ;;
+ esac
+ fi
+
+ #
+ # Is ac_lbl_dependency_flag defined and, if so, does the compiler
+ # complain about it?
+ #
+ # Note: clang doesn't seem to exit with an error status when handed
+ # an unknown non-warning error, even if you pass it
+ # -Werror=unknown-warning-option. However, it always supports
+ # -M, so the fact that this test always succeeds with clang
+ # isn't an issue.
+ #
+ if test ! -z "$ac_lbl_dependency_flag"; then
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+int main(void) { return 0; }
+_ACEOF
+ echo "$CC" $ac_lbl_dependency_flag conftest.c >&5
+ if "$CC" $ac_lbl_dependency_flag conftest.c >/dev/null 2>&1; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, with $ac_lbl_dependency_flag" >&5
+$as_echo "yes, with $ac_lbl_dependency_flag" >&6; }
+ DEPENDENCY_CFLAG="$ac_lbl_dependency_flag"
+ MKDEP='${srcdir}/mkdep'
+ else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+ #
+ # We can't run mkdep, so have "make depend" do
+ # nothing.
+ #
+ MKDEP=:
+ fi
+ rm -rf conftest*
+ else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+ #
+ # We can't run mkdep, so have "make depend" do
+ # nothing.
+ #
+ MKDEP=:
+ fi
+
+
+
+ #
+ # We used to set -n32 for IRIX 6 when not using GCC (presumed
+ # to mean that we're using MIPS C or MIPSpro C); it specified
+ # the "new" faster 32-bit ABI, introduced in IRIX 6.2. I'm
+ # not sure why that would be something to do *only* with a
+ # .devel file; why should the ABI for which we produce code
+ # depend on .devel?
+ #
os=`echo $host_os | sed -e 's/\([0-9][0-9]*\)[^0-9].*$/\1/'`
name="lbl/os-$os.h"
if test -f $name ; then
@@ -7346,11 +7779,14 @@
$ac_includes_default
#include <sys/socket.h>
+#include <netinet/in.h>
#include <linux/types.h>
#include <linux/netlink.h>
+#include <linux/netfilter.h>
#include <linux/netfilter/nfnetlink.h>
#include <linux/netfilter/nfnetlink_log.h>
+#include <linux/netfilter/nfnetlink_queue.h>
int
main ()
{
@@ -7405,7 +7841,46 @@
{ $as_echo "$as_me:${as_lineno-$LINENO}: Bluetooth sniffing is supported" >&5
$as_echo "$as_me: Bluetooth sniffing is supported" >&6;}
+ #
+ # OK, does struct sockaddr_hci have an hci_channel
+ # member?
+ #
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking if struct sockaddr_hci has hci_channel member" >&5
+$as_echo_n "checking if struct sockaddr_hci has hci_channel member... " >&6; }
+ if ${ac_cv_lbl_sockaddr_hci_has_hci_channel+:} false; then :
+ $as_echo_n "(cached) " >&6
else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+#include <bluetooth/bluetooth.h>
+#include <bluetooth/hci.h>
+
+int
+main ()
+{
+u_int i = sizeof(((struct sockaddr_hci *)0)->hci_channel)
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ ac_cv_lbl_sockaddr_hci_has_hci_channel=yes
+else
+ ac_cv_lbl_sockaddr_hci_has_hci_channel=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lbl_sockaddr_hci_has_hci_channel" >&5
+$as_echo "$ac_cv_lbl_sockaddr_hci_has_hci_channel" >&6; }
+ if test $ac_cv_lbl_sockaddr_hci_has_hci_channel = yes ; then
+
+$as_echo "#define SOCKADDR_HCI_HAS_HCI_CHANNEL /**/" >>confdefs.h
+
+ fi
+
+else
{ $as_echo "$as_me:${as_lineno-$LINENO}: Bluetooth sniffing is not supported; install bluez-lib devel to enable it" >&5
$as_echo "$as_me: Bluetooth sniffing is not supported; install bluez-lib devel to enable it" >&6;}
@@ -7422,6 +7897,45 @@
fi
+# Check whether --enable-canusb was given.
+if test "${enable_canusb+set}" = set; then :
+ enableval=$enable_canusb;
+else
+ enable_canusb=yes
+fi
+
+
+if test "x$enable_canusb" != "xno" ; then
+ case "$host_os" in
+ linux*)
+ ac_fn_c_check_header_mongrel "$LINENO" "libusb-1.0/libusb.h" "ac_cv_header_libusb_1_0_libusb_h" "$ac_includes_default"
+if test "x$ac_cv_header_libusb_1_0_libusb_h" = xyes; then :
+
+
+$as_echo "#define PCAP_SUPPORT_CANUSB 1" >>confdefs.h
+
+ CANUSB_SRC=pcap-canusb-linux.c
+ LIBS="-lusb-1.0 -lpthread $LIBS"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: canusb sniffing is supported" >&5
+$as_echo "$as_me: canusb sniffing is supported" >&6;}
+
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: canusb sniffing is not supported; install libusb1.0 lib devel to enable it" >&5
+$as_echo "$as_me: canusb sniffing is not supported; install libusb1.0 lib devel to enable it" >&6;}
+
+fi
+
+
+ ;;
+ *)
+ { $as_echo "$as_me:${as_lineno-$LINENO}: no canusb support implemented for $host_os" >&5
+$as_echo "$as_me: no canusb support implemented for $host_os" >&6;}
+ ;;
+ esac
+
+
+fi
+
# Check whether --enable-can was given.
if test "${enable_can+set}" = set; then :
enableval=$enable_can;
@@ -7459,6 +7973,118 @@
fi
+# Check whether --enable-dbus was given.
+if test "${enable_dbus+set}" = set; then :
+ enableval=$enable_dbus;
+else
+ enable_dbus=ifavailable
+fi
+
+
+if test "x$enable_dbus" != "xno"; then
+ # Extract the first word of "pkg-config", so it can be a program name with args.
+set dummy pkg-config; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_PKGCONFIG+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$PKGCONFIG"; then
+ ac_cv_prog_PKGCONFIG="$PKGCONFIG" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_PKGCONFIG="pkg-config"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+ test -z "$ac_cv_prog_PKGCONFIG" && ac_cv_prog_PKGCONFIG="no"
+fi
+fi
+PKGCONFIG=$ac_cv_prog_PKGCONFIG
+if test -n "$PKGCONFIG"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKGCONFIG" >&5
+$as_echo "$PKGCONFIG" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+ if test "x$PKGCONFIG" != "xno"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for D-Bus" >&5
+$as_echo_n "checking for D-Bus... " >&6; }
+ if "$PKGCONFIG" dbus-1; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+ DBUS_CFLAGS=`"$PKGCONFIG" --cflags dbus-1`
+ DBUS_LIBS=`"$PKGCONFIG" --libs dbus-1`
+ save_CFLAGS="$CFLAGS"
+ save_LIBS="$LIBS"
+ CFLAGS="$CFLAGS $DBUS_CFLAGS"
+ LIBS="$LIBS $DBUS_LIBS"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the D-Bus library defines dbus_connection_read_write" >&5
+$as_echo_n "checking whether the D-Bus library defines dbus_connection_read_write... " >&6; }
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <string.h>
+
+ #include <time.h>
+ #include <sys/time.h>
+
+ #include <dbus/dbus.h>
+int
+main ()
+{
+return dbus_connection_read_write(NULL, 0);
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+
+$as_echo "#define PCAP_SUPPORT_DBUS 1" >>confdefs.h
+
+ DBUS_SRC=pcap-dbus.c
+ V_INCLS="$V_INCLS $DBUS_CFLAGS"
+
+else
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+ if test "x$enable_dbus" = "xyes"; then
+ as_fn_error $? "--enable-dbus was given, but the D-Bus library doesn't define dbus_connection_read_write()" "$LINENO" 5
+ fi
+ LIBS="$save_LIBS"
+
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+ CFLAGS="$save_CFLAGS"
+ else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+ if test "x$enable_dbus" = "xyes"; then
+ as_fn_error $? "--enable-dbus was given, but the dbus-1 package is not installed" "$LINENO" 5
+ fi
+ fi
+ fi
+
+
+fi
+
case "$host_os" in
linux*)
for ac_header in linux/net_tstamp.h
@@ -7532,7 +8158,7 @@
# by default.
for ac_prog in ginstall scoinst install; do
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
if test $ac_prog = install &&
grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
# AIX install. It has an incompatible calling convention.
@@ -7592,8 +8218,10 @@
ac_config_headers="$ac_config_headers config.h"
-ac_config_files="$ac_config_files Makefile pcap-filter.manmisc pcap-linktype.manmisc pcap-tstamp.manmisc pcap-savefile.manfile pcap.3pcap pcap_compile.3pcap pcap_datalink.3pcap pcap_dump_open.3pcap pcap_list_datalinks.3pcap pcap_list_tstamp_types.3pcap pcap_open_dead.3pcap pcap_open_offline.3pcap pcap_set_tstamp_type.3pcap"
+ac_config_commands="$ac_config_commands default-1"
+ac_config_files="$ac_config_files Makefile pcap-filter.manmisc pcap-linktype.manmisc pcap-tstamp.manmisc pcap-savefile.manfile pcap.3pcap pcap_compile.3pcap pcap_datalink.3pcap pcap_dump_open.3pcap pcap_get_tstamp_precision.3pcap pcap_list_datalinks.3pcap pcap_list_tstamp_types.3pcap pcap_open_dead.3pcap pcap_open_offline.3pcap pcap_set_tstamp_precision.3pcap pcap_set_tstamp_type.3pcap"
+
cat >confcache <<\_ACEOF
# This file is a shell script that caches the results of configure
# tests run on this system so they can be shared between configure
@@ -8001,16 +8629,16 @@
# ... but there are two gotchas:
# 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
# 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
- # In both cases, we have to default to `cp -p'.
+ # In both cases, we have to default to `cp -pR'.
ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
- as_ln_s='cp -p'
+ as_ln_s='cp -pR'
elif ln conf$$.file conf$$ 2>/dev/null; then
as_ln_s=ln
else
- as_ln_s='cp -p'
+ as_ln_s='cp -pR'
fi
else
- as_ln_s='cp -p'
+ as_ln_s='cp -pR'
fi
rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
rmdir conf$$.dir 2>/dev/null
@@ -8070,29 +8698,17 @@
as_mkdir_p=false
fi
-if test -x / >/dev/null 2>&1; then
- as_test_x='test -x'
-else
- if ls -dL / >/dev/null 2>&1; then
- as_ls_L_option=L
- else
- as_ls_L_option=
- fi
- as_test_x='
- eval sh -c '\''
- if test -d "$1"; then
- test -d "$1/.";
- else
- case $1 in #(
- -*)set "./$1";;
- esac;
- case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
- ???[sx]*):;;*)false;;esac;fi
- '\'' sh
- '
-fi
-as_executable_p=$as_test_x
+# as_fn_executable_p FILE
+# -----------------------
+# Test if FILE is an executable regular file.
+as_fn_executable_p ()
+{
+ test -f "$1" && test -x "$1"
+} # as_fn_executable_p
+as_test_x='test -x'
+as_executable_p=as_fn_executable_p
+
# Sed expression to map a string onto a valid CPP name.
as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
@@ -8113,7 +8729,7 @@
# values after options handling.
ac_log="
This file was extended by $as_me, which was
-generated by GNU Autoconf 2.68. Invocation command line was
+generated by GNU Autoconf 2.69. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
CONFIG_HEADERS = $CONFIG_HEADERS
@@ -8139,6 +8755,7 @@
# Files that config.status was made for.
config_files="$ac_config_files"
config_headers="$ac_config_headers"
+config_commands="$ac_config_commands"
_ACEOF
@@ -8168,6 +8785,9 @@
Configuration headers:
$config_headers
+Configuration commands:
+$config_commands
+
Report bugs to the package provider."
_ACEOF
@@ -8175,10 +8795,10 @@
ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
ac_cs_version="\\
config.status
-configured by $0, generated by GNU Autoconf 2.68,
+configured by $0, generated by GNU Autoconf 2.69,
with options \\"\$ac_cs_config\\"
-Copyright (C) 2010 Free Software Foundation, Inc.
+Copyright (C) 2012 Free Software Foundation, Inc.
This config.status script is free software; the Free Software Foundation
gives unlimited permission to copy, distribute and modify it."
@@ -8267,7 +8887,7 @@
_ACEOF
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
if \$ac_cs_recheck; then
- set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
+ set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
shift
\$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
CONFIG_SHELL='$SHELL'
@@ -8288,6 +8908,11 @@
_ACEOF
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+#
+# INIT-COMMANDS
+#
+
+
_ACEOF
cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
@@ -8297,6 +8922,7 @@
do
case $ac_config_target in
"config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h" ;;
+ "default-1") CONFIG_COMMANDS="$CONFIG_COMMANDS default-1" ;;
"Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
"pcap-filter.manmisc") CONFIG_FILES="$CONFIG_FILES pcap-filter.manmisc" ;;
"pcap-linktype.manmisc") CONFIG_FILES="$CONFIG_FILES pcap-linktype.manmisc" ;;
@@ -8306,10 +8932,12 @@
"pcap_compile.3pcap") CONFIG_FILES="$CONFIG_FILES pcap_compile.3pcap" ;;
"pcap_datalink.3pcap") CONFIG_FILES="$CONFIG_FILES pcap_datalink.3pcap" ;;
"pcap_dump_open.3pcap") CONFIG_FILES="$CONFIG_FILES pcap_dump_open.3pcap" ;;
+ "pcap_get_tstamp_precision.3pcap") CONFIG_FILES="$CONFIG_FILES pcap_get_tstamp_precision.3pcap" ;;
"pcap_list_datalinks.3pcap") CONFIG_FILES="$CONFIG_FILES pcap_list_datalinks.3pcap" ;;
"pcap_list_tstamp_types.3pcap") CONFIG_FILES="$CONFIG_FILES pcap_list_tstamp_types.3pcap" ;;
"pcap_open_dead.3pcap") CONFIG_FILES="$CONFIG_FILES pcap_open_dead.3pcap" ;;
"pcap_open_offline.3pcap") CONFIG_FILES="$CONFIG_FILES pcap_open_offline.3pcap" ;;
+ "pcap_set_tstamp_precision.3pcap") CONFIG_FILES="$CONFIG_FILES pcap_set_tstamp_precision.3pcap" ;;
"pcap_set_tstamp_type.3pcap") CONFIG_FILES="$CONFIG_FILES pcap_set_tstamp_type.3pcap" ;;
*) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
@@ -8324,6 +8952,7 @@
if $ac_need_defaults; then
test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
+ test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
fi
# Have a temporary directory for convenience. Make it in the build tree
@@ -8620,7 +9249,7 @@
fi # test -n "$CONFIG_HEADERS"
-eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS "
+eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS :C $CONFIG_COMMANDS"
shift
for ac_tag
do
@@ -8858,9 +9487,20 @@
fi
;;
+ :C) { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5
+$as_echo "$as_me: executing $ac_file commands" >&6;}
+ ;;
+ esac
+
+ case $ac_file$ac_mode in
+ "default-1":C) if test -f .devel; then
+ echo timestamp > stamp-h
+ cat Makefile-devel-adds >> Makefile
+ make depend
+fi ;;
+
esac
-
done # for ac_tag
@@ -8897,8 +9537,4 @@
$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
fi
-
-if test -f .devel ; then
- make depend
-fi
exit 0
Index: libpcap/packaging/pcap.spec.in
===================================================================
--- libpcap/packaging/pcap.spec.in (revision 32783)
+++ libpcap/packaging/pcap.spec.in (working copy)
@@ -66,8 +66,10 @@
%files devel
%defattr(-,root,root)
%{_bindir}/pcap-config
-%{_includedir}/pcap*.h
+%{_includedir}/pcap/*.h
%{_includedir}/pcap.h
+%{_includedir}/pcap-bpf.h
+%{_includedir}/pcap-namedb.h
%{_libdir}/libpcap.so
%{_libdir}/libpcap.a
%{_mandir}/man1/pcap-config.1*
Index: libpcap/pcap-snf.c
===================================================================
--- libpcap/pcap-snf.c (revision 32783)
+++ libpcap/pcap-snf.c (working copy)
@@ -15,13 +15,20 @@
#include <sys/types.h>
#include <unistd.h>
-#include "snf.h"
+#include <snf.h>
+
#include "pcap-int.h"
+#include "pcap-snf.h"
-#ifdef SNF_ONLY
-#define snf_create pcap_create
-#define snf_platform_finddevs pcap_platform_finddevs
-#endif
+/*
+ * Private data for capturing on SNF devices.
+ */
+struct pcap_snf {
+ snf_handle_t snf_handle; /* opaque device handle */
+ snf_ring_t snf_ring; /* opaque device ring handle */
+ int snf_timeout;
+ int snf_boardnum;
+};
static int
snf_set_datalink(pcap_t *p, int dlt)
@@ -36,7 +43,7 @@
struct snf_ring_stats stats;
int rc;
- if ((rc = snf_ring_getstats(p->md.snf_ring, &stats))) {
+ if ((rc = snf_ring_getstats(ps->snf_ring, &stats))) {
snprintf(p->errbuf, PCAP_ERRBUF_SIZE, "snf_get_stats: %s",
pcap_strerror(rc));
return -1;
@@ -50,30 +57,36 @@
static void
snf_platform_cleanup(pcap_t *p)
{
+ struct pcap_snf *ps = p->priv;
+
if (p == NULL)
return;
- snf_ring_close(p->md.snf_ring);
- snf_close(p->md.snf_handle);
+ snf_ring_close(ps->snf_ring);
+ snf_close(ps->snf_handle);
pcap_cleanup_live_common(p);
}
static int
snf_getnonblock(pcap_t *p, char *errbuf)
{
- return (p->md.snf_timeout == 0);
+ struct pcap_snf *ps = p->priv;
+
+ return (ps->snf_timeout == 0);
}
static int
snf_setnonblock(pcap_t *p, int nonblock, char *errbuf)
{
+ struct pcap_snf *ps = p->priv;
+
if (nonblock)
- p->md.snf_timeout = 0;
+ ps->snf_timeout = 0;
else {
- if (p->md.timeout <= 0)
- p->md.snf_timeout = -1; /* forever */
+ if (p->opt.timeout <= 0)
+ ps->snf_timeout = -1; /* forever */
else
- p->md.snf_timeout = p->md.timeout;
+ ps->snf_timeout = p->opt.timeout;
}
return (0);
}
@@ -96,6 +109,7 @@
static int
snf_read(pcap_t *p, int cnt, pcap_handler callback, u_char *user)
{
+ struct pcap_snf *ps = p->priv;
struct pcap_pkthdr hdr;
int i, flags, err, caplen, n;
struct snf_recv_req req;
@@ -104,7 +118,7 @@
return -1;
n = 0;
- while (n < cnt || cnt < 0) {
+ while (n < cnt || PACKET_COUNT_IS_UNLIMITED(cnt)) {
/*
* Has "pcap_breakloop()" been called?
*/
@@ -117,7 +131,7 @@
}
}
- err = snf_ring_recv(p->md.snf_ring, p->md.snf_timeout, &req);
+ err = snf_ring_recv(ps->snf_ring, ps->snf_timeout, &req);
if (err) {
if (err == EBUSY || err == EAGAIN)
@@ -163,8 +177,6 @@
if (install_bpf_program(p, fp) < 0)
return -1;
- p->md.use_bpf = 0;
-
return (0);
}
@@ -179,6 +191,7 @@
static int
snf_activate(pcap_t* p)
{
+ struct pcap_snf *ps = p->priv;
char *device = p->opt.source;
const char *nr = NULL;
int err;
@@ -197,31 +210,31 @@
else
nr = NULL;
- err = snf_open(p->md.snf_boardnum,
+ err = snf_open(ps->snf_boardnum,
0, /* let SNF API parse SNF_NUM_RINGS, if set */
NULL, /* default RSS, or use SNF_RSS_FLAGS env */
0, /* default to SNF_DATARING_SIZE from env */
flags, /* may want pshared */
- &p->md.snf_handle);
+ &ps->snf_handle);
if (err != 0) {
snprintf(p->errbuf, PCAP_ERRBUF_SIZE,
"snf_open failed: %s", pcap_strerror(err));
return -1;
}
- err = snf_ring_open(p->md.snf_handle, &p->md.snf_ring);
+ err = snf_ring_open(ps->snf_handle, &ps->snf_ring);
if (err != 0) {
snprintf(p->errbuf, PCAP_ERRBUF_SIZE,
"snf_ring_open failed: %s", pcap_strerror(err));
return -1;
}
- if (p->md.timeout <= 0)
- p->md.snf_timeout = -1;
+ if (p->opt.timeout <= 0)
+ ps->snf_timeout = -1;
else
- p->md.snf_timeout = p->md.timeout;
+ ps->snf_timeout = p->opt.timeout;
- err = snf_start(p->md.snf_handle);
+ err = snf_start(ps->snf_handle);
if (err != 0) {
snprintf(p->errbuf, PCAP_ERRBUF_SIZE,
"snf_start failed: %s", pcap_strerror(err));
@@ -242,14 +255,11 @@
p->setnonblock_op = snf_setnonblock;
p->stats_op = snf_pcap_stats;
p->cleanup_op = snf_platform_cleanup;
- p->md.stat.ps_recv = 0;
- p->md.stat.ps_drop = 0;
- p->md.stat.ps_ifdrop = 0;
return 0;
}
int
-snf_platform_finddevs(pcap_if_t **devlistp, char *errbuf)
+snf_findalldevs(pcap_if_t **devlistp, char *errbuf)
{
/*
* There are no platform-specific devices since each device
@@ -259,22 +269,29 @@
}
pcap_t *
-snf_create(const char *device, char *ebuf)
+snf_create(const char *device, char *ebuf, int *is_ours)
{
pcap_t *p;
int boardnum = -1;
struct snf_ifaddrs *ifaddrs, *ifa;
size_t devlen;
+ struct pcap_snf *ps;
- if (snf_init(SNF_VERSION_API))
+ if (snf_init(SNF_VERSION_API)) {
+ /* Can't initialize the API, so no SNF devices */
+ *is_ours = 0;
return NULL;
+ }
/*
* Match a given interface name to our list of interface names, from
* which we can obtain the intended board number
*/
- if (snf_getifaddrs(&ifaddrs) || ifaddrs == NULL)
+ if (snf_getifaddrs(&ifaddrs) || ifaddrs == NULL) {
+ /* Can't get SNF addresses */
+ *is_ours = 0;
return NULL;
+ }
devlen = strlen(device) + 1;
ifa = ifaddrs;
while (ifa) {
@@ -292,15 +309,22 @@
* and "snf10gX" where X is the board number.
*/
if (sscanf(device, "snf10g%d", &boardnum) != 1 &&
- sscanf(device, "snf%d", &boardnum) != 1)
+ sscanf(device, "snf%d", &boardnum) != 1) {
+ /* Nope, not a supported name */
+ *is_ours = 0;
return NULL;
+ }
}
- p = pcap_create_common(device, ebuf);
+ /* OK, it's probably ours. */
+ *is_ours = 1;
+
+ p = pcap_create_common(device, ebuf, sizeof (struct pcap_snf));
if (p == NULL)
return NULL;
+ ps = p->priv;
p->activate_op = snf_activate;
- p->md.snf_boardnum = boardnum;
+ ps->snf_boardnum = boardnum;
return p;
}
Index: libpcap/pcap-snf.h
===================================================================
--- libpcap/pcap-snf.h (revision 32783)
+++ libpcap/pcap-snf.h (working copy)
@@ -1,2 +1,2 @@
-pcap_t *snf_create(const char *, char *);
-int snf_platform_finddevs(pcap_if_t **devlistp, char *errbuf);
+pcap_t *snf_create(const char *, char *, int *);
+int snf_findalldevs(pcap_if_t **devlistp, char *errbuf);
Index: libpcap/pcap-septel.c
===================================================================
--- libpcap/pcap-septel.c (revision 32783)
+++ libpcap/pcap-septel.c (working copy)
@@ -38,34 +38,33 @@
#include <sys/types.h>
#include <unistd.h>
-#ifdef HAVE_SEPTEL_API
#include <msg.h>
#include <ss7_inc.h>
#include <sysgct.h>
#include <pack.h>
#include <system.h>
-#endif /* HAVE_SEPTEL_API */
-#ifdef SEPTEL_ONLY
-/* This code is required when compiling for a Septel device only. */
#include "pcap-septel.h"
-/* Replace septel function names with pcap equivalent. */
-#define septel_create pcap_create
-#define septel_platform_finddevs pcap_platform_finddevs
-#endif /* SEPTEL_ONLY */
-
static int septel_setfilter(pcap_t *p, struct bpf_program *fp);
static int septel_stats(pcap_t *p, struct pcap_stat *ps);
static int septel_setnonblock(pcap_t *p, int nonblock, char *errbuf);
/*
+ * Private data for capturing on Septel devices.
+ */
+struct pcap_septel {
+ struct pcap_stat stat;
+}
+
+/*
* Read at most max_packets from the capture queue and call the callback
* for each of them. Returns the number of packets handled, -1 if an
* error occured, or -2 if we were told to break out of the loop.
*/
static int septel_read(pcap_t *p, int cnt, pcap_handler callback, u_char *user) {
+ struct pcap_septel *ps = p->priv;
HDR *h;
MSG *m;
int processed = 0 ;
@@ -163,7 +162,7 @@
pcap_header.len = packet_len;
/* Count the packet. */
- p->md.stat.ps_recv++;
+ ps->stat.ps_recv++;
/* Call the user supplied callback function */
callback(user, &pcap_header, dp);
@@ -221,10 +220,24 @@
return 0;
}
-pcap_t *septel_create(const char *device, char *ebuf) {
+pcap_t *septel_create(const char *device, char *ebuf, int *is_ours) {
+ const char *cp;
pcap_t *p;
- p = pcap_create_common(device, ebuf);
+ /* Does this look like the Septel device? */
+ cp = strrchr(device, '/');
+ if (cp == NULL)
+ cp = device;
+ if (strcmp(cp, "septel") != 0) {
+ /* Nope, it's not "septel" */
+ *is_ours = 0;
+ return NULL;
+ }
+
+ /* OK, it's probably ours. */
+ *is_ours = 1;
+
+ p = pcap_create_common(device, ebuf, sizeof (struct pcap_septel));
if (p == NULL)
return NULL;
@@ -233,17 +246,18 @@
}
static int septel_stats(pcap_t *p, struct pcap_stat *ps) {
- /*p->md.stat.ps_recv = 0;*/
- /*p->md.stat.ps_drop = 0;*/
+ struct pcap_septel *handlep = p->priv;
+ /*handlep->stat.ps_recv = 0;*/
+ /*handlep->stat.ps_drop = 0;*/
- *ps = p->md.stat;
+ *ps = handlep->stat;
return 0;
}
int
-septel_platform_finddevs(pcap_if_t **devlistp, char *errbuf)
+septel_findalldevs(pcap_if_t **devlistp, char *errbuf)
{
unsigned char *p;
const char description[512]= "Intel/Septel device";
@@ -277,8 +291,6 @@
return -1;
}
- p->md.use_bpf = 0;
-
return (0);
}
@@ -286,5 +298,6 @@
static int
septel_setnonblock(pcap_t *p, int nonblock, char *errbuf)
{
- return (0);
+ fprintf(errbuf, PCAP_ERRBUF_SIZE, "Non-blocking mode not supported on Septel devices");
+ return (-1);
}
Index: libpcap/tests/valgrindtest.c
===================================================================
--- libpcap/tests/valgrindtest.c (revision 0)
+++ libpcap/tests/valgrindtest.c (working copy)
@@ -0,0 +1,408 @@
+/*
+ * 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 copyright[] _U_ =
+ "@(#) 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/libpcap/filtertest.c,v 1.2 2005-08-08 17:50:13 guy Exp $ (LBL)";
+#endif
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <stdarg.h>
+#include <unistd.h>
+#include <fcntl.h>
+#include <errno.h>
+#include <arpa/inet.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+
+#if defined(__APPLE__) || defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__) || defined(__DragonFly__)
+/* BSD-flavored OS - use BPF */
+#define USE_BPF
+#elif defined(linux)
+/* Linux - use socket filters */
+#define USE_SOCKET_FILTERS
+#else
+#error "Unknown platform or platform that doesn't support Valgrind"
+#endif
+
+#if defined(USE_BPF)
+
+#include <sys/ioctl.h>
+#include <net/bpf.h>
+
+/*
+ * Make "pcap.h" not include "pcap/bpf.h"; we are going to include the
+ * native OS version, as we're going to be doing our own ioctls to
+ * make sure that, in the uninitialized-data tests, the filters aren't
+ * checked by libpcap before being handed to BPF.
+ */
+#define PCAP_DONT_INCLUDE_PCAP_BPF_H
+
+#elif defined(USE_SOCKET_FILTERS)
+
+#include <sys/socket.h>
+#include <linux/types.h>
+#include <linux/filter.h>
+
+#endif
+
+#include <pcap.h>
+#ifndef HAVE___ATTRIBUTE__
+#define __attribute__(x)
+#endif
+
+static char *program_name;
+
+/* Forwards */
+static void usage(void) __attribute__((noreturn));
+static void error(const char *, ...)
+ __attribute__((noreturn, format (printf, 1, 2)));
+static void warning(const char *, ...)
+ __attribute__((format (printf, 1, 2)));
+
+extern int optind;
+extern int opterr;
+extern char *optarg;
+
+/*
+ * On Windows, we need to open the file in binary mode, so that
+ * we get all the bytes specified by the size we get from "fstat()".
+ * On UNIX, that's not necessary. O_BINARY is defined on Windows;
+ * we define it as 0 if it's not defined, so it does nothing.
+ */
+#ifndef O_BINARY
+#define O_BINARY 0
+#endif
+
+static char *
+read_infile(char *fname)
+{
+ register int i, fd, cc;
+ register char *cp;
+ struct stat buf;
+
+ fd = open(fname, O_RDONLY|O_BINARY);
+ if (fd < 0)
+ error("can't open %s: %s", fname, pcap_strerror(errno));
+
+ if (fstat(fd, &buf) < 0)
+ error("can't stat %s: %s", fname, pcap_strerror(errno));
+
+ cp = malloc((u_int)buf.st_size + 1);
+ if (cp == NULL)
+ error("malloc(%d) for %s: %s", (u_int)buf.st_size + 1,
+ fname, pcap_strerror(errno));
+ cc = read(fd, cp, (u_int)buf.st_size);
+ if (cc < 0)
+ error("read %s: %s", fname, pcap_strerror(errno));
+ if (cc != buf.st_size)
+ error("short read %s (%d != %d)", fname, cc, (int)buf.st_size);
+
+ close(fd);
+ /* replace "# comment" with spaces */
+ for (i = 0; i < cc; i++) {
+ if (cp[i] == '#')
+ while (i < cc && cp[i] != '\n')
+ cp[i++] = ' ';
+ }
+ cp[cc] = '\0';
+ return (cp);
+}
+
+/* VARARGS */
+static void
+error(const char *fmt, ...)
+{
+ va_list ap;
+
+ (void)fprintf(stderr, "%s: ", program_name);
+ va_start(ap, fmt);
+ (void)vfprintf(stderr, fmt, ap);
+ va_end(ap);
+ if (*fmt) {
+ fmt += strlen(fmt);
+ if (fmt[-1] != '\n')
+ (void)fputc('\n', stderr);
+ }
+ exit(1);
+ /* NOTREACHED */
+}
+
+/* VARARGS */
+static void
+warning(const char *fmt, ...)
+{
+ va_list ap;
+
+ (void)fprintf(stderr, "%s: WARNING: ", program_name);
+ va_start(ap, fmt);
+ (void)vfprintf(stderr, fmt, ap);
+ va_end(ap);
+ if (*fmt) {
+ fmt += strlen(fmt);
+ if (fmt[-1] != '\n')
+ (void)fputc('\n', stderr);
+ }
+}
+
+/*
+ * Copy arg vector into a new buffer, concatenating arguments with spaces.
+ */
+static char *
+copy_argv(register char **argv)
+{
+ register char **p;
+ register u_int len = 0;
+ char *buf;
+ char *src, *dst;
+
+ p = argv;
+ if (*p == 0)
+ return 0;
+
+ while (*p)
+ len += strlen(*p++) + 1;
+
+ buf = (char *)malloc(len);
+ if (buf == NULL)
+ error("copy_argv: malloc");
+
+ p = argv;
+ dst = buf;
+ while ((src = *p++) != NULL) {
+ while ((*dst++ = *src++) != '\0')
+ ;
+ dst[-1] = ' ';
+ }
+ dst[-1] = '\0';
+
+ return buf;
+}
+
+#define INSN_COUNT 17
+
+int
+main(int argc, char **argv)
+{
+ char *cp, *device;
+ int op;
+ int dorfmon, useactivate;
+ char ebuf[PCAP_ERRBUF_SIZE];
+ char *infile;
+ char *cmdbuf;
+ pcap_t *pd;
+ int status = 0;
+ int pcap_fd;
+#if defined(USE_BPF)
+ struct bpf_program bad_fcode;
+ struct bpf_insn uninitialized[INSN_COUNT];
+#elif defined(USE_SOCKET_FILTERS)
+ struct sock_fprog bad_fcode;
+ struct sock_filter uninitialized[INSN_COUNT];
+#endif
+ struct bpf_program fcode;
+
+ device = NULL;
+ dorfmon = 0;
+ useactivate = 0;
+ infile = NULL;
+
+ if ((cp = strrchr(argv[0], '/')) != NULL)
+ program_name = cp + 1;
+ else
+ program_name = argv[0];
+
+ opterr = 0;
+ while ((op = getopt(argc, argv, "aF:i:I")) != -1) {
+ switch (op) {
+
+ case 'a':
+ useactivate = 1;
+ break;
+
+ case 'F':
+ infile = optarg;
+ break;
+
+ case 'i':
+ device = optarg;
+ break;
+
+ case 'I':
+ dorfmon = 1;
+ useactivate = 1; /* required for rfmon */
+ break;
+
+ default:
+ usage();
+ /* NOTREACHED */
+ }
+ }
+
+ if (device == NULL) {
+ /*
+ * No interface specified; get whatever pcap_lookupdev()
+ * finds.
+ */
+ device = pcap_lookupdev(ebuf);
+ if (device == NULL) {
+ error("couldn't find interface to use: %s",
+ ebuf);
+ }
+ }
+
+ if (infile != NULL) {
+ /*
+ * Filter specified with "-F" and a file containing
+ * a filter.
+ */
+ cmdbuf = read_infile(infile);
+ } else {
+ if (optind < argc) {
+ /*
+ * Filter specified with arguments on the
+ * command line.
+ */
+ cmdbuf = copy_argv(&argv[optind+1]);
+ } else {
+ /*
+ * No filter specified; use an empty string, which
+ * compiles to an "accept all" filter.
+ */
+ cmdbuf = "";
+ }
+ }
+
+ if (useactivate) {
+ pd = pcap_create(device, ebuf);
+ if (pd == NULL)
+ error("%s: pcap_create() failed: %s", device, ebuf);
+ status = pcap_set_snaplen(pd, 65535);
+ if (status != 0)
+ error("%s: pcap_set_snaplen failed: %s",
+ device, pcap_statustostr(status));
+ status = pcap_set_promisc(pd, 1);
+ if (status != 0)
+ error("%s: pcap_set_promisc failed: %s",
+ device, pcap_statustostr(status));
+ if (dorfmon) {
+ status = pcap_set_rfmon(pd, 1);
+ if (status != 0)
+ error("%s: pcap_set_rfmon failed: %s",
+ device, pcap_statustostr(status));
+ }
+ status = pcap_set_timeout(pd, 1000);
+ if (status != 0)
+ error("%s: pcap_set_timeout failed: %s",
+ device, pcap_statustostr(status));
+ status = pcap_activate(pd);
+ if (status < 0) {
+ /*
+ * pcap_activate() failed.
+ */
+ error("%s: %s\n(%s)", device,
+ pcap_statustostr(status), pcap_geterr(pd));
+ } else if (status > 0) {
+ /*
+ * pcap_activate() succeeded, but it's warning us
+ * of a problem it had.
+ */
+ warning("%s: %s\n(%s)", device,
+ pcap_statustostr(status), pcap_geterr(pd));
+ }
+ } else {
+ *ebuf = '\0';
+ pd = pcap_open_live(device, 65535, 1, 1000, ebuf);
+ if (pd == NULL)
+ error("%s", ebuf);
+ else if (*ebuf)
+ warning("%s", ebuf);
+ }
+
+ pcap_fd = pcap_fileno(pd);
+
+ /*
+ * Try setting a filter with an uninitialized bpf_program
+ * structure. This should cause valgrind to report a
+ * problem.
+ *
+ * We don't check for errors, because it could get an
+ * error due to a bad pointer or count.
+ */
+#if defined(USE_BPF)
+ ioctl(pcap_fd, BIOCSETF, &bad_fcode);
+#elif defined(USE_SOCKET_FILTERS)
+ setsockopt(pcap_fd, SOL_SOCKET, SO_ATTACH_FILTER, &bad_fcode,
+ sizeof(bad_fcode));
+#endif
+
+ /*
+ * Try setting a filter with an initialized bpf_program
+ * structure that points to an uninitialized program.
+ * That should also cause valgrind to report a problem.
+ *
+ * We don't check for errors, because it could get an
+ * error due to a bad pointer or count.
+ */
+#if defined(USE_BPF)
+ bad_fcode.bf_len = INSN_COUNT;
+ bad_fcode.bf_insns = uninitialized;
+ ioctl(pcap_fd, BIOCSETF, &bad_fcode);
+#elif defined(USE_SOCKET_FILTERS)
+ bad_fcode.len = INSN_COUNT;
+ bad_fcode.filter = uninitialized;
+ setsockopt(pcap_fd, SOL_SOCKET, SO_ATTACH_FILTER, &bad_fcode,
+ sizeof(bad_fcode));
+#endif
+
+ /*
+ * Now compile a filter and set the filter with that.
+ * That should *not* cause valgrind to report a
+ * problem.
+ */
+ if (pcap_compile(pd, &fcode, cmdbuf, 1, 0) < 0)
+ error("can't compile filter: %s", pcap_geterr(pd));
+ if (pcap_setfilter(pd, &fcode) < 0)
+ error("can't set filter: %s", pcap_geterr(pd));
+
+ pcap_close(pd);
+ exit(status < 0 ? 1 : 0);
+}
+
+static void
+usage(void)
+{
+ (void)fprintf(stderr, "%s, with %s\n", program_name,
+ pcap_lib_version());
+ (void)fprintf(stderr,
+ "Usage: %s [-aI] [ -F file ] [ -I interface ] [ expression ]\n",
+ program_name);
+ exit(1);
+}
Index: libpcap/pcap-septel.h
===================================================================
--- libpcap/pcap-septel.h (revision 32783)
+++ libpcap/pcap-septel.h (working copy)
@@ -11,5 +11,5 @@
* @(#) $Header: /tcpdump/master/libpcap/pcap-septel.h,v 1.2 2008-04-04 19:37:45 guy Exp $
*/
-pcap_t *septel_create(const char *device, char *ebuf);
-
+pcap_t *septel_create(const char *device, char *ebuf, int *is_ours);
+int septel_findalldevs(pcap_if_t **devlistp, char *errbuf);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment