Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 21 Dec 1995 13:43:16 -0500
From:      "Garrett A. Wollman" <wollman@lcs.mit.edu>
To:        Julian Elischer <julian@jhome.DIALix.COM>
Cc:        wollman@lcs.mit.edu (Garrett A. Wollman), phk@critter.tfs.com, current@freebsd.org
Subject:   Re: MOUNT_* constants
Message-ID:  <9512211843.AA27199@halloran-eldar.lcs.mit.edu>
In-Reply-To: <199512211827.SAA07395@jhome.DIALix.COM>
References:  <9512211709.AA26246@halloran-eldar.lcs.mit.edu> <199512211827.SAA07395@jhome.DIALix.COM>

next in thread | previous in thread | raw e-mail | index | archive | help
<<On Thu, 21 Dec 1995 18:27:36 +0000 (), Julian Elischer <julian@jhome.DIALix.COM> 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 <sys/mount.h>.  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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?9512211843.AA27199>