dect
/
libpcap
Archived
13
0
Fork 0

Commit Graph

  • cf54e028ce Explicitly map PACKET_ values to LINUX_SLL_ values, so that even if a future Linux kernel changes the PACKET_ values out from under us, the values recorded in the packet header in DLT_LINUX_SLL captures does *not* change. guy 2000-12-22 12:11:36 +0000
  • db46beec77 "depend" should depend on "bpf_filter.c", so that we make the appropriate "bpf_filter.c" symlink before building the dependencies, so that the dependencies include those for "bpf_filter.c". guy 2000-12-22 11:54:48 +0000
  • 4ee46797c7 Patch from Olaf Kirch to add support for ARPHRD_TUNNEL (or at least for some tunnels). guy 2000-12-22 11:53:27 +0000
  • 0a56cf15a9 Declare "pfopen()" in "lbl/os-osf4.h", as Digital don't seem to have bothered to declare it anywhere in a system header file. guy 2000-12-22 11:51:33 +0000
  • d6752d37e8 Regenerate "config.h.in" and "configure". guy 2000-12-22 11:42:18 +0000
  • 5b0a98d641 Add support for a new link layer type DLT_LINUX_SLL, for use when doing live captures with a "cooked" (SOCK_DGRAM) rather than a "raw" (SOCK_RAW) PF_PACKET socket; it includes a bunch of the fields from the "struct sockaddr_ll" you get in a "recvfrom()", including the Ethernet protocol field. guy 2000-12-21 10:29:21 +0000
  • 892c4a4436 Put in a comment noting that we should, perhaps, declare "ether_hostton()" in "lbl/os-XXX.h" files rather than in "nametoaddr.c". guy 2000-12-18 03:45:34 +0000
  • 839690365f As per many suggestions, the most recent in mail to "patches@tcpdump.org" by Jonathan Wilkins <jwilkins@madscience.dyndns.org>, we don't declare "ether_hostton()" on FreeBSD - it's declared in <net/ethernet.h> in 3.0 and later, and is declared with the first argument as "const char *" in 4.0 and later so that if we declare it with the first argument as "char *" we get errors. (If we declare it with "const char *", you get errors on FreeBSD 3.x and other systems that *don't* declare it with "const char *".) guy 2000-12-18 03:42:39 +0000
  • 6fc6ca1eb5 Improve the error message printed if you try to use the "any" device on a system where only SOCK_PACKET works. guy 2000-12-18 00:20:51 +0000
  • 109075a904 Update config.guess and config.sub to revision 2000-12-15 from ftp://ftp.gnu.org/gnu/config/ fenner 2000-12-17 15:16:50 +0000
  • 61d8355611 Add "config.h" and ".devel". guy 2000-12-17 08:11:20 +0000
  • d394d8f49f Get rid of "config.h" and "bpf_filter.c" on a "make distclean". guy 2000-12-17 07:25:40 +0000
  • d9d04b6303 Use 50, not 113, for the link layer type in NetBSD DLT_PPP_SERIAL capture files; NetBSD uses 50, and, hopefully, nobody else will use 50 for something else. guy 2000-12-16 22:19:12 +0000
  • 213173c109 The stuff in the "linux-include" directory is no longer needed, as we no longer depend on the OS's header files for packet format and packet field value definitions; get rid of the stuff in that directory. guy 2000-12-16 21:40:22 +0000
  • 7928a0e823 Handle DLT_NULL correctly - the AF_ value is in host byte order, which means that we should "htonl()" it before using it in BPF expressions *but*, if we're reading a capture file from a machine with the opposite byte order from ours, we should byte-swap it before "htonl()"ing it. guy 2000-12-16 21:31:10 +0000
  • c9452a7666 Clean up promiscuous mode, when using SOCK_PACKET, as best we can; remember which pcap_t's were opened (with SOCK_PACKET) in promiscuous mode on interfaces not already in promiscuous mode, turn promiscuous mode off when closing such a pcap_t, and arrange that, when the program exits, all pcap_t's of that sort not already closed have their interfaces taken out of promiscuous mode. (It's not sufficient to do this on exit - applications may close a pcap_t without exiting, e.g. Ethereal.) guy 2000-12-16 10:43:26 +0000
  • 84533f55bf The stuff in the "linux-include" directory is no longer needed, as we no longer depend on the OS's header files for packet format and packet field value definitions; get rid of the stuff in that directory. guy 2000-12-16 09:05:11 +0000
  • 54b79fdd10 Note that: guy 2000-12-12 09:31:45 +0000
  • e20bbc40f7 If the user specifies an Ethernet address in an expression such as "ether host XX:XX:XX:XX:XX:XX", but the device on which you're capturing isn't a device with Ethernet-style link-layer addresses, report "ethernet addresses supported only on ethernet, FDDI or token ring", not "ethernet address used in non-ether expression", as the error. guy 2000-12-12 08:08:38 +0000
  • 26f7f272c0 Make "pcap_compile_nopcap()" a wrapper around "pcap_open_dead()" and "pcap_compile()", rather than a routine that duplicates a lot of code in "pcap_compile()", so that we don't run the risk of having "pcap_compile_nopcap()" fail to take actions that "pcap_compile()" takes. guy 2000-12-12 03:26:16 +0000
  • 7ec14224d6 preliminary edits for 0.6 mcr 2000-12-08 07:01:11 +0000
  • a91d72d3ed The Linux 2.4 kernel supplies ARPHRD_IEEE802_TR, rather than ARPHRD_IEEE802, as the hardware type for Token Ring interfaces. Map both of them to DLT_IEEE802 (as that has become the DLT_ type for Token Ring, the fact that it just says "802", not "802_5" or whatever, nonwithstanding), and, if ARPHRD_IEEE802_TR isn't defined, define it with the value it has in 2.4 (so that the resulting libpcap will work on a 2.4 system regardless of whether the system on which it was built defined ARPHRD_IEEE802_TR). guy 2000-12-03 09:07:27 +0000
  • 21e33731db Update the platform-specific information for various platforms. guy 2000-12-01 07:47:07 +0000
  • dc543edc9a Fix a couple of error messages. guy 2000-11-22 05:32:55 +0000
  • 20784fd22c netbsd 1.5 -> 1.6 itojun 2000-11-19 13:37:20 +0000
  • ef0a3b3d38 Add a DLT_IEEE802_11 for use by any platform that provides raw 802.11 link-layer headers on capture. (Nothing uses it yet, but hopefully this will make it less likely that they'll use different DLT_ names or values.) guy 2000-11-15 05:36:48 +0000
  • e9c32982c8 Oops! I gave LINKTYPE_PPP_HDLC the same value as LINKTYPE_FR, which is Not Good. Give LINKTYPE_PPP_HDLC 113 instead, as nothing else uses it. guy 2000-11-15 05:31:05 +0000
  • 142ff8d0c7 correct "protochain" processing. itojun 2000-11-09 06:20:05 +0000
  • ad7e091f5d Declare "install_bpf_program()" in "pcap-int.h", not "gencode.h"; it has nothing to do with generating code, and "gencode.h" isn't included by all "pcap-XXX.c" modules, whilst "pcap-int.h" is. guy 2000-11-04 10:09:55 +0000
  • 525b970802 Patch from Arkadiusz Miskiewicz <misiek@pld.org.pl> to handle ARPHRD_SIT (IPv6-inside-IPv4 tunnel). guy 2000-11-04 07:19:22 +0000
  • 7d16400ec5 When reporting an unknown data link type, print it in decimal, not hex, as DLT_ values are defined with decimal values in "net/bpf.h". guy 2000-10-30 06:06:53 +0000
  • daef269870 Add a #define for the LSAP value for SNAP. guy 2000-10-29 05:53:21 +0000
  • 00357a902a Handle "iso" as a PPP link-layer type. guy 2000-10-28 10:28:15 +0000
  • 195ad572d1 Allow "clnp", as well as "esis" and "isis", as OSI protocols for which we can check. guy 2000-10-28 10:18:39 +0000
  • f4cbadac41 Allow "iso proto esis" and "iso proto isis" (as the FreeBSD man page claims are allowed, even though the FreeBSD tcpdump doesn't support them). guy 2000-10-28 10:05:46 +0000
  • be6af9e0ad Catch attempts to filter on ISO hosts (we don't support that) and to apply "esis" or "isis" to host names. guy 2000-10-28 09:43:56 +0000
  • af30d75a3e Tony Li's changes, from FreeBSD, to support filtering for OSI packets and for ESIS and ISIS packets. guy 2000-10-28 09:30:20 +0000
  • 14972aa99d Handle for DLT_PPP all the protocol types we handle for DLT_PPP_BSDOS. guy 2000-10-28 09:06:06 +0000
  • 54b2ab13c2 Patch from Monroe Williams <monroe@pobox.com>, submitted with NetBSD PR #5228, to correctly check for Appletalk for EtherTalk phase II - they use 802.3 with LLC SNAP packets, rather than D/I/X Ethernet packets. guy 2000-10-28 08:19:29 +0000
  • 8c16ead778 Fix from Jefferson Ogata <jogata@nodc.noaa.gov> - "count_stmts()" wasn't counting any extra jumps required by a flowgraph node (the conditional jump instructions have an 8-bit offset; if the target is more than 256 instructions away, we generate a nearby "jump always" to the target, and jump to that instead). guy 2000-10-28 01:22:52 +0000
  • 82547471f7 When attaching a "bpf_program" to a "pcap_t" to use as a userland filter, always attach a copy, as "pcap-linux.c" does; that way, after a program uses "pcap_setfilter()", it can safely use "pcap_freecode()" to free up the BPF instructions allocated by "pcap_compile()". Also, always free it up when the "pcap_t" is closed. guy 2000-10-28 00:01:26 +0000
  • 188fee53cc If we're receiving packets from a PF_PACKET socket, check whether the interface index of the interface for the packet is the interface index of the loopback interface and, if it is, check if the packet is an outgoing packet; if so, ignore it, as we'll also be seeing that packet as a received packet. guy 2000-10-25 07:46:49 +0000
  • 5c4a950507 Clean up the lexical analyzer if we return normally from "pcap_compile()", not just if we return with an error, so that we don't leak memory by allocating a Flex buffer for the expression to be parsed but not freeing it. guy 2000-10-25 07:28:22 +0000
  • c900791477 The Linux "pcap_setfilter()" makes a copy of the filter it's handed, and installs that copy; when closing a pcap_t on Linux, free that copy. guy 2000-10-25 06:59:09 +0000
  • fd8a7488b1 If we're reading from a savefile, don't try to install a kernel packet filter. guy 2000-10-25 05:59:04 +0000
  • 72f94b6459 Eliminate __P(). fenner 2000-10-23 19:32:20 +0000
  • 4bff247486 Oh, well, maybe *next* time I'll remember that the names are in alphabetical order by first then last name. guy 2000-10-22 04:18:44 +0000
  • 98a503e843 Improved VLAN support, from Peter Jeremy - "vlan" filtering keyword, letting you filter based on the VLAN to which a packet belongs, and an improvement to the printing of VLAN packets (adding an extra space to separate the VLAN priority and flags from the next stuff printed). guy 2000-10-22 04:15:55 +0000
  • 6251821734 Document that a null pointer or "any", when specified as the "device" argument to "pcap_open_live()", will, on Linux systems with a 2.2 or later kernel, snoop on all interfaces. guy 2000-10-22 02:21:34 +0000
  • b4bfe1ee30 Add "lbl/os-osf4.h" to declare "snprintf()" and "vsnprintf()", to squelch some compiler warnings. guy 2000-10-21 05:04:18 +0000
  • be7f1ec5ad We should no longer need to use our own versions of system header files when compiling on Linux, as we extracted from those copies the definitions and declarations we need in order to dissect packets, and put them into our own header files in the regular source directory. guy 2000-10-21 04:50:43 +0000
  • edcaeb1db4 Don't declare "iface_get_id()" or "iface_bind()" if "HAVE_NETPACKET_PACKET_H" isn't defined, as we won't define them if it's not defined. guy 2000-10-20 06:55:28 +0000
  • c7823f5045 pcap_read: Back out the last change. Now EINTR is handled as timeout reached so that pcap-based applications can use alarm timers to interrupt the pcap loop. torsten 2000-10-18 23:51:48 +0000
  • 0ae7f68987 pcap_read: Check the error code of select against EINTR. Reported by Sebastian. torsten 2000-10-18 23:47:41 +0000
  • 9cd2d87ddd Oops, I missed one PCAP_ENCAP_ value; revert it to the equivalent DLT_ value. guy 2000-10-18 08:32:55 +0000
  • 3a5713e4fc In addition to telling people not to change the format of the savefile header without getting a new magic number from us, tell them not to change the interpretation of any fields in the header without getting a new magic number from us. guy 2000-10-12 04:16:52 +0000
  • 88541c9adf Get rid of the PCAP_ENCAP_ values - if an application uses them, that application won't build with any other version of libpcap, which means that a lot of applications won't use them. In addition, "pcap_linktype()" needs to return DLT_ values, so that platforms that build libpcap as a shared library won't break binary compatibility if they update to this version of libpcap. guy 2000-10-12 04:12:27 +0000
  • 2c961ff224 Get rid of the PCAP_ENCAP_ values - if an application uses them, that application won't build with any other version of libpcap, which means that a lot of applications won't use them. In addition, "pcap_linktype()" needs to return DLT_ values, so that platforms that build libpcap as a shared library won't break binary compatibility if they update to this version of libpcap. guy 2000-10-12 03:53:57 +0000
  • f7179f8b0d Remove from "lbl/os-solaris2.h" declarations of functions we don't use; the declaration of "utimes()" collides with the declaration that SunOS 5.5.1 and later, at least, *do* have. (5.5.1 doesn't declare "snprintf()", even though it has "snprintf()", so we declare it here; we declare some others that don't cause problems.) guy 2000-10-11 04:02:52 +0000
  • bcb41391ec Eliminate a warning with some compilers. guy 2000-10-10 04:53:54 +0000
  • fd7f1bf605 Include <string.h> to declare various string-manipulating routines. guy 2000-10-10 04:53:08 +0000
  • b8be30ba60 Include the license file as one of the files in the tarball. guy 2000-10-10 04:51:18 +0000
  • 8c9d56c5d4 added license file mcr 2000-10-09 22:38:56 +0000
  • 79e2793fb3 Make "gen_protochain()", as it's not used outside "gencode.c", and declare it before it's defined. guy 2000-10-06 04:52:53 +0000
  • 6ef0c9a172 Add definitions of Ethernet types from "linux-includes/netinet/if_ether.h" to "ethertype.h", and remove includes of <netinet/if_ether.h> from files that only include it to get ETHERTYPE_ values defined. guy 2000-09-23 07:26:27 +0000
  • 45b3cb247a Added support for an "any" device based on a patch from Sebastian Krahmer. torsten 2000-09-20 15:10:28 +0000
  • da539dbb00 Give it an SCCS ID and an RCS ID. guy 2000-09-20 07:52:04 +0000
  • 6e4c95091d When making directories into which to install files in "make install", change the directory mode to 755 after making the directory, so that the directory is publicly readable and searchable even if the user doing the "make install" has a umask that takes away public read and search permissions. (I think that's been a problem at least once - somebody had trouble configuring and building Ethereal, probably because "/usr/local/include/net" wasn't publicly readable and searchable, and my suspicion is that somebody did "make install-incl" or "make install" of libpcap when their umask was 027.) guy 2000-09-19 14:52:41 +0000
  • d1713b06bb The current "config.guess" may give different Alpha processors different names, e.g. "alphaev56", rather than just "alpha", so, in "AC_LBL_UNALIGNED_ACCESS", we should check for "alpha*", rather than "alpha", in our test for platforms we *know* shouldn't do unaligned accesses (Digital^H^H^H^H^H^H^HTru64 UNIX, by default, may just catch the alignment trap, complain on the console, and then simulate the unaligned access, but that's slow - and, in one test, didn't appear to prevent all the faults from unaligned accesses). guy 2000-09-19 03:56:26 +0000
  • 7e4d6babb8 Not all systems running on Alpha processors add 3 bytes of padding to FDDI headers to align the payload on a 4-byte boundary; for example, Linux/Alpha doesn't appear to do so, which causes filter expressions not to work correctly on FDDI on Linux/Alpha. guy 2000-09-19 03:28:10 +0000
  • a744b40d5e Added a TODO file with some stuff that needs to be done IMHO (putting on the asbestos suit). As we don't have a bug tracking system or task manager we need some way to record a list of tasks. I think this is the easiest way. Discussion on -workers please. torsten 2000-09-18 19:33:07 +0000
  • 808b77b191 Fixed my mail address. The GMX address might go away. For open source stuff I prefer using the debian.org address. torsten 2000-09-18 18:47:46 +0000
  • 8439f66a3f In "init_linktype()", map DLT_ codes that don't have the same value as the equivalent PCAP_ENCAP_ codes to the corresponding PCAP_ENCAP_ code so that the code generator need check only the PCAP_ENCAP_ codes. guy 2000-09-18 06:39:44 +0000
  • e7e53064df Don't map DLT_LOOP to PCAP_ENCAP_NULL; it's handled differently from DLT_NULL in OpenBSD's libpcap, and I'm not sure what the right way to handle it is yet - for now, this lets the OpenBSD folk merge their DLT_LOOP support in if, as, and when they pick up the next version of libpcap. guy 2000-09-18 06:38:08 +0000
  • 8445a15c7c Add support for NetBSD DLT_PPP_SERIAL (PPP in HDLC-like framing, as per RFC 1662, or Cisco point-to-point with HDLC framing, as per seciont 4.3.1 of RFC 1547; there's always an address and control octet at the beginning of these packets, but they're not necessarily 0xff 0x03), which we map to PCAP_ENCAP_PPP_HDLC. guy 2000-09-18 05:08:02 +0000
  • 7e461ddcbe There's no longer a rule to make "force", so don't make "depend" depend on "force". guy 2000-09-18 05:04:52 +0000
  • 781fae3571 Introduce a set of PCAP_ENCAP_ codes to specify packet encapsulations. guy 2000-09-17 04:04:36 +0000
  • 74ab49bec1 Add comments telling people not to gratuitously change the capture file format (file header or per-packet header format, or interpretation of any of the fields in those headers) without getting a new magic number from "tcpdump-workers@tcpdump.org", and to make sure that libpcap can still read files with the existing magic numbers, not just files with the new magic number and record formats. guy 2000-09-14 09:49:28 +0000
  • 549c0b2c89 repair argument mismatch to malloc(). itojun 2000-09-06 07:40:03 +0000
  • 9700d14e7b Regenerate. fenner 2000-08-16 20:30:46 +0000
  • af62365a17 Add a check for lame lex and fail with an error message recommending flex. fenner 2000-08-16 20:28:52 +0000
  • d8d8ac33c8 Changed the indention of pcap-linux.c to match with the other source files of libpcap. torsten 2000-08-13 21:25:26 +0000
  • 6bc711849d Stopped pcap_close from closing stdin. I don't see why somebody would want to close that file apart from becoming a daemon. Thanks to Don Talsma for pointing this out. torsten 2000-08-13 10:33:14 +0000
  • 5c220490cb Change the message issued on HP-UX if we can't find the PPA for a network device, so that guy 2000-08-13 06:56:05 +0000
  • 64c7184aa6 Fixed the BPF compiler for Linux. The BPF code used to truncate the packets after the snaplen. On Linux this hinders us from inquiring the original packet size so I removed that feature for Linux builds. torsten 2000-08-06 01:22:39 +0000
  • c2c579d32b Updated the comment on the MSG_TRUNC problem in connection with the Linux packet filter. Work around to come. torsten 2000-08-04 18:35:48 +0000
  • 407e3aaf67 regenerated from configure.in assar 2000-07-30 10:50:22 +0000
  • c972305a1f bring a little bit more uptodate assar 2000-07-30 06:01:22 +0000
  • e5db17becd use common names for directories use INSTALL_PROGRAM/INSTALL_DATA assar 2000-07-30 05:56:49 +0000
  • ef67d43d46 Change my address to my mail-forwarding address; "any problem in computer science can be solved by adding a layer of indirection". guy 2000-07-30 05:28:24 +0000
  • 763e372b7e Fix the names in the entries in the credits for Alexey Kuznetsov and Fulvio Risso. guy 2000-07-30 05:20:13 +0000
  • ccd074109a try fetch names from CVS logs and adding here assar 2000-07-29 10:16:08 +0000
  • 6dc5bf2601 replace bzero with memset assar 2000-07-29 08:03:56 +0000
  • 6019517c9b ISLOOPBACK_IFA: add (pcap_lookupdev): handle device names without numbers. based on a patch from Rafal Maszkowski <rzm@icm.edu.pl> assar 2000-07-29 07:42:48 +0000
  • 84f822f4d8 Pick up, from the FreeBSD libpcap, changes to surround all declarations with guy 2000-07-29 07:36:41 +0000
  • 84f2cb311c remove owner/group from installs assar 2000-07-29 07:20:24 +0000
  • 662b2c32d8 (install): install everything (uninstall): add (force): remove assar 2000-07-29 07:05:20 +0000
  • 099d57bfe9 Give it an SCCS/RCS ID. guy 2000-07-25 06:20:37 +0000
  • c8c2e7e65b Token Ring support, from various patches. Also add "tr" as an alias for "ether", "fddi", "link", etc.. guy 2000-07-25 05:50:08 +0000
  • 884ed98aed Add support for reading capture files from programs using Alexey Kuznetzov's patched version of libpcap; we ignore the additional fields it adds to the per-packet header. Red Hat Linux 6.2 uses that patched version, and some other Linux distributions might do so as well. guy 2000-07-18 03:43:47 +0000