From owner-freebsd-hackers Fri May 8 22:43:38 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id WAA28041 for freebsd-hackers-outgoing; Fri, 8 May 1998 22:43:38 -0700 (PDT) (envelope-from owner-freebsd-hackers@FreeBSD.ORG) Received: from freebie.lemis.com (freebie.lemis.com [139.130.136.133]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id WAA27987; Fri, 8 May 1998 22:43:24 -0700 (PDT) (envelope-from grog@lemis.com) Received: (from grog@localhost) by freebie.lemis.com (8.8.8/8.8.7) id PAA25965; Sat, 9 May 1998 15:13:24 +0930 (CST) (envelope-from grog) Message-ID: <19980509151324.U12200@freebie.lemis.com> Date: Sat, 9 May 1998 15:13:24 +0930 From: Greg Lehey To: TOKER ONUR , freebsd-hackers@FreeBSD.ORG Cc: FreeBSD Questions Subject: Re: How to get major device numbers ??? References: <199805090439.HAA74403@dpc107.dpc.kfupm.edu.sa> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 0.91.1i In-Reply-To: <199805090439.HAA74403@dpc107.dpc.kfupm.edu.sa>; from TOKER ONUR on Sat, May 09, 1998 at 07:39:00AM +0300 WWW-Home-Page: http://www.lemis.com/~grog Organization: LEMIS, PO Box 460, Echunga SA 5153, Australia Phone: +61-8-8388-8286 Fax: +61-8-8388-8725 Mobile: +61-41-739-7062 X-Mutt-References: <199805090439.HAA74403@dpc107.dpc.kfupm.edu.sa> Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG 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