darwin-xnu/bsd/sys/ipcs.h
<<
>>
Prefs
   1/*
   2 * Copyright (c) 2004-2005 Apple Computer, Inc. All rights reserved.
   3 *
   4 * @APPLE_LICENSE_HEADER_START@
   5 * 
   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.
  11 * 
  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
  18 * under the License.
  19 * 
  20 * @APPLE_LICENSE_HEADER_END@
  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
  56#if __DARWIN_ALIGN_NATURAL
  57#pragma options align=natural
  58#endif
  59
  60struct user_IPCS_command {
  61        int             ipcs_magic;     /* Magic number for struct layout */
  62        int             ipcs_op;        /* Operation to perform */
  63        int             ipcs_cursor;    /* Cursor for iteration functions */
  64        int             ipcs_datalen;   /* Length of ipcs_data area */
  65        user_addr_t     ipcs_data;      /* OP specific data */
  66};
  67
  68#if __DARWIN_ALIGN_NATURAL
  69#pragma options align=reset
  70#endif
  71
  72#endif /* KERNEL_PRIVATE */
  73
  74/*
  75 * OP code values for 'ipcs_op'
  76 */
  77#define IPCS_SHM_CONF   0x00000001      /* Obtain shared memory config */
  78#define IPCS_SHM_ITER   0x00000002      /* Iterate shared memory info */
  79
  80#define IPCS_SEM_CONF   0x00000010      /* Obtain semaphore config */
  81#define IPCS_SEM_ITER   0x00000020      /* Iterate semaphore info */
  82
  83#define IPCS_MSG_CONF   0x00000100      /* Obtain message queue config */
  84#define IPCS_MSG_ITER   0x00000200      /* Iterate message queue info */
  85
  86/*
  87 * Sysctl oid name values
  88 */
  89#define IPCS_SHM_SYSCTL "kern.sysv.ipcs.shm"
  90#define IPCS_SEM_SYSCTL "kern.sysv.ipcs.sem"
  91#define IPCS_MSG_SYSCTL "kern.sysv.ipcs.msg"
  92
  93
  94#endif  /* _SYS_IPCS_H_ */
  95
lxr.linux.no kindly hosted by Redpill Linpro AS, provider of Linux consulting and operations services since 1995.