]>
git.saurik.com Git - apple/libc.git/blob - gen/asl_private.h
2 * Copyright (c) 2007-2010 Apple Inc. All rights reserved.
4 * @APPLE_LICENSE_HEADER_START@
6 * This file contains Original Code and/or Modifications of Original Code
7 * as defined in and that are subject to the Apple Public Source License
8 * Version 2.0 (the 'License'). You may not use this file except in
9 * compliance with the License. Please obtain a copy of the License at
10 * http://www.opensource.apple.com/apsl/ and read it before using this
13 * The Original Code and all software distributed under the License are
14 * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
15 * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
16 * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
17 * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
18 * Please see the License for the specific language governing rights and
19 * limitations under the License.
21 * @APPLE_LICENSE_HEADER_END@
24 #ifndef __ASL_PRIVATE_H__
25 #define __ASL_PRIVATE_H__
28 #include <sys/socket.h>
30 #include <netinet/in.h>
31 #include <arpa/inet.h>
34 #include <Availability.h>
36 #define ASL_QUERY_OP_NULL 0x00000
38 #define NOTIFY_SYSTEM_MASTER "com.apple.system.syslog.master"
39 #define NOTIFY_SYSTEM_ASL_FILTER "com.apple.system.syslog.asl_filter"
40 #define NOTIFY_PREFIX_SYSTEM "com.apple.system.syslog"
41 #define NOTIFY_PREFIX_USER "user.syslog"
42 #define NOTIFY_RC "com.apple.asl.remote"
44 #define ASL_MSG_FMT_RAW "raw"
45 #define ASL_MSG_FMT_STD "std"
46 #define ASL_MSG_FMT_BSD "bsd"
47 #define ASL_MSG_FMT_XML "xml"
48 #define ASL_MSG_FMT_MSG "msg"
50 #define ASL_TIME_FMT_SEC "sec"
51 #define ASL_TIME_FMT_UTC "utc"
52 #define ASL_TIME_FMT_LCL "lcl"
54 #define ASL_ENCODE_NONE 0
55 #define ASL_ENCODE_SAFE 1
56 #define ASL_ENCODE_VIS 2
57 #define ASL_ENCODE_ASL 3
59 #define ASL_OPT_IGNORE "ignore"
60 #define ASL_OPT_STORE "store"
62 #define ASL_STORE_LOCATION_FILE 0
63 #define ASL_STORE_LOCATION_MEMORY 1
65 #define ASL_OPT_SYSLOG_LEGACY 0x00010000
67 /* SPI to enable ASL filter tunneling using asl_set_filter() */
68 #define ASL_FILTER_MASK_TUNNEL 0x100
70 typedef struct __aslclient
73 struct sockaddr_un server
;
82 int notify_master_token
;
87 uint32_t *fd_encoding
;
94 typedef struct __aslresponse
99 } asl_search_result_t
;
103 int asl_add_output(aslclient asl
, int fd
, const char *msg_fmt
, const char *time_fmt
, uint32_t text_encoding
) __OSX_AVAILABLE_STARTING(__MAC_10_5
, __IPHONE_2_0
);
104 int asl_remove_output(aslclient asl
, int fd
) __OSX_AVAILABLE_STARTING(__MAC_10_5
, __IPHONE_2_0
);
105 char *asl_format_message(asl_msg_t
*msg
, const char *msg_fmt
, const char *time_fmt
, uint32_t text_encoding
, uint32_t *outlen
) __OSX_AVAILABLE_STARTING(__MAC_10_5
, __IPHONE_2_0
);
106 uint32_t asl_msg_string_length(asl_msg_t
*msg
) __OSX_AVAILABLE_STARTING(__MAC_10_7
, __IPHONE_4_3
);
107 uint32_t asl_msg_to_string_buffer(asl_msg_t
*msg
, char *buf
, uint32_t bufsize
) __OSX_AVAILABLE_STARTING(__MAC_10_7
, __IPHONE_4_3
);
108 char *asl_msg_to_string(asl_msg_t
*in
, uint32_t *len
) __OSX_AVAILABLE_STARTING(__MAC_10_4
, __IPHONE_2_0
);
109 asl_search_result_t
*asl_list_from_string(const char *buf
) __OSX_AVAILABLE_STARTING(__MAC_10_5
, __IPHONE_2_0
);
110 char *asl_list_to_string(asl_search_result_t
*, uint32_t *) __OSX_AVAILABLE_STARTING(__MAC_10_5
, __IPHONE_2_0
);
111 int asl_store_location() __OSX_AVAILABLE_STARTING(__MAC_10_7
, __IPHONE_4_3
);
112 int asl_get_filter(aslclient asl
, int *local
, int *master
, int *remote
, int *active
) __OSX_AVAILABLE_STARTING(__MAC_10_7
, __IPHONE_4_3
);
113 char *asl_remote_notify_name() __OSX_AVAILABLE_STARTING(__MAC_10_7
, __IPHONE_4_3
);
117 #endif /* __ASL_PRIVATE_H__ */