Mailing List Archive

Support open source code!


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Association between eth0 and 3c59x...



sorry, half asleep this morning, the way I did it a while back was to know
what mac addrs I have, then use the SIOCGIFCONF ioctl call which returns a
lot on info on the currently open socket (you have to bind a socket to
INADDR_ANY or 0 first). One whing it returns is the MAC address which you
can match. If you are doing this sort of thing, I would sggest TCP/IP
Illustrated volume 1, it is an excellent reference book anyway.

I have an example of using this ioctl on
http://www.kano.org.uk/projects/pxe/pxe-1.2.tar.gz

sock.cc contains some fairly evil socket code.

Tim

On Fri, 31 Aug 2001, Scott M. Stone wrote:

>
> How can you figure out, by querying the kernel, what ethernet driver is
> bound, say, to eth0?  shouldn't the kernel keep track of this somewhere?
> I can't find any ioctl, any system call, etc, that will give me this
> information.
>
> I would think there's some way to ask the kernel, "what driver is giving
> you eth0" without having to look through dmesg, conf.modules, etc, etc..
>
> --------------------------
> Scott M. Stone <sstone@example.com>
> Director of Information Technology, Director of Research and Development
> ITIsOpen, Inc. - http://www.itisopen.com
> Cisco Certified Network Associate, Sun Solaris Certified Systems Administrator
>
> -----------------------------------------------------------------------
> Next Technical Meeting:  Sat, Sep 15 13:30-  Leading Edge Co., Place Canada
> Next Nomikai Meeting:    Fri, Oct 19 19:30-  Tengu Tokyo Eki-Mae
> -----------------------------------------------------------------------
> more info: http://www.tlug.gr.jp           Sponsor: Global Online Japan
>
>


Home | Main Index | Thread Index

Home Page Mailing List Linux and Japan TLUG Members Links