cnet's Application Programming Interface
- NAME
- CNET_parse_nicaddr - convert a well-formed string to a NIC address
- SYNOPSIS
- #include <cnet.h>
int CNET_parse_nicaddr(CnetNICaddr nicaddr, char *string);
- DESCRIPTION
-
CNET_parse_nicaddr accepts a character string of the form
ab:cd:ef:gh:ij:kl,
where each letter is a valid hexadecimal character,
and converts this string representation to cnet's "internal" form
consisting of an array of 6 unsigned characters.
Any valid Network Interface Card (NIC) address is accepted.
- RETURN VALUE
-
The value 0 is returned on success.
On failure, the value -1 is returned,
and the global variable cnet_errno is set to the
following value to describe the error:
- ER_BADARG
- string is a NULL pointer,
or string points to an incorrectly formatted string.
- SEE ALSO
-
CNET_set_nicaddr and
CNET_format_nicaddr
|
cnet v3.3.4, written by Chris.McDonald@uwa.edu.au
Last modified: Tue Mar 1 7:43AM 2016