]> git.saurik.com Git - apple/xnu.git/blame - bsd/sys/ipcs.h
xnu-792.25.20.tar.gz
[apple/xnu.git] / bsd / sys / ipcs.h
CommitLineData
91447636
A
1/*
2 * Copyright (c) 2004-2005 Apple Computer, Inc. All rights reserved.
3 *
6601e61a 4 * @APPLE_LICENSE_HEADER_START@
91447636 5 *
6601e61a
A
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.
8f6c56a5 11 *
6601e61a
A
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
8f6c56a5
A
14 * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
15 * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
6601e61a
A
16 * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT. Please see the
17 * License for the specific language governing rights and limitations
18 * under the License.
8f6c56a5 19 *
6601e61a 20 * @APPLE_LICENSE_HEADER_END@
91447636
A
21 */
22/*
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.
26 */
27
28#ifndef _SYS_IPCS_H_
29#define _SYS_IPCS_H_
30
31#include <sys/appleapiopts.h>
32#include <sys/cdefs.h>
33
34#define IPCS_MAGIC 0x00000001 /* Version */
35
36/*
37 * IPCS_command
38 *
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.
43 */
44
45struct IPCS_command {
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 */
51};
52
53#ifdef KERNEL_PRIVATE
54#include <machine/types.h>
55
91447636
A
56struct 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 */
62};
63
91447636
A
64#endif /* KERNEL_PRIVATE */
65
66/*
67 * OP code values for 'ipcs_op'
68 */
69#define IPCS_SHM_CONF 0x00000001 /* Obtain shared memory config */
70#define IPCS_SHM_ITER 0x00000002 /* Iterate shared memory info */
71
72#define IPCS_SEM_CONF 0x00000010 /* Obtain semaphore config */
73#define IPCS_SEM_ITER 0x00000020 /* Iterate semaphore info */
74
75#define IPCS_MSG_CONF 0x00000100 /* Obtain message queue config */
76#define IPCS_MSG_ITER 0x00000200 /* Iterate message queue info */
77
78/*
79 * Sysctl oid name values
80 */
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"
84
85
86#endif /* _SYS_IPCS_H_ */