Re: Deleting a TCP connection in Mac OS X
Re: Deleting a TCP connection in Mac OS X
- Subject: Re: Deleting a TCP connection in Mac OS X
- From: Vincent Lubet <email@hidden>
- Date: Thu, 5 Jun 2008 13:01:37 -0700
Peter,
On Jun 5, 2008, at 10:49 AM, Peter Sichel wrote:
Internally, TCP keeps a connection table as a list of PCBs. When a
connection segment arrives or a timer fires, TCP searches this list
to update the connection state. I want to remove that state
entirely because it is no longer valid. That is, delete the
corresponding PCB for that connection.
A sysctl would be fine. Presumably you would need to be executing
with privileges and would specify the local and remote endpoints.
The sysctl function ultimately dispatched would then acquire any
needed locks, walk the TCP connection table to find the matching PCB
entry, unlink it, and release it. If there was a list of partially
assembled fragments (or other resources) associated with that entry,
they would need to be released too.
You cannot remove a TCP control block from beneath an open socket.
I still don't understand by what you mean by "remove that state
entirely because it is no longer valid" as the TCP control block is a
data structure that is internal to the TCP implementation which is the
only one who knows about the validity of the control block...
Are you looking for a way to close a TCP connection used by another
application?
Vincent
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Macnetworkprog mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden