aboutsummaryrefslogtreecommitdiffstats
path: root/pcap-util.c
AgeCommit message (Collapse)AuthorFilesLines
2004-02-24Squelch a compiler warning.guy1-2/+6
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@10211 f5534014-38df-0310-8fa8-9805f1628bb7
2003-12-21removed some MSVC warnings (moved pcap.h before glib.h)ulfl1-3/+3
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@9393 f5534014-38df-0310-8fa8-9805f1628bb7
2003-11-26From Jaime Fournier: fix a typo.guy1-2/+2
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@9093 f5534014-38df-0310-8fa8-9805f1628bb7
2003-11-21Maybe the problem is that the compilers used on AIX weren't definingguy1-4/+4
"AIX", and that code was never compiled. Libpcap uses "_AIX" to conditionally compile in the extra AIX BPF support; we'll do the same. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@9056 f5534014-38df-0310-8fa8-9805f1628bb7
2003-11-21Pass "strncmp()" the right number of arguments. (Why hasn't anybodyguy1-4/+4
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....) git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@9055 f5534014-38df-0310-8fa8-9805f1628bb7
2003-11-01Based on a patch from Brian Fundakowski Feldman, add support for settingguy1-1/+126
link-layer type when capturing, using the "pcap_set_datalink()" and related APIs. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@8848 f5534014-38df-0310-8fa8-9805f1628bb7
2003-10-10Use "pcap_findalldevs()" if present.guy1-357/+19
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@8655 f5534014-38df-0310-8fa8-9805f1628bb7
2003-09-10Fix a compile error on Windows.guy1-2/+2
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@8441 f5534014-38df-0310-8fa8-9805f1628bb7
2003-09-10Have "get_interface_list()" return a list of "if_info_t" structuresguy1-51/+100
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. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@8440 f5534014-38df-0310-8fa8-9805f1628bb7
2003-09-08From Nathan Jennings:guy1-2/+1
support for user-supplied interface descriptions; support for hiding interfaces in drop-down list in capture dialog. Clean up comments written to preferences file. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@8419 f5534014-38df-0310-8fa8-9805f1628bb7
2003-07-06From Nathan Jennings: "g_list_remove_link()" doesn't free the list itemguy1-9/+5
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. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@7965 f5534014-38df-0310-8fa8-9805f1628bb7
2003-06-13Fix by Gerald Combs to a braino of mine.guy1-2/+2
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@7866 f5534014-38df-0310-8fa8-9805f1628bb7
2003-06-10Handle the case of an empty interface list on Windows the same way weguy1-11/+14
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. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@7828 f5534014-38df-0310-8fa8-9805f1628bb7
2003-03-25AIX's BPF, and thus its tcpdump, appears to use 24 as the link-layerguy1-1/+14
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. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@7361 f5534014-38df-0310-8fa8-9805f1628bb7
2002-08-28Removed trailing whitespaces from .h and .c files using thejmayer1-39/+39
winapi_cleanup tool written by Patrik Stridvall for the wine project. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@6117 f5534014-38df-0310-8fa8-9805f1628bb7
2002-08-02Replace the types from sys/types.h and netinet/in.h by their glib.hjmayer1-5/+1
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. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@5932 f5534014-38df-0310-8fa8-9805f1628bb7
2002-06-27Update tethereal to handle the "<description> : <device ID>" interfacegerald1-2/+9
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. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@5770 f5534014-38df-0310-8fa8-9805f1628bb7
2002-05-18In the Windows capture dialog, place the interface description before thegerald1-32/+41
interface name. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@5499 f5534014-38df-0310-8fa8-9805f1628bb7
2002-04-25Put in incomplete definitions of "struct mbuf" and "struct rtentry" toguy1-1/+6
eliminate compiler warnings on Digital UNIX. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@5251 f5534014-38df-0310-8fa8-9805f1628bb7
2002-04-01From Andrew Feren: on Windows, in the drop-down list for the "Interface"guy1-2/+45
field in the "Capture Options" dialog, put the descriptive name of the device in parentheses after the actual device path. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@5069 f5534014-38df-0310-8fa8-9805f1628bb7
2002-03-31From Joerg Mayer: mark function arguments as unused.guy1-3/+7
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@5052 f5534014-38df-0310-8fa8-9805f1628bb7
2001-11-09Fixes from Kazushi Sugyo:guy1-2/+5
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"). git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@4186 f5534014-38df-0310-8fa8-9805f1628bb7
2001-11-09Put in an XXX note indicating that if we conclude we're using the AIXguy1-1/+7
libpcap, we may also want to return a flag indicating that we have to map seconds/nanoseconds in the packet header to seconds/microseconds. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@4185 f5534014-38df-0310-8fa8-9805f1628bb7
2001-11-09Wrap calls to "pcap_datalink()" in a routine that attempts to compensateguy1-0/+439
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. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@4184 f5534014-38df-0310-8fa8-9805f1628bb7