Commit Graph

24 Commits

Author SHA1 Message Date
Guy Harris 64b2a29fc8 Squelch a compiler warning.
svn path=/trunk/; revision=10211
2004-02-24 01:11:27 +00:00
Ulf Lamping 3b77bfee59 removed some MSVC warnings (moved pcap.h before glib.h)
svn path=/trunk/; revision=9393
2003-12-21 12:19:39 +00:00
Guy Harris d792460eac From Jaime Fournier: fix a typo.
svn path=/trunk/; revision=9093
2003-11-26 02:54:05 +00:00
Guy Harris 27fdd16f4e Maybe the problem is that the compilers used on AIX weren't defining
"AIX", and that code was never compiled.  Libpcap uses "_AIX" to
conditionally compile in the extra AIX BPF support; we'll do the same.

svn path=/trunk/; revision=9056
2003-11-21 08:33:49 +00:00
Guy Harris 23c4738618 Pass "strncmp()" the right number of arguments. (Why hasn't anybody
reported this as a problem when compiling on AIX?  Doesn't any compiler
complain that "strncmp()" isn't being passed enough arguments?  GCC sure
did in a test program I built on FreeBSD 3.4....)

svn path=/trunk/; revision=9055
2003-11-21 08:30:40 +00:00
Guy Harris 219b6cefa2 Based on a patch from Brian Fundakowski Feldman, add support for setting
link-layer type when capturing, using the "pcap_set_datalink()" and
related APIs.

svn path=/trunk/; revision=8848
2003-11-01 02:30:18 +00:00
Guy Harris de7bbaf8da Use "pcap_findalldevs()" if present.
svn path=/trunk/; revision=8655
2003-10-10 03:04:38 +00:00
Guy Harris b657bea870 Fix a compile error on Windows.
svn path=/trunk/; revision=8441
2003-09-10 06:47:04 +00:00
Guy Harris 27ea7816ee Have "get_interface_list()" return a list of "if_info_t" structures
containing a pointer to an interface name and possibly a pointer to an
interface description (although that pointer might be null if no
description is available), rather than having the Windows version glue
together the name and description into a single string.

Supply for the Linux "any" device the same description that libpcap's
"pcap_findalldevs()" returns.

svn path=/trunk/; revision=8440
2003-09-10 05:35:26 +00:00
Guy Harris 81fc518ec6 From Nathan Jennings:
support for user-supplied interface descriptions;

	support for hiding interfaces in drop-down list in capture
	dialog.

Clean up comments written to preferences file.

svn path=/trunk/; revision=8419
2003-09-08 21:44:42 +00:00
Guy Harris a99b2c3b2b From Nathan Jennings: "g_list_remove_link()" doesn't free the list item
itself, so we leaked memory when freeing the interface list; in
"free_interface_list()", use "g_list_foreach()", calling a list free
routine, to free the data items in the list, and then use
"g_list_free()" to free the list.

Use "free_interface_list()" in "get_interface_list()" to free the list
if we have an error, as it now does what the code that use to be there
did.

svn path=/trunk/; revision=7965
2003-07-06 00:07:59 +00:00
Guy Harris 4275845779 Fix by Gerald Combs to a braino of mine.
svn path=/trunk/; revision=7866
2003-06-13 02:37:42 +00:00
Guy Harris 32eb0448a8 Handle the case of an empty interface list on Windows the same way we
handle it on UNIX.  Check for an empty interface name (which indicates
the end of the interface list) at the beginning of the loop, so that if
the first interface name is empty (meaning an empty interface list) we
don't put a bogus entry into the list with just a colon.

svn path=/trunk/; revision=7828
2003-06-10 08:01:42 +00:00
Guy Harris 2fecf91a17 AIX's BPF, and thus its tcpdump, appears to use 24 as the link-layer
type for loopback devices; map it to DLT_NULL when reading libpcap files
with a major version of 2 and a minor version of 2, and when capturing
from an "loN" device on AIX.

svn path=/trunk/; revision=7361
2003-03-25 06:04:54 +00:00
Jörg Mayer 7c4176d868 Removed trailing whitespaces from .h and .c files using the
winapi_cleanup tool written by Patrik Stridvall for the wine
project.

svn path=/trunk/; revision=6117
2002-08-28 21:04:11 +00:00
Jörg Mayer 173fe5aef4 Replace the types from sys/types.h and netinet/in.h by their glib.h
equivalents for the toplevel directory. The removal of winsock2.h will
hopefully not cause any problems under MSVC++, as those files using
struct timeval still include wtap.h, which still includes winsock2.h.

svn path=/trunk/; revision=5932
2002-08-02 23:36:07 +00:00
Gerald Combs 83dc23831a Update tethereal to handle the "<description> : <device ID>" interface
names that are generated under Windows.  Note in pcap-util.c that we
may want to separate interface device names and descriptions in the
future.

svn path=/trunk/; revision=5770
2002-06-27 22:39:16 +00:00
Gerald Combs 0bc4c2d329 In the Windows capture dialog, place the interface description before the
interface name.

svn path=/trunk/; revision=5499
2002-05-18 02:41:46 +00:00
Guy Harris 45cffd9f12 Put in incomplete definitions of "struct mbuf" and "struct rtentry" to
eliminate compiler warnings on Digital UNIX.

svn path=/trunk/; revision=5251
2002-04-25 22:03:54 +00:00
Guy Harris 8ae18ded80 From Andrew Feren: on Windows, in the drop-down list for the "Interface"
field in the "Capture Options" dialog, put the descriptive name of the
device in parentheses after the actual device path.

svn path=/trunk/; revision=5069
2002-04-01 03:55:44 +00:00
Guy Harris 2eb1990b0b From Joerg Mayer: mark function arguments as unused.
svn path=/trunk/; revision=5052
2002-03-31 21:05:47 +00:00
Guy Harris 45900852ff Fixes from Kazushi Sugyo:
1) print the payload length in AH headers correctly (the field's
	   value is length of the payload, minus 2, divided by 2, so we
	   have to add 2 before multiplying by 2);

	2) correctly handle, in an SIOCGIFCONF list, entries whose
	   address has an "sa_len" field less than the size of a "struct
	   sockaddr" (the length of the address in an entry is the
	   maximum of the real length and the size of a "struct
	   sockaddr").

svn path=/trunk/; revision=4186
2001-11-09 08:16:25 +00:00
Guy Harris 4279815244 Put in an XXX note indicating that if we conclude we're using the AIX
libpcap, we may also want to return a flag indicating that we have to
map seconds/nanoseconds in the packet header to seconds/microseconds.

svn path=/trunk/; revision=4185
2001-11-09 07:51:01 +00:00
Guy Harris 40b22f317b Wrap calls to "pcap_datalink()" in a routine that attempts to compensate
for AIX 5.x's non-standard libpcap, where "pcap_datalink()" doesn't
return DLT_ values, it returns RFC 1573 ifType values.

Put that wrapper, and the routine to get the interface list, in a
separate file, for packet-capture utility routines, so not everybody who
includes "util.h" needs to include <pcap.h>.

Fix up the Wiretap hack for dealing with said incompatibility to use the
correct ifType value for Token Ring.

svn path=/trunk/; revision=4184
2001-11-09 07:44:51 +00:00