>>>>> "Ben" == Ben Greear <greearb@xxxxxxxxxxxxxxx> writes:
Ben> Henner Eisen wrote:
>> 2.4.0 struct sock contains a member
>> void *user_data;
>> which is currently only used for pointing to an in-kernel RPC
>> layer control block.
>> Is it o.k. to use this pointer for alternative upper layer or
>> would that be a bad idea?
Ben> I've been thinking that if we used unions instead of all the
Ben> void*, then it might be more obvious what the use of the
Ben> variable is (in the using code), and could be (when looking
Ben> at net_dev.h).
Yes, good idea. Well, most of struct sock (outside the protocol-specific
unions} is obviously really generic. But there is apparently some
PF_INET specific data (the __u16 and __u32 typed fields related to ipv4
address and ports) in struct sock which does not even use void*.
Maybe this can also reasonnably be re-used for similar purpose by other