Skip to main content
Skip table of contents

NumberToMAC [LJM User's Guide]

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

Syntax

LJM_ERROR_RETURN LJM_NumberToMAC(

unsigned long long Number,

char * MACString)

Parameters

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.

Returns

LJM errorcodes or 0 for no error.

Remarks

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

Example

Convert a number into a MAC string.

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

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.