Networking_GetHardwareAddress Function
Header: #include <applibs/networking.h>
Retrieves the hardware address of the given network interface.
static int Networking_GetHardwareAddress(const char *networkInterfaceName, Networking_Interface_HardwareAddress *outAddress);
Parameters
networkInterfaceName
The name of the network interface to retrieve.outAddress
A pointer to aHardwareAddress
that receives the network interface's hardware address.
Errors
Returns -1 if an error is encountered and sets errno
to the error value.
ENOINT: the network interface does not exist.
EPERM: this function is not allowed on the interface.
EAGAIN: the networking stack isn't ready.
EINVAL: the
outAddress
is invalid.
Any other errno
may be specified; such errors aren't deterministic and there is no guarantee that the same behavior will be returned through the system.
Return value
Returns the number of network interfaces, or -1 for failure, in which case errno
is set to the error value.
Concepts and samples
Feedback
https://aka.ms/ContentUserFeedback.
Coming soon: Throughout 2024 we will be phasing out GitHub Issues as the feedback mechanism for content and replacing it with a new feedback system. For more information see:Submit and view feedback for