Networking Forums

Networking Forums > Computer Networking > Linux Networking > TCP socket - how to get rid?

Reply
Thread Tools Display Modes

TCP socket - how to get rid?

 
 
Innocenti Maresin
Guest
Posts: n/a

 
      08-19-2003, 11:52 AM
Hello!

Have Linux means to enforce some TCP socket to close?
e.g. send to the peer CLOSE, or maybe simply destroy filehandle.
If the proccess waits for "read" or "recv" on such socket,
it would get a normal closure or an error, not waits forever.

Of course, I ask not about socket API,
but about how to destroy a socket owned by another process.


--
qq~~~~\ [ úá IP âåú ãåîúõòù ]
/ /\ \
\ /_/ / Linux console internationalization http://www.comtv.ru/~av95/linux/console/
\____/
 
Reply With Quote
 
 
 
 
Chris Fowler
Guest
Posts: n/a

 
      08-19-2003, 10:15 PM
Innocenti Maresin wrote:

> Hello!
>
> Have Linux means to enforce some TCP socket to close?
> e.g. send to the peer CLOSE, or maybe simply destroy filehandle.
> If the proccess waits for "read" or "recv" on such socket,
> it would get a normal closure or an error, not waits forever.
>
> Of course, I ask not about socket API,
> but about how to destroy a socket owned by another process.
>
>


I guess with a raw socket you can do *whatever* you want.
I do not see no reason why you could not construct a
TCP packet that can be sent to the signaling a close. Seems
reasonable to me.


 
Reply With Quote
 
Innocenti Maresin
Guest
Posts: n/a

 
      08-20-2003, 08:43 AM
Chris Fowler wrote:
> I guess with a raw socket you can do *whatever* you want.
> I do not see no reason why you could not construct a
> TCP packet that can be sent to the signaling a close.


Yes, theoretically it is possible to sent to peer a packet imitating normal TCP CLOSE,
but how to get proper Acknowledgement number? compute a Sequence number?
Who will set the state of TCP socket in the kernel to FIN-WAIT-1?

I suppose that some techniques of socket manipulating are _already_ developped,
at least some experience exists,
and I will happy to get some information on it,
not man-known things that raw socket can send arbitrary IP data.


--
qq~~~~\ [ úá IP âåú ãåîúõòù ]
/ /\ \
\ /_/ /
\____/
 
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

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Test socket on Master Socket not working Kevin Cowans Broadband 14 11-15-2006 09:17 PM
10038 Socket Operation on non-socket =?Utf-8?B?UkNyYWlnTGF3MUBhb2wuY29t?= Windows Networking 3 12-23-2004 03:01 AM
10038 socket operation on non-socket Bill H. Windows Networking 1 09-27-2004 03:56 AM
10038 Socket Operation on non-socket error Tim G Windows Networking 1 09-26-2004 03:04 PM
WLAN Monitor 10038 Socket operation on non-socket Bill Windows Networking 1 03-01-2004 10:34 PM



1 2 3 4 5 6 7 8 9 10 11