2.6.4 - NumberToMAC | LabJack
« Close

Datasheets and User Guides

App Notes

Software & Driver

Wednesday April 8th, 2020
Support: LabJack engineers available through email and chat.
Shipping: We are processing and shipping all orders.
Stock: 55/56 products in stock. More details.
Supply Chain: Some disruptions. More details.

2.6.4 - NumberToMAC

Takes an integer representing a MAC address and outputs the corresponding hex-colon MAC address as a null-terminated string.


                      unsigned long long Number, 
                      char * MACString)


Number [in]
The number representing a MAC address.
MACString [out]
A character array which will be updated to contain the null-terminated string representation of the MAC address. Must be allocated to size LJM_MAC_STRING_SIZE.


LJM errorcodes or 0 for no error.


Use this function to get a more human-readable interpretation of a MAC address.


[C/C++] Convert a number into a MAC string.

int LJMError;
char MACString[18];
LJMError = LJM_NumberToIP(81952921372024, MACString);
printf ("%s \n", MACString);
// prints "78:45:C4:26:89:4A"