Determining Ethernet HW Address

Jim Richardson warlock at eskimo.com
Wed Mar 29 02:10:41 EST 2000


On Wed, 29 Mar 2000 01:24:02 GMT, 
 Grant Edwards, in the persona of <nobody at nowhere.nohow>,
 brought forth the following words...:

>On 29 Mar 2000 01:30:54 +0300, Erno Kuusela <erno at iki.fi> wrote:
>>>>>>> "Jerome" == Jerome Chan <eviltofu at rocketmail.com> writes:
>>
>>    Jerome> I've need the ethernet hw address given an IP and the
>>    Jerome> Python code runs on Win32 and Linux... so...
>>
>>there is no portable way of getting it even in C. i guess your best
>>bet would be parsing ifconfig output... but that too varies
>>between operating systems.
>
>Mind if I ask why people want to do this?  
>
>The question of how to get the Ethernet address of an interface
>seems to come up regularly in various newsgroups (it comes up
>in the Linux groups regularly).  I've been messing with
>computers for 15 years and never needed to know an Ethernet
>address in a program, so I'm curious...
>
>-- 


I can't speak for others, but I have needed to pass data straight to the MAC 
address, avoiding all networking layers, in order to test 10/100 base T
microwave units through-put in (relatively) long term, and to get BER numnbers
over several hours. But this is coming from data pipes orthogonal to 
computers, so YMMV.

-- 
Jim Richardson
	Anarchist, pagan and proud of it
WWW.eskimo.com/~warlock
	Linux, because life's too short for a buggy OS.




More information about the Python-list mailing list