netdev
[Top] [All Lists]

Re: sk->user_data

To: Ben Greear <greearb@xxxxxxxxxxxxxxx>
Subject: Re: sk->user_data
From: Henner Eisen <eis@xxxxxxxxxxxxx>
Date: 23 Nov 2000 20:31:26 +0100
Cc: netdev@xxxxxxxxxxx
In-reply-to: Ben Greear's message of "Wed, 22 Nov 2000 18:03:27 -0700"
References: <200011212222.XAA03012@xxxxxxxxxxxxx> <3A1C6CDF.CA7A1F4A@xxxxxxxxxxxxxxx>
Sender: owner-netdev@xxxxxxxxxxx
>>>>> "Ben" == Ben Greear <greearb@xxxxxxxxxxxxxxx> writes:

    Ben> Henner Eisen wrote:
    >>  Hi,
    >> 
    >> 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
protocol families.

Henner


<Prev in Thread] Current Thread [Next in Thread>