ANN: MAC address library

Bringing the internet highway into your project? Building FTP, HTTP, email, chat or other client solutions?

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
mwieder
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 3581
Joined: Mon Jan 22, 2007 7:36 am
Location: Berkeley, CA, US
Contact:

ANN: MAC address library

Post by mwieder » Wed Feb 09, 2022 7:07 pm

Here's a library that uses the api at maclookup.app to return information about Media Access Control addresses.
These are the "unique" addresses assigned to hardware components so that routers can direct packets to the proper devices.
There's a function to return the local addresses on your computer and various functions to return information about specified MAC addresses.

There's a simple stack that illustrates how to use the functions as well.
Hope someone finds this useful.

Code: Select all

# list local MAC addresses
on mouseUp pMouseButton
   library stack "libMacLookup"
   put libMACLookup.localMACAddress() into msg
   stop using stack "libMacLookup"
end mouseUp

Code: Select all

# return company address from MAC address
on mouseUp pMouseButton
   local tAddress
   
   start using stack "libMacLookup"
   if field 1 is not empty then
      try
         put field 1 into tAddress
         put libMACLookup.companyAddress(tAddress) into field 2
      catch e
         answer e
      end try
   end if
   stop using stack "libMacLookup"
end mouseUp
Attachments
libMacLookup.zip
(3.37 KiB) Downloaded 139 times

Post Reply

Return to “Internet”