2002-08-01 07:21:12

by Nico Schottelius

[permalink] [raw]
Subject: network driver informations [general NIC, Wireless and e100]

Hello!

I recently tried the e100 driver and was happy that it reports
if there is a connection and speed and so on.

But should these informations not be reported through /proc-fs ?
I think this would make it easier for programs to monitor connection
status. We could even have a small red/green light in the KDE panel
to display connection status for different cards.

The point in fact is, looking into dmesg for connection status is definitly
wrong IMHO. It's neither a clean access nor easy to watch for applications.

So what do you think about /proc/net/<DEVNAME> support for status ?

As far as I can see this is partly implemented in /proc/net/wireless
or in /proc/net/dev.
Adding another column in the latter would do the job, too.

Anyways, just an idea.

Hope to hear your critics,

Nico


--
Changing mail address: please forget all known @pcsystems.de addresses.

Please send your messages pgp-signed and/or pgp-encrypted (don't encrypt mails
to mailing list!). If you don't know what pgp is visit http://www.gnupg.org.
(public pgp key: ftp.schottelius.org/pub/familiy/nico/pgp-key)


Attachments:
(No filename) (1.07 kB)
(No filename) (189.00 B)
Download all attachments

2002-08-01 11:56:45

by Gianni Tedesco

[permalink] [raw]
Subject: Re: network driver informations [general NIC, Wireless and e100]

On Wed, 2002-07-31 at 22:24, Nico Schottelius wrote:
> Hello!
>
> I recently tried the e100 driver and was happy that it reports
> if there is a connection and speed and so on.
>
> But should these informations not be reported through /proc-fs ?
> I think this would make it easier for programs to monitor connection
> status. We could even have a small red/green light in the KDE panel
> to display connection status for different cards.

AFAIK this information is already available for ethernet cards with an
MII tranciever via a bunch of ioctl()'s. Google for mii-diag.c for an
example.

--
// Gianni Tedesco (gianni at ecsc dot co dot uk)
8646BE7D: 6D9F 2287 870E A2C9 8F60 3A3C 91B5 7669 8646 BE7D


Attachments:
signature.asc (232.00 B)
This is a digitally signed message part

2002-08-01 12:08:24

by Jeff Garzik

[permalink] [raw]
Subject: Re: network driver informations [general NIC, Wireless and e100]

Nico Schottelius wrote:
> Hello!
>
> I recently tried the e100 driver and was happy that it reports
> if there is a connection and speed and so on.
>
> But should these informations not be reported through /proc-fs ?
> I think this would make it easier for programs to monitor connection
> status. We could even have a small red/green light in the KDE panel
> to display connection status for different cards.


Thou shalt not add to the junk collection that is procfs :)

Al Viro has talked about, long term, making this information available
through a filesystem. When that happens, your request will have
basically been implemented.

Until then, ioctls :)

Jeff




2002-08-01 17:39:35

by John Levon

[permalink] [raw]
Subject: Re: network driver informations [general NIC, Wireless and e100]

On Thu, Aug 01, 2002 at 08:10:25AM -0400, Jeff Garzik wrote:

> Al Viro has talked about, long term, making this information available
> through a filesystem. When that happens, your request will have
> basically been implemented.

It would probably help if some of the basic code needed was wrapped in
an even more "dumbed-down" API - most of the stuff in say pcihpfs is
generically useful for this sort of configfs thing.

As more and more minifs's appear (they are trivially easy to write after
all) we're likely to see more duplication of this code, and the
resultant missing bug fix propogation

regards
john

--
"The simpler it is, the harder it is."
- Tim Van Holder

2002-08-02 00:23:02

by Jeff Garzik

[permalink] [raw]
Subject: Re: network driver informations [general NIC, Wireless and e100]

John Levon wrote:
> On Thu, Aug 01, 2002 at 08:10:25AM -0400, Jeff Garzik wrote:
>
>
>>Al Viro has talked about, long term, making this information available
>>through a filesystem. When that happens, your request will have
>>basically been implemented.
>
>
> It would probably help if some of the basic code needed was wrapped in
> an even more "dumbed-down" API - most of the stuff in say pcihpfs is
> generically useful for this sort of configfs thing.
>
> As more and more minifs's appear (they are trivially easy to write after
> all) we're likely to see more duplication of this code, and the
> resultant missing bug fix propogation


Doubtful -- Al Viro created libfs.c, and understands the basic concept
of avoiding code duplication :)


2002-08-02 19:17:33

by Greg KH

[permalink] [raw]
Subject: Re: network driver informations [general NIC, Wireless and e100]

On Thu, Aug 01, 2002 at 06:42:52PM +0100, John Levon wrote:
> On Thu, Aug 01, 2002 at 08:10:25AM -0400, Jeff Garzik wrote:
>
> > Al Viro has talked about, long term, making this information available
> > through a filesystem. When that happens, your request will have
> > basically been implemented.
>
> It would probably help if some of the basic code needed was wrapped in
> an even more "dumbed-down" API - most of the stuff in say pcihpfs is
> generically useful for this sort of configfs thing.

Hm, like perhaps 'driverfs'? :)

That's where pcihpfs is going to go to, as soon as Pat makes a few more
changes to the API.

thanks,

greg k-h

2002-08-05 12:50:57

by Nico Schottelius

[permalink] [raw]
Subject: Re: network driver informations [general NIC, Wireless and e100]

Jeff Garzik [Thu, Aug 01, 2002 at 08:10:25AM -0400]:
> Al Viro has talked about, long term, making this information available
> through a filesystem. When that happens, your request will have
> basically been implemented.

will wait until that happy day. Hopefully this will be as soon as
floppy.o works again :/

Nico

--
Changing mail address: please forget all known @pcsystems.de addresses.

Please send your messages pgp-signed and/or pgp-encrypted (don't encrypt mails
to mailing list!). If you don't know what pgp is visit http://www.gnupg.org.
(public pgp key: ftp.schottelius.org/pub/familiy/nico/pgp-key)


Attachments:
(No filename) (612.00 B)
(No filename) (189.00 B)
Download all attachments