]>
git.saurik.com Git - apple/xnu.git/blob - bsd/sys/ipcs.h
d0e0b543ce4be6293fc791001cae5f19ebe72d5a
2 * Copyright (c) 2004-2005 Apple Computer, Inc. All rights reserved.
4 * @APPLE_LICENSE_OSREFERENCE_HEADER_START@
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. The rights granted to you under the
10 * License may not be used to create, or enable the creation or
11 * redistribution of, unlawful or unlicensed copies of an Apple operating
12 * system, or to circumvent, violate, or enable the circumvention or
13 * violation of, any terms of an Apple operating system software license
16 * Please obtain a copy of the License at
17 * http://www.opensource.apple.com/apsl/ and read it before using this
20 * The Original Code and all software distributed under the License are
21 * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
22 * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
23 * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
24 * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
25 * Please see the License for the specific language governing rights and
26 * limitations under the License.
28 * @APPLE_LICENSE_OSREFERENCE_HEADER_END@
31 * NOTE: Internal ipcs.h header; all interfaces are private; if you want this
32 * same information from your own program, popen(3) the ipcs(2) command and
33 * parse its output, or your program may not work on future OS releases.
39 #include <sys/appleapiopts.h>
40 #include <sys/cdefs.h>
42 #define IPCS_MAGIC 0x00000001 /* Version */
47 * This is the IPCS command structure used for obtaining status about the
48 * System V IPC mechanisms. All other operations are based on the per
49 * subsystem (shm, msg, ipc) *ctl entry point, which can be called once
50 * this information is known.
54 int ipcs_magic
; /* Magic number for struct layout */
55 int ipcs_op
; /* Operation to perform */
56 int ipcs_cursor
; /* Cursor for iteration functions */
57 int ipcs_datalen
; /* Length of ipcs_data area */
58 void *ipcs_data
; /* OP specific data */
62 #include <machine/types.h>
64 #if __DARWIN_ALIGN_NATURAL
65 #pragma options align=natural
68 struct user_IPCS_command
{
69 int ipcs_magic
; /* Magic number for struct layout */
70 int ipcs_op
; /* Operation to perform */
71 int ipcs_cursor
; /* Cursor for iteration functions */
72 int ipcs_datalen
; /* Length of ipcs_data area */
73 user_addr_t ipcs_data
; /* OP specific data */
76 #if __DARWIN_ALIGN_NATURAL
77 #pragma options align=reset
80 #endif /* KERNEL_PRIVATE */
83 * OP code values for 'ipcs_op'
85 #define IPCS_SHM_CONF 0x00000001 /* Obtain shared memory config */
86 #define IPCS_SHM_ITER 0x00000002 /* Iterate shared memory info */
88 #define IPCS_SEM_CONF 0x00000010 /* Obtain semaphore config */
89 #define IPCS_SEM_ITER 0x00000020 /* Iterate semaphore info */
91 #define IPCS_MSG_CONF 0x00000100 /* Obtain message queue config */
92 #define IPCS_MSG_ITER 0x00000200 /* Iterate message queue info */
95 * Sysctl oid name values
97 #define IPCS_SHM_SYSCTL "kern.sysv.ipcs.shm"
98 #define IPCS_SEM_SYSCTL "kern.sysv.ipcs.sem"
99 #define IPCS_MSG_SYSCTL "kern.sysv.ipcs.msg"
102 #endif /* _SYS_IPCS_H_ */