Discussion:
create network cloned devices without specifying a unit
(too old to reply)
Darren Reed
2012-06-27 12:00:44 UTC
Permalink
A diff has been attached to the following PR:

kern/46633: create network cloned devices without specifying a unit

It should eventually show up here:
http://gnats.netbsd.org/cgi-bin/query-pr-single.pl?number=46633
(but is not there currently)

Testing:

firewall# ./ifconfig tun create
tun0
firewall# ./ifconfig tun create
tun1
firewall# ./ifconfig gif create
gif0
firewall# ifconfig tun1
tun1: flags=10<POINTOPOINT> mtu 1500
firewall# ifconfig gif0
gif0: flags=8010<POINTOPOINT,MULTICAST>
firewall# ifconfig gif0 destroy
firewall# ifconfig tun1 destroy
firewall# ifconfig tun0 destroy
firewall# ifconfig tun0
ifconfig: SIOCGIFFLAGS tun0: Device not configured

Comments?
Criticisims?
Code review?

Darren


--
Posted automagically by a mail2news gateway at muc.de e.V.
Please direct questions, flames, donations, etc. to news-***@muc.de
Matthew Mondor
2012-06-28 06:21:56 UTC
Permalink
On Wed, 27 Jun 2012 22:00:44 +1000
Post by Darren Reed
firewall# ./ifconfig tun create
tun0
I think it's a good thing to have, making the C and ifconfig cloning
interfaces more consistent. I actually didn't know that this was not
already possible using ifconfig(8).
--
Matt

--
Posted automagically by a mail2news gateway at muc.de e.V.
Please direct questions, flames, donations, etc. to news-***@muc.de
Manuel Bouyer
2012-06-28 08:25:44 UTC
Permalink
Post by Darren Reed
kern/46633: create network cloned devices without specifying a unit
http://gnats.netbsd.org/cgi-bin/query-pr-single.pl?number=46633
(but is not there currently)
firewall# ./ifconfig tun create
tun0
firewall# ./ifconfig tun create
tun1
firewall# ./ifconfig gif create
gif0
firewall# ifconfig tun1
tun1: flags=10<POINTOPOINT> mtu 1500
firewall# ifconfig gif0
gif0: flags=8010<POINTOPOINT,MULTICAST>
firewall# ifconfig gif0 destroy
firewall# ifconfig tun1 destroy
firewall# ifconfig tun0 destroy
firewall# ifconfig tun0
ifconfig: SIOCGIFFLAGS tun0: Device not configured
Comments?
Criticisims?
Code review?
Code looks good. I can't see a use case for this myself, and as long as I can
still 'ifconfig vlan1234 create' I'm happy :)
I guess this will be usefull for higher level network management tools.
--
Manuel Bouyer <***@antioche.eu.org>
NetBSD: 26 ans d'experience feront toujours la difference
--

--
Posted automagically by a mail2news gateway at muc.de e.V.
Please direct questions, flames, donations, etc. to news-***@muc.de
Loading...