netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Stephen Hemminger <stephen@networkplumber.org>
To: Chris Friesen <chris.friesen@genband.com>
Cc: netdev <netdev@vger.kernel.org>
Subject: Re: why is it not allowed to add a new socket protocol family as an external module?
Date: Wed, 20 Feb 2013 15:23:25 -0800	[thread overview]
Message-ID: <20130220152325.64c57d55@samsung-9> (raw)
In-Reply-To: <5125002D.9080008@genband.com>

On Wed, 20 Feb 2013 10:56:13 -0600
Chris Friesen <chris.friesen@genband.com> wrote:

> Hi,
> 
> I was just wondering why the kernel doesn't allow a new network protocol 
> family to be loaded as as a kernel module built outside the kernel 
> source tree.
> 
> Most of the networking code would seem to allow this, but the check for
> "if (ops->family >= NPROTO)" in sock_register() means that only protocol 
> families defined in socket.h can be registered.
> 
> Was this intentional for ideological reasons, or has nobody wanted to be 
> able to add arbitrary network protocols without patching the kernel and 
> rebuilding?
> 

If you want an answer, to the question, use a tool like cscope and
learn to read the kernel code. There are several tables of pointers sized by NPROTO.

  reply	other threads:[~2013-02-20 23:23 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-02-20 16:56 why is it not allowed to add a new socket protocol family as an external module? Chris Friesen
2013-02-20 23:23 ` Stephen Hemminger [this message]
2013-02-21  0:44   ` Chris Friesen
2013-02-21  1:05     ` David Miller
2013-02-21 15:19       ` Chris Friesen
2013-02-21  1:39     ` Eric Dumazet
2013-02-21 15:47       ` Chris Friesen
2013-02-21 16:04         ` Stephen Hemminger
2013-02-21 16:19           ` Chris Friesen
2013-02-21 16:43         ` Eric Dumazet
2013-02-21 17:58           ` Chris Friesen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20130220152325.64c57d55@samsung-9 \
    --to=stephen@networkplumber.org \
    --cc=chris.friesen@genband.com \
    --cc=netdev@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).