From 7f08bc3477d0953ebfa9c4a06cbee4950933d1d4 Mon Sep 17 00:00:00 2001 From: rwatson Date: Sat, 1 Apr 2006 10:54:51 +0000 Subject: Add a comment describing SS_PROTOREF in detail. This will eventually be in socket(9). MFC after: 3 months --- sys/sys/socketvar.h | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'sys') diff --git a/sys/sys/socketvar.h b/sys/sys/socketvar.h index 1ff3843..b1d7dd7 100644 --- a/sys/sys/socketvar.h +++ b/sys/sys/socketvar.h @@ -208,6 +208,13 @@ extern struct mtx accept_mtx; #define SS_ASYNC 0x0200 /* async i/o notify */ #define SS_ISCONFIRMING 0x0400 /* deciding to accept connection req */ #define SS_ISDISCONNECTED 0x2000 /* socket disconnected from peer */ +/* + * Protocols can mark a socket as SS_PROTOREF to indicate that, following + * pru_detach, they still want the socket to persist, and will free it + * themselves when they are done. Protocols should only ever call sofree() + * following setting this flag in pru_detach(), and never otherwise, as + * sofree() bypasses socket reference counting. + */ #define SS_PROTOREF 0x4000 /* strong protocol reference */ /* -- cgit v1.1