Add a new "ip_to_str_buf()" routine that takes a pointer to an IP
authorguy <guy@f5534014-38df-0310-8fa8-9805f1628bb7>
Tue, 9 Jan 2001 09:57:06 +0000 (09:57 +0000)
committerguy <guy@f5534014-38df-0310-8fa8-9805f1628bb7>
Tue, 9 Jan 2001 09:57:06 +0000 (09:57 +0000)
commit873b52ac1cdd52af0153b2aeb22af12143a34248
tree4302960a6625f3a2342fdd47adb3407a82fcf3fc
parenta2e2dd78a3bfe730f3ffbcee258923f45bd5c27c
Add a new "ip_to_str_buf()" routine that takes a pointer to an IP
address and a pointer to a character buffer as arguments, and puts a
printable form of the IP address into the buffer.  Make "ip_to_str()"
use it.

Make "host_name_lookup()" use "ip_to_str_buf()", not "ip_to_str()", so
that it doesn't trash any strings that a dissector has gotten with
"ip_to_str()" (for example, the ARP dissector gets strings for the
source and target protocol addresses, and then may attempt to register
names for the source and target hardware addresses with
"add_ether_byip()"; if "host_name_lookup()" fails to find a host name
for the IP address, it shouldn't use "ip_to_str()" to generate an IP
address string to associate with the IP address, as if that's done twice
it'll run out of "ip_to_str()" buffers - there're only 3 of them - and
trash one of the IP address strings the ARP dissector got).

git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@2850 f5534014-38df-0310-8fa8-9805f1628bb7
epan/packet.c
epan/packet.h
epan/resolv.c