]>
git.saurik.com Git - apple/libc.git/blob - gen/asl_private.h
a9c699bdd86a4ca3962cf1b4a37dcbed13c20de9
2 * Copyright (c) 2007 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"
38 #define NOTIFY_RC "com.apple.asl.remote"
40 #define ASL_MSG_FMT_RAW "raw"
41 #define ASL_MSG_FMT_STD "std"
42 #define ASL_MSG_FMT_BSD "bsd"
43 #define ASL_MSG_FMT_XML "xml"
44 #define ASL_MSG_FMT_MSG "msg"
46 #define ASL_TIME_FMT_SEC "sec"
47 #define ASL_TIME_FMT_UTC "utc"
48 #define ASL_TIME_FMT_LCL "lcl"
50 #define ASL_ENCODE_NONE 0
51 #define ASL_ENCODE_SAFE 1
52 #define ASL_ENCODE_VIS 2
53 #define ASL_ENCODE_ASL 3
55 #define ASL_KEY_REF_PID "RefPID"
56 #define ASL_KEY_REF_PROC "RefProc"
57 #define ASL_KEY_OPTION "ASLOption"
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 typedef struct __aslclient
68 struct sockaddr_un server
;
77 int notify_master_token
;
82 uint32_t *fd_encoding
;
87 typedef struct __aslmsg
96 typedef struct __aslresponse
101 } asl_search_result_t
;
106 int asl_add_output(aslclient asl
, int fd
, const char *msg_fmt
, const char *time_fmt
, uint32_t text_encoding
);
107 int asl_remove_output(aslclient asl
, int fd
);
108 char *asl_format_message(aslmsg msg
, const char *msg_fmt
, const char *time_fmt
, uint32_t text_encoding
, uint32_t *outlen
);
109 int asl_store_location();