This is a discussion on Disabling a Linux TCP/IP Socket within the Linux Networking forums, part of the Linux Forums category; Hi All, We are working on a application which will offload some of the tcp/ip connections after the setup ...
|
|||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
|
|||
|
Hi All,
We are working on a application which will offload some of the tcp/ip connections after the setup completes. For this purpose, we want to keep the socket in suspended state till we hand back the control to socket. For this I tried to do the following: 1. In the user space established the connection and send the socket file descriper to a kernel module. 2. In the kernel module we got the handle to sock structure by sock_lookup call. 3. In the sock structure, we made the state to TCP_LISTEN from ESTABLISHED as in LISTEN state the tcp socket can stay alive indefinitely. But doing this makes the whole sytem to hang. Can some one please help me to know * How to do the above? * How to disable TCP timers for a given socket effectively making the socket to sleep until woken up. thanks and regards, Ravi |
|
|||
|
B.Ravi Kumar <rabh@indiatimes.com> wrote:
> We are working on a application which will offload some of the > tcp/ip connections after the setup completes. What `setup'? > For this I tried to do the following: Ewww, that is a truly hideous way to do that. Anyway, what would the other end of the connection think? It's going to timing out. The only way to effectively sleep a connection is to accept the connection, enable keepalives, and not read/write to it. But even then you can fall fowl of the connection peer if it expects to read/write but times out waiting to send or recieve on the socket. Sounds like you need something like simpleproxy or redir. Package: simpleproxy Description: Simple TCP proxy simpleproxy acts as a simple TCP proxy. It opens a listening socket on the local machine and forwards any connection to a remote host. It can be run as a daemon or through inetd. |
![]() |
| Thread Tools | |
| Display Modes | |
|
|