Subject: Cloning network pseudo-devices
To: None <tech-net@netbsd.org>
From: Jason R Thorpe <thorpej@zembu.com>
List: tech-net
Date: 07/01/2000 17:37:50
Hi folks...

I have just committed some code that allows network pseudo-devices
to be `cloned', that is created on-the-fly.  I have converted the
`gif' interface to be a cloning interface, and will slowly convert
others.

Let me explain the problem with the old mechanism (specifying the
count in the kernel configuration file) that was a problem for me...

I have a VPN that is small now, but that I expect to grow over
time.  I cannot anticipate precisely how many tunnel interfaces
I will need, nor do I want to install new kernels on otherwise
perfectly functioning routers just to increase their tunneling
capacity.

The new mechanism means that I do the following in e.g. /etc/ifconfig.gif0:

create
inet tunnel xxxx yyyy
inet aaaa bbbb

An `ifconfig gif0 destroy' will also fully tear-down the interface.

I expect that pppd could be taught to issue the create/destroy
ioctls in the event that the ppp interface is converted (which
it should be, eventually :-), same with slattach and the slip
interface.

In any case, I would like to pull this up to the 1.5 release branch,
unless there are any objections.

-- 
        -- Jason R. Thorpe <thorpej@zembu.com>