Changeset View
Changeset View
Standalone View
Standalone View
lib/libifconfig/libifconfig_internal.c
Show First 20 Lines • Show All 96 Lines • ▼ Show 20 Lines | if (h->sockets[addressfamily] == -1) { | ||||
h->error.errtype = SOCKET; | h->error.errtype = SOCKET; | ||||
h->error.errcode = errno; | h->error.errcode = errno; | ||||
return (-1); | return (-1); | ||||
} | } | ||||
*s = h->sockets[addressfamily]; | *s = h->sockets[addressfamily]; | ||||
return (0); | return (0); | ||||
} | } | ||||
void | |||||
ifconfig_error_clear(ifconfig_handle_t *h) | |||||
{ | |||||
h->error.errtype = OK; | |||||
h->error.errcode = 0; | |||||
} | |||||
void | |||||
ifconfig_error(ifconfig_handle_t *h, ifconfig_errtype type, int error) | |||||
{ | |||||
h->error.errtype = type; | |||||
h->error.errcode = error; | |||||
} |