libexplain
1.4.D001
|
Go to the source code of this file.
Functions | |
void | explain_buffer_socket_type (struct explain_string_buffer_t *sb, int type) |
void | explain_buffer_socket_type_from_fildes (struct explain_string_buffer_t *sb, int fildes) |
int | explain_parse_socket_type_or_die (const char *text, const char *caption) |
void explain_buffer_socket_type | ( | struct explain_string_buffer_t * | sb, |
int | type | ||
) |
The explain_buffer_socket_type function may be used to print a symbolic representation of a socket type.
sb | The string buffer to print into. |
type | The socket type to decipher. |
Definition at line 52 of file socket_type.c.
void explain_buffer_socket_type_from_fildes | ( | struct explain_string_buffer_t * | sb, |
int | fildes | ||
) |
The explain_buffer_socket_type_from_fildes function may be used to supplement an error explanation with the type of a socet, taken from the file descriptor. Nothing is printed if thr socket type cannot be determined.
sb | The string buffer to print into. |
fildes | the file descriptor to extract the socket type from and then print it |
Definition at line 72 of file socket_type.c.
int explain_parse_socket_type_or_die | ( | const char * | text, |
const char * | caption | ||
) |
The explain_parse_socket_type_or_die function may be used to parse a string into a socket type value. On error, prints a diagnostic and exits EXIT_FAILURE.
text | The string to parse. |
caption | addition text to add to start of error message |
Definition at line 65 of file socket_type.c.