Subject: tun problems?
To: None <current-users@sun-lamp.cs.berkeley.edu>
From: Lee Essen <lee@esltd.demon.co.uk>
List: current-users
Date: 02/25/1994 10:26:30
This may just be my lack of understanding of the tun driver, but...

If you ifconfig tun0 with some arbitary values...

tun0: flags=51<UP,POINTOPOINT,RUNNING>
        inet 250.250.250.1 --> 250.250.250.2 netmask 0xffffff0

...and then cat < /dev/tun0 (maj: 40, min: 0 - from conf.c), you get...

cat: stdin: Host is down

(with debug turned on in the driver you get...

Feb 25 10:21:16 esltd /netbsd: tun0: open
Feb 25 10:21:16 esltd /netbsd: tun0: read
Feb 25 10:21:16 esltd /netbsd: tun0: not ready 033
Feb 25 10:21:16 esltd /netbsd: tun0: closed

...which seems ok)

Then, if you do the same cat again you get...

/dev/tun0: Device not configured.

...with no output to the console.

This seems a bit strange to me, I'm trying to write some code to utilise
the tun driver but once I've opened the device once, I can't do it again
(whether I read from it or not!).

Any help/pointers would be appreciated.

-current sup'd last night (er, 10ish hours ago!)

Thanks,

Lee.
-- 
Essential Solutions Ltd	
40 Tatnam Road			Voice:		+44 202 736230
Poole				Data/Fax:	+44 202 716063
Dorset				
BH15 2DR			E-Mail:		lee@esltd.demon.co.uk
ENGLAND

------------------------------------------------------------------------------