From owner-freebsd-current Thu Dec 21 10:43:44 1995 Return-Path: owner-current Received: (from root@localhost) by freefall.freebsd.org (8.7.3/8.7.3) id KAA25425 for current-outgoing; Thu, 21 Dec 1995 10:43:44 -0800 (PST) Received: from halloran-eldar.lcs.mit.edu (halloran-eldar.lcs.mit.edu [18.26.0.159]) by freefall.freebsd.org (8.7.3/8.7.3) with SMTP id KAA25414 for ; Thu, 21 Dec 1995 10:43:37 -0800 (PST) Received: by halloran-eldar.lcs.mit.edu; (5.65/1.1.8.2/19Aug95-0530PM) id AA27199; Thu, 21 Dec 1995 13:43:16 -0500 Date: Thu, 21 Dec 1995 13:43:16 -0500 From: "Garrett A. Wollman" Message-Id: <9512211843.AA27199@halloran-eldar.lcs.mit.edu> To: Julian Elischer Cc: wollman@lcs.mit.edu (Garrett A. Wollman), phk@critter.tfs.com, current@freebsd.org Subject: Re: MOUNT_* constants In-Reply-To: <199512211827.SAA07395@jhome.DIALix.COM> References: <9512211709.AA26246@halloran-eldar.lcs.mit.edu> <199512211827.SAA07395@jhome.DIALix.COM> Sender: owner-current@freebsd.org Precedence: bulk < said: > The other thing I want to make dynamic is > AF_INET and related constants... > I see no reason to not have a pointer to a string "inet" > for compatibility we can make pointers < 32 be treated as the old > constant, but I hope to redefine AF_INET as "inet" > some time this millenium :) Actually, there are a number of very strong reasons why you need to keep these constants relatively small, short, easy to compare, and valid arguments to a switch statement. The same is true of the filesystem indexes; what I have come close to getting rid of is /not/ the need for the constants themselves (which I believe will continue to exist), but rather, the static mapping from name to number implied in the MOUNT_* constants in . This is reasonable to do because mount and statfs requests are relatively infrequent. Calls to the socket functions, and the manipulation that is done internally of these numbers by the socket code, are so frequent that it does not make sense to do so. (We can't afford to take a speed hit in the networking code, it's too slow as it is!) -GAWollman -- Garrett A. Wollman | Shashish is simple, it's discreet, it's brief. ... wollman@lcs.mit.edu | Shashish is the bonding of hearts in spite of distance. Opinions not those of| It is a bond more powerful than absence. We like people MIT, LCS, ANA, or NSA| who like Shashish. - Claude McKenzie + Florent Vollant