Return to BSD News archive
Path: euryale.cc.adfa.oz.au!newshost.carno.net.au!harbinger.cc.monash.edu.au!munnari.OZ.AU!news.ecn.uoknor.edu!news.wildstar.net!news.ececs.uc.edu!newsrelay.netins.net!news.dacom.co.kr!usenet.seri.re.kr!news.cais.net!news.mathworks.com!fu-berlin.de!irz401!orion.sax.de!uriah.heep!news
From: j@uriah.heep.sax.de (J Wunsch)
Newsgroups: comp.unix.bsd.freebsd.misc
Subject: Re: tun device not available.....
Date: 17 Aug 1996 12:52:13 GMT
Organization: Private BSD site, Dresden
Lines: 54
Message-ID: <4v4f9t$au3@uriah.heep.sax.de>
References: <4v3f8e$u8a@news3.realtime.net>
Reply-To: joerg_wunsch@uriah.heep.sax.de (Joerg Wunsch)
NNTP-Posting-Host: localhost.heep.sax.de
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 8bit
X-Newsreader: knews 0.9.6
X-Phone: +49-351-2012 669
X-PGP-Fingerprint: DC 47 E6 E4 FF A6 E9 8F 93 21 E0 7D F9 12 D6 4E
tushar@ecpi.com (Tushar Patel) wrote:
> I tried following suggestion give by Jorden, still when I try to connect
> on the 11th line I get message saying no tun device available.
I'm not Jordan :), but i think it was my suggestion anyway...
> I had to changed the above to "tun??)" then it let me make "tun10"
> device. The entry in the "/dev" directory has correct minor number (10),
> but when I try to connect on the 11th line that is "tun10" it says no
> tun device available.
>
>
> crw------- 1 uucp dialer 52, 10 Aug 13 22:59 tun10
But your kernel is configured to allow more than 10 devices?
> >p.s.: In -current, mknod would have complained about the bad digit,
> >instead of silently assuming 0. You could also rewrite the above
> >there into:
> >
> > mknod tun$unit c 52 0x$unit
> >
> >if you prefer tuna, tunb, ... over tun10, tun11...
>
>
> I tried doing that but still it gave incorrect minor number
>
>
> crw------- 1 uucp dialer 52, 0 Aug 16 21:52 tuna
Are you sure you upgraded your mknod(8) command? Btw., it wouldn't
help at all, i forgot that programs like ppp(8) need to know the name
of the device beforehand, and that's what ppp is using:
for( unit=0; unit <= MAX_TUN ; unit++ ) {
sprintf( devname, "/dev/tun%d", unit );
tun_out = open(devname, O_RDWR);
if( tun_out >= 0 )
break;
if( errno == ENXIO )
unit=MAX_TUN+1;
sprintf( devname, "/dev/tun%d", unit );
tun_out = open(devname, O_RDWR);
So it's obvious that the unit number must be decimal. (MAX_TUN equal
256, in case you wonder. So this ain't your limitation.)
--
cheers, J"org
joerg_wunsch@uriah.heep.sax.de -- http://www.sax.de/~joerg/ -- NIC: JW11-RIPE
Never trust an operating system you don't have sources for. ;-)