From owner-freebsd-net Thu Jun 8 12:32:24 2000 Delivered-To: freebsd-net@freebsd.org Received: from khavrinen.lcs.mit.edu (khavrinen.lcs.mit.edu [18.24.4.193]) by hub.freebsd.org (Postfix) with ESMTP id 5054937B681 for ; Thu, 8 Jun 2000 12:32:21 -0700 (PDT) (envelope-from wollman@khavrinen.lcs.mit.edu) Received: (from wollman@localhost) by khavrinen.lcs.mit.edu (8.9.3/8.9.3) id PAA76727; Thu, 8 Jun 2000 15:32:16 -0400 (EDT) (envelope-from wollman) Date: Thu, 8 Jun 2000 15:32:16 -0400 (EDT) From: Garrett Wollman Message-Id: <200006081932.PAA76727@khavrinen.lcs.mit.edu> To: Bernd Walter Cc: net@FreeBSD.ORG Subject: Re: [REPOST] Re: How do I get port inside kernel.... (fwd) In-Reply-To: <20000607233457.B98783@cicely8.cicely.de> References: <20000607220906.A98783@cicely8.cicely.de> <200006072058.QAA72060@khavrinen.lcs.mit.edu> <20000607233457.B98783@cicely8.cicely.de> Sender: owner-freebsd-net@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org < said: > Are the fuctions using the same table with proc0 as with nil or must all > calls use the same value? There are two different purposes for the process argument in the network stack. In some functions (e.g., bind, setsockopt), it is used to gain access to the calling process's credentials. In other functions, it is used as a binary flag indicating whether there is a calling process or not. Some functions of the former flavor know enough to accept a null pointer as meaning ``process is root'', but in general You Just Have To Know. &proc0 should never be passed to functions of the latter type. Sorry. -GAWollman -- Garrett A. Wollman | O Siem / We are all family / O Siem / We're all the same wollman@lcs.mit.edu | O Siem / The fires of freedom Opinions not those of| Dance in the burning flame MIT, LCS, CRS, or NSA| - Susan Aglukark and Chad Irschick To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-net" in the body of the message