1104893Ssobomax/*- 2104893Ssobomax * Copyright (c) 2002 Maxim Sobolev <sobomax@FreeBSD.org> 3104893Ssobomax * All rights reserved. 4104893Ssobomax * 5104893Ssobomax * Redistribution and use in source and binary forms, with or without 6104893Ssobomax * modification, are permitted provided that the following conditions 7104893Ssobomax * are met: 8104893Ssobomax * 1. Redistributions of source code must retain the above copyright 9104893Ssobomax * notice, this list of conditions and the following disclaimer 10104893Ssobomax * in this position and unchanged. 11104893Ssobomax * 2. Redistributions in binary form must reproduce the above copyright 12104893Ssobomax * notice, this list of conditions and the following disclaimer in the 13104893Ssobomax * documentation and/or other materials provided with the distribution. 14104893Ssobomax * 3. The name of the author may not be used to endorse or promote products 15104893Ssobomax * derived from this software without specific prior written permission 16104893Ssobomax * 17104893Ssobomax * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR 18104893Ssobomax * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 19104893Ssobomax * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 20104893Ssobomax * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, 21104893Ssobomax * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 22104893Ssobomax * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 23104893Ssobomax * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 24104893Ssobomax * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 25104893Ssobomax * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 26104893Ssobomax * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 27104893Ssobomax * 28104893Ssobomax * $FreeBSD$ 29104893Ssobomax */ 30104893Ssobomax 31104893Ssobomax#ifndef _I386_LINUX_LINUX_IPC64_H_ 32104893Ssobomax#define _I386_LINUX_LINUX_IPC64_H_ 33104893Ssobomax 34104893Ssobomax/* 35104893Ssobomax * The ipc64_perm structure for i386 architecture. 36104893Ssobomax * Note extra padding because this structure is passed back and forth 37104893Ssobomax * between kernel and user space. 38104893Ssobomax * 39104893Ssobomax * Pad space is left for: 40104893Ssobomax * - 32-bit mode_t and seq 41104893Ssobomax * - 2 miscellaneous 32-bit values 42104893Ssobomax */ 43104893Ssobomax 44104893Ssobomaxstruct l_ipc64_perm 45104893Ssobomax{ 46104893Ssobomax l_key_t key; 47104893Ssobomax l_uid_t uid; 48104893Ssobomax l_gid_t gid; 49104893Ssobomax l_uid_t cuid; 50104893Ssobomax l_gid_t cgid; 51104893Ssobomax l_mode_t mode; 52104893Ssobomax l_ushort __pad1; 53104893Ssobomax l_ushort seq; 54104893Ssobomax l_ushort __pad2; 55104893Ssobomax l_ulong __unused1; 56104893Ssobomax l_ulong __unused2; 57104893Ssobomax}; 58104893Ssobomax 59104893Ssobomax/* 60104893Ssobomax * The msqid64_ds structure for i386 architecture. 61104893Ssobomax * Note extra padding because this structure is passed back and forth 62104893Ssobomax * between kernel and user space. 63104893Ssobomax * 64104893Ssobomax * Pad space is left for: 65104893Ssobomax * - 64-bit time_t to solve y2038 problem 66104893Ssobomax * - 2 miscellaneous 32-bit values 67104893Ssobomax */ 68104893Ssobomax 69104893Ssobomaxstruct l_msqid64_ds { 70104893Ssobomax struct l_ipc64_perm msg_perm; 71104893Ssobomax l_time_t msg_stime; /* last msgsnd time */ 72104893Ssobomax l_ulong __unused1; 73104893Ssobomax l_time_t msg_rtime; /* last msgrcv time */ 74104893Ssobomax l_ulong __unused2; 75104893Ssobomax l_time_t msg_ctime; /* last change time */ 76104893Ssobomax l_ulong __unused3; 77104893Ssobomax l_ulong msg_cbytes; /* current number of bytes on queue */ 78104893Ssobomax l_ulong msg_qnum; /* number of messages in queue */ 79104893Ssobomax l_ulong msg_qbytes; /* max number of bytes on queue */ 80104893Ssobomax l_pid_t msg_lspid; /* pid of last msgsnd */ 81104893Ssobomax l_pid_t msg_lrpid; /* last receive pid */ 82104893Ssobomax l_ulong __unused4; 83104893Ssobomax l_ulong __unused5; 84104893Ssobomax}; 85104893Ssobomax 86104893Ssobomax/* 87104893Ssobomax * The semid64_ds structure for i386 architecture. 88104893Ssobomax * Note extra padding because this structure is passed back and forth 89104893Ssobomax * between kernel and user space. 90104893Ssobomax * 91104893Ssobomax * Pad space is left for: 92104893Ssobomax * - 64-bit time_t to solve y2038 problem 93104893Ssobomax * - 2 miscellaneous 32-bit values 94104893Ssobomax */ 95104893Ssobomax 96104893Ssobomaxstruct l_semid64_ds { 97104893Ssobomax struct l_ipc64_perm sem_perm; /* permissions */ 98104893Ssobomax l_time_t sem_otime; /* last semop time */ 99104893Ssobomax l_ulong __unused1; 100104893Ssobomax l_time_t sem_ctime; /* last change time */ 101104893Ssobomax l_ulong __unused2; 102104893Ssobomax l_ulong sem_nsems; /* no. of semaphores in array */ 103104893Ssobomax l_ulong __unused3; 104104893Ssobomax l_ulong __unused4; 105104893Ssobomax}; 106104893Ssobomax 107104893Ssobomax/* 108104893Ssobomax * The shmid64_ds structure for i386 architecture. 109104893Ssobomax * Note extra padding because this structure is passed back and forth 110104893Ssobomax * between kernel and user space. 111104893Ssobomax * 112104893Ssobomax * Pad space is left for: 113104893Ssobomax * - 64-bit time_t to solve y2038 problem 114104893Ssobomax * - 2 miscellaneous 32-bit values 115104893Ssobomax */ 116104893Ssobomax 117104893Ssobomaxstruct l_shmid64_ds { 118104893Ssobomax struct l_ipc64_perm shm_perm; /* operation perms */ 119104893Ssobomax l_size_t shm_segsz; /* size of segment (bytes) */ 120104893Ssobomax l_time_t shm_atime; /* last attach time */ 121104893Ssobomax l_ulong __unused1; 122104893Ssobomax l_time_t shm_dtime; /* last detach time */ 123104893Ssobomax l_ulong __unused2; 124104893Ssobomax l_time_t shm_ctime; /* last change time */ 125104893Ssobomax l_ulong __unused3; 126104893Ssobomax l_pid_t shm_cpid; /* pid of creator */ 127104893Ssobomax l_pid_t shm_lpid; /* pid of last operator */ 128104893Ssobomax l_ulong shm_nattch; /* no. of current attaches */ 129104893Ssobomax l_ulong __unused4; 130104893Ssobomax l_ulong __unused5; 131104893Ssobomax}; 132104893Ssobomax 133104893Ssobomaxstruct l_shminfo64 { 134104893Ssobomax l_ulong shmmax; 135104893Ssobomax l_ulong shmmin; 136104893Ssobomax l_ulong shmmni; 137104893Ssobomax l_ulong shmseg; 138104893Ssobomax l_ulong shmall; 139104893Ssobomax l_ulong __unused1; 140104893Ssobomax l_ulong __unused2; 141104893Ssobomax l_ulong __unused3; 142104893Ssobomax l_ulong __unused4; 143104893Ssobomax}; 144104893Ssobomax 145104893Ssobomax#endif /* !_I386_LINUX_LINUX_IPC64_H_ */ 146