]>
git.saurik.com Git - apple/libc.git/blob - gen/asl_private.h
989fb5b131759433aebac720bcf0119048199930
2 * Copyright (c) 2007-2008 Apple Inc. All rights reserved.
4 * @APPLE_LICENSE_HEADER_START@
6 * "Portions Copyright (c) 2007 Apple Inc. All Rights
7 * Reserved. This file contains Original Code and/or Modifications of
8 * Original Code as defined in and that are subject to the Apple Public
9 * Source License Version 1.0 (the 'License'). You may not use this file
10 * except in compliance with the License. Please obtain a copy of the
11 * License at http://www.apple.com/publicsource and read it before using
14 * The Original Code and all software distributed under the License are
15 * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
16 * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
17 * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
18 * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT. Please see the
19 * License for the specific language governing rights and limitations
22 * @APPLE_LICENSE_HEADER_END@
25 #include <sys/socket.h>
27 #include <netinet/in.h>
28 #include <arpa/inet.h>
30 #define _PATH_ASL_OUT "/var/log/asl.log"
32 #define ASL_QUERY_OP_NULL 0x00000
34 #define NOTIFY_SYSTEM_MASTER "com.apple.system.syslog.master"
35 #define NOTIFY_SYSTEM_ASL_FILTER "com.apple.system.syslog.asl_filter"
36 #define NOTIFY_PREFIX_SYSTEM "com.apple.system.syslog"
37 #define NOTIFY_PREFIX_USER "user.syslog"
39 #define ASL_MSG_FMT_RAW "raw"
40 #define ASL_MSG_FMT_STD "std"
41 #define ASL_MSG_FMT_BSD "bsd"
42 #define ASL_MSG_FMT_XML "xml"
43 #define ASL_MSG_FMT_MSG "msg"
45 #define ASL_TIME_FMT_SEC "sec"
46 #define ASL_TIME_FMT_UTC "utc"
47 #define ASL_TIME_FMT_LCL "lcl"
49 #define ASL_ENCODE_NONE 0
50 #define ASL_ENCODE_SAFE 1
51 #define ASL_ENCODE_VIS 2
52 #define ASL_ENCODE_ASL 3
54 #define ASL_KEY_REF_PID "RefPID"
55 #define ASL_KEY_REF_PROC "RefProc"
57 typedef struct __aslclient
60 struct sockaddr_un server
;
69 int notify_master_token
;
74 uint32_t *fd_encoding
;
79 typedef struct __aslmsg
88 typedef struct __aslresponse
93 } asl_search_result_t
;
98 int asl_add_output(aslclient asl
, int fd
, const char *msg_fmt
, const char *time_fmt
, uint32_t text_encoding
);
99 int asl_remove_output(aslclient asl
, int fd
);
100 char *asl_format_message(aslmsg msg
, const char *msg_fmt
, const char *time_fmt
, uint32_t text_encoding
, uint32_t *outlen
);