i3
sd-daemon.h File Reference
#include <sys/types.h>
#include <inttypes.h>
Include dependency graph for sd-daemon.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define _sd_printf_attr_(a, b)
 
#define _sd_hidden_
 
#define SD_EMERG   "<0>" /* system is unusable */
 
#define SD_ALERT   "<1>" /* action must be taken immediately */
 
#define SD_CRIT   "<2>" /* critical conditions */
 
#define SD_ERR   "<3>" /* error conditions */
 
#define SD_WARNING   "<4>" /* warning conditions */
 
#define SD_NOTICE   "<5>" /* normal but significant condition */
 
#define SD_INFO   "<6>" /* informational */
 
#define SD_DEBUG   "<7>" /* debug-level messages */
 
#define SD_LISTEN_FDS_START   3
 

Functions

int sd_listen_fds (int unset_environment) _sd_hidden_
 
int sd_is_fifo (int fd, const char *path) _sd_hidden_
 
int sd_is_socket (int fd, int family, int type, int listening) _sd_hidden_
 
int sd_is_socket_inet (int fd, int family, int type, int listening, uint16_t port) _sd_hidden_
 
int sd_is_socket_unix (int fd, int type, int listening, const char *path, size_t length) _sd_hidden_
 
int sd_notify (int unset_environment, const char *state) _sd_hidden_
 
int sd_notifyf (int unset_environment, const char *format,...) _sd_printf_attr_(2
 
int sd_booted (void) _sd_hidden_
 

Variables

int _sd_hidden_
 

Macro Definition Documentation

◆ _sd_hidden_

#define _sd_hidden_

Definition at line 81 of file sd-daemon.h.

◆ _sd_printf_attr_

#define _sd_printf_attr_ ( a,
b )

Definition at line 73 of file sd-daemon.h.

◆ SD_ALERT

#define SD_ALERT   "<1>" /* action must be taken immediately */

Definition at line 93 of file sd-daemon.h.

◆ SD_CRIT

#define SD_CRIT   "<2>" /* critical conditions */

Definition at line 94 of file sd-daemon.h.

◆ SD_DEBUG

#define SD_DEBUG   "<7>" /* debug-level messages */

Definition at line 99 of file sd-daemon.h.

◆ SD_EMERG

#define SD_EMERG   "<0>" /* system is unusable */

Definition at line 92 of file sd-daemon.h.

◆ SD_ERR

#define SD_ERR   "<3>" /* error conditions */

Definition at line 95 of file sd-daemon.h.

◆ SD_INFO

#define SD_INFO   "<6>" /* informational */

Definition at line 98 of file sd-daemon.h.

◆ SD_LISTEN_FDS_START

#define SD_LISTEN_FDS_START   3

Definition at line 102 of file sd-daemon.h.

Referenced by main(), sd_listen_fds(), and start_application().

◆ SD_NOTICE

#define SD_NOTICE   "<5>" /* normal but significant condition */

Definition at line 97 of file sd-daemon.h.

◆ SD_WARNING

#define SD_WARNING   "<4>" /* warning conditions */

Definition at line 96 of file sd-daemon.h.

Function Documentation

◆ sd_booted()

int sd_booted ( void )

Definition at line 454 of file sd-daemon.c.

◆ sd_is_fifo()

int sd_is_fifo ( int fd,
const char * path )

Definition at line 124 of file sd-daemon.c.

◆ sd_is_socket()

int sd_is_socket ( int fd,
int family,
int type,
int listening )

Definition at line 219 of file sd-daemon.c.

References sockaddr_union::sa, and sd_is_socket_internal().

Here is the call graph for this function:

◆ sd_is_socket_inet()

int sd_is_socket_inet ( int fd,
int family,
int type,
int listening,
uint16_t port )

Definition at line 251 of file sd-daemon.c.

References sockaddr_union::in4, sockaddr_union::in6, sockaddr_union::sa, and sd_is_socket_internal().

Here is the call graph for this function:

◆ sd_is_socket_unix()

int sd_is_socket_unix ( int fd,
int type,
int listening,
const char * path,
size_t length )

Definition at line 305 of file sd-daemon.c.

References sockaddr_union::sa, sd_is_socket_internal(), and sockaddr_union::un.

Here is the call graph for this function:

◆ sd_listen_fds()

int sd_listen_fds ( int unset_environment)

Definition at line 47 of file sd-daemon.c.

References SD_LISTEN_FDS_START.

Referenced by main().

◆ sd_notify()

int sd_notify ( int unset_environment,
const char * state )

Definition at line 353 of file sd-daemon.c.

References sockaddr_union::sa, state, and sockaddr_union::un.

Referenced by main(), and sd_notifyf().

◆ sd_notifyf()

int sd_notifyf ( int unset_environment,
const char * format,
... )

Variable Documentation

◆ _sd_hidden_

int _sd_hidden_

Definition at line 245 of file sd-daemon.h.