dect
/
libpcap
Archived
13
0
Fork 0
Commit Graph

877 Commits

Author SHA1 Message Date
guy ff5da1a402 "install_bpf_program()" already sets "p->errbuf" to an error string if
it fails; there's no need for "dag_setfilter()" to do so.
2005-04-03 23:56:47 +00:00
guy 73a0081c01 Fix some typoes for "ether_hostton".
If we don't have ether_hostton(), don't bother checking
NETINET_ETHER_H_DECLARES_ETHER_HOSTTON and including <netinet/ether.h>
if it's defined.
2005-03-27 22:26:25 +00:00
guy b3f8e4f640 Squelch some compiler warnings. 2005-03-27 22:10:23 +00:00
guy 4d2457ceee When testing whether <netinet/if_ether.h> declares ether_hostton(), add
all the extra #includes and definitions nametoaddr.c has.
2005-03-27 21:51:23 +00:00
guy cd3e743361 Unset ac_cv_have_decl_ether_hostton before testing whether
<netinet/ether.h> declares ether_hostton(), so the failure to find it
declared in <netinet/in_ether.h> doesn't cause us to assume we won't
find it anywhere.

Fix a typo in a comment.
2005-03-27 03:36:36 +00:00
guy 2bdb85977d When testing whether "inline" works, use the V_CCOPT flags, because some
of those might disable inlining; otherwise, the test for inlining will
succeed, but inlining won't work with the options we're using when
compiling.
2005-03-27 03:27:09 +00:00
guy 822f0efb5f If we don't get a declaration of ether_hostton() by including
<netinet/if_ether.h>, try <netinet/ether.h>.
2005-03-27 02:45:03 +00:00
guy 216c14f343 One more header Solaris needs to get at ether_hostton(). 2005-03-27 01:15:20 +00:00
guy 5277314c1e Make the first AC_CHECK_HEADERS test look the way it used to look, and
make the second one similar.

Get rid of the # in the "Rechecking with some additional #includes"
message, as it's a shell comment character and screws up the script.

Fix a typo in a comment.
2005-03-27 01:07:01 +00:00
guy 575134c351 Discard the cached result of a failure of the first test of
<netinet/if_ether.h>, so we try the second test with the additional
includes and definitions).

Log a message before doing the second test, to show why we're testing
twice.
2005-03-27 00:57:08 +00:00
guy d7ef1bcb71 On some platforms, some extra stuff is needed in order to include
<netinet/if_ether.h>, so, if we don't find <netinet/if_ether.h>, try
adding that extra stuff when looking for it.
2005-03-27 00:30:21 +00:00
guy 3c27416c4d Use AC_LBL_LIBRARY_NET before checking for ether_hostton(), as, at least
on Solaris, it's a "gethostbyname() -ish function", and we'll find it
only when we're linking with whatever libraries are required for finding
those functions.

Get the AC_LBL_LIBRARY_NET macro from tcpdump; that macro works with
autoconf 2.5x, but the one here didn't.
2005-03-26 23:57:42 +00:00
guy d3bc29242e If we have ether_hostton(), check whether we have <netinet/if_ether.h>
and if including it declares ether_hostton(), and define
HAVE_DECL_ETHER_HOSTTON appropriately, and use that to determine whether
to define it ourselves, rather than having a set of OSes that don't need
it, as that set can change over time.

Make the default declaration of "ether_hostton()" declare its first
argument as "const char *", as that's what it's *supposed* to be
(although it's not declared as such in some OSes, so we still have to
cast a "const char *" when passed as the first argument).
2005-03-26 23:07:50 +00:00
guy afe114b070 For "ether proto", allow LLC value names as well as Ethernet type value
names, so that, as the tcpdump man page claims to be the case, "ether
proto \{iso,stp,ipx,netbeui}" are equivalent to "{iso,stp,ipx,netbeui}".
2005-03-17 07:02:31 +00:00
guy 16889bae3e On the platforms where we do in-kernel filtering and can read more than
one packet from the kernel at a time, when the filter is changed, clear
the libpcap buffer to discard packets read from the kernel before the
filter was changed.
2005-02-26 21:58:05 +00:00
guy e6c1698e5e Install an initial filter that accepts all packets; you need a filter in
order to tell the kernel what the snapshot length is.
2005-02-24 08:59:38 +00:00
guy 34f7067751 Gisle Vanem notes that some compilers warn about "const register char
*" - use "register const char *" instead.
2005-02-10 19:38:06 +00:00
guy 8804809bf5 Add DLT_ values requested by Gregor Maier <gregor@endace.com> of Endace
Measurement Systems.
2005-02-08 20:03:15 +00:00
guy c1401d4725 The DLT_LINUX_PPP_WITHDIRECTION is also used for pppd on some BSDs, so
rename it again to DLT_PPP_PPPD, and rename other #defines to match.

Add backwards-compatibility #defines of DLT_PPP_WITH_DIRECTION and
DLT_LINUX_PPP_WITHDIRECTION for software that used them.
2005-02-08 19:52:18 +00:00
guy d9e0597103 Rename DLT_PPP_WITHDIRECTION to DLT_LINUX_PPP_WITHDIRECTION, as it's a
Linux-specific mechanism, and rename other #defines accordingly.  Give
more details about it in comments.
2005-01-31 01:47:27 +00:00
guy f08856ee2d Apparently, Redback used a DLT_ value of 32 for captures from its
SmartEdge 400 and 800.
2005-01-31 01:00:07 +00:00
guy 547b1dec36 Don't ignore Solaris logical interface entries, as they could give
additional IP addresses for the underlying interface; instead, strip off
the logical interface number, and add them so that the additional
addresses are added.
2005-01-29 10:34:04 +00:00
guy 2c29645015 Clean up indentation.
Get rid of some unnecessary casts.
2005-01-29 00:52:22 +00:00
guy 07ea050fd6 Explain why we're discarding interfaces we can't open for capturing. 2005-01-29 00:47:25 +00:00
guy a16432cb28 Put back the code to try opening a device for capture before adding it
to the list of interfaces, so we don't, for example, include the
loopback device in the list on Solaris - SIOCGIFCONF/SIOCGLIFCONF will
find the device, as it has an IP address, but it's not a DLPI device so
you can't open it for capturing.
2005-01-28 20:51:20 +00:00
guy 738db2cb08 Add checks for interfaces that begin with "dummy" or that end with ":"
followed by a number; Ethereal has those checks in the code it uses when
not using "pcap_findalldevs()" - I'm not sure what the "dummy" is
checking for (Linux dummy interfaces?), but the ":" followed by a number
are Solaris virtual interfaces (I think that's how it implements
multiple IP addresses per "real" interface, with each additional address
getting a virtual interface; I'm not sure you can open a virtual
interface for capturing, and even if you can you won't, as far as I
know, see any packets other than the one you get for the "real"
interface - should we just ignore the ":{number}" and "add" that
interface so that we add its IP address?).
2005-01-28 20:33:51 +00:00
hannes d6d37a1ad0 remove duplicate Juniper ML-PPP DLT name 2005-01-27 18:32:28 +00:00
hannes b82f83587c add support for DLT_JUNIPER_{MLFR,MLPPP) 2005-01-25 22:38:23 +00:00
guy 2dd3e0acd6 From Koryn Grant:
The DAG 4.2 OC-48 cards (and revisions thereof) produce ERF
	records that do not contain the trailing FCS.  However,
	pcap-dag.c assumed that there is an FCS and strips the final
	word of the packet.  This meant that packets captured with
	libpcap on a DAG 4.2 are truncated by four bytes, unless a
	magical environment variable (ERF_FCS_BITS) was set.  This patch
	autodetects when the DAG card is a 4.2, and turns off the
	FCS-stripping feature so that packets are no longer truncated.

	Also, include "dagnew.h" and "dagapi.h" with quotes, not angle
	brackets, as they should be in the user search path, not the
	system search path.
2005-01-21 10:11:39 +00:00
guy 2f23c057fc Add to the beginning a note from Rick Jones that 11i (11.11) and later
don't have any known issues with promiscuous mode.
2005-01-15 01:23:56 +00:00
hannes f718fd1835 add support for Juniper PIC Peer DLT_ 2005-01-12 09:15:05 +00:00
hannes 6e18a333d2 add gencode support for Juniper ML/LS PIC DLT_ 2005-01-12 09:02:55 +00:00
guy 1a66ed9ea7 Add new DLT_ values for use in Gcom's T1/E1 line monitoring equipment. 2005-01-11 11:02:08 +00:00
guy c3411874c8 Add a magic number for Navtel Communications. 2005-01-07 11:21:01 +00:00
guy 54b7cfbafb Squelch a (valid) compiler warning. 2004-12-27 01:12:17 +00:00
guy b3a008a463 Mark some arguments as unused (pointers to those functions are assigned
to pointer variables, so the signature can't be changed).

From Gisle Vanem: assign to the right variables in the Win32
version-string construction code (where one criterion for being "right"
is that the variable exist...).
2004-12-19 20:02:45 +00:00
guy 7848712ee7 From Gisle Vanem: fix the include-only-once #define's name. 2004-12-19 19:48:37 +00:00
guy 0865b78db9 Actually add the RCS ID claimed to be added by the previous checkin. 2004-12-19 19:47:01 +00:00
guy 7379471bd6 From Gisle Vanem:
add note for djgpp;

	pcap_verbose() is gone;

	fix a typo.

Add an RCS ID.

Remove CRs - they get in the way of applying patches on UN*X, and
presumably either they aren't required on DOS or DOS CVS inserts them
when the file is checked out.
2004-12-19 19:44:29 +00:00
guy 8163c9ce4d From Gisle Vanem: produce a version.h from VERSION.
Add an RCS ID.

Remove CRs - they get in the way of applying patches on UN*X, and
presumably either they aren't required on DOS or DOS CVS inserts them
when the file is checked out.
2004-12-19 19:41:06 +00:00
guy 14e0f5d9f7 From Gisle Vanem: don't compile 32-bit drivers by default.
Add an RCS ID.

Remove CRs - they get in the way of applying patches on UN*X, and
presumably either they aren't required on DOS or DOS CVS inserts them
when the file is checked out.
2004-12-19 19:36:33 +00:00
guy f8a76d1d76 From Gisle Vanem: MS-DOS support. 2004-12-18 08:52:08 +00:00
guy f912cc399c From Gisle Vanem: there's no need to include <sys/time.h> in
"grammar.y", as "pcap.h" includes it.
2004-12-18 08:49:23 +00:00
guy 529f98f94f Use "version.h" if autoconf is being used (as that assumes a
UN*Xy-enough platform that the Makefile.in rules to generate "version.h"
work), and use the stuff from "version.h" iff HAVE_VERSION_H is defined,
so we can use it even with WinPcap.
2004-12-17 23:25:36 +00:00
guy 14eb2792bd Don't boldface the period at the end of a sentence. 2004-12-17 21:27:54 +00:00
guy 3ba117b68d On Win32, don't close "p->fd" in "pcap_close_common()", as there is no
"p->fd".  Do, however, use "pcap_close_common()" to free up "p->buffer",
as is done on other platforms.
2004-12-17 20:41:59 +00:00
guy f4531c5cf3 From Gisle Vanem:
don't include <sys/time.h>, as it's included, if necessary, by
	pcap.h;

	constify some arguments.
2004-12-17 20:32:35 +00:00
guy 875d60923d Don't close the input stream if "pcap_fopen_offline()" fails; only do so
in "pcap_open_offline()", where we were the one who opened the stream.
2004-12-17 20:26:16 +00:00
guy 8ab85b3b53 From Gisle Vanem: there's no need to include <sys/time.h> in
"gencode.c", as "pcap.h" includes it.
2004-12-17 20:16:44 +00:00
guy 6fdd92e436 From Gisle Vanem: add some new link-layer types to the "dlt_choices[]"
table.

Add some even newer ones that arrived after his patch.
2004-12-17 19:55:41 +00:00