Return-Path: <linux-wlan-user-owner@www.bitstorm.net>
Received: from pacific-carrier-annex.mit.edu by po12.mit.edu (8.9.2/4.7) id QAA06684; Sat, 17 Mar 2001 16:33:20 -0500 (EST)
Received: from www.bitstorm.net (majordom@mail.bitstorm.net [216.230.38.4]) by pacific-carrier-annex.mit.edu (8.9.2/8.9.2) with ESMTP id QAA19988 for <chris@mit.edu>; Sat, 17 Mar 2001 16:33:18 -0500 (EST)
Received: (from majordom@localhost) by www.bitstorm.net (8.9.0/8.9.1) id QAA27021 for linux-wlan-user-outgoing; Sat, 17 Mar 2001 16:15:38 -0500 (EST)
Received: from moon.mt.lv (root@moon.mt.lv [159.148.147.194]) by www.bitstorm.net (8.9.0/8.9.1) with ESMTP id QAA27013 for <linux-wlan-user@absoval.com>; Sat, 17 Mar 2001 16:15:36 -0500 (EST)
Received: from localhost.localdomain (IDENT:root@karlis.dev.mt.lv [10.0.0.16]) by moon.mt.lv (8.9.3/8.9.3) with ESMTP id XAA22764 for <linux-wlan-user@absoval.com>; Sat, 17 Mar 2001 23:20:38 +0200
Date: Sat, 17 Mar 2001 23:20:38 +0200 (GMT-2)
From: Karlis Peisenieks <karlis@mt.lv>
To: linux-wlan-user@absoval.com
Subject: Re: [lwlan-user]: Re: linux-wlan-ng-0.1.8-pre5 works perfectly(?)with Orinoco Silver
In-Reply-To: <Pine.LNX.4.21.0103171231530.24501-100000@chef.cc.absoval.com>
Message-ID: <Pine.LNX.4.10.10103172247530.11929-100000@localhost.localdomain>
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
Sender: owner-linux-wlan-user@nightsky.com
Precedence: bulk
Reply-To: linux-wlan-user@absoval.com
X-Evolution: 00000122-0000



On Sat, 17 Mar 2001, Mark S. Mathews wrote:

> equivalent in the bsd's.   The reason I was considering a
> unix domain socket rather than a char device is that I felt it might be a
> tad more portable.  If I were to do a char device, I'd probably implement

What do you mean by portable - there will still be plenty of os dependent
code I think (in any case).

> it as a misc device with the minor number allocated at runtime
> (usermode apps would retrieve the minor number via an ioctl query)....and

Hmm, to call ioctl, you need file descriptor. To get file descriptor you
need to open file. To open file you need to known minor and major.

At least on linux you can either allocate some major number (there are
plenty of them free, so you can take one I think), or make kernel do that
for you and then find out by name in /proc/devices (well I am not sure
that you can do this on other bsds).

Anyway - the only stuff different on different systems will have to be
script/code that creates chardevice node in file system as well as
character device code in kernel (and that will definetly be different for
different os).

> I agree that netlink is a perfect solution (and very nicely done, thanks
> AC).  Additionally, I love its simplicity.  It isn't particularly well
> documented, but the source is pretty straightforward.

Yes, its not that hard to find out what some 4 functions do :).

Anyway, why don't you consider having os dependent "communications with
user space" part with well defined interface, which on linux would
translate into netlink calls (with not much additional stuff - possibly
macros) and to some other userspace interface on other os, with the same
for userspace app (like that is done in so many programs, e.g. pppd,
zebra) as you will have to have different executables anyway.

I think that if you have to write 5 lines of code for one os and 100
different lines for other - that should not be reason why you would choose
to write 100 "logically common" but still different lines for each os.


Karlis

-----------------------------------------------
The Linux WLAN User's Mailing List
For more information about this list see:
http://www.absoval.com/linux-wlan/lists.html
