Commit Graph

27 Commits

Author SHA1 Message Date
Ulf Lamping d2233711d9 add get_manuf_name_if_known (returns NULL if unknown) in addition to get_manuf_name
svn path=/trunk/; revision=14405
2005-05-20 21:44:17 +00:00
Guy Harris 3a8d46d8e9 Always set "*success" in "ipxnet_addr_lookup()" before returning (thanks
and a tip of the hat to GCC 4.0's interprocedural data flow analysis for
catching this one!).

svn path=/trunk/; revision=14353
2005-05-12 02:50:27 +00:00
Guy Harris af2aab9ee1 Plug some more small leaks.
svn path=/trunk/; revision=13889
2005-03-24 03:10:31 +00:00
Luis Ontanon f0c8a7ab65 From Francisco Alcoba:
changed the behaviour of get_addr_name:
 - resolve to a name if the address supports it
 - call address_to_str if it does not, but the address is valid
 - return "NONE" if it is AT_NONE


svn path=/trunk/; revision=13463
2005-02-22 01:55:04 +00:00
Guy Harris 1f8699cca9 Fix a typo in the previous checkin.
svn path=/trunk/; revision=13090
2005-01-17 21:38:31 +00:00
Guy Harris 2aad197f9e Use WINDIR rather than SYSTEMROOT - WINDIR is apparently set on Windows
OT as well as NT, while SYSTEMROOT isn't.

If it's not set, don't bother looking for the hosts file, rather than
trying a path with a fixed drive letter.  If it is set, try the Windows
NT location first and, if that fails, the Windows OT location.

svn path=/trunk/; revision=13088
2005-01-17 19:30:31 +00:00
Guy Harris 5862d6546e Add support for a personal hosts file.
Clean up the description of the global and personal ethers and ipxnets
files.

svn path=/trunk/; revision=13017
2005-01-13 09:09:56 +00:00
Guy Harris f8b7622fd5 Put back the declaration of hostspath on Windows.
svn path=/trunk/; revision=12976
2005-01-07 11:22:18 +00:00
Guy Harris 081f202ae3 Move the open and close of the hosts file into "read_hosts_file()".
On Windows, if we don't get the SYSTEMROOT environment variable, try
various locations where the hosts file is known to exist.

svn path=/trunk/; revision=12972
2005-01-07 10:20:17 +00:00
Lars Roland 0a771e1c65 Check return value of getenv().
It can return NULL, which would lead here to strcpy(hostspath, NULL);
*Very* bad.

replace g_malloc(), strcpy() and strcat() with one single g_strconcat(). 

svn path=/trunk/; revision=12970
2005-01-07 03:19:39 +00:00
Guy Harris 0ccf418724 Add a "get_addr_name()" routine that takes an "address *" and attempts
to resolve it to a name.

Fix up some const-pointer-to-non-const-pointer, and
function-pointer-to-void-*, conversions.

Fix some comments.

svn path=/trunk/; revision=12863
2004-12-30 02:10:24 +00:00
Ulf Lamping 5bcad85d01 Again, some warnings removed.
svn path=/trunk/; revision=12842
2004-12-27 13:17:20 +00:00
Ulf Lamping 99576c146c removed an MSVC warning
svn path=/trunk/; revision=12561
2004-11-21 11:52:34 +00:00
Guy Harris 650ba47a9a Fix some problems when compiling on Windows and when compiling on
systems where INET6 isn't defined.

svn path=/trunk/; revision=12541
2004-11-17 19:46:34 +00:00
Guy Harris f33fdc05c2 Don't assume that IPv6 addresses are aligned on 32-bit boundaries.
svn path=/trunk/; revision=12540
2004-11-17 19:41:56 +00:00
Guy Harris 4469052ec3 Add a hash table for IPv6 addresses, and add an "add_ipv6_name()"
routine to add IPv6-address/name pairings to that table; use that when
reading the hosts file.

svn path=/trunk/; revision=12537
2004-11-17 09:44:41 +00:00
Guy Harris 366ff47474 Rename some routines and structures to reflect that they're specific to
IPv4; use different data structures for port numbers.

svn path=/trunk/; revision=12536
2004-11-17 08:53:20 +00:00
Guy Harris 3eb79de07d Based on code from Francisco Alcoba, read the hosts file on startup if
we're using ADNS, so that we can resolve host names from the hosts file
as well as from DNS.

"fgetline()" strips newlines from the line, so don't bother looking for
them when tokenizing the line.

svn path=/trunk/; revision=12534
2004-11-17 08:34:36 +00:00
Ulf Lamping 12aebd7634 fix a typo
svn path=/trunk/; revision=12502
2004-11-10 06:50:55 +00:00
Guy Harris 19aa464f56 Don't shut down GNU ADNS if it wasn't initialized.
svn path=/trunk/; revision=12501
2004-11-10 05:01:09 +00:00
Guy Harris 91e4d3bca3 Check for errors in "adns_init()", and don't enable ADNS if we get an
error in "adns_init()".  (I suspect this is what's causing the crashes
somebody's seeing when they run Ethereal on a Windows system with no
networking protocols installed - no networking protocols -> no Internet
protocols probably -> no ability to set ADNS up.)

svn path=/trunk/; revision=12500
2004-11-10 04:57:34 +00:00
Guy Harris f975d8c0b5 Give some more details on the hang in RH 9.
svn path=/trunk/; revision=12214
2004-10-06 07:25:38 +00:00
Guy Harris 08cedfee45 Turn off the longjmping stuff when doing name lookups - it appears to
cause problems on RH9 when using ADNS, too.

svn path=/trunk/; revision=12209
2004-10-05 22:48:36 +00:00
Guy Harris bbe7f89742 Move prefs.c and prefs.h into the epan subdirectory.
svn path=/trunk/; revision=12115
2004-09-27 22:55:15 +00:00
Guy Harris f23f4ecf04 Use _WIN32 rather than WIN32 to determine if we're compiling on Win32;
according to Gisle Vanem, WIN32 isn't a built-in in MSVC, but _WIN32 is.

svn path=/trunk/; revision=11972
2004-09-11 23:03:36 +00:00
Gerald Combs ed2befc8b7 Merge the "resolv" rename changes with the trunk.
svn path=/trunk/; revision=11638
2004-08-09 22:31:21 +00:00
Guy Harris 3a583aeb59 From Albert Chin: rename resolv.{ch} to addr_resolv.{ch}, so that an
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
2004-08-06 19:57:49 +00:00