]>
git.saurik.com Git - apple/syslog.git/blob - libsystem_asl.tproj/include/asl_legacy1.h
1 #ifndef __ASL_LEGACY1_H__
2 #define __ASL_LEGACY1_H__
5 * Copyright (c) 2007-2011 Apple Inc. All rights reserved.
7 * @APPLE_LICENSE_HEADER_START@
9 * This file contains Original Code and/or Modifications of Original Code
10 * as defined in and that are subject to the Apple Public Source License
11 * Version 2.0 (the 'License'). You may not use this file except in
12 * compliance with the License. Please obtain a copy of the License at
13 * http://www.opensource.apple.com/apsl/ and read it before using this
16 * The Original Code and all software distributed under the License are
17 * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
18 * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
19 * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
20 * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
21 * Please see the License for the specific language governing rights and
22 * limitations under the License.
24 * @APPLE_LICENSE_HEADER_END@ */
27 * ASL Database VERSION 1 (LEGACY)
29 * Log messages are stored in 80 byte records of the form:
31 * | 1 | 4 | 8 | 4 | 4 | 8 | 8 | 8 | 8 | 4 | 4 | 4 | 4 | 8 | 2 | 1 | (80 bytes)
32 * | Type | Next | ID | RUID | RGID | Time | Host | Sender | Facility | LEVEL | PID | UID | GID | Message | Flags | Zero |
34 * If there are no additional key/value pairs in the message, Next will be zero. If there are additional
35 * key/value pairs in the database, Next is a record number for a record with the format:
37 * | 1 | 4 | 4 | 8 | 8 | 8 | 8 | 8 | 8 | 8 | 8 | 7 | (80 bytes)
38 * | Type | Next | Count | Key1 | Val1 | Key2 | Val2 | Key3 | Val3 | Key4 | Val4 | Zero |
40 * Additional records will be chained using the Next field, with the count field left zero.
42 * Strings stored in records of the form:
44 * | 1 | 4 | 8 | 4 | 4 | 4 | 55 | (80 bytes)
45 * | Type | Next | ID | Refcount | Hash | Length | String |
47 * If the string is longer than 55 bytes, Next is a record number for a record with the format:
49 * | 1 | 4 | 75 | (80 bytes)
50 * | Type | Next | String |
52 * The first record (header) in the database has the format:
54 * | 12 | 4 | 8 | 56 | (80 bytes)
55 * | Cookie | Vers | Max ID | Zero |
63 #include <Availability.h>
71 } asl_legacy1_slot_info_t
;
75 asl_legacy1_slot_info_t
*slotlist
;
76 uint32_t slotlist_count
;
80 uint32_t asl_legacy1_open(const char *path
, asl_legacy1_t
**s
) __OSX_AVAILABLE_STARTING(__MAC_10_5
, __IPHONE_2_0
);
81 uint32_t asl_legacy1_close(asl_legacy1_t
*s
) __OSX_AVAILABLE_STARTING(__MAC_10_5
, __IPHONE_2_0
);
82 uint32_t asl_legacy1_fetch(asl_legacy1_t
*s
, uint64_t msgid
, aslmsg
*msg
) __OSX_AVAILABLE_STARTING(__MAC_10_5
, __IPHONE_2_0
);
83 uint32_t asl_legacy1_match(asl_legacy1_t
*s
, aslresponse query
, aslresponse
*res
, uint64_t *last_id
, uint64_t start_id
, uint32_t count
, int32_t direction
) __OSX_AVAILABLE_STARTING(__MAC_10_5
, __IPHONE_2_0
);
85 #endif /*__ASL_LEGACY1_H__*/