]>
Commit | Line | Data |
---|---|---|
3d9156a7 A |
1 | #include <stdint.h> |
2 | #include <sys/socket.h> | |
3 | #include <sys/un.h> | |
4 | #include <netinet/in.h> | |
5 | #include <arpa/inet.h> | |
6 | ||
7 | #define _PATH_ASL_OUT "/var/log/asl.log" | |
8 | ||
9 | #define ASL_QUERY_OP_NULL 0x00000 | |
10 | ||
11 | #define NOTIFY_SYSTEM_MASTER "com.apple.system.syslog.master" | |
12 | #define NOTIFY_SYSTEM_ASL_FILTER "com.apple.system.syslog.asl_filter" | |
13 | #define NOTIFY_PREFIX_SYSTEM "com.apple.system.syslog" | |
14 | #define NOTIFY_PREFIX_USER "user.syslog" | |
15 | ||
16 | typedef struct __aslclient | |
17 | { | |
18 | uint32_t options; | |
19 | struct sockaddr_un server; | |
20 | int sock; | |
21 | pid_t pid; | |
22 | uid_t uid; | |
23 | gid_t gid; | |
24 | char *name; | |
25 | char *facility; | |
26 | uint32_t filter; | |
27 | int notify_token; | |
28 | int notify_master_token; | |
29 | uint32_t fd_count; | |
30 | int *fd_list; | |
31 | uint32_t reserved1; | |
32 | void *reserved2; | |
33 | } asl_client_t; | |
34 | ||
35 | typedef struct __aslmsg | |
36 | { | |
37 | uint32_t type; | |
38 | uint32_t count; | |
39 | char **key; | |
40 | char **val; | |
41 | uint32_t *op; | |
42 | } asl_msg_t; | |
43 | ||
44 | typedef struct __aslresponse | |
45 | { | |
46 | uint32_t count; | |
47 | uint32_t curr; | |
48 | asl_msg_t **msg; | |
49 | } asl_search_result_t; |