]>
Commit | Line | Data |
---|---|---|
e9ce8d39 A |
1 | /* |
2 | * Copyright (c) 1999 Apple Computer, Inc. All rights reserved. | |
3 | * | |
4 | * @APPLE_LICENSE_HEADER_START@ | |
5 | * | |
734aad71 | 6 | * Copyright (c) 1999-2003 Apple Computer, Inc. All Rights Reserved. |
e9ce8d39 | 7 | * |
734aad71 A |
8 | * This file contains Original Code and/or Modifications of Original Code |
9 | * as defined in and that are subject to the Apple Public Source License | |
10 | * Version 2.0 (the 'License'). You may not use this file except in | |
11 | * compliance with the License. Please obtain a copy of the License at | |
12 | * http://www.opensource.apple.com/apsl/ and read it before using this | |
13 | * file. | |
14 | * | |
15 | * The Original Code and all software distributed under the License are | |
16 | * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER | |
e9ce8d39 A |
17 | * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, |
18 | * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, | |
734aad71 A |
19 | * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. |
20 | * Please see the License for the specific language governing rights and | |
21 | * limitations under the License. | |
e9ce8d39 A |
22 | * |
23 | * @APPLE_LICENSE_HEADER_END@ | |
24 | */ | |
25 | /* | |
26 | * Mach Operating System | |
27 | * Copyright (c) 1989 Carnegie-Mellon University | |
28 | * Copyright (c) 1988 Carnegie-Mellon University | |
29 | * Copyright (c) 1987 Carnegie-Mellon University | |
30 | * All rights reserved. The CMU software License Agreement specifies | |
31 | * the terms and conditions for use and redistribution. | |
32 | */ | |
33 | ||
34 | /* | |
35 | * Definitions for the logstat module. | |
36 | */ | |
37 | ||
38 | ||
39 | #ifndef _LS_DEFS_ | |
40 | #define _LS_DEFS_ | |
41 | ||
42 | #include <sys/types.h> | |
43 | ||
44 | /* | |
45 | * Definition for a log record. | |
46 | */ | |
47 | typedef struct { | |
48 | long code; | |
49 | long thread; | |
50 | long a1; | |
51 | long a2; | |
52 | long a3; | |
53 | long a4; | |
54 | long a5; | |
55 | long a6; | |
56 | } log_rec_t; | |
57 | ||
58 | typedef log_rec_t *log_ptr_t; | |
59 | ||
60 | /* | |
61 | * Statistics record. | |
62 | */ | |
63 | typedef struct { | |
64 | int datagram_pkts_sent; | |
65 | int datagram_pkts_rcvd; | |
66 | int srr_requests_sent; | |
67 | int srr_bcasts_sent; | |
68 | int srr_requests_rcvd; | |
69 | int srr_bcasts_rcvd; | |
70 | int srr_replies_sent; | |
71 | int srr_replies_rcvd; | |
72 | int srr_retries_sent; | |
73 | int srr_retries_rcvd; | |
74 | int srr_cfailures_sent; | |
75 | int srr_cfailures_rcvd; | |
76 | int deltat_dpkts_sent; | |
77 | int deltat_acks_rcvd; | |
78 | int deltat_dpkts_rcvd; | |
79 | int deltat_acks_sent; | |
80 | int deltat_oldpkts_rcvd; | |
81 | int deltat_oospkts_rcvd; | |
82 | int deltat_retries_sent; | |
83 | int deltat_retries_rcvd; | |
84 | int deltat_cfailures_sent; | |
85 | int deltat_cfailures_rcvd; | |
86 | int deltat_aborts_sent; | |
87 | int deltat_aborts_rcvd; | |
88 | int vmtp_requests_sent; | |
89 | int vmtp_requests_rcvd; | |
90 | int vmtp_replies_sent; | |
91 | int vmtp_replies_rcvd; | |
92 | int ipc_in_messages; | |
93 | int ipc_out_messages; | |
94 | int ipc_unblocks_sent; | |
95 | int ipc_unblocks_rcvd; | |
96 | int pc_requests_sent; | |
97 | int pc_requests_rcvd; | |
98 | int pc_replies_rcvd; | |
99 | int pc_startups_rcvd; | |
100 | int nn_requests_sent; | |
101 | int nn_requests_rcvd; | |
102 | int nn_replies_rcvd; | |
103 | int po_ro_hints_sent; | |
104 | int po_ro_hints_rcvd; | |
105 | int po_token_requests_sent; | |
106 | int po_token_requests_rcvd; | |
107 | int po_token_replies_rcvd; | |
108 | int po_xfer_requests_sent; | |
109 | int po_xfer_requests_rcvd; | |
110 | int po_xfer_replies_rcvd; | |
111 | int po_deaths_sent; | |
112 | int po_deaths_rcvd; | |
113 | int ps_requests_sent; | |
114 | int ps_requests_rcvd; | |
115 | int ps_replies_rcvd; | |
116 | int ps_auth_requests_sent; | |
117 | int ps_auth_requests_rcvd; | |
118 | int ps_auth_replies_rcvd; | |
119 | int mallocs_or_vm_allocates; | |
120 | int mem_allocs; | |
121 | int mem_deallocs; | |
122 | int mem_allocobjs; | |
123 | int mem_deallocobjs; | |
124 | int pkts_encrypted; | |
125 | int pkts_decrypted; | |
126 | int vmtp_segs_encrypted; | |
127 | int vmtp_segs_decrypted; | |
128 | int tcp_requests_sent; | |
129 | int tcp_replies_sent; | |
130 | int tcp_requests_rcvd; | |
131 | int tcp_replies_rcvd; | |
132 | int tcp_send; | |
133 | int tcp_recv; | |
134 | int tcp_connect; | |
135 | int tcp_accept; | |
136 | int tcp_close; | |
137 | } stat_t; | |
138 | ||
139 | typedef stat_t *stat_ptr_t; | |
140 | ||
141 | ||
142 | /* | |
143 | * Debugging flags record. | |
144 | */ | |
145 | typedef struct { | |
146 | int print_level; | |
147 | int ipc_in; | |
148 | int ipc_out; | |
149 | int tracing; | |
150 | int vmtp; | |
151 | int netname; | |
152 | int deltat; | |
153 | int tcp; | |
154 | int mem; | |
155 | } debug_t; | |
156 | ||
157 | typedef debug_t *debug_ptr_t; | |
158 | ||
159 | ||
160 | /* | |
161 | * Parameters record. | |
162 | */ | |
163 | typedef struct { | |
164 | int srr_max_tries; | |
165 | int srr_retry_sec; | |
166 | int srr_retry_usec; | |
167 | int deltat_max_tries; | |
168 | int deltat_retry_sec; | |
169 | int deltat_retry_usec; | |
170 | int deltat_msg_life; | |
171 | int pc_checkup_interval; | |
172 | int crypt_algorithm; | |
173 | int transport_default; | |
174 | int conf_network; | |
175 | int conf_netport; | |
176 | int timer_quantum; | |
177 | int tcp_conn_steady; | |
178 | int tcp_conn_opening; | |
179 | int tcp_conn_max; | |
180 | int compat; | |
181 | int syslog; | |
182 | int old_nmmonitor; | |
183 | } param_t; | |
184 | ||
185 | typedef param_t *param_ptr_t; | |
186 | ||
187 | ||
188 | /* | |
189 | * Port statistics record. | |
190 | */ | |
191 | typedef struct { | |
192 | u_int port_id; | |
193 | u_int alive; | |
194 | u_int nport_id_high; | |
195 | u_int nport_id_low; | |
196 | u_int nport_receiver; | |
197 | u_int nport_owner; | |
198 | u_int messages_sent; | |
199 | u_int messages_rcvd; | |
200 | u_int send_rights_sent; | |
201 | u_int send_rights_rcvd_sender; | |
202 | u_int send_rights_rcvd_recown; | |
203 | u_int rcv_rights_xferd; | |
204 | u_int own_rights_xferd; | |
205 | u_int all_rights_xferd; | |
206 | u_int tokens_sent; | |
207 | u_int tokens_requested; | |
208 | u_int xfer_hints_sent; | |
209 | u_int xfer_hints_rcvd; | |
210 | } port_stat_t, *port_stat_ptr_t; | |
211 | ||
212 | extern port_stat_ptr_t port_stat_cur; | |
213 | extern port_stat_ptr_t port_stat_end; | |
214 | extern struct mutex port_stat_lock; | |
215 | ||
216 | ||
217 | /* | |
218 | * Types for the mem_list operation. | |
219 | * | |
220 | * XXX These must be faked, because we cannot include mem.h here | |
221 | * (mutual includes). | |
222 | */ | |
223 | typedef char *mem_class_ptr_t; | |
224 | typedef char *mem_nam_ptr_t; | |
225 | typedef int *mem_bucket_ptr_t; | |
226 | ||
227 | ||
228 | /* | |
229 | * Definitions for print_level. | |
230 | */ | |
231 | #define LS_PRINT_NEVER 5 | |
232 | #define LS_PRINT_LOG 3 | |
233 | #define LS_PRINT_ALWAYS 0 | |
234 | ||
235 | #endif /* _LS_DEFS_ */ |