]>
Commit | Line | Data |
---|---|---|
81582353 | 1 | /* |
5222c21d | 2 | * Copyright (c) 2007-2015 Apple Inc. All rights reserved. |
81582353 A |
3 | * |
4 | * @APPLE_LICENSE_HEADER_START@ | |
5 | * | |
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 | |
11 | * file. | |
12 | * | |
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. | |
20 | * | |
21 | * @APPLE_LICENSE_HEADER_END@ | |
22 | */ | |
23 | ||
24 | #ifndef __ASL_PRIVATE_H__ | |
25 | #define __ASL_PRIVATE_H__ | |
26 | ||
f3df4c03 | 27 | #include <asl.h> |
81582353 A |
28 | #include <stdint.h> |
29 | #include <sys/socket.h> | |
30 | #include <sys/un.h> | |
f3df4c03 | 31 | #include <sys/time.h> |
5222c21d | 32 | #include <mach/vm_statistics.h> |
81582353 A |
33 | #include <netinet/in.h> |
34 | #include <arpa/inet.h> | |
81582353 | 35 | #include <Availability.h> |
f3df4c03 A |
36 | #include <os/object.h> |
37 | #include <os/object_private.h> | |
38 | ||
81582353 A |
39 | #define ASL_QUERY_OP_NULL 0x00000 |
40 | ||
41 | #define ASLMANAGER_SERVICE_NAME "com.apple.aslmanager" | |
42 | #define NOTIFY_SYSTEM_MASTER "com.apple.system.syslog.master" | |
43 | #define NOTIFY_SYSTEM_ASL_FILTER "com.apple.system.syslog.asl_filter" | |
44 | #define NOTIFY_PREFIX_SYSTEM "com.apple.system.syslog" | |
45 | #define NOTIFY_PREFIX_USER "user.syslog" | |
46 | #define NOTIFY_RC "com.apple.asl.remote" | |
47 | ||
48 | #define ASL_OPT_IGNORE "ignore" | |
49 | #define ASL_OPT_STORE "store" | |
f3df4c03 A |
50 | #define ASL_OPT_CONTROL "control" |
51 | ||
52 | /* File and Store Open Option */ | |
53 | #define ASL_OPT_OPEN_READ 0x80000000 | |
81582353 | 54 | |
5222c21d A |
55 | #define ASL_OPT_SHIM_NO_ASL 0x10000000 |
56 | #define ASL_OPT_SHIM_NO_TRACE 0x20000000 | |
57 | ||
81582353 A |
58 | #define ASL_STORE_LOCATION_FILE 0 |
59 | #define ASL_STORE_LOCATION_MEMORY 1 | |
60 | ||
61 | #define ASL_OPT_SYSLOG_LEGACY 0x00010000 | |
62 | ||
f3df4c03 | 63 | #define ASL_KEY_FREE_NOTE "ASLFreeNotify" |
5222c21d | 64 | #define ASL_KEY_MESSAGETRACER "com.apple.message.domain" |
af7d442c | 65 | #define ASL_KEY_POWERMANAGEMENT "com.apple.iokit.domain" |
af7d442c | 66 | #define ASL_KEY_CFLOG_LOCAL_TIME "CFLog Local Time" |
5222c21d | 67 | |
15d86b03 A |
68 | #define FACILITY_LASTLOG "com.apple.system.lastlog" |
69 | #define FACILITY_UTMPX "com.apple.system.utmpx" | |
70 | ||
5222c21d A |
71 | /* remote control bits */ |
72 | #define EVAL_LEVEL_MASK 0x000000ff | |
73 | #define EVAL_ACTION_MASK 0xffff0000 | |
74 | #define EVAL_ACTIVE 0x00010000 | |
75 | #define EVAL_SEND_ASL 0x00020000 | |
76 | #define EVAL_SEND_TRACE 0x00040000 | |
77 | #define EVAL_TEXT_FILE 0x00080000 | |
78 | #define EVAL_ASL_FILE 0x00100000 | |
79 | #define EVAL_TUNNEL 0x00200000 | |
80 | #define EVAL_QUOTA 0x00400000 | |
f3df4c03 A |
81 | |
82 | /* | |
83 | * Private types | |
84 | */ | |
85 | #define ASL_TYPE_STRING 6 | |
86 | #define ASL_TYPE_COUNT 7 | |
81582353 A |
87 | |
88 | /* SPI to enable ASL filter tunneling using asl_set_filter() */ | |
89 | #define ASL_FILTER_MASK_TUNNEL 0x100 | |
90 | ||
f3df4c03 | 91 | #define NOQUOTA_FILE_PATH "/etc/asl/.noquota" |
81582353 | 92 | |
5222c21d A |
93 | // TODO: this could move to vm_statistics.h |
94 | #ifndef VM_MEMORY_ASL | |
95 | #define VM_MEMORY_ASL (VM_MEMORY_APPLICATION_SPECIFIC_1 + 7) | |
96 | #endif | |
97 | ||
98 | /* | |
99 | * Memory limits: work queue size for syslogd and max message size in libasl | |
100 | */ | |
101 | #if TARGET_OS_EMBEDDED | |
102 | #define SYSLOGD_WORK_QUEUE_MEMORY 3072000 | |
103 | #define LIBASL_MAX_MSG_SIZE 2048000 | |
104 | #else | |
105 | #define SYSLOGD_WORK_QUEUE_MEMORY 10240000 | |
106 | #define LIBASL_MAX_MSG_SIZE 8192000 | |
107 | #endif | |
108 | ||
81582353 A |
109 | __BEGIN_DECLS |
110 | ||
af7d442c A |
111 | int asl_store_location() __API_DEPRECATED("os_log(3) has replaced asl(3)", macosx(10.7,10.12), ios(4.3,10.0), watchos(2.0,3.0), tvos(9.0,10.0)); |
112 | char *asl_remote_notify_name() __API_DEPRECATED("os_log(3) has replaced asl(3)", macosx(10.7,10.12), ios(4.3,10.0), watchos(2.0,3.0), tvos(9.0,10.0)); | |
113 | int asl_syslog_faciliy_name_to_num(const char *name) __API_DEPRECATED("os_log(3) has replaced asl(3)", macosx(10.5,10.12), ios(2.0,10.0), watchos(2.0,3.0), tvos(9.0,10.0)); | |
114 | const char *asl_syslog_faciliy_num_to_name(int n) __API_DEPRECATED("os_log(3) has replaced asl(3)", macosx(10.5,10.12), ios(2.0,10.0), watchos(2.0,3.0), tvos(9.0,10.0)); | |
115 | int asl_trigger_aslmanager(void) __API_DEPRECATED("os_log(3) has replaced asl(3)", macosx(10.10,10.12), ios(7.0,10.0), watchos(2.0,3.0), tvos(9.0,10.0)); | |
116 | int asl_get_filter(asl_object_t client, int *local, int *master, int *remote, int *active) __API_DEPRECATED("os_log(3) has replaced asl(3)", macosx(10.7,10.12), ios(4.3,10.0), watchos(2.0,3.0), tvos(9.0,10.0)); | |
117 | uint32_t asl_set_local_control(asl_object_t client, uint32_t filter) __API_DEPRECATED("os_log(3) has replaced asl(3)", macosx(10.11,10.12), ios(9.0,10.0), watchos(2.0,3.0), tvos(9.0,10.0)); | |
118 | uint32_t asl_get_local_control(asl_object_t client) __API_DEPRECATED("os_log(3) has replaced asl(3)", macosx(10.11,10.12), ios(9.0,10.0), watchos(2.0,3.0), tvos(9.0,10.0)); | |
f3df4c03 A |
119 | |
120 | /* EXCLUSIVLY FOR USE BY DEV TOOLS */ | |
121 | /* DO NOT USE THIS INTERFACE OTHERWISE */ | |
122 | ||
af7d442c | 123 | uint32_t asl_store_match_timeout(void *ignored, void *query_v1, void **result_v1, uint64_t *last_id, uint64_t start_id, uint32_t count, int32_t direction, uint32_t usec) __API_DEPRECATED("os_log(3) has replaced asl(3)", macosx(10.10,10.12), ios(7.0,10.0), watchos(2.0,3.0), tvos(9.0,10.0)); |
81582353 A |
124 | |
125 | __END_DECLS | |
126 | ||
f3df4c03 | 127 | |
81582353 | 128 | #endif /* __ASL_PRIVATE_H__ */ |