Re: Q: How to notify a policy router about on behalf of which client squid is making a request

From: Henrik Nordstrom <hno@dont-contact.us>
Date: Sat, 16 Oct 1999 23:19:31 +0200

> On Sun, 10 Oct 1999, Christian Worm Mortensen wrote:
>
> > Now, is it possible to insert a point between 1 and 2 saying:
> >
> > 1.5) The squid server sends an UDP (or any other) packet to IP adress
> > W.X.Y.Z telling that the TCP connection that it is just about to open
> > is made on behalf of the local client with IP adress A.B.C.D and MAC
> > address ab:cd:ef:gh:ij:kl

Yes, as Duane said. However, it is not all that obvious how to find the
client address at that time so you may need to modify the call threads
leading up to there. Squid has quite separated client and server
processing code, where multiple clients can be listening to one server
connection.

Regarding getting the MAC address. Code for doing this on some platforms
already exists in squid if you enable arp acl. It may need some
adjusting and fixing to be more portable. No, there is no defined API
for getting the remote MAC address of an TCP/IP connection or host.

Also, you do want to bind the local end of the socket prior to sending
the notification packet to the bandwith controller in order to be able
to include the local port number as well as the IP address. There may be
multiple connections opening virtually at the same time. Binding the
local endpoint prior to making the connection automatically gets done if
you set tcp_outgoing_address.

--
Henrik Nordstrom
Squid hacker
Received on Sat Oct 16 1999 - 16:06:47 MDT

This archive was generated by hypermail pre-2.1.9 : Tue Dec 09 2003 - 16:12:18 MST