On Fri, 20 Aug 1999, Jurijs Dorofejevs wrote:
]Now I'm writing patch for squid allowing writing Destination IP
]address insted of URL into access.log
That patch already exists (at least for DIRECT hierarchies), see
Henrik Nordström's pages.
]But following line returned right result only when squid connects
]DIRECTly. When it connects to PARENT proxy - I get IP address of
]parent proxy, not the destination host.
Yes, that is correct. Otherwise, your parent would have to forward the
address it is connecting to, too.
]So, I think I need another function to make gethostbyname(), but
]cannot obtain its name.
You are on the wrong track. Your TCP connection via a parent is to the
parent. period. The parent creates its own separate TCP connection to the
next parent, or the final destination; essentially the next hop along the
way. So, only the parent TCP/IP stack knows the address of the next hop,
but not yours. Therefore, in order to obtain that address, you would have
to look into the "Via" header, or invent a "X-xxxx" header of your own.
IMHO, I don't think it is worth the trouble. Just getting the IP address
for DIRECT/SOURCE_FASTEST/etc. suffices for my log file analysis thingies.
Le deagh dhùrachd,
Dipl.-Ing. Jens-S. Vöckler (voeckler@rvs.uni-hannover.de)
Institute for Computer Networks and Distributed Systems
University of Hanover, Germany; +49 511 762 4726
Received on Fri Aug 20 1999 - 04:53:48 MDT
This archive was generated by hypermail pre-2.1.9 : Tue Dec 09 2003 - 16:48:04 MST