Q:  How do I convert a hostid into an Ethernet address?

A:  Here is the code to decode a hostid:

main()
{
long hostid;
long en_address;

hostid = gethostid();
en_address = (hostid & 0xffffff) + 0x00000f000000;

printf("hostid = 0x%x; en_address = 0x%x.\n", hostid, en_address);
}



QA261

Valid for 1.0, 2.0, 3.0, 3.1 on NeXT processors
Not Valid for 3.1 on Intel processors