netdev
[Top] [All Lists]

Re: Allowing netlink_family to be any integer (was: [PATCH 2.6] iptables

To: Herbert Xu <herbert@xxxxxxxxxxxxxxxxxxx>
Subject: Re: Allowing netlink_family to be any integer (was: [PATCH 2.6] iptables CLUSTERIP target)
From: "David S. Miller" <davem@xxxxxxxxxxxxx>
Date: Fri, 22 Oct 2004 16:05:59 -0700
Cc: laforge@xxxxxxxxxxxxx, lmb@xxxxxxx, ahu@xxxxxxx, hch@xxxxxxxxxxxxx, netdev@xxxxxxxxxxx
In-reply-to: <E1CKkWZ-0005x5-00@gondolin.me.apana.org.au>
References: <20041021142527.GG3551@sunbeam.de.gnumonks.org> <E1CKkWZ-0005x5-00@gondolin.me.apana.org.au>
Sender: netdev-bounce@xxxxxxxxxxx
On Fri, 22 Oct 2004 07:31:07 +1000
Herbert Xu <herbert@xxxxxxxxxxxxxxxxxxx> wrote:

> Initially I considered an interface where kernel users can register
> themselves using a string as the key.  But I soon realised that we
> could simply allow the netlink_family field to be an arbitrary integer
> that is used as a key to a hash table.

(I assume you mean "nl_family" not "netlink_family" :-)

> The CPU cost of the hash table isn't too bad since you'll only be
> looking it up when the socket is created.

I'm fine with this idea, however please tell me how you intend
to make things like ->getname() behave?

I would also suggest to start with values > AF_MAX, so that people
sticking other AF_* values in there by accident are caught.

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