]>
git.saurik.com Git - apple/xnu.git/blob - bsd/sys/ipcs.h
2 * Copyright (c) 2004-2005 Apple Computer, Inc. All rights reserved.
4 * @APPLE_LICENSE_HEADER_START@
6 * The contents of this file constitute Original Code as defined in and
7 * are subject to the Apple Public Source License Version 1.1 (the
8 * "License"). You may not use this file except in compliance with the
9 * License. Please obtain a copy of the License at
10 * http://www.apple.com/publicsource and read it before using this file.
12 * This Original Code and all software distributed under the License are
13 * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
14 * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
15 * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
16 * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT. Please see the
17 * License for the specific language governing rights and limitations
20 * @APPLE_LICENSE_HEADER_END@
23 * NOTE: Internal ipcs.h header; all interfaces are private; if you want this
24 * same information from your own program, popen(3) the ipcs(2) command and
25 * parse its output, or your program may not work on future OS releases.
31 #include <sys/appleapiopts.h>
32 #include <sys/cdefs.h>
34 #define IPCS_MAGIC 0x00000001 /* Version */
39 * This is the IPCS command structure used for obtaining status about the
40 * System V IPC mechanisms. All other operations are based on the per
41 * subsystem (shm, msg, ipc) *ctl entry point, which can be called once
42 * this information is known.
46 int ipcs_magic
; /* Magic number for struct layout */
47 int ipcs_op
; /* Operation to perform */
48 int ipcs_cursor
; /* Cursor for iteration functions */
49 int ipcs_datalen
; /* Length of ipcs_data area */
50 void *ipcs_data
; /* OP specific data */
54 #include <machine/types.h>
56 struct user_IPCS_command
{
57 int ipcs_magic
; /* Magic number for struct layout */
58 int ipcs_op
; /* Operation to perform */
59 int ipcs_cursor
; /* Cursor for iteration functions */
60 int ipcs_datalen
; /* Length of ipcs_data area */
61 user_addr_t ipcs_data
; /* OP specific data */
64 #endif /* KERNEL_PRIVATE */
67 * OP code values for 'ipcs_op'
69 #define IPCS_SHM_CONF 0x00000001 /* Obtain shared memory config */
70 #define IPCS_SHM_ITER 0x00000002 /* Iterate shared memory info */
72 #define IPCS_SEM_CONF 0x00000010 /* Obtain semaphore config */
73 #define IPCS_SEM_ITER 0x00000020 /* Iterate semaphore info */
75 #define IPCS_MSG_CONF 0x00000100 /* Obtain message queue config */
76 #define IPCS_MSG_ITER 0x00000200 /* Iterate message queue info */
79 * Sysctl oid name values
81 #define IPCS_SHM_SYSCTL "kern.sysv.ipcs.shm"
82 #define IPCS_SEM_SYSCTL "kern.sysv.ipcs.sem"
83 #define IPCS_MSG_SYSCTL "kern.sysv.ipcs.msg"
86 #endif /* _SYS_IPCS_H_ */