libexplain  1.4.D001
Defines | Functions | Variables
libexplain/buffer/accept4_flags.c File Reference
#include <libexplain/ac/sys/socket.h>
#include <libexplain/buffer/accept4_flags.h>
#include <libexplain/parse_bits.h>
#include <libexplain/sizeof.h>

Go to the source code of this file.

Defines

#define SOCK_NONBLOCK   0
#define SOCK_CLOEXEC   0

Functions

void explain_buffer_accept4_flags (explain_string_buffer_t *sb, int flags)
int explain_accept4_flags_parse_or_die (const char *text, const char *caption)

Variables

static const
explain_parse_bits_table_t 
table []

Define Documentation

#define SOCK_CLOEXEC   0

Definition at line 31 of file accept4_flags.c.

#define SOCK_NONBLOCK   0

Definition at line 28 of file accept4_flags.c.


Function Documentation

int explain_accept4_flags_parse_or_die ( const char *  text,
const char *  caption 
)

The explain_accept4_flags_parse_or_die function is used to convert a text string into an accept4() flags value.

Parameters:
textThe text to be converted.
captionAn extra caption for error messages.
Returns:
the parsed value

Definition at line 51 of file accept4_flags.c.

void explain_buffer_accept4_flags ( explain_string_buffer_t sb,
int  flags 
)

The explain_buffer_accept4_flags function may be used to print a representation of the accept4() flags argument.

Parameters:
sbThe string buffer to print into.
flagsThe accept4() flags value to be printed.

Definition at line 44 of file accept4_flags.c.


Variable Documentation

Initial value:
{
    { "SOCK_NONBLOCK", SOCK_NONBLOCK },
    { "SOCK_CLOEXEC", SOCK_CLOEXEC },
}

Definition at line 36 of file accept4_flags.c.