Nagios
4.4.3
Dev docs for Nagios core and neb-module hackers
|
Go to the documentation of this file. 1 #ifndef LIBNAGIOS_NSOCK_H_INCLUDED
2 #define LIBNAGIOS_NSOCK_H_INCLUDED
17 #define NSOCK_EBIND (-1)
18 #define NSOCK_ELISTEN (-2)
19 #define NSOCK_ESOCKET (-3)
20 #define NSOCK_EUNLINK (-4)
21 #define NSOCK_ECONNECT (-5)
22 #define NSOCK_EFCNTL (-6)
23 #define NSOCK_EINVAL (-EINVAL)
26 #define NSOCK_TCP (1 << 0)
27 #define NSOCK_UDP (1 << 1)
28 #define NSOCK_UNLINK (1 << 2)
29 #define NSOCK_REUSE (1 << 2)
30 #define NSOCK_CONNECT (1 << 3)
31 #define NSOCK_BLOCK (1 << 4)
50 extern int nsock_unix(
const char *path,
unsigned int flags);
62 __attribute__((__format__(__printf__, 2, 3)));
73 __attribute__((__format__(__printf__, 2, 3)));
int nsock_unix(const char *path, unsigned int flags)
Create or connect to a unix socket To control permissions on sockets when NSOCK_LISTEN is specified,...
int int nsock_printf(int sd, const char *fmt,...) __attribute__((__format__(__printf__
Write a printf()-formatted string to the socket pointed to by sd.
const char * nsock_strerror(int code)
Grab an error string relating to nsock_unix()
int nsock_printf_nul(int sd, const char *fmt,...) __attribute__((__format__(__printf__
Write a nul-terminated message to the socket pointed to by sd.