nic_strtomac
![]() |
![]() |
![]() |
![]() |
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:
- xxxxxxxxxxxx -- where "x" is a
hexidecimal digit in one of the folllowing ranges:
- 0-9
- a-z
- A-Z
- xxxxxxxxxxxx -- where "x" is a
hexidecimal digit in one of the folllowing ranges:
- 0-9
- a-z
- A-Z
The nic_strtomac() function assumes that the MAC address is six bytes long.
Returns:
Zero if the MAC address is valid; nonzero if it isn't.
Classification:
QNX Neutrino
| Safety: | |
|---|---|
| Cancellation point | Yes |
| Interrupt handler | No |
| Signal handler | Yes |
| Thread | Yes |
![]() |
![]() |
![]() |
![]() |
![[Previous]](prev.gif)
![[Contents]](contents.gif)
![[Index]](keyword_index.gif)
![[Next]](next.gif)