[Previous] [Contents] [Index] [Next]

Caution: This version of this document is no longer maintained. For the latest documentation, see http://www.qnx.com/developers/docs.

nic_strtomac()

Convert a MAC address

Synopsis:



int nic_strtomac  ( const char *s,
                  unsigned char *mac)

Arguments:

s
A pointer to the MAC address string.
mac
A pointer to the MAC address to convert.

Description:

The nic_strtomac() function converts a MAC address from a string form to a numeric form. The string may be any of the following forms:

The nic_strtomac() function assumes that the MAC address is six-bytes long.

Returns:

non-zero if the MAC address is invalid; 0 if it's valid.

Classification:

QNX Neutrino

Safety:
Cancellation point Yes
Interrupt handler No
Signal handler Yes
Thread Yes

[Previous] [Contents] [Index] [Next]