cnet v3.1.4

home
FAQ

cmdline options
topology files
attributes

datatypes
data structures
core API
support API

download/install

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 was written and is maintained by Chris McDonald (chris@csse.uwa.edu.au).

cnet development has been supported by an ACM-SIGCSE Special Project Grant, and an Australian Apple University Consortium Scholarship.