aboutsummaryrefslogtreecommitdiffstats
path: root/epan/addr_resolv.c
AgeCommit message (Collapse)AuthorFilesLines
2016-04-08Replace and remove host_ip_af() functionJoão Valverde1-28/+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-192/+43
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-22Remove more missed ADNS codeJoão Valverde1-60/+0
Fixup for 7a1d3f67ac83e12645a91b5329b6e8163954f77e. Change-Id: Idb8d68a3cc114545f24738cead4968804d831346 Reviewed-on: https://code.wireshark.org/review/14548 Petri-Dish: João Valverde <j@v6e.pt> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Michael Mann <mmann78@netscape.net>
2016-03-21Remove ADNS supportJoão Valverde1-124/+5
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-1/+198
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-29Only say we have a new resolved MAC address if it's actually *new*.Guy Harris1-3/+5
If we aren't changing the resolved name, it's not new. This prevents us from perpetually "resolving" the address. If we have ARP packets that cause us to map a MAC address to a host name, based on the ARP packet saying the MAC address corresponds to a given resolved IP address, then each time we dissect the packet, the address will be "resolved" - and each time we have new resolved addresses as a result of that, we'll redissect the displayed packets so that they show the resolved address, and we'll forever be redissecting. Change-Id: I445e92f407d52a4ed5986721ffcc472f86e99431 Reviewed-on: https://code.wireshark.org/review/14236 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2016-02-19Add inet_pton/inet_ntop interface to libwsutilJoão Valverde1-57/+25
Change-Id: Ifc344ed33f2f7ca09a6912a5adb49dc35f07c81f Reviewed-on: https://code.wireshark.org/review/13881 Petri-Dish: João Valverde <j@v6e.pt> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: João Valverde <j@v6e.pt>
2016-02-13Just #include wsutil/inet_aton.hJoão Valverde1-4/+1
No need for platform-specific system header boilerplate. Change-Id: I5387a0005ddb0d7aab3c5b9f28d6282053c1b0fd Reviewed-on: https://code.wireshark.org/review/13865 Petri-Dish: João Valverde <j@v6e.pt> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: João Valverde <j@v6e.pt>
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-47/+49
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-08Fix a lot of typos and misspellingsmoshekaplan1-1/+1
Change-Id: I8512cfa1d424f82a873a0e0e1d22c7b075fdd7f3 Reviewed-on: https://code.wireshark.org/review/13069 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>
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-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-23Remove configure --enable-ipv6 optionJoão Valverde1-6/+2
It's an ancient obsolete option with a confusing name. Change-Id: Ib10330cf859cdea18fed2077c6539e56350ef380 Reviewed-on: https://code.wireshark.org/review/11967 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-07Clean up includes of unistd.h, fcntl.h, and sys/stat.h.Guy Harris1-4/+0
Have wsutil/file_util.h include them on UN*X, just as it includes io.h on Windows, so we can have a rule of "if you do file operations, include <wsutil/file_util.h> and use the routines in it". Remove includes of unistd.h, fcntl.h, and sys/stat.h that aren't necessary (whether because of the addition of them to wsutil/file_util.h or because they weren't needed in the first place). Change-Id: Ie241dd74deff284e39a5f690a297dbb6e1dc485f Reviewed-on: https://code.wireshark.org/review/11619 Petri-Dish: Guy Harris <guy@alum.mit.edu> Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-11-04Don't include libwireshark headers from libwiretap.Guy Harris1-1/+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-22Use address functions instead of ADDRESS macros in asn1 and epanGerald Combs1-1/+1
Replace CMP_ADDRESS, COPY_ADDRESS, et al with their lower-case equivalents in the asn1 and epan directories. Change-Id: I4043b0931d4353d60cffbd829e30269eb8d08cf4 Reviewed-on: https://code.wireshark.org/review/11200 Petri-Dish: Michal Labedzki <michal.labedzki@tieto.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-10-18Don't parse services file twice, respect user settingsJoão Valverde1-34/+6
Platform file '/etc/services' is the same as Wireshark's '/usr/share/wireshark/services', only Wireshark's is more recent (on my system, same goes for other platforms I assume). Use only Wireshark's IANA services files. Other benefits would be removing some platform specific #ifdefs and making service names more consistent. Also respect user services settings by parsing $PERSCONFIG_DIR/services after $SYSCONFIG_DIR/services. Change-Id: I9890473af92763e02dabd2386eaa767aed2f2899 Reviewed-on: https://code.wireshark.org/review/10941 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-11Remove duplicate transport ports from proto tree summaryJoão Valverde1-75/+68
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-6/+17
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-13/+13
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-08-18Init values set (found by American Fuzzy Lop).Dario Lombardo1-1/+1
Change-Id: Iddd2b4a0ceb409db1afb1a412339134634de631c Reviewed-on: https://code.wireshark.org/review/10104 Petri-Dish: Hadriel Kaplan <hadrielk@yahoo.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2015-07-25DNS: move DNS name resolution pref to Name Resolution prefsHadriel Kaplan1-1/+24
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-54/+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-06-21Fix memory leak printing eui64sEvan Huus1-3/+7
The scope that is passed in should only be used for the return value - other temporary buffers we must alloc/free ourselves, since if the scope is NULL they will not be managed automatically. Bug: 11293 Change-Id: I27be856f1c5cdf47f78e766192a29523664a543e Reviewed-on: https://code.wireshark.org/review/9007 Reviewed-by: Evan Huus <eapache@gmail.com> Petri-Dish: Evan Huus <eapache@gmail.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2015-06-09Remove the executable bit from epan/addr_resolv.cEvan Huus1-0/+0
It was added (presumably by accident) in 41ac67c. Change-Id: If9c2daae6d9f6a0f09fc04c5332faeaa69d355c2 Reviewed-on: https://code.wireshark.org/review/8855 Reviewed-by: Evan Huus <eapache@gmail.com>
2015-06-09Fix insertion of subnets read from the subnets file: append to the *end* ofChristopher Maynard1-9/+15
the list. The patch ensures that non-duplicate subnets are appended to the end of the list rather than as the second element, which if there had been a second element previously, the memory for it was effectively leaked. It also allows /32 "subnets", even though arguably the hosts file should be used instead, but now the test in read_subnets_file() matches the assert in subnet_entry_set(). Bug: 11247 Change-Id: I54bf1cbb34edfcf410aa634043a377c27091df51 Reviewed-on: https://code.wireshark.org/review/8802 Petri-Dish: Jeff Morriss <jeff.morriss.ws@gmail.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Jeff Morriss <jeff.morriss.ws@gmail.com> Reviewed-by: Anders Broman <a.broman58@gmail.com>
2015-03-18Complete the fix from g6b5c71a.Gerald Combs1-1/+0
Change-Id: I18360cbc50d790a22e69e85dcc16363f8c682c64 Reviewed-on: https://code.wireshark.org/review/7739 Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-03-18Don't cache existing IPv4 and IPv6 hostnames.Gerald Combs1-13/+14
In the Qt UI redrawing the packet list redissects our visible packets, which might call add_ipv{4,6}_name, which sets new_resolved_objects = TRUE, which emits the addressResolutionChanged signal, which redraws the packet list, which ... Break out of the loop by checking to see if we've already cached an IPv4 or IPv6 hostname. Change-Id: Icb2841e3453fb98d4cf0ea06a0f49737e2b8f25e Reviewed-on: https://code.wireshark.org/review/7738 Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-03-03Look for and use gethostbyname() if we don't have getaddrinfo(). Fail toJeff Morriss1-11/+59
configure if we can't find any name resolver (autotools only). This puts back the gethostbyname()/gethostbyname2() code removed in I3348179626e97daaddfbc89e3ed21e39915e3de4 and If59ce8a038776eadd6cd1794ed0e2dad8bf8a22c but as a last-resort option (only if we don't have a better or more modern name resolver). As suggested/requested by Guy in https://code.wireshark.org/review/#/c/7423/ Change-Id: I706dbbd65135f47c67d3d8d88a61ad7273914c47 Reviewed-on: https://code.wireshark.org/review/7447 Petri-Dish: Jeff Morriss <jeff.morriss.ws@gmail.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Jeff Morriss <jeff.morriss.ws@gmail.com>
2015-03-03Add tvb_get_ether_nameMichael Mann1-0/+6
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-03-02Don't read aliases from the personal hosts file.Jeff Morriss1-1/+5
We only store the last name added (i.e., the last alias) which is the opposite of what the name resolver does (it returns the first name in the hosts file). Just comment the code out for now with a comment explaining why. Maybe some day we'll have a reason to store the aliases. Change-Id: I560ac05868a429d31e9d41f3a34af36c4fca1f6c Reviewed-on: https://code.wireshark.org/review/7466 Reviewed-by: Anders Broman <a.broman58@gmail.com>
2015-02-27Use getnameinfo() instead of gethostbyaddr().Jeff Morriss1-89/+90
Also fix up some formatting. Change-Id: I3348179626e97daaddfbc89e3ed21e39915e3de4 Reviewed-on: https://code.wireshark.org/review/7423 Petri-Dish: Jeff Morriss <jeff.morriss.ws@gmail.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Jeff Morriss <jeff.morriss.ws@gmail.com>
2015-02-27Restore synchronous name resolution (revert SVN rev52115).Jeff Morriss1-0/+28
These gethostbyaddr() calls should be changed to getaddrinfo() but only in master. Change-Id: I7e2d31ceb0e072beb7f324336d7b145c3adbe3a0 Reviewed-on: https://code.wireshark.org/review/7402 Reviewed-by: Jeff Morriss <jeff.morriss.ws@gmail.com>
2015-02-26Check whether we HAVE_GETADDRINFO before using it.Jeff Morriss1-4/+4
One spot was missing the check. Change-Id: I72d1d3d2dec2cc71b02861ace59dc9e189721cfb Reviewed-on: https://code.wireshark.org/review/7401 Reviewed-by: Jeff Morriss <jeff.morriss.ws@gmail.com>
2015-02-20addr_resolv.c: fix a stack buffer overflow detected by ASANPascal Quantin1-1/+1
Issue reported by Alexis Change-Id: I0ef19625b6844fbc2996b75d51e86f949e358c8d Reviewed-on: https://code.wireshark.org/review/7273 Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2015-02-20addr_resolv: Fix Dead Store (Dead assignement/Dead increment) warning found ↵Alexis La Goutte1-11/+0
by Clang Change-Id: I559151afab48892c51b702d008c1583570bd8754 Reviewed-on: https://code.wireshark.org/review/7262 Reviewed-by: Anders Broman <a.broman58@gmail.com>
2015-02-19Add name resolution support to address type.Michael Mann1-26/+1
Add address_with_resolution_to_str API that returns address string + name resolution in the format %s (%s), first string is resolved name (if available) and second string is raw address string. Convert AT_FCWWN to using proper name resolution format First use of address_with_resolution_to_str with field types in proto.c Change-Id: I2ae77c29a4ffc30bb919fbec00f06629830898c2 Reviewed-on: https://code.wireshark.org/review/7196 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-17Corrected display format for EUI-64Robert Cragie1-1/+1
Change-Id: I0913337a29efac5c39e30897cad7e90195fa984a Reviewed-on: https://code.wireshark.org/review/7198 Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-02-16Get rid of duplicate typedef.Guy Harris1-2/+2
Change-Id: I389132ec27405394ca73fb9c09950d8a91ea32a7 Reviewed-on: https://code.wireshark.org/review/7180 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-02-16Make get_manuf_name return a const string.Michael Mann1-39/+77
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-14Remove a duplicate typedef.Gerald Combs1-2/+2
Change-Id: Ie26785cc3577bda84cb4d244aab5a607797b99fb Reviewed-on: https://code.wireshark.org/review/7118 Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-02-14"Hide" hashether_t structure.Michael Mann1-3/+16
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-16/+3
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-77/+39
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-39/+77
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-3/+16
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-02-09Add fixed length function for address types.Michael Mann1-0/+9
This allows for even more cleanup with respect to how address types are handled, including removing address_to_str.c. Most of the functionality was folded into address_types.c, but the remainder was just dispersed because it didn't make sense to keep the file. Change-Id: Id4e9391f0c3c26eff8c27b362e4f7a1970d718b4 Reviewed-on: https://code.wireshark.org/review/7038 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-06Remove gethostbyaddr and gethostbyaddr2.Gerald Combs1-24/+51
They've been deprecated for a very long time. Replace them with getaddrinfo. Note that we might not want to do synchronous name resolution at all. Add HAVE_GETADDRINFO to the KfW win-mac.h collision list. Change-Id: If59ce8a038776eadd6cd1794ed0e2dad8bf8a22c Reviewed-on: https://code.wireshark.org/review/6958 Reviewed-by: Gerald Combs <gerald@wireshark.org> Petri-Dish: Gerald Combs <gerald@wireshark.org> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Anders Broman <a.broman58@gmail.com>
2015-01-29addr_resolv: correctly scope returned memoryEvan Huus1-4/+4
*_port_to_display functions take an allocator scope, so the memory they return must be allocated from that scope, which means we must strdup the result of serv_name_lookup. Bug: 10901 Change-Id: I337c8b6f9dfece966964c09023679b3e24648e48 Reviewed-on: https://code.wireshark.org/review/6842 Reviewed-by: Michael Mann <mmann78@netscape.net> Reviewed-by: Evan Huus <eapache@gmail.com>