1explain_setsockopt_or_die(3)Library Functions Manualexplain_setsockopt_or_die(3)
2
3
4

NAME

6       explain_setsockopt_or_die  -  get and set options on sockets and report
7       errors
8

SYNOPSIS

10       #include <libexplain/setsockopt.h>
11       void explain_setsockopt_or_die(int fildes, int level,  int  name,  void
12       *data, socklen_t data_size);
13

DESCRIPTION

15       The  explain_setsockopt_or_die  function  is  used to call the setsock‐
16       opt(2) system call.  On failure  an  explanation  will  be  printed  to
17       stderr,  obtained from explain_setsockopt(3), and then the process ter‐
18       minates by calling exit(EXIT_FAILURE).
19
20       This function is intended to be used in a fashion similar to  the  fol‐
21       lowing example:
22              explain_setsockopt_or_die(fildes, level, name, data, data_size);
23
24       fildes  The fildes, exactly as to be passed to the setsockopt(2) system
25               call.
26
27       level   The level, exactly as to be passed to the setsockopt(2)  system
28               call.
29
30       name    The  name,  exactly as to be passed to the setsockopt(2) system
31               call.
32
33       data    The data, exactly as to be passed to the  setsockopt(2)  system
34               call.
35
36       data_size
37               The  data_size,  exactly  as  to be passed to the setsockopt(2)
38               system call.
39
40       Returns:
41               This function only returns on success.  On failure,  prints  an
42               explanation and exits.
43

SEE ALSO

45       setsockopt(2)
46               get and set options on sockets
47
48       explain_setsockopt(3)
49               explain setsockopt(2) errors
50
51       exit(2) terminate the calling process
52
54       libexplain version 1.4
55       Copyright (C) 2009 Peter Miller
56
57
58
59                                                  explain_setsockopt_or_die(3)
Impressum