aboutsummaryrefslogtreecommitdiffstats
path: root/epan/resolv.c
Commit message (Collapse)AuthorAgeFilesLines
* From Albert Chin: rename resolv.{ch} to addr_resolv.{ch}, so that anGuy Harris2004-08-061-1915/+0
| | | | | | | include of <resolv.h> in any system header file gets the system <resolv.h> (needed for builds on Tru64 with GTK+ 1.2[.x]). svn path=/trunk/; revision=11615
* Set the svn:eol-style property on all text files to "native", so thatGuy Harris2004-07-181-1/+1
| | | | | | | | | they have LF at the end of the line on UN*X and CR/LF on Windows; hopefully this means that if a CR/LF version is checked in on Windows, the CRs will be stripped so that they show up only when checked out on Windows, not on UN*X. svn path=/trunk/; revision=11400
* Fix automagically generated filters in case of remote login via IPv6.Jörg Mayer2004-06-251-1/+16
| | | | | | This fix was picked from the source rpm of Suse 9.1. svn path=/trunk/; revision=11234
* code cleanupUlf Lamping2004-05-201-4/+2
| | | | svn path=/trunk/; revision=10927
* The octets in an ip address are unsignedJörg Mayer2004-01-251-2/+2
| | | | svn path=/trunk/; revision=9840
* Replace guchar * with gchar * and get rid of many signedness warnings.Olivier Biot2004-01-101-29/+29
| | | | svn path=/trunk/; revision=9643
* removed some MSVC warnings (level 3)Ulf Lamping2004-01-051-2/+2
| | | | svn path=/trunk/; revision=9560
* Add "ip6_to_str_buf()", by analogy to "ip_to_str_buf()".Guy Harris2003-12-091-2/+2
| | | | svn path=/trunk/; revision=9216
* On Mac OS X, disable the alarm/longjmp stuff for timing out nameGuy Harris2003-11-201-2/+15
| | | | | | | resolution queries - it runs a significant risk of crashing applications that do that. svn path=/trunk/; revision=9042
* From Matthias Melchior: parenthesize check for RESOLV_CONCURRENT.Guy Harris2003-10-141-2/+2
| | | | | | | Get rid of "!= 0" check - other tests for a bit being on in g_resolv_flags don't do that. svn path=/trunk/; revision=8684
* Fix macro logic to allow classical resolution even if we have HAVE_GNU_ADNSGerald Combs2003-08-261-3/+2
| | | | | | defined. svn path=/trunk/; revision=8274
* From Gisle Vanem: <ws2tcpip.h> is needed for INET6 code in epan/resolv.cGuy Harris2003-08-181-1/+5
| | | | | | (at least with MingW + gcc 3.3.1). svn path=/trunk/; revision=8184
* Add two preferences to control ADNS, one to enable/disable it and one toGerald Combs2003-07-221-13/+15
| | | | | | set its concurrency level. Fix an ADNS queueing bug. svn path=/trunk/; revision=8063
* From Richard Urwin:Guy Harris2003-05-151-5/+2
| | | | | | | | | | | | add support for a system-wide color filter file; fix a bug where "read_filters()" didn't close the file handle. Use the "get_datafile_path()" routine he added to construct the pathname of the Diameter directory, the global preferences file, and the manuf file. svn path=/trunk/; revision=7677
* Provide stub versions of "host_name_lookup_init()",Guy Harris2003-05-051-3/+20
| | | | | | | | | | | "host_name_lookup_process()", and "host_name_lookup_cleanup()" if we don't have GNU ADNS, so that Ethereal compiles without GNU ADNS. Declare the argument lists of "host_name_lookup_init()" and "host_name_lookup_cleanup()" as empty, C89-style, rather than as unknown. svn path=/trunk/; revision=7641
* Add support for asynchronous DNS updates using the GNU ADNS library.Gerald Combs2003-05-041-7/+141
| | | | | | | | | | | Support can be enabled at configure time by using "--with-adns=DIR". If support is enabled, async queries happen whenever host name resolution is enabled. Do we need a separate preference for async queries? Currently, only IPv4 reverse queries are supported. I can add IPv4 forward lookup support, but I don't have any way to test IPv6 queries. svn path=/trunk/; revision=7640
* Update my email address in various places since my old one no longer worksLaurent Deniel2003-01-261-2/+2
| | | | svn path=/trunk/; revision=7003
* "ether_to_str()" takes a "const guint8 *" as an argument; there's noGuy Harris2002-11-271-3/+3
| | | | | | | need to cast a "const guint8 *" to a "guint8 *" when passing it to "ether_to_str()". svn path=/trunk/; revision=6682
* Note why we're including <sys/socket.h> and <winsock2.h> in places whereGuy Harris2002-10-291-2/+6
| | | | | | | | | | | | | we're including them to get AF_ values. Shuffle the order of those includes in "inet_pton.c" to match the order in "inet_ntop.c". Include <winsock2.h> in "resolv.c" and "to_str.c" so that we get AF_ values from it - including AF_INET6 - if they exist, as we want to have everybody who uses AF_INET6 get the same value. svn path=/trunk/; revision=6517
* When allocating a hash table for a given MAC address range, useGuy Harris2002-09-101-2/+2
| | | | | | "g_malloc0()", so it starts out initialized to all null pointers. svn path=/trunk/; revision=6247
* Allow the "manuf" file to contain well-known MAC addresses and addressGuy Harris2002-09-091-56/+354
| | | | | | | | | | | ranges specified with a mask, as well as manufacturer OUIs. Match the address range values, as well as MAC addresses and manufacturer OUIs, when translating MAC addresses to names. Have "make-manuf" read a file containing the well-known addresses and append it to the list of OUIs. svn path=/trunk/; revision=6233
* Removed trailing whitespaces from .h and .c files using theJörg Mayer2002-08-281-81/+81
| | | | | | | winapi_cleanup tool written by Patrik Stridvall for the wine project. svn path=/trunk/; revision=6116
* Replace the types from sys/types.h and netinet/in.h by their glib.hJörg Mayer2002-08-021-7/+3
| | | | | | | equivalents for the epan/ directory but leave winsock2.h in inet_pton.c and inet_ntop.c for now (can't estimate the consequences). svn path=/trunk/; revision=5928
* From Heikki Vatiainen: make "get_host_ipaddr()" require dotted-quad IPGuy Harris2002-03-031-1/+10
| | | | | | addresses to really be quads, i.e. have four numbers. svn path=/trunk/; revision=4854
* From Joerg Mayer: get rid of "-Wno-unused" flag in some configureGuy Harris2002-03-021-2/+2
| | | | | | | | scripts, and check in changes to add _U_ to some unused arguments (some other should perhaps be used, so we leave the _U_ out so that the warnings serve as a reminder to check those). svn path=/trunk/; revision=4848
* IPv6 name resolution support on Solaris 8, from Heikki Vatiainen.Guy Harris2002-01-301-1/+5
| | | | svn path=/trunk/; revision=4627
* Add a preferences page for the name resolution flags.Guy Harris2002-01-131-18/+21
| | | | | | | | | | | | | | | | | Separate the preferences value for those flags and the name resolution code's value into separate variables; this means that the resolution code no longer depends on the preferences code, and may let us eventually have the current setting and the preference setting differ (so that a user can temporarily override the preference setting without causing subsequent saves of the preferences to save the temporary value). Add routines to create various types of widgets for preferences, and to fetch the values for "enumerated" preferences, and use them both in the code to handle hardwired preference pages and table-driven preference pages. svn path=/trunk/; revision=4536
* Work around Windows' annoying decision to map 0.0.0.0 to the local hostGuy Harris2001-12-201-2/+8
| | | | | | name in "gethostbyaddr()". svn path=/trunk/; revision=4433
* Get rid of some unused variables.Guy Harris2001-11-211-4/+1
| | | | svn path=/trunk/; revision=4239
* Fix some signed/unsigned comparison warnings. In the case of tvbuff.h,Gilbert Ramirez2001-10-261-2/+2
| | | | | | | there were 2 functions which accepted 'maxlength' == -1, but the function prototypes had maxlength as a guint --- fixed. svn path=/trunk/; revision=4087
* Have a routine that takes a file name for a personal configuration fileGuy Harris2001-10-241-13/+5
| | | | | | | | | | and generates the path name; have it, if the file is to be opened for reading on Win32, check whether it exists and, if not, check for it in the old home directory-based configuration directory and, if so, return that path instead, so that files saved with earlier versions of Ethereal will be seen. svn path=/trunk/; revision=4072
* Add a routine to get the directory in which personal configuration filesGuy Harris2001-10-221-9/+9
| | | | | | | | | | reside. Use it, rather than concatenating the user's home directory and ".ethereal" in a number of files. Fix up some additional places to use G_DIR_SEPARATOR_S as the pathname separator. svn path=/trunk/; revision=4061
* Use G_DIR_SEPARATOR_S rather than "/" as a pathname separator in formatGuy Harris2001-10-211-41/+26
| | | | | | | | | | | | | | | | strings used to generate pathnames. Move the definition of PF_DIR from <epan/epan.h> to <epan/filesystem.h>, so that files requiring only the definition of PF_DIR don't have to include <epan/epan.h>, and get rid of no-longer-necessary includes of <epan/epan.h>. Add a routine to get the directory for "system files" such as "/etc/ethers" - it's "/etc" on UNIX, and the datafile directory on Windows (as there's no "/etc" on Windows). Use that to construct the pathname of the ethers and ipxnet files. svn path=/trunk/; revision=4056
* On Windows, get the "ethers" and "ipxnets" file from the directory inGuy Harris2001-10-211-10/+44
| | | | | | | | | | which the Ethereal binary is found; there's no notion of "/etc" or of "/etc/ethers" or "/etc/ipxnets" files on Windows. Update the documentation to reflect that, and fix a typo in the Ethereal and Tethereal man pages. svn path=/trunk/; revision=4055
* On Windows, use the directory in which the binary resides as theGuy Harris2001-08-211-4/+18
| | | | | | | | | | | | | | | | | | | | | | directory in which global data files are stored. If an installed binary is being run, that's the correct directory for them; if a build-tree binary is being run, the "manuf" file will be there, and you can put other data files there as well, if necessary. Do the same with plugins, except that, if there's no "plugins\\{version}" subdirectory of that directory, fall back on the default installation directory, so you at least have a place where you can put plugins for use by build-tree binaries. (Should we, instead, have the Windows build procedure create a subdirectory of the "plugins" source directory, with the plugin version number as its name, and copy the plugins there, so you'd use the build-tree plugin binaries?) Move "test_for_directory()" out of "util.c" and into "epan/filesystem.c", with the other file system access portability wrappers and convenience routines. Fix "util.h" not to declare it - or other routines moved to "epan/filesystem.c" a while ago. svn path=/trunk/; revision=3858
* Pull the hash functions into macros, rather than using duplicating theGuy Harris2001-06-071-55/+59
| | | | | | code to generate the hash index. svn path=/trunk/; revision=3523
* Support for "-N" flag enabling selected forms of name resolution, fromGuy Harris2001-05-311-14/+14
| | | | | | | | | | | | Joerg Meyer. Support for saving to the preferences file the settings for all types of name resolution. Do a case-insensitive check for "true" and "false" in Boolean preference settings. svn path=/trunk/; revision=3489
* There's no "enable name resolution in captures" preference in Ethereal,Guy Harris2001-04-151-18/+18
| | | | | | | | | | | | and never was - there's only an Ethereal-wide "enable name resolution" preference. Name it just "name_resolve". Replace all tests of "g_resolving_actif" with tests of "prefs.name_resolv", and replace all code that sets "g_resolving_actif" with code that sets "prefs.name_resolv", so that the setting of "prefs.name_resolv" actually affects whether names are resolved or not. svn path=/trunk/; revision=3300
* Use GLib types rather than "u_int" and "u_char" in "resolv.h"; "u_int"Guy Harris2001-04-021-38/+38
| | | | | | | | | and "u_char" aren't declared in <sys/types.h> in Win32, you have to include <winsock.h>, which is a pain. Throw in some "const"s while we're at it. svn path=/trunk/; revision=3240
* Moved some ipv6 definitions from packet-ipv6.h to epan/ipv6-utils.h.Ed Warnicke2001-04-011-3/+2
| | | | | | Fixed some typos. svn path=/trunk/; revision=3230
* removed #include "util.h" from filesystem.c and resolv.cEd Warnicke2001-03-311-2/+2
| | | | svn path=/trunk/; revision=3217
* Add a new "ip_to_str_buf()" routine that takes a pointer to an IPGuy Harris2001-01-091-2/+2
| | | | | | | | | | | | | | | | | | | address and a pointer to a character buffer as arguments, and puts a printable form of the IP address into the buffer. Make "ip_to_str()" use it. Make "host_name_lookup()" use "ip_to_str_buf()", not "ip_to_str()", so that it doesn't trash any strings that a dissector has gotten with "ip_to_str()" (for example, the ARP dissector gets strings for the source and target protocol addresses, and then may attempt to register names for the source and target hardware addresses with "add_ether_byip()"; if "host_name_lookup()" fails to find a host name for the IP address, it shouldn't use "ip_to_str()" to generate an IP address string to associate with the IP address, as if that's done twice it'll run out of "ip_to_str()" buffers - there're only 3 of them - and trash one of the IP address strings the ARP dissector got). svn path=/trunk/; revision=2850
* Check to make sure the h_addr entry returned by gethostbyname() can fitGerald Combs2000-11-191-4/+6
| | | | | | into an in_addr struct. svn path=/trunk/; revision=2673
* Move the declaration of "g_resolving_actif" from the top-levelGuy Harris2000-10-191-2/+1
| | | | | | | | | | "globals.h" file to "epan/resolv.h", as it's exported by "epan/resolv.c", have files that use "g_resolving_actif" include "resolv.h", and don't have "epan/resolv.c" include "globals.h" so that it doesn't drag in, for example, headers that, in turn, drag in GTK+ headers. svn path=/trunk/; revision=2517
* Give libethereal its own configuration file, and have that configurationGuy Harris2000-10-161-1/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | file, rather than the top-level Ethereal configuration file, check for "inet_aton()", "inet_pton()", and "inet_ntop()". Then make its Makefile.am include the appropriate object files if necessary. Otherwise, they don't get built and put into libethereal, and therefore attempts to link with anything in libethereal that uses them fail on platforms that lack ethem, causing the build to fail. That means a bunch of things need to be fixed to cope with libethereal having its own "config.h" file; this means removing the include of "config.h" from some libethereal header files. Move the definitions of the path names used only by "resolv.c" to "resolv.c" from "resolv.h" (so "resolv.h" doesn't need "config.h", define HAVE_PLUGINS in the configure script (so we don't have to include it in "plugins.h" to check whether HAVE_DLFCN_H is defined). Unfortunately, stuff outside libethereal needs to know PLUGIN_DIR; for now, define that in the top-level configuration file, and have Ethereal and Tethereal pass it as an argument to "epan_init()" - that should be cleaned up at some point. Remove from the top-level configure script checks for things used only in libethereal. svn path=/trunk/; revision=2498
* Simple code movement to epan.Gilbert Ramirez2000-09-281-0/+1384
svn path=/trunk/; revision=2462