Dillo v3.1.1-46-g8a360e32
Loading...
Searching...
No Matches
dpi.h
Go to the documentation of this file.
1
7#ifndef DPI_H
8#define DPI_H
9
10#include <unistd.h> /* for socklen_t */
11#include <sys/socket.h> /* for socklen_t and AF_LOCAL */
12
13/* Some systems may not have this one... */
14#ifndef AF_LOCAL
15 #define AF_LOCAL AF_UNIX
16#endif
17
18/* This one is tricky, some sources state it should include the byte
19 * for the terminating NULL, and others say it shouldn't.
20 * The other way is to only use this one when a native SUN_LEN is not present,
21 * but as dillo has used this for a long time successfully, here it goes.
22 */
23# define D_SUN_LEN(ptr) ((size_t) (((struct sockaddr_un *) 0)->sun_path) \
24 + strlen ((ptr)->sun_path))
25
29enum {
31 AUTH_CMD, /* authentication */
32 BYE_CMD, /* "DpiBye" */
33 CHECK_SERVER_CMD, /* "check_server" */
34 REGISTER_ALL_CMD, /* "register_all" */
35 REGISTER_SERVICE_CMD /* "register_service" */
36};
37
38
39char *a_Dpi_sockdir_file(void);
40
41char *a_Dpi_rd_dpi_socket_dir(char *dirname);
42
43char *a_Dpi_srs(void);
44
45#endif
char * a_Dpi_rd_dpi_socket_dir(char *dirname)
Definition dpi.c:51
char * a_Dpi_sockdir_file(void)
Definition dpi.c:34
@ REGISTER_SERVICE_CMD
Definition dpi.h:35
@ UNKNOWN_CMD
Definition dpi.h:30
@ REGISTER_ALL_CMD
Definition dpi.h:34
@ BYE_CMD
Definition dpi.h:32
@ AUTH_CMD
Definition dpi.h:31
@ CHECK_SERVER_CMD
Definition dpi.h:33
char * a_Dpi_srs(void)
Definition dpi.c:87