hwaddr_canonical


Description:


public string hwaddr_canonical (string asc, ssize_t length)

Parses asc to see if it is a valid hardware address of the given length, and if so, returns it in canonical form (uppercase, with leading 0s as needed, and with colons rather than hyphens).

Parameters:

asc

the ASCII representation of a hardware address

length

the length of address that asc is expected to convert to (or -1 to accept any length up to nm_utils_hwaddr_len_max)

Returns:

the canonicalized address if asc appears to be a valid hardware address of the indicated length, null if not.


Namespace: NM.Utils
Package: libnm



2022 vala-language.org