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

From: Christian Worm Mortensen <worm@dont-contact.us>
Date: Sun, 17 Oct 1999 17:38:11 +0200

Hi,

>> 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
>>
>> ?

Thank you for your comments... I have looked at it myself now. I decided to
make the policy router make a TCP connection to the squid server and make
the squid server push policy information through that connection.

>Probably the hardest part is getting the ethernet address. I think
>there is not a good way to do it for all operating systems, but then
>again I'm often wrong.

There is in fact a way to get it, at least on Linux. The squid server itself
has a function getting the MAC adress from the ARP cache. It seems, however,
like the system call made from that function always fails. At least on the
2.2 Linux kernels. But after having adjusted the parameters to the system
call it now seems to work (the problem was that the interface name needed to
be specified).

> 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.

I have done exactly that. It was not that hard - I did not have to change
very much to transfer the information.

If anyone is interrested in helping with my project more can be read about
it
on http://monitor.dkik.dk/wipl-wrr/ and
http://monitor.dkik.dk/wipl-wrr/proxy.html.
In short the project is to make a policy-routing system I have already
written to be supported by the squid server. This invovles both changing
the policy-routing system and the squid server.

Christian
Received on Sun Oct 17 1999 - 08:40:21 MDT

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