Commit Graph

45 Commits

Author SHA1 Message Date
Evan Huus 63ef04ec84 Fix a whole bunch of doxygen warnings, mostly typos or renamed parameters.
svn path=/trunk/; revision=49053
2013-04-26 18:28:21 +00:00
Balint Reczey 1ebdb2e521 Export libwireshark symbols using WS_DLL_PUBLIC define
Also remove old WS_VAR_IMPORT define and related Makefile magic
everywhere in the project.

svn path=/trunk/; revision=47992
2013-03-01 23:53:11 +00:00
Gerald Combs bd19dcd8bf Add an add_hosts_file routine that adds a "hosts" path to an array and
use it in tshark.c instead of read_hosts_file. This lets us use "-H"
multiple times. Make read_hosts_file static.

svn path=/trunk/; revision=46273
2012-11-29 00:32:39 +00:00
Guy Harris 73dd0321ea Get rid of the always-null and unused argument to
host_name_lookup_process().  If, in the future, we find that we need an
argument for changes we're making, we can add it then.

svn path=/trunk/; revision=45269
2012-10-02 21:13:59 +00:00
Anders Broman 0a27ca29b2 Add a new preference to make it possible to only use the hosts file
for a profile for name resolution.

svn path=/trunk/; revision=43659
2012-07-11 08:52:51 +00:00
Jeff Morriss 8f12c9d7d7 First phase of fixing https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=7380 :
Add a new name resolution option: whether or not use the configured (in the OS)
name resolver (e.g., DNS) to resolve network names.  When this option is disabled
but network name resolution is enabled then Wireshark will resolve only those
names that it can from local sources.  This includes (at least, AFAIK):

- name resolutions that Wireshark picks up on from DNS packets it decodes
- the "user hosts file" (~/.wireshark/hosts on *NIX)
- what Wireshark reads out of capture file (the PCAPNG name resolution block)

This new preference defaults to "use external resolvers" for backward
compatibility (so people turning on network name resolution will get the old
behavior).

This option can be set via Edit->Preferences and on the command line; there
remain several UIs (e.g., the "open capture file" dialog, the
View->Name Resolution menu, etc.) that don't have the new option yet.


Also expand on the "description" for the name resolution preferences: these
are used not only in the tooltips but are also written to the preferences
file.  The previous text didn't include enough context when written do the
preferences file.

svn path=/trunk/; revision=43605
2012-07-08 01:31:48 +00:00
Jakub Zawadzki a22526df74 Try to fix compilation on compilers != MSVC.
Note: we should get rid of this circular dependency.

svn path=/trunk/; revision=43582
2012-07-06 07:06:09 +00:00
Anders Broman c19583b72c From Michael Mann:
Generic preferences implementation - Printing and Name Resolution.

svn path=/trunk/; revision=43579
2012-07-06 04:48:36 +00:00
Jakub Zawadzki bf81b42e1e Update Free Software Foundation address.
(COPYING will be updated in next commit)

svn path=/trunk/; revision=43536
2012-06-28 22:56:06 +00:00
Guy Harris 7f8d3e24e3 Add uint_get_manuf_name() and uint_get_manuf_name_if_known() routines,
which take an OUI, presumably fetched with a routine such as
tvb_get_ntoh24(), as an argument and attempt to look it up in the manuf
file.

Fix up the comments for all the get_manuf_name routines.

Get rid of "extern"s in definitions of functions (definitions, not
declarations).

svn path=/trunk/; revision=42054
2012-04-13 22:23:04 +00:00
Jeff Morriss da8ec2c2d6 Use proto_tree_add_item() instead of proto_tree_add_xxx() with a pointer into
the TVB.

Introduce and start using tvb_get_manuf_name() and tvb_get_manuf_name_if_known()
which do the same as the non-tvb versions but take a tvb and an offset instead
of (commonly) a pointer into a TVB.

svn path=/trunk/; revision=37317
2011-05-20 02:42:14 +00:00
Alexis La Goutte 7d317e553b Add FT_EUI64 Field Type
* Remove proto_tree_add_eui64 function from 802.15.4 Dissector 
* Replace print_eui64/print_eui64 by eui64_to_str/get_eui64_name
* Update Documentation (README.dev)
* Add new function in libwireshark.def
* Support of encoding for tvb_eui64_to_str
* Use FT_EUI64 for ICMPv6, CAPWAP, Zbee ... dissector

svn path=/trunk/; revision=37015
2011-05-08 10:23:53 +00:00
Gerald Combs fcf51fc73b Add initial pcapng name resolution record support. Wireshark has read
support; TShark has read+write support. Additionally TShark can read a
"hosts" file and write those records to a capture file.

This uses "struct addrinfo" in many places and probably won't compile on
some platforms.

svn path=/trunk/; revision=36318
2011-03-24 22:47:57 +00:00
Bill Meier c78221d4ce Rename g_resolv_flags --> gbl_resolv_flags; Also: cleanup some whitespace & indentation.
svn path=/trunk/; revision=34487
2010-10-12 13:15:08 +00:00
Bill Meier d99e90b2e2 Fix a gcc -Wshadow warning; Fix a comment;
Use consistent indentation.

svn path=/trunk/; revision=32581
2010-04-27 22:46:39 +00:00
Stig Bjørlykke 32ce531601 Added Manual IP address resolve functions.
This can later be extended with ethernet and probably other addresses.

svn path=/trunk/; revision=32571
2010-04-27 06:51:16 +00:00
Bill Meier 6812b68eb1 From Yaniv Kaul: constify parameters
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=4422

 From me: Fix a number of instances where the function prototype or
  the function definition wasn't changed so there was a mismatch 
  thus causing Windows (but not gcc) compilation errors.

svn path=/trunk/; revision=32365
2010-04-03 18:18:50 +00:00
Bill Meier d32b4c0758 Revert SVN #32360 until Windows compilation errors corrected.
svn path=/trunk/; revision=32361
2010-04-02 15:18:03 +00:00
Bill Meier 049f9eac85 From Yaniv Kaul: constify parameters
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=4422

svn path=/trunk/; revision=32360
2010-04-02 14:37:49 +00:00
Gerald Combs ad69bdd7ea Have get_host_ipaddr and get_host_ipaddr6 return FALSE if network name
resolution is disabled. Fix some indentation.

svn path=/trunk/; revision=31361
2009-12-24 17:21:02 +00:00
Gerald Combs b7702fd6d7 If we're using c-ares, have get_host_ipaddr and get_host_ipaddr6 time
out after 250ms. This should fix the annoying freeze in bug 658.

svn path=/trunk/; revision=31360
2009-12-24 00:58:31 +00:00
Gerald Combs 4f30c2170e Change host_name_lookup_process to return TRUE if anything new has been
resolved since the last time it was called. Use this to redraw the packet
list and detail any time we have newly-resolved objects.

svn path=/trunk/; revision=31350
2009-12-22 20:01:06 +00:00
Kovarththanan Rajaratnam c629dde8b6 Constify some functions
svn path=/trunk/; revision=29773
2009-09-07 16:17:58 +00:00
Kovarththanan Rajaratnam 72c9662da6 ntroduce some seasonal address name lookup functions which we use when NEW_PACKET_LIST is defined. This change partially reverts some parts of r29768, which didn't seem to work because it assumed that get_addr_name() would always return a seasonal string. This wasn't the case if the adddress type was AT_STRINGZ.
svn path=/trunk/; revision=29771
2009-09-07 16:05:37 +00:00
Kovarththanan Rajaratnam 8c48c6835f Rename address_to_str() to ep_address_to_str() because:
1) This indicates that the string has ephemeral lifetime
2) More consistent with its existing seasonal counterpart, se_address_to_str().

svn path=/trunk/; revision=29747
2009-09-06 14:25:47 +00:00
Anders Broman 3278582767 From Kovarththanan Rajaratnam:
Optimize column fill path.
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=3701

svn path=/trunk/; revision=29130
2009-07-17 08:24:06 +00:00
Bill Meier 44efa0ed2e Fix some simple cases of GTK2 deprecated API usage by using a renamed or equivalent API
gtk_timeout_add()     ==> g_timeout_add
   gtk_timeout_remove()  ==> g_source_remove()

Also: timer callback should return gboolean (not void or gint)

svn path=/trunk/; revision=25672
2008-07-08 02:25:30 +00:00
Guy Harris 83fc9d5e09 Constify a bunch of stuff, to squelch -Wwrite-strings warnings.
epan/dissectors/packet-ncp2222.inc is a bit hard to fix, so we're not
ready to enable that warning by default yet.

Throw in some casts to handle GLib routines that take arbitrary
non-const pointers (they can later return the pointers, and some
callers might want to modify or free up those pointers in cases where
they're known to be writable or allocated).

Use ep_tvb_memdup() rather than a combination of ep_alloc() and
tvb_memcpy().

Clean up some indentation.

svn path=/trunk/; revision=25601
2008-06-25 09:12:35 +00:00
Mike Duigou 6aeb75c3f0 Changes get_addr_name_buf() to use the more common convention where the provided buffer size is the entire size of the buffer including the space for the terminating \0
svn path=/trunk/; revision=23016
2007-09-28 18:23:59 +00:00
Guy Harris 0fb0fa8794 Put
#ifdef __cplusplus
	extern "C" {
	#endif /* __cplusplus */

		...

	#ifdef __cplusplus
	}
	#endif /* __cplusplus */

wrappers into some header files, for the benefit of C++ plugins.  Also,
add multiple-include protections.

svn path=/trunk/; revision=20485
2007-01-18 18:43:30 +00:00
Gerald Combs f7e38bd5e6 Change ETH_VAR_IMPORT to WS_VAR_IMPORT. Try to fix a duplicate variable
definition in the Catapult DCT2000 code.

svn path=/trunk/; revision=18524
2006-06-20 18:30:54 +00:00
Gerald Combs 8958bab6de Tethereal/tethereal -> TShark/tshark.
svn path=/trunk/; revision=18268
2006-05-31 17:38:42 +00:00
Anders Broman 996d4db495 Ethereal->Wireshark
svn path=/trunk/; revision=18234
2006-05-28 19:49:07 +00:00
Ronnie Sahlberg f0b33a4789 ethereal->wireshark updates
svn path=/trunk/; revision=18206
2006-05-22 08:14:01 +00:00
Ronnie Sahlberg 89f022b12b name change
svn path=/trunk/; revision=18197
2006-05-21 05:12:17 +00:00
Jörg Mayer e6194537b3 Francesco Fondelli; Add dcp support
svn path=/trunk/; revision=15897
2005-09-20 15:18:28 +00:00
Ronnie Sahlberg 31fc2979b1 update some comments pointing out these buffers need not be freed
svn path=/trunk/; revision=15391
2005-08-17 20:45:18 +00:00
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
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 88cf75d47f Include <epan/address.h>, as per a suggestion by Thomas Boehne - not all
dissectors using the address resolution routines need to know about the
"address" structure, so not all of them would include <epan/address.h>
themselves.

svn path=/trunk/; revision=12978
2005-01-07 11:56:00 +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
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
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