]> git.saurik.com Git - apple/xnu.git/blame - bsd/sys/ipcs.h
xnu-6153.41.3.tar.gz
[apple/xnu.git] / bsd / sys / ipcs.h
CommitLineData
91447636 1/*
2d21ac55 2 * Copyright (c) 2004-2006 Apple Computer, Inc. All rights reserved.
91447636 3 *
2d21ac55 4 * @APPLE_OSREFERENCE_LICENSE_HEADER_START@
0a7de745 5 *
2d21ac55
A
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.
0a7de745 14 *
2d21ac55
A
15 * Please obtain a copy of the License at
16 * http://www.opensource.apple.com/apsl/ and read it before using this file.
0a7de745 17 *
2d21ac55
A
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
8f6c56a5
A
20 * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
21 * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
2d21ac55
A
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.
0a7de745 25 *
2d21ac55 26 * @APPLE_OSREFERENCE_LICENSE_HEADER_END@
91447636
A
27 */
28/*
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.
32 */
33
34#ifndef _SYS_IPCS_H_
35#define _SYS_IPCS_H_
36
37#include <sys/appleapiopts.h>
38#include <sys/cdefs.h>
39
0a7de745 40#define IPCS_MAGIC 0x00000001 /* Version */
91447636
A
41
42/*
43 * IPCS_command
44 *
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.
49 */
50
51struct IPCS_command {
0a7de745
A
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 */
91447636
A
57};
58
59#ifdef KERNEL_PRIVATE
60#include <machine/types.h>
61
91447636 62struct user_IPCS_command {
0a7de745
A
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 */
91447636
A
68};
69
b0d623f7 70struct user32_IPCS_command {
0a7de745
A
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 */
b0d623f7
A
76};
77
91447636
A
78#endif /* KERNEL_PRIVATE */
79
80/*
81 * OP code values for 'ipcs_op'
82 */
0a7de745
A
83#define IPCS_SHM_CONF 0x00000001 /* Obtain shared memory config */
84#define IPCS_SHM_ITER 0x00000002 /* Iterate shared memory info */
91447636 85
0a7de745
A
86#define IPCS_SEM_CONF 0x00000010 /* Obtain semaphore config */
87#define IPCS_SEM_ITER 0x00000020 /* Iterate semaphore info */
91447636 88
0a7de745
A
89#define IPCS_MSG_CONF 0x00000100 /* Obtain message queue config */
90#define IPCS_MSG_ITER 0x00000200 /* Iterate message queue info */
91447636
A
91
92/*
93 * Sysctl oid name values
94 */
0a7de745
A
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"
91447636
A
98
99
0a7de745 100#endif /* _SYS_IPCS_H_ */