Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 9 May 1998 15:13:24 +0930
From:      Greg Lehey <grog@lemis.com>
To:        TOKER ONUR <onur@dpc107.dpc.kfupm.edu.sa>, freebsd-hackers@FreeBSD.ORG
Cc:        FreeBSD Questions <questions@FreeBSD.ORG>
Subject:   Re: How to get major device numbers ???
Message-ID:  <19980509151324.U12200@freebie.lemis.com>
In-Reply-To: <199805090439.HAA74403@dpc107.dpc.kfupm.edu.sa>; from TOKER ONUR on Sat, May 09, 1998 at 07:39:00AM %2B0300
References:  <199805090439.HAA74403@dpc107.dpc.kfupm.edu.sa>

next in thread | previous in thread | raw e-mail | index | archive | help
On Sat,  9 May 1998 at  7:33:42 +0300, onur@ccse.kfupm.edu.sa wrote:
On Sat,  9 May 1998 at  7:39:00 +0300, TOKER ONUR wrote:
On Sat,  9 May 1998 at  8:20:57 +0300, TOKER ONUR wrote:

Please only send one message.

>      If I know the name of the device (e.g. ed0), how can I get its
> major device number. Please don't write me to look at /dev directory
> because it is not there, although I am using ed0 for network access.
> Basically, a device node is not created for ed0 and I want to generate
> a /dev/ed0, but I need the major device number.
>
>      Where is the mapping between device names and device numbers ?

Network interfaces don't use major device numbers.  That's why there
is no entry in /dev, and why you can't create one.  Why do you want
one?

To access the network interfaces programmatically, use the socket
interface.  You might like to look at how ifconfig does it.

Greg
--
See complete headers for address and phone numbers
finger grog@lemis.com for PGP public key

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



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