Re: KPI replacement for sodisconnect?
site_archiver@lists.apple.com Delivered-To: darwin-kernel@lists.apple.com sock_shutdown should work fine to disconnect a TCP socket. There is a KPI hands-on session at WWDC. <http://developer.apple.com/wwdc/labs/labs-osfoundations.html> -josh On May 17, 2005, at 10:08 PM, Brian Bergstrand wrote: -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 I also noticed that soabort is missing a KPI replacement -- we were using this to abort a connection in progress -- although retain/close should work there too. I haven't really begun exploring our TCP conversion yet, as I expect it to be more difficult than the UDP one. For one, we are tracking TCP state changes via access to the raw TCP header. P.S. Is there going to be a KPI hands-on session at WWDC? Thanks. On May 17, 2005, at 11:37 PM, Josh Graessley wrote: TCP sockets aren't meant to be reused liked that. Just close the socket and open a new one for a new connection. sendto won't work with a TCP socket either. -josh On May 17, 2005, at 9:32 PM, Brian Bergstrand wrote: -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On May 17, 2005, at 6:42 PM, Josh Graessley wrote: You do this the same way in the kernel you would in user space. Connect again but specify the INADDR_ANY address (0.0.0.0). Yeah, it's sorta weird, but that's just the way it is. You can also connect directly to a different address. -josh On May 17, 2005, at 3:32 PM, Brian Bergstrand wrote: -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Am I missing something, or is there no KPI replacement for sodisconnect()? We were using this on UDP sockets to disassociate an address set with soconnect(). Brian Bergstrand <http://www.bergstrand.org/brian/> PGP Key ID: 0xB6C7B6A2 -----BEGIN PGP SIGNATURE----- Version: PGP Desktop 9.0.1 (Build 2130) iQA/AwUBQorFV3nR2Fu2x7aiEQJQcwCgnls3/rEqoMOvccDGZdPm+++8Qh0AoL5n zbTB85CC9Le7a73zdziSXPGs =zlt7 -----END PGP SIGNATURE----- Brian Bergstrand <http://www.bergstrand.org/brian/> PGP Key ID: 0xB6C7B6A2 -----BEGIN PGP SIGNATURE----- Version: PGP Desktop 9.0.1 (Build 2130) iQA/AwUBQorN8nnR2Fu2x7aiEQJukgCeIwPT9ulf3glFpX5l661bNqQf02MAn2Kz qxVD8SBKFImIIHII5ZCKZpUP =5KTo -----END PGP SIGNATURE----- _______________________________________________ Do not post admin requests to the list. They will be ignored. Darwin-kernel mailing list (Darwin-kernel@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/darwin-kernel/site_archiver%40lists.a... This email sent to site_archiver@lists.apple.com Kernel Extensions on Thursday from 2PM to 3:30PM in the Performance & Tools lab. When you say that you are "tracking TCP state changes via access to the raw TCP header", do you mean you look at the tcp control block? There is no way to do that on Tiger. You can receive notification of a number of state changes through a socket filter. What exactly are you trying to accomplish? Yes, I didn't mean to imply a re-use of a TCP socket -- just if sock_connect(INADDR_ANY) will cause a disconnect of the current connection. Our current model issues a disconnect because it needs to hang onto the socket for a while longer before actually closing it. I suppose I could do a retain before the close to keep the socket around. Thanks Josh. Does this also work for TCP sockets or will it return an error since there's an actual connection state? smime.p7s
participants (1)
-
Josh Graessley