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