aboutsummaryrefslogtreecommitdiffstats
path: root/epan/addr_resolv.h
AgeCommit message (Collapse)AuthorFilesLines
2016-06-14addr_resolv: change g_hash to wmem_map.Dario Lombardo1-8/+8
Change-Id: Ice7533fbeac700dae0a46766838818a32b0d5736 Reviewed-on: https://code.wireshark.org/review/15051 Reviewed-by: Michael Mann <mmann78@netscape.net>
2016-04-08Replace and remove host_ip_af() functionJoão Valverde1-8/+0
Change-Id: I932c156cbc6883d1d63bf0457fd62cfb67c3340e Reviewed-on: https://code.wireshark.org/review/14750 Petri-Dish: Peter Wu <peter@lekensteyn.nl> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Peter Wu <peter@lekensteyn.nl>
2016-04-04Remove synchronous DNS name resolutionJoão Valverde1-1/+0
Change-Id: Ie5e670b769eb0674950f3679ef511047641c2873 Reviewed-on: https://code.wireshark.org/review/14751 Petri-Dish: João Valverde <j@v6e.pt> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com> Reviewed-by: Anders Broman <a.broman58@gmail.com>
2016-03-21Remove ADNS supportJoão Valverde1-1/+1
Relevant mailing list message: https://www.wireshark.org/lists/wireshark-dev/201503/msg00007.html Change-Id: I0cff6d4d64fb52a651bcf6b28c183e43653b1cc2 Reviewed-on: https://code.wireshark.org/review/14519 Reviewed-by: João Valverde <j@v6e.pt>
2016-03-18IEEE 802.1Q/VLAN: Resolve ID to a describing nameUli Heilmeier1-0/+12
A vlans file in the personal preference directory add an option to resolve VLAN IDs to a describing name. Format of vlan file is 123\tName of VLAN To enable the resolving the preference nameres.vlan_name must be set to TRUE. Bug: 11209 Change-Id: I3f00b4897aace89c03c57b68b6c4b6c8b7d4685a Reviewed-on: https://code.wireshark.org/review/14471 Reviewed-by: Michael Mann <mmann78@netscape.net> Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2016-02-11Change some constness qualificationsJoão Valverde1-4/+4
Change-Id: I0ece488f43aae27e7c055c2edacbf09ff11ce16d Reviewed-on: https://code.wireshark.org/review/13889 Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: João Valverde <j@v6e.pt>
2016-01-19Don't use IP address strings as "names" for MAC addresses.Guy Harris1-4/+5
Have a flag for addresses indicating whether the address is resolved to a name or whether its "name" is just a printable version of the address. If the name corresponding to an IP address isn't really a name, don't assign it to a MAC address. Clean up some code a bit (have a fill_dummy_ip6() corresponding to fill_dummy_ip4()). Bug: 10212 Change-Id: I9d0ffa2706be17842f832c64cea7acc5c1dc6536 Reviewed-on: https://code.wireshark.org/review/13412 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2016-01-03Rename ipv6-utils.h to ipv6.h.Guy Harris1-1/+1
By analogy to ipv4.h. Change-Id: I147565b332024b1bb88e9cd15889255773d04524 Reviewed-on: https://code.wireshark.org/review/13034 Petri-Dish: Guy Harris <guy@alum.mit.edu> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Guy Harris <guy@alum.mit.edu>
2016-01-03If you want struct e_in6_addr, include <epan/ipv6-utils.h>.Guy Harris1-1/+0
Don't just define it yourself. (And especially don't define it yourself if you're already including epan/ipv6-utils.h.) Change-Id: I9970d0edecef0c820b2a7fdce34509b54e7b3106 Reviewed-on: https://code.wireshark.org/review/13020 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2016-01-03Fix some constness issues [-Wcast-qual]João Valverde1-2/+2
Change-Id: I111558df3d36436ddf5e2728f113b022cc48a713 Reviewed-on: https://code.wireshark.org/review/13013 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-11-12Export functions str_to_ip() and str_to_ip6() to pluginsJo Rueschel1-0/+3
The functions str_to_ip() and str_to_ip6() are not yet exposed to plugins so they cannot be used there. Now they are added to the plugin API. Change-Id: I9df267934ad43887a6326c8c9a1a666f263c08a2 Reviewed-on: https://code.wireshark.org/review/11728 Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com> Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-11-04Don't include libwireshark headers from libwiretap.Guy Harris1-14/+1
Move the definitions of hashipv4_t and hashipv6_t to wiretap/wtap.h, as that's the main place they're used. Change them a bit not to depend on other stuff from libwireshark, and change the code as required by those changes. This should fix the Solaris build; apparently, the Sun^WOracle compiler is generating code for static inline functions even if they're never called, so that libwiretap ends up including code that calls tvbuff and wmem functions. There's probably further cleanup that could be done here, but this should at least fix the build, as well as getting rid of a dependency between two libraries that are at least somewhat independent (libwiretap should *not* depend on libwireshark, as some programs use libwiretap but not libwireshark, and, ultimately, we probably want it to be possible to use libwireshark without libwiretap but that'd be more work). Change-Id: I91c745282f17d7c8bff7809aa277eab2b3cf47c1 Reviewed-on: https://code.wireshark.org/review/11537 Petri-Dish: Guy Harris <guy@alum.mit.edu> Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-10-11Remove duplicate transport ports from proto tree summaryJoão Valverde1-1/+21
Don't display duplicate ports if transport name resolution is not enabled (for UDP/TCP/DCCP). Also introduce col_append_port() to handle info column port display with name resolution in a uniform format. Change-Id: Icb8ac45f726b7c539b4534c62061473e9b582753 Reviewed-on: https://code.wireshark.org/review/10804 Petri-Dish: Michael Mann <mmann78@netscape.net> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-10-05Add BASE_PT_ field display typesJoão Valverde1-1/+8
Avoid displaying duplicate port numbers with transport name resolution disabled and make some dissector code simpler. Introduces port_with_resolution_to_str_buf() function and amends UDP/TCP/DCCP/SCTP to use the new field display type. Change-Id: Ifb97810b9c669ccbb1a310a2c0ffd6e2b63af210 Reviewed-on: https://code.wireshark.org/review/10625 Petri-Dish: Michael Mann <mmann78@netscape.net> Reviewed-by: João Valverde <j@v6e.pt> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-09-27addr_resolv: cosmetic change for flagsPeter Wu1-5/+5
Reduce some magic numbers and add parentheses, change ((flags & X) == X) to simply (flags * X), change tp->flags = tp->flags | x to tp->flags |= x. Change-Id: Ida2d1aa59a3efc20d5fe6910d7b757277eb7e627 Reviewed-on: https://code.wireshark.org/review/10659 Petri-Dish: Peter Wu <peter@lekensteyn.nl> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Peter Wu <peter@lekensteyn.nl>
2015-09-25Don't display duplicate addresses without name resolution enabledJoão Valverde1-0/+6
Change-Id: Ieb88e2632401cbf50c4ae51768a64df64d54a45d Reviewed-on: https://code.wireshark.org/review/10497 Petri-Dish: Michael Mann <mmann78@netscape.net> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-07-25DNS: move DNS name resolution pref to Name Resolution prefsHadriel Kaplan1-6/+15
Move the boolean flag for using captured DNS packet info for name resolution to the Name Resolution preferences settings, as it was rather surprising to disable Name Resolution preferences and still have names being resolved. Also disble them all if the '-n' command line switch is used, and re-enable it for a 'd' character in the '-N' option. Bug: 10337 Change-Id: Ie4d47bab0100db3360cc447cd3e446b2e39aa917 Reviewed-on: https://code.wireshark.org/review/9786 Petri-Dish: Hadriel Kaplan <hadrielk@yahoo.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Hadriel Kaplan <hadrielk@yahoo.com>
2015-07-03Fix address resolution for columns.Guy Harris1-14/+0
Have address_to_name() be a routine that takes an address and returns a string with a "sufficiently long" lifetime for use in columns, using the address type's addr_name_res_str routine for most address types, rather than having a too-small set of address types wired into it. It replaces both the internal solve_address_to_name() routine and get_addr_name(), and can, for example, handle the special WLAN address types rather than leaving them unresolved even with an ethers file. Change-Id: Id09bc412adf5d2752155650a14a77c5378af2e42 Reviewed-on: https://code.wireshark.org/review/9475 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-03-03Add tvb_get_ether_nameMichael Mann1-0/+3
This is mostly to reduce tvb_get_ptr calls that were used to pass into get_ether_name. Some optimizations were made to packet-ieee80211.c in the process of conversion. Change-Id: I81d3c65d4c09a15237fc287c2e989eb6e6936b1f Reviewed-on: https://code.wireshark.org/review/7492 Reviewed-by: Anders Broman <a.broman58@gmail.com>
2015-02-16Make get_manuf_name return a const string.Michael Mann1-1/+7
Model get_manuf_name after get_ether_name so that a string (either name resolved or colon-separated bytes) is always stored in a hash table. This will make name resolution of addresses perform a little better because it doesn't have to worry about the wmem_allocator. Change-Id: If976fe7b0c3f9cd053225096c2ac05418f061af6 Reviewed-on: https://code.wireshark.org/review/7081 Petri-Dish: Michael Mann <mmann78@netscape.net> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-02-14"Hide" hashether_t structure.Michael Mann1-7/+6
One use in a GUI function isn't really enough to justify making the structure public. Change-Id: Ic7dee275ba0a2bd4e19c06702a867417c5624c27 Reviewed-on: https://code.wireshark.org/review/7080 Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-02-12Revert ""Hide" hashether_t structure."Anders Broman1-6/+7
This reverts commit 297ef07b9b2f5b681234d0c31269996413262cbc. Change-Id: Id47f5fd221b631c95ca71e3f9315f5263bab22de Reviewed-on: https://code.wireshark.org/review/7077 Reviewed-by: Anders Broman <a.broman58@gmail.com>
2015-02-12Revert "Make get_manuf_name return a const string."Anders Broman1-7/+1
This reverts commit 797ea88aefc2f45dba7e77d2dcaebe68ac1a4fac. Change-Id: I9bc2cef0051d88c6374c6f1868b0250cba3edbd4 Reviewed-on: https://code.wireshark.org/review/7076 Reviewed-by: Anders Broman <a.broman58@gmail.com>
2015-02-12Make get_manuf_name return a const string.Michael Mann1-1/+7
Model get_manuf_name after get_ether_name so that a string (either name resolved or colon-separated bytes) is always stored in a hash table. This will make name resolution of addresses perform a little better because it doesn't have to work about the wmem_allocator. Change-Id: I80f465ae0845290255a659ab63310ac3cc35506e Reviewed-on: https://code.wireshark.org/review/7075 Petri-Dish: Michael Mann <mmann78@netscape.net> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Anders Broman <a.broman58@gmail.com>
2015-02-12"Hide" hashether_t structure.Michael Mann1-7/+6
One use in a GUI function isn't really enough to justify making the structure public. Change-Id: I6d70b9bacbc0fa1898150f59c0c69779a6cd5d51 Reviewed-on: https://code.wireshark.org/review/7074 Reviewed-by: Anders Broman <a.broman58@gmail.com>
2015-01-18Miscellaneous ep_strdup_printf replacement.Michael Mann1-1/+1
Change-Id: I973c672e9d573ad67e9b9fd82a5610aaf8a74efa Reviewed-on: https://code.wireshark.org/review/6605 Petri-Dish: Michael Mann <mmann78@netscape.net> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-01-16Replace se alloced memory in compare stat tap.Michael Mann1-1/+1
Also replaced comments mentioning se_alloc memory with wmem_file_scope, since it's more accurate. It seems that many of the TShark stat taps may be leaking memory, because the hash tables created by the taps don't get a chance to be freed. Somewhat academic since TShark exits shortly after displaying any stats, but a leak none the less. Change-Id: I8ceecbd00d65b3442dc02d720b39c2e15aa0c8a6 Reviewed-on: https://code.wireshark.org/review/6557 Reviewed-by: Evan Huus <eapache@gmail.com> Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-01-09Convert EUI64 address APIs to use wmem.Michael Mann1-6/+2
Change-Id: I57d2e435ac72ea07ec9a567e0b1ce4410966e3d2 Reviewed-on: https://code.wireshark.org/review/6419 Reviewed-by: Michael Mann <mmann78@netscape.net> Petri-Dish: Michael Mann <mmann78@netscape.net> Reviewed-by: Anders Broman <a.broman58@gmail.com>
2015-01-09Have ipxnet addresses use wmem scoped memory.Michael Mann1-1/+1
Change-Id: I1d8eed2ceacccce2768590f0689cd2c83a5e56e9 Reviewed-on: https://code.wireshark.org/review/6418 Petri-Dish: Hadriel Kaplan <hadrielk@yahoo.com> Reviewed-by: Anders Broman <a.broman58@gmail.com>
2015-01-08ep_<protocol>_port_to_display -> <protocol>_port_to_displayMichael Mann1-8/+8
Adjust any other ep_ related APIs related to the transition. Change-Id: I961b371c2c4bda557e0f1817705c27eef0dae66c Reviewed-on: https://code.wireshark.org/review/6388 Reviewed-by: Anders Broman <a.broman58@gmail.com>
2015-01-06Replace ep_address_to_str with address_to_str.Michael Mann1-1/+1
Change-Id: I4f1078b20f41800f72a751612703ad0d4c2ae87b Reviewed-on: https://code.wireshark.org/review/6323 Reviewed-by: Michael Mann <mmann78@netscape.net> Petri-Dish: Michael Mann <mmann78@netscape.net> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Anders Broman <a.broman58@gmail.com>
2015-01-05Replace ep_display_to_address with wmem equivalent display_to_address.Michael Mann1-17/+3
Almost all instances require using "manual" memory management, but it gets some ep_ calls out of the GUI. Change-Id: Ifa7303766b08d09442ccf3d7063cbe061578ecd9 Reviewed-on: https://code.wireshark.org/review/6318 Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-01-04Make all Lua code use wmem not ememHadriel Kaplan1-0/+7
Changed all remaining code in wslua that was using emem, to use wmem or simpler methods. Bug: 9927 Change-Id: I3d19a770e0fd77d996bdb6b61a76a722cc2bcd55 Reviewed-on: https://code.wireshark.org/review/6109 Petri-Dish: Michael Mann <mmann78@netscape.net> Reviewed-by: Hadriel Kaplan <hadrielk@yahoo.com> Petri-Dish: Hadriel Kaplan <hadrielk@yahoo.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Michael Mann <mmann78@netscape.net>
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