 |
 |
getting a unique number corresponding to mac
|
 |
|
 |
|
Fresh-Faced Recruit
Join Date: May 2001
Location: India
Status:
Offline
|
|
hi,
I have to get a unique number corresponding to a MAC machine. i.e. i want to uniquely identify a MAC machine and get a integer corresponding to it.
How can i do this. Can anybody help?
Its urgent.
Regards
Rachna
|
|
|
| |
|
|
|
 |
|
 |
|
Fresh-Faced Recruit
Join Date: Sep 2000
Location: Monopoli, Bary, ITALY
Status:
Offline
|
|
You can use the ethernet address as unique machine identifier.
Check:
GetEnetAddrDirect.ppc
GetHWEthernetAddr
GetMACAddressSample
at:
http://developer.apple.com/samplecod...Networking.htm
The last two examples work with MacOS X.
I have used this address in my structure analysis software 'SAP One' at: http://www.macsapone.net/index.htm
for free and commercial registrations
Sorry for my poor english
[ 07-30-2001: Message edited by: antofic ]
|
|
|
| |
|
|
|
 |
|
 |
|
Fresh-Faced Recruit
Join Date: May 2001
Location: India
Status:
Offline
|
|
thanx very much for the reply.
i don't know much abt the hardware of the Mac machine, but i wonder what will happen if some body changes the Ethernet card of the machine. Then the new Ethernet card will have new ID corresponding to it.
Then how will we identify the machine to be the same as before?
|
|
|
| |
|
|
|
 |
|
 |
|
Fresh-Faced Recruit
Join Date: Sep 2000
Location: Monopoli, Bary, ITALY
Status:
Offline
|
|
Macs have ethernet built-in on the mother-board. Only very old computers like the Powerbook 1400 dont have it.
Some users can install a new ethernet card (i.e. for speed reasons) so the computer can have two or more ethernet address. You should left the user choose what ethernet address use to register your product. This is what my software make in the registration dialog.
You can use Apple System Profiler to discover the enet address (in Network -> Appletalk)
|
|
|
| |
|
|
|
 |
|
 |
|
Fresh-Faced Recruit
Join Date: May 2001
Location: India
Status:
Offline
|
|
Can you please tell me the format of the Ethernet adderss?
|
|
|
| |
|
|
|
 |
|
 |
|
Fresh-Faced Recruit
Join Date: Sep 2000
Location: Monopoli, Bary, ITALY
Status:
Offline
|
|
You can store the ethernet address in an array of 6 chars, i.e.:
typedef char EnetAddress[6];
In you need to convert this code to an integer you can write a function like:
long enetAddressToLong( EnetAddress addr );
that make some (your defined) simple operations (sum, subtraction, or, and, etc...) on the array or that take only the last 4 characters:
unsigned long enetAddressToLong( EnetAddress addr ) {
return *(unsigned long *)&addr[2];
}
[ 07-31-2001: Message edited by: antofic ]
|
|
|
| |
|
|
|
 |
|
 |
|
Addicted to MacNN
Join Date: Mar 2000
Location: London, UK
Status:
Offline
|
|
be warned that it's possible to fake your MAC address...
|
|
|
| |
|
|
|
 |
|
 |
|
Fresh-Faced Recruit
Join Date: Sep 2000
Location: Monopoli, Bary, ITALY
Status:
Offline
|
|
Is ever possible to crack a software. 
|
|
|
| |
|
|
|
 |
 |
|
 |
|
|
|
|
|

|
|
 |
Forum Rules
|
 |
 |
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
|
HTML code is Off
|
|
|
|
|
|
 |
 |
 |
 |
|
 |
|