Posted by Matthew Pratt on 1999-06-17
> Thanx for the answers, but it'll need to work in > Dos/Win95, so no linux > please.. I dont understand this predjudice. Code is code for my mind. It doesn't matter where it comes from. Just beacause it comes from linux doesnt mean that you can gain some understanding from it. In fact most linux code would probably compile with DJGPP under dos, and could be modified to compile with any ANSI C compiler. I also believe, that linux would be a good place to look as it has drivers for alot of NICs (I counted 80 ) and they aren't part of the kernel, they are seperate modules (althogh they are distributed with the kernel), and so you dont have to go digging thru irrelivant source to find what you are looking for. You could simply check to see how a particular driver does it and what registers it uses etc. I'm looking at ne.c now and all the data structures are well commented. There are even some README's in linux/drivers/net/ that talk about some of the NICs. If you still need convincing, I just did a grep for "MAC" in linux/drivers/net/ and I got 390 lines. If the GPL that the kernel licenses its code under is a problem then look at the FreeBSD (or any BSD) kernel source as the license is less restrictive. Either way you look at it, the code is there, you have just got to be willing to use it. Also regaurding my last post, I thought you meant that you wanted to get the MAC address of a remote host, not the local one... Hope this helps. === Matty . http://members.xoom.com/mattpratt/ _--_|\ mattpratt@xxxxx.xxx / \ s3099239@xxxxxxx.xxx.xxx.xx \_.--._/<--Canberra, W2K - The other millenium bug. v Australia _________________________________________________________ Do You Yahoo!? Get your free @yahoo.com address at http://mail.yahoo.com
Previous post | Next post | Timeline | Home