aboutsummaryrefslogtreecommitdiffstats
path: root/epan/addr_resolv.h
AgeCommit message (Collapse)AuthorFilesLines
2014-04-19More name changes.Guy Harris1-12/+12
Add ep_ to routines that may return ephemeral strings. Change "get_XXX" to "XXX_to_display" if the routine returns a formatted string if it can't get a name. Change-Id: Ia0e82784349752cf4285bf82788316c9588fdd88 Reviewed-on: https://code.wireshark.org/review/1217 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-04-19Some routine name changes.Guy Harris1-4/+4
"get_addr_name()" -> "ep_address_to_display()", to 1) indicate that it returns a string with ephemeral scope and 2) indicate that it maps an address to a "displayable" form - a name if possible, an address string if not. "se_get_addr_name()" -> "get_addr_name()", to indicate that its strings have the same scope as "get_ether_name()", "get_hostname()", and "get_hostname6()". Change-Id: If2ab776395c7a4a163fef031d92b7757b5d23838 Reviewed-on: https://code.wireshark.org/review/1216 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-03-04Remove all $Id$ from top of fileAlexis La Goutte1-2/+0
(Using sed : sed -i '/^ \* \$Id\$/,+1 d') Fix manually some typo (in export_object_dicom.c and crc16-plain.c) Change-Id: I4c1ae68d1c4afeace8cb195b53c715cf9e1227a8 Reviewed-on: https://code.wireshark.org/review/497 Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-02-25Remove trailing whitespaceBill Meier1-1/+1
Change-Id: I8116f63ff88687c8db3fd6e8e23b22ab2f759af0 Reviewed-on: https://code.wireshark.org/review/385 Reviewed-by: Bill Meier <wmeier@newsguy.com> Tested-by: Bill Meier <wmeier@newsguy.com>
2013-12-21New functions: str_to_ip6(), str_to_ip()Jakub Zawadzki1-0/+3
This way we can avoid including lot of system header files in some dissectors and it might fix bug #9581 svn path=/trunk/; revision=54330
2013-12-20Fix [-Wmissing-prototypes]Anders Broman1-1/+1
svn path=/trunk/; revision=54280
2013-11-10Remove <epan/ipv6-utils.h> from tvbuff.Jakub Zawadzki1-0/+1
svn path=/trunk/; revision=53221
2013-10-23g_slist_free_full() is glib 2.28Anders Broman1-1/+1
Fix spelling. svn path=/trunk/; revision=52787
2013-10-23Make manual address resolution work again by putting the addressesAnders Broman1-0/+3
in a separate list and add that list when address resolution is rebuilt during rescan of packets. svn path=/trunk/; revision=52785
2013-10-10Try to make the build bot happy.Anders Broman1-1/+1
svn path=/trunk/; revision=52505
2013-10-10Flag the addresses used in the trace which has been resolved and only add ↵Anders Broman1-10/+12
those to the list used to create the NRB. svn path=/trunk/; revision=52504
2013-09-22Get rid of struct addrinfo, use the hastables for name resolution instead.Anders Broman1-24/+6
svn path=/trunk/; revision=52176
2013-08-29Revert revision=51577.Anders Broman1-0/+2
Ref https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=9082 Since this commit the IP (source and destination) address in the GUI will be replaced with some date after I click on the entry, reverting this commit fixes the problem. This looks like a memory corruption. I imported an older pcap file. svn path=/trunk/; revision=51579
2013-08-29Don't store address in the hastable when name resolution is off.Anders Broman1-2/+0
svn path=/trunk/; revision=51577
2013-08-20Use g_hash_table() for ipxnet name resolution.Anders Broman1-0/+3
svn path=/trunk/; revision=51436
2013-08-18Use g_hastable() for IPv6 name reslution.Anders Broman1-0/+12
svn path=/trunk/; revision=51415
2013-08-11Use g_hashtable for IPv4 name resolution.Anders Broman1-0/+16
svn path=/trunk/; revision=51301
2013-08-07Ensure we have both _initialize() and a corresponding _cleanup() routines forJeff Morriss1-10/+21
the various name resolvers; put those two routines next to each other. Add generic addr_resolv_init() and addr_resolv_cleanup() routines which call all of those internal routines. Call the generic init/cleanup routine from epan_init() and epan_cleanup(). Create the hash tables for each name resolver in those initialization routines in order to avoid having to repeatedly check if the table is already created or not (and to avoid glib warnings if we neglected to perform that check): http://www.wireshark.org/lists/wireshark-dev/201308/msg00012.html Don't clean up hostnames in init_dissection(): it's done already in cleanup_dissection(). Don't initialize hostnames in cleanup_dissection(): it's done already in init_dissection(). svn path=/trunk/; revision=51191
2013-08-05Use a hastable for port resolution. Currently one table for the 4 protocols ↵Anders Broman1-0/+10
with resolution. SCTP and DCCP should perhaps be splited out to their own tables. svn path=/trunk/; revision=51153
2013-08-02- Use a hashtable for eth lookup.Anders Broman1-0/+11
Currently broken get_ether_addr(). - Show hastable content in address dlg.(temp solution). svn path=/trunk/; revision=51119
2013-08-01Use glibs hastables rather than home grown variants for manuf an wka(well ↵Anders Broman1-0/+12
known addresses). https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=9000 svn path=/trunk/; revision=51084
2013-04-26Fix a whole bunch of doxygen warnings, mostly typos or renamed parameters.Evan Huus1-1/+1
svn path=/trunk/; revision=49053
2013-03-01Export libwireshark symbols using WS_DLL_PUBLIC defineBalint Reczey1-17/+22
Also remove old WS_VAR_IMPORT define and related Makefile magic everywhere in the project. svn path=/trunk/; revision=47992
2012-11-29Add an add_hosts_file routine that adds a "hosts" path to an array andGerald Combs1-2/+10
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-10-02Get rid of the always-null and unused argument toGuy Harris1-2/+1
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-07-11Add a new preference to make it possible to only use the hosts fileAnders Broman1-0/+1
for a profile for name resolution. svn path=/trunk/; revision=43659
2012-07-08First phase of fixing https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=7380 :Jeff Morriss1-0/+1
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-06Try to fix compilation on compilers != MSVC.Jakub Zawadzki1-2/+2
Note: we should get rid of this circular dependency. svn path=/trunk/; revision=43582
2012-07-06From Michael Mann:Anders Broman1-17/+13
Generic preferences implementation - Printing and Name Resolution. svn path=/trunk/; revision=43579
2012-06-28Update Free Software Foundation address.Jakub Zawadzki1-1/+1
(COPYING will be updated in next commit) svn path=/trunk/; revision=43536
2012-04-13Add uint_get_manuf_name() and uint_get_manuf_name_if_known() routines,Guy Harris1-4/+30
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
2011-05-20Use proto_tree_add_item() instead of proto_tree_add_xxx() with a pointer intoJeff Morriss1-3/+10
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-08Add FT_EUI64 Field TypeAlexis La Goutte1-0/+8
* 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-03-24Add initial pcapng name resolution record support. Wireshark has readGerald Combs1-0/+31
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
2010-10-12Rename g_resolv_flags --> gbl_resolv_flags; Also: cleanup some whitespace & ↵Bill Meier1-1/+1
indentation. svn path=/trunk/; revision=34487
2010-04-27Fix a gcc -Wshadow warning; Fix a comment;Bill Meier1-1/+1
Use consistent indentation. svn path=/trunk/; revision=32581
2010-04-27Added Manual IP address resolve functions.Stig Bjørlykke1-0/+3
This can later be extended with ethernet and probably other addresses. svn path=/trunk/; revision=32571
2010-04-03 From Yaniv Kaul: constify parametersBill Meier1-6/+6
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-02Revert SVN #32360 until Windows compilation errors corrected.Bill Meier1-3/+3
svn path=/trunk/; revision=32361
2010-04-02From Yaniv Kaul: constify parametersBill Meier1-3/+3
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=4422 svn path=/trunk/; revision=32360
2009-12-24Have get_host_ipaddr and get_host_ipaddr6 return FALSE if network nameGerald Combs1-1/+5
resolution is disabled. Fix some indentation. svn path=/trunk/; revision=31361
2009-12-24If we're using c-ares, have get_host_ipaddr and get_host_ipaddr6 timeGerald Combs1-7/+17
out after 250ms. This should fix the annoying freeze in bug 658. svn path=/trunk/; revision=31360
2009-12-22Change host_name_lookup_process to return TRUE if anything new has beenGerald Combs1-2/+8
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-09-07Constify some functionsKovarththanan Rajaratnam1-2/+2
svn path=/trunk/; revision=29773
2009-09-07ntroduce some seasonal address name lookup functions which we use when ↵Kovarththanan Rajaratnam1-0/+1
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-06Rename address_to_str() to ep_address_to_str() because:Kovarththanan Rajaratnam1-3/+3
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-07-17From Kovarththanan Rajaratnam:Anders Broman1-1/+1
Optimize column fill path. https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=3701 svn path=/trunk/; revision=29130
2008-07-08Fix some simple cases of GTK2 deprecated API usage by using a renamed or ↵Bill Meier1-2/+2
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-06-25Constify a bunch of stuff, to squelch -Wwrite-strings warnings. Guy Harris1-2/+2
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
2007-09-28Changes get_addr_name_buf() to use the more common convention where the ↵Mike Duigou1-3/+3
provided buffer size is the entire size of the buffer including the space for the terminating \0 svn path=/trunk/; revision=23016