[2156] in linux-net channel archive

home help back first fref pref prev next nref lref last post

question

daemon@ATHENA.MIT.EDU (Tom Dyas)
Tue Mar 19 17:41:10 1996

Date: 	Tue, 19 Mar 96 17:04:04 EST
From: Tom Dyas <tdyas@eden.rutgers.edu>
To: linux-net@vger.rutgers.edu

Minor question about the net module stuff regarding the protocol
private protinfo in the socket state structure. Currently, we
conditionally compile the differnet portions of the protinfo union
based on the configuration macros. However, with net modules, we are
faced with two possibilities:

1) Forget conditional compilation and just delcare all possible union
members. It might take up a little more space if there is a protocol
with a big private structure but not much more since it is a union and
the space overlaps.

2) Conditionally compile a protinfo union member if the protocol was
configured into the kernel or if it was configured as a module. This
will save some space since it can result in the minimum size
possible. However, it also presents the possibility that a protocol
module can be inserted into a kernel that was not configured with the
correct amount of space in the union which would result in overwrites
or kernel segfaults. (The possibility is remote and there is a simple
solution.)

Which one would be the better choice?


home help back first fref pref prev next nref lref last post