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 &...
|
|||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
|
|||
|
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! |
![]() |
| Thread Tools | |
| Display Modes | |
|
|