|
libexplain
1.4.D001
|
#include <libexplain/ac/sys/socket.h>#include <libexplain/ac/netdb.h>#include <libexplain/ac/netinet/in.h>#include <libexplain/parse_bits.h>#include <libexplain/buffer/socket_protocol.h>#include <libexplain/sizeof.h>#include <libexplain/string_buffer.h>Go to the source code of this file.
Functions | |
| void | explain_buffer_socket_protocol (explain_string_buffer_t *sb, int protocol) |
| int | explain_parse_socket_protocol_or_die (const char *text, const char *caption) |
Variables | |
| static const explain_parse_bits_table_t | table [] |
| void explain_buffer_socket_protocol | ( | struct explain_string_buffer_t * | sb, |
| int | protocol | ||
| ) |
The explain_buffer_socket_protocol function may be used to print a symbolic value of a socket protocol value to the given string buffer.
| sb | The string buffer to print into. |
| protocol | The socket protocol value to interpret. |
Definition at line 111 of file socket_protocol.c.
| int explain_parse_socket_protocol_or_die | ( | const char * | text, |
| const char * | cptn | ||
| ) |
The explain_parse_socket_protocol function is used to parse a string into a socket protocol value. On error, prints a diagnostic and exits EXIT_FAILURE.
| text | The string to be parsed. |
| cptn | additional text to add to start of error message |
Definition at line 135 of file socket_protocol.c.
const explain_parse_bits_table_t table[] [static] |
Definition at line 30 of file socket_protocol.c.
1.7.6.1