<div dir="ltr"><div><div><div>Hi,<br></div>I needed some direction again. I also need to know where in the source code does squid open the network interface before it reads/writes from it.<br></div>Thanks.<br><br></div>Regards<br></div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Jan 6, 2015 at 11:37 AM, Priya Agarwal <span dir="ltr"><<a href="mailto:priyaiitmandi@gmail.com" target="_blank">priyaiitmandi@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div>Thanks a lot. :)<br></div>I'll sign up for squid-dev mailing list and do any further discussions there. <br><br></div><div class="HOEnZb"><div class="h5"><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Jan 6, 2015 at 12:13 AM, Amos Jeffries <span dir="ltr"><<a href="mailto:squid3@treenet.co.nz" target="_blank">squid3@treenet.co.nz</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span>-----BEGIN PGP SIGNED MESSAGE-----<br>
Hash: SHA1<br>
<br>
</span><span>On 6/01/2015 6:01 a.m., Priya Agarwal wrote:<br>
> Thank you for the reply.<br>
><br>
> I do not intend to change its functionality. I just want to make it<br>
> run on a processor (Freescale's T4240). For that it has to use some<br>
> new architectural features (Data Path Acceleration Architecture)<br>
> which are a part of the processor.<br>
><br>
> For e.g. suppose squid was merely swapping ipv4/mac src and dest<br>
> addresses( just an example! ) in the packet header and sends it<br>
> back. So I don't want to change what it does, I just want squid to<br>
> send whatever data it has prepared to a memory location. Basically<br>
> instead of receiving and sending to OS Stack, I want to it read and<br>
> write from memory.  (Further details : This memory is basically a<br>
> memory-mapped device which is further responsible for transmitting<br>
> the frame to a network interface, ethernet)<br>
><br>
> So maybe if I could know where in the source code does it<br>
> communicate with the OS stack.<br>
<br>
</span>Ah, that kind of packet handling is all much, much lower level than Squid.<br>
<br>
Squid uses functions provided by the POSIX system API with socket<br>
handles/"filedescriptors".<br>
<br>
<a href="http://man7.org/linux/man-pages/man7/socket.7.html" target="_blank">http://man7.org/linux/man-pages/man7/socket.7.html</a><br>
<a href="http://man7.org/linux/man-pages/man2/read.2.html" target="_blank">http://man7.org/linux/man-pages/man2/read.2.html</a><br>
<a href="http://man7.org/linux/man-pages/man2/write.2.html" target="_blank">http://man7.org/linux/man-pages/man2/write.2.html</a><br>
<br>
The functions in src/fd.cc are where that happens, the lowest<br>
networking-I/O level of Squid.<br>
<br>
<br>
NP: If you want to take this further and/or discuss any other feature<br>
additions/changes I encourage you to sign up to squid-dev mailing list<br>
and discuss it with the whole dev team. This list is for general user<br>
discussions, (though sometimes code talk from someone doing bug<br>
investigations does slip in).<br>
<span><br>
Amos<br>
-----BEGIN PGP SIGNATURE-----<br>
Version: GnuPG v2.0.22 (MingW32)<br>
<br>
</span>iQEcBAEBAgAGBQJUqts4AAoJELJo5wb/XPRjJu4IANCAhXt7PM48xHkERw/mz/sa<br>
heSoEC7nJXaLpRz9JSq085UY2F0p55/GH0Gdh+XLq0h6kMLZB8qYTify0WMp18Jj<br>
sfVOhuURZVdabS5ldW2ZrqftsqCt5eu3JvgHtQ+ewp8RhN5OI6OTQbCL9sf6llWY<br>
Vqm1gno2IymyjcsuPYzpDv7sw7M3odJSETAD2eh6E3r+++uN1q5R4JZ7GZt5mgaE<br>
tIJF0DyOlhAfAJIniCImZ0MDqWHLWjrzLWZRazHg4zA025TinDxkjy+qfHnjYfDc<br>
oIFh9t/mtSbHPnBiZmsyUDOfl/wB0EOMuXEItoLGgBLh/71huVf2QRmfXUr6qS8=<br>
=oajV<br>
-----END PGP SIGNATURE-----<br>
</blockquote></div><br></div>
</div></div></blockquote></div><br></div>