detecting tcp/udp socket bind in kernel module

This is a discussion on detecting tcp/udp socket bind in kernel module within the Linux Networking forums, part of the Linux Forums category; Hi, I want to detect tcp/udp socket binds programmatically i.e. I want to write a module which will &...


Go Back   Usenet Forums > Linux Forums > Linux Networking

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 03-21-2007
hari_kannan@hotmail.com
 
Posts: n/a
Default detecting tcp/udp socket bind in kernel module

Hi,

I want to detect tcp/udp socket binds programmatically i.e. I want to
write a module which will "know" whenever any tcp/ip application does
a tcp or udp socket bind. In SLES9/RHEL3.X versions, we used to trap
the "bind" function in inet_dgram_ops and tcpsniff_bind, but in SLES10/
RHEL4.x versions, those variables have become "const" in af_inet.c

What we did before was

udp.save_bind = inet_dgram_ops.bind;
udp.save_release = inet_dgram_ops.release;
inet_dgram_ops.bind = udpsniff_bind;
inet_dgram_ops.release = udpsniff_release;

and

tcp.save_bind = inet_stream_ops.bind;
tcp.save_release = inet_stream_ops.release;
inet_stream_ops.bind = tcpsniff_bind;
inet_stream_ops.release = tcpsniff_release

I cant do that anymore because inet_stream_ops and inet_dgram_ops are
const in SLES10.

Any ideas?

Thanks a lot!

Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 07:48 AM.


Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0