Hi Sachin,

sachin sonone wrote:

Hi all,
There is server application listening on some port (xxxx).
Client application connects to server on perticular port(xxxx).

If my application know port (xxxx) can i get data whatever is send by server before clinet. My application validates data if valid then only pass to clinet else
close the connection.



You can do this by a variety of methods, we can start at the most higher
level and then go downwards.

See First I think u can do this by using iptables, I have attached the
flowchart of  the packets inside the iptables with this mail.

Secondly you can do this by using a modified kernel or a kernel module
to intercept the tcp/ip traffic. I may have the documentation and the
code for it somewhere. I will try to get it if you are intersted.

Thirdly, the best way would be to do is to use the Shared Library
interposition mechanism, you can use it even if u do not have the code
for the server or the client, it just needs to be dynamically linkable .

Is it possible using raw socket or i need to write kernel module or driver?
Is there any other way?


Do you know what a raw socket means ? Or when you would have to go the
level of a kernel module exactly ?

Regards,
sachin.

Regards,

---------------------------------------------------------------------------------------------------------------------------------


Chaitanya V. Hazarey,

                                                            Ecom and
Grid Computing Lab
School of Technology & Computer Science,
Email  : [EMAIL PROTECTED]
Tata Institute of Fundamental Research,
Phone  : 022 - 22782550
Colaba, Homi Bhabha Road,
      Mobile : 9869360938
Mumbai, Maharashtra, 400005
-----------------------------------------------------------------------------------------------------------------------------------




--
______________________________________________________________________
Pune GNU/Linux Users Group Mailing List:      ([email protected])
List Information:  http://plug.org.in/mailing-list/listinfo/plug-mail
Send 'help' to [EMAIL PROTECTED] for mailing instructions.

Reply via email to