Subject: Getting rid of in_protox[]
To: None <>
From: Darren Reed <>
List: tech-net
Date: 07/02/2001 08:42:13
I was mulling over a few things whilst having breakfast and it occurred
to me that maybe it's time to get rid of in_protox[].  What's it used
for ?  It's an array of ip protocol numbers that provide an index into
in_proto[] so that inetsw[] doesn't need to be [256] with initializers
all over the place.

What I'd like to see would be for inetsw[] to become an array of pointers
to struct protosw (struct protosw *inetsw[256]) and for this to be populated
using a "protocol foo" type directive in kernel config files.  As a bonus,
this allows protocols to be added on the fly at run time, making development
of new ones easier, as LKMs.

The config file statement would need to be capable of specifying ipv4 or
ipv6, so maybe that should be "protocol tcp ipv6" (for example).

I haven't thought thing through much further than this.  Is this a
worthwhile change or just silliness ?