|
libexplain
1.4.D001
|
#include <libexplain/ac/sys/socket.h>#include <libexplain/parse_bits.h>#include <libexplain/buffer/socket_type.h>#include <libexplain/sizeof.h>#include <libexplain/string_buffer.h>Go to the source code of this file.
Functions | |
| void | explain_buffer_socket_type (explain_string_buffer_t *sb, int type) |
| int | explain_parse_socket_type_or_die (const char *text, const char *caption) |
| void | explain_buffer_socket_type_from_fildes (explain_string_buffer_t *sb, int fildes) |
Variables | |
| static const explain_parse_bits_table_t | table [] |
| 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.
const explain_parse_bits_table_t table[] [static] |
{
}
Definition at line 28 of file socket_type.c.
1.7.6.1