aboutsummaryrefslogtreecommitdiffstats
path: root/epan/resolv.c
AgeCommit message (Collapse)AuthorFilesLines
2002-09-10When allocating a hash table for a given MAC address range, useGuy Harris1-2/+2
"g_malloc0()", so it starts out initialized to all null pointers. svn path=/trunk/; revision=6247
2002-09-09Allow the "manuf" file to contain well-known MAC addresses and addressGuy Harris1-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
2002-08-28Removed trailing whitespaces from .h and .c files using theJörg Mayer1-81/+81
winapi_cleanup tool written by Patrik Stridvall for the wine project. svn path=/trunk/; revision=6116
2002-08-02Replace the types from sys/types.h and netinet/in.h by their glib.hJörg Mayer1-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
2002-03-03From Heikki Vatiainen: make "get_host_ipaddr()" require dotted-quad IPGuy Harris1-1/+10
addresses to really be quads, i.e. have four numbers. svn path=/trunk/; revision=4854
2002-03-02From Joerg Mayer: get rid of "-Wno-unused" flag in some configureGuy Harris1-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
2002-01-30IPv6 name resolution support on Solaris 8, from Heikki Vatiainen.Guy Harris1-1/+5
svn path=/trunk/; revision=4627
2002-01-13Add a preferences page for the name resolution flags.Guy Harris1-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
2001-12-20Work around Windows' annoying decision to map 0.0.0.0 to the local hostGuy Harris1-2/+8
name in "gethostbyaddr()". svn path=/trunk/; revision=4433
2001-11-21Get rid of some unused variables.Guy Harris1-4/+1
svn path=/trunk/; revision=4239
2001-10-26Fix some signed/unsigned comparison warnings. In the case of tvbuff.h,Gilbert Ramirez1-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
2001-10-24Have a routine that takes a file name for a personal configuration fileGuy Harris1-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
2001-10-22Add a routine to get the directory in which personal configuration filesGuy Harris1-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
2001-10-21Use G_DIR_SEPARATOR_S rather than "/" as a pathname separator in formatGuy Harris1-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
2001-10-21On Windows, get the "ethers" and "ipxnets" file from the directory inGuy Harris1-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
2001-08-21On Windows, use the directory in which the binary resides as theGuy Harris1-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
2001-06-07Pull the hash functions into macros, rather than using duplicating theGuy Harris1-55/+59
code to generate the hash index. svn path=/trunk/; revision=3523
2001-05-31Support for "-N" flag enabling selected forms of name resolution, fromGuy Harris1-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
2001-04-15There's no "enable name resolution in captures" preference in Ethereal,Guy Harris1-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
2001-04-02Use GLib types rather than "u_int" and "u_char" in "resolv.h"; "u_int"Guy Harris1-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
2001-04-01Moved some ipv6 definitions from packet-ipv6.h to epan/ipv6-utils.h.Ed Warnicke1-3/+2
Fixed some typos. svn path=/trunk/; revision=3230
2001-03-31removed #include "util.h" from filesystem.c and resolv.cEd Warnicke1-2/+2
svn path=/trunk/; revision=3217
2001-01-09Add a new "ip_to_str_buf()" routine that takes a pointer to an IPGuy Harris1-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
2000-11-19Check to make sure the h_addr entry returned by gethostbyname() can fitGerald Combs1-4/+6
into an in_addr struct. svn path=/trunk/; revision=2673
2000-10-19Move the declaration of "g_resolving_actif" from the top-levelGuy Harris1-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
2000-10-16Give libethereal its own configuration file, and have that configurationGuy Harris1-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
2000-09-28Simple code movement to epan.Gilbert Ramirez1-0/+1384
svn path=/trunk/; revision=2462