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