]> git.saurik.com Git - apple/libc.git/blob - mach/servers/ls_defs.h
Libc-320.1.3.tar.gz
[apple/libc.git] / mach / servers / ls_defs.h
1 /*
2 * Copyright (c) 1999 Apple Computer, 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 * Mach Operating System
25 * Copyright (c) 1989 Carnegie-Mellon University
26 * Copyright (c) 1988 Carnegie-Mellon University
27 * Copyright (c) 1987 Carnegie-Mellon University
28 * All rights reserved. The CMU software License Agreement specifies
29 * the terms and conditions for use and redistribution.
30 */
31
32 /*
33 * Definitions for the logstat module.
34 */
35
36
37 #ifndef _LS_DEFS_
38 #define _LS_DEFS_
39
40 #include <sys/types.h>
41
42 /*
43 * Definition for a log record.
44 */
45 typedef struct {
46 long code;
47 long thread;
48 long a1;
49 long a2;
50 long a3;
51 long a4;
52 long a5;
53 long a6;
54 } log_rec_t;
55
56 typedef log_rec_t *log_ptr_t;
57
58 /*
59 * Statistics record.
60 */
61 typedef struct {
62 int datagram_pkts_sent;
63 int datagram_pkts_rcvd;
64 int srr_requests_sent;
65 int srr_bcasts_sent;
66 int srr_requests_rcvd;
67 int srr_bcasts_rcvd;
68 int srr_replies_sent;
69 int srr_replies_rcvd;
70 int srr_retries_sent;
71 int srr_retries_rcvd;
72 int srr_cfailures_sent;
73 int srr_cfailures_rcvd;
74 int deltat_dpkts_sent;
75 int deltat_acks_rcvd;
76 int deltat_dpkts_rcvd;
77 int deltat_acks_sent;
78 int deltat_oldpkts_rcvd;
79 int deltat_oospkts_rcvd;
80 int deltat_retries_sent;
81 int deltat_retries_rcvd;
82 int deltat_cfailures_sent;
83 int deltat_cfailures_rcvd;
84 int deltat_aborts_sent;
85 int deltat_aborts_rcvd;
86 int vmtp_requests_sent;
87 int vmtp_requests_rcvd;
88 int vmtp_replies_sent;
89 int vmtp_replies_rcvd;
90 int ipc_in_messages;
91 int ipc_out_messages;
92 int ipc_unblocks_sent;
93 int ipc_unblocks_rcvd;
94 int pc_requests_sent;
95 int pc_requests_rcvd;
96 int pc_replies_rcvd;
97 int pc_startups_rcvd;
98 int nn_requests_sent;
99 int nn_requests_rcvd;
100 int nn_replies_rcvd;
101 int po_ro_hints_sent;
102 int po_ro_hints_rcvd;
103 int po_token_requests_sent;
104 int po_token_requests_rcvd;
105 int po_token_replies_rcvd;
106 int po_xfer_requests_sent;
107 int po_xfer_requests_rcvd;
108 int po_xfer_replies_rcvd;
109 int po_deaths_sent;
110 int po_deaths_rcvd;
111 int ps_requests_sent;
112 int ps_requests_rcvd;
113 int ps_replies_rcvd;
114 int ps_auth_requests_sent;
115 int ps_auth_requests_rcvd;
116 int ps_auth_replies_rcvd;
117 int mallocs_or_vm_allocates;
118 int mem_allocs;
119 int mem_deallocs;
120 int mem_allocobjs;
121 int mem_deallocobjs;
122 int pkts_encrypted;
123 int pkts_decrypted;
124 int vmtp_segs_encrypted;
125 int vmtp_segs_decrypted;
126 int tcp_requests_sent;
127 int tcp_replies_sent;
128 int tcp_requests_rcvd;
129 int tcp_replies_rcvd;
130 int tcp_send;
131 int tcp_recv;
132 int tcp_connect;
133 int tcp_accept;
134 int tcp_close;
135 } stat_t;
136
137 typedef stat_t *stat_ptr_t;
138
139
140 /*
141 * Debugging flags record.
142 */
143 typedef struct {
144 int print_level;
145 int ipc_in;
146 int ipc_out;
147 int tracing;
148 int vmtp;
149 int netname;
150 int deltat;
151 int tcp;
152 int mem;
153 } debug_t;
154
155 typedef debug_t *debug_ptr_t;
156
157
158 /*
159 * Parameters record.
160 */
161 typedef struct {
162 int srr_max_tries;
163 int srr_retry_sec;
164 int srr_retry_usec;
165 int deltat_max_tries;
166 int deltat_retry_sec;
167 int deltat_retry_usec;
168 int deltat_msg_life;
169 int pc_checkup_interval;
170 int crypt_algorithm;
171 int transport_default;
172 int conf_network;
173 int conf_netport;
174 int timer_quantum;
175 int tcp_conn_steady;
176 int tcp_conn_opening;
177 int tcp_conn_max;
178 int compat;
179 int syslog;
180 int old_nmmonitor;
181 } param_t;
182
183 typedef param_t *param_ptr_t;
184
185
186 /*
187 * Port statistics record.
188 */
189 typedef struct {
190 u_int port_id;
191 u_int alive;
192 u_int nport_id_high;
193 u_int nport_id_low;
194 u_int nport_receiver;
195 u_int nport_owner;
196 u_int messages_sent;
197 u_int messages_rcvd;
198 u_int send_rights_sent;
199 u_int send_rights_rcvd_sender;
200 u_int send_rights_rcvd_recown;
201 u_int rcv_rights_xferd;
202 u_int own_rights_xferd;
203 u_int all_rights_xferd;
204 u_int tokens_sent;
205 u_int tokens_requested;
206 u_int xfer_hints_sent;
207 u_int xfer_hints_rcvd;
208 } port_stat_t, *port_stat_ptr_t;
209
210 extern port_stat_ptr_t port_stat_cur;
211 extern port_stat_ptr_t port_stat_end;
212 extern struct mutex port_stat_lock;
213
214
215 /*
216 * Types for the mem_list operation.
217 *
218 * XXX These must be faked, because we cannot include mem.h here
219 * (mutual includes).
220 */
221 typedef char *mem_class_ptr_t;
222 typedef char *mem_nam_ptr_t;
223 typedef int *mem_bucket_ptr_t;
224
225
226 /*
227 * Definitions for print_level.
228 */
229 #define LS_PRINT_NEVER 5
230 #define LS_PRINT_LOG 3
231 #define LS_PRINT_ALWAYS 0
232
233 #endif /* _LS_DEFS_ */