summaryrefslogtreecommitdiffstats
path: root/sys/netinet/in_pcb.h
diff options
context:
space:
mode:
authorbz <bz@FreeBSD.org>2008-10-04 15:06:34 +0000
committerbz <bz@FreeBSD.org>2008-10-04 15:06:34 +0000
commit77f80e067299bffd274515d2db4724fd7d914bec (patch)
tree798bd6e57445e0123df29550d1712a406a9067ef /sys/netinet/in_pcb.h
parent848f285a655e18bcbd21886fa35dbab3286b54e4 (diff)
downloadFreeBSD-src-77f80e067299bffd274515d2db4724fd7d914bec.zip
FreeBSD-src-77f80e067299bffd274515d2db4724fd7d914bec.tar.gz
Cache so_cred as inp_cred in the inpcb.
This means that inp_cred is always there, even after the socket has gone away. It also means that it is constant for the lifetime of the inp. Both facts lead to simpler code and possibly less locking. Suggested by: rwatson Reviewed by: rwatson MFC after: 6 weeks X-MFC Note: use a inp_pspare for inp_cred
Diffstat (limited to 'sys/netinet/in_pcb.h')
-rw-r--r--sys/netinet/in_pcb.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/sys/netinet/in_pcb.h b/sys/netinet/in_pcb.h
index 857d007..b393c18 100644
--- a/sys/netinet/in_pcb.h
+++ b/sys/netinet/in_pcb.h
@@ -153,6 +153,7 @@ struct inpcb {
void *inp_ppcb; /* (i) pointer to per-protocol pcb */
struct inpcbinfo *inp_pcbinfo; /* (c) PCB list info */
struct socket *inp_socket; /* (i) back pointer to socket */
+ struct ucred *inp_cred; /* (c) cache of socket cred */
u_int32_t inp_flow; /* (i) IPv6 flow information */
int inp_flags; /* (i) generic IP/datagram flags */
OpenPOWER on IntegriCloud