]>
Commit | Line | Data |
---|---|---|
b1ab9ed8 A |
1 | /* |
2 | * Copyright (c) 2008 Apple Inc. All Rights Reserved. | |
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 | * DTrace static providers at the security utility layer | |
25 | */ | |
26 | #define int32_t int | |
27 | #define uint32_t unsigned | |
28 | ||
29 | ||
30 | /* | |
31 | * The security-debug provider replaces the old text-based debug log facility | |
32 | */ | |
33 | provider security_debug { | |
34 | probe log(const char *scope, const char *message); | |
35 | probe logp(const char *scope, void *object, const char *message); | |
36 | probe delay(const char *path); | |
37 | ||
38 | probe sec__create(void *object, const char *className, uint32_t classID); | |
39 | probe sec__destroy(void *object); | |
40 | ||
41 | probe refcount__create(const void *p); | |
42 | probe refcount__up(const void *p, unsigned count); | |
43 | probe refcount__down(const void *p, unsigned count); | |
44 | }; | |
45 | ||
46 | ||
47 | /* | |
48 | * Track and monitor C++ exception activity | |
49 | */ | |
50 | typedef const void *DTException; | |
51 | ||
52 | provider security_exception { | |
53 | probe throw__osstatus(DTException error, int32_t status); | |
54 | probe throw__cssm(DTException error, uint32_t status); | |
55 | probe throw__mach(DTException error, int32_t status); | |
56 | probe throw__unix(DTException error, int errno); | |
57 | probe throw__pcsc(DTException error, uint32_t status); | |
58 | probe throw__sqlite(DTException error, int status, const char *message); | |
59 | probe throw__cf(DTException error); | |
60 | probe throw__other(DTException error, uint32_t status, const char *type); | |
61 | probe copy(DTException newError, DTException oldError); | |
62 | probe handled(DTException error); | |
63 | }; | |
64 | ||
65 | ||
66 | /* | |
67 | * The MachServer run-loop controller | |
68 | */ | |
69 | provider security_machserver { | |
70 | probe start_thread(int subthread); | |
71 | probe end_thread(int thrown); | |
72 | probe begin(uint32_t servicePort, int id); | |
73 | probe end(); | |
74 | probe timer__start(void *timer, int longterm, double when); | |
75 | probe timer__end(int thrown); | |
76 | probe port__add(uint32_t port); | |
77 | probe port__remove(uint32_t port); | |
78 | probe receive(double timeout); // (timeout == 0 means infinite) | |
79 | probe receive_error(uint32_t machError); | |
80 | probe send_error(uint32_t machError, uint32_t replyPort); | |
81 | probe reap(uint32_t count, uint32_t idle); | |
82 | probe alloc__register(const void *memory, const void *allocator); | |
83 | probe alloc__release(const void *memory, const void *allocator); | |
84 | }; |