Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 22 May 2001 19:42:52 +0100
From:      Brian Somers <brian@Awfulhak.org>
To:        freebsd-arch@FreeBSD.org
Cc:        Brian Somers <brian@Awfulhak.org>
Subject:   RFC: unit_list routines
Message-ID:  <200105221842.f4MIgqb84117@hak.lan.Awfulhak.org>

next in thread | raw e-mail | index | archive | help
Hi,

I want to change if_tun.c so that userland can open /dev/tun and get 
back a /dev/tunX device.  To do this, I need to track the units that 
have (or haven't) been opened, and I figure other devices may wish to 
do this too.

To this end, I've written the attached URLs for

  /sys/kern/unit_list.c
  /sys/sys/unit_list.h

and have also attached URLs for patches to /sys/conf/files and 
/sys/net/if_tun.c.

The unit_list stuff is designed to be an easy way of tracking sparce 
arrays of units - arrays that are generally expected to start at zero 
and increment, but may sometimes be allocated randomly.

I haven't tested as extensively as I plan to because my dev box is 
useless at the moment due to mutex problems, but I believe it works :)

I ansified if_tun.c while I was there - sorry if that complicates any 
reviews :-/

Comments ?

	ftp://ftp.Awfulhak.org/pub/unit_list/sys-kern-unit_list.c
	ftp://ftp.Awfulhak.org/pub/unit_list/sys-sys-unit_list.h
	ftp://ftp.Awfulhak.org/pub/unit_list/sys-conf-files.patch
	ftp://ftp.Awfulhak.org/pub/unit_list/sys-net-if_tun.c.patch

Cheers.
-- 
Brian <brian@Awfulhak.org>                        <brian@[uk.]FreeBSD.org>
      <http://www.Awfulhak.org>;                   <brian@[uk.]OpenBSD.org>
Don't _EVER_ lose your sense of humour !



To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-arch" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200105221842.f4MIgqb84117>