Ethereal-cvs: [Ethereal-cvs] cvs commit: ethereal/epan packet.c packet.h resolv.c

Note: This archive is from the project's previous web site, ethereal.com. This list is no longer active.

From: Guy Harris <guy@xxxxxxxxxxxxxxxxxxx>
Date: Tue, 9 Jan 2001 03:57:07 -0600 (CST)
guy         2001/01/09 03:57:07 CST

  Modified files:
    epan                 packet.c packet.h resolv.c 
  Log:
  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).
  
  Revision  Changes    Path
  1.14      +31 -19    ethereal/epan/packet.c
  1.18      +2 -1      ethereal/epan/packet.h
  1.5       +2 -2      ethereal/epan/resolv.c