1283424Sdchagin/*-
2283424Sdchagin * Copyright (c) 2002 Maxim Sobolev <sobomax@FreeBSD.org>
3283424Sdchagin * All rights reserved.
4283424Sdchagin *
5283424Sdchagin * Redistribution and use in source and binary forms, with or without
6283424Sdchagin * modification, are permitted provided that the following conditions
7283424Sdchagin * are met:
8283424Sdchagin * 1. Redistributions of source code must retain the above copyright
9283424Sdchagin *    notice, this list of conditions and the following disclaimer
10283424Sdchagin *    in this position and unchanged.
11283424Sdchagin * 2. Redistributions in binary form must reproduce the above copyright
12283424Sdchagin *    notice, this list of conditions and the following disclaimer in the
13283424Sdchagin *    documentation and/or other materials provided with the distribution.
14283424Sdchagin * 3. The name of the author may not be used to endorse or promote products
15283424Sdchagin *    derived from this software without specific prior written permission
16283424Sdchagin *
17283424Sdchagin * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
18283424Sdchagin * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
19283424Sdchagin * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
20283424Sdchagin * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
21283424Sdchagin * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
22283424Sdchagin * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
23283424Sdchagin * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
24283424Sdchagin * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
25283424Sdchagin * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
26283424Sdchagin * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
27283424Sdchagin *
28283424Sdchagin * $FreeBSD: releng/10.3/sys/amd64/linux/linux_ipc64.h 283424 2015-05-24 16:07:11Z dchagin $
29283424Sdchagin */
30283424Sdchagin
31283424Sdchagin#ifndef _AMD64_LINUX_LINUX_IPC64_H_
32283424Sdchagin#define	_AMD64_LINUX_LINUX_IPC64_H_
33283424Sdchagin
34283424Sdchagin/*
35283424Sdchagin * The ipc64_perm structure for i386 architecture.
36283424Sdchagin * Note extra padding because this structure is passed back and forth
37283424Sdchagin * between kernel and user space.
38283424Sdchagin *
39283424Sdchagin * Pad space is left for:
40283424Sdchagin * - 32-bit mode_t and seq
41283424Sdchagin * - 2 miscellaneous 32-bit values
42283424Sdchagin */
43283424Sdchagin
44283424Sdchaginstruct l_ipc64_perm
45283424Sdchagin{
46283424Sdchagin	l_key_t		key;
47283424Sdchagin	l_uid_t		uid;
48283424Sdchagin	l_gid_t		gid;
49283424Sdchagin	l_uid_t		cuid;
50283424Sdchagin	l_gid_t		cgid;
51283424Sdchagin	l_mode_t	mode;
52283424Sdchagin	l_ushort	__pad1;
53283424Sdchagin	l_ushort	seq;
54283424Sdchagin	l_ushort	__pad2;
55283424Sdchagin	l_ulong		__unused1;
56283424Sdchagin	l_ulong		__unused2;
57283424Sdchagin};
58283424Sdchagin
59283424Sdchagin/*
60283424Sdchagin * The msqid64_ds structure for i386 architecture.
61283424Sdchagin * Note extra padding because this structure is passed back and forth
62283424Sdchagin * between kernel and user space.
63283424Sdchagin *
64283424Sdchagin * Pad space is left for:
65283424Sdchagin * - 64-bit time_t to solve y2038 problem
66283424Sdchagin * - 2 miscellaneous 32-bit values
67283424Sdchagin */
68283424Sdchagin
69283424Sdchaginstruct l_msqid64_ds {
70283424Sdchagin	struct l_ipc64_perm msg_perm;
71283424Sdchagin	l_time_t	msg_stime;	/* last msgsnd time */
72283424Sdchagin	l_ulong		__unused1;
73283424Sdchagin	l_time_t	msg_rtime;	/* last msgrcv time */
74283424Sdchagin	l_ulong		__unused2;
75283424Sdchagin	l_time_t	msg_ctime;	/* last change time */
76283424Sdchagin	l_ulong		__unused3;
77283424Sdchagin	l_ulong		msg_cbytes;	/* current number of bytes on queue */
78283424Sdchagin	l_ulong		msg_qnum;	/* number of messages in queue */
79283424Sdchagin	l_ulong		msg_qbytes;	/* max number of bytes on queue */
80283424Sdchagin	l_pid_t		msg_lspid;	/* pid of last msgsnd */
81283424Sdchagin	l_pid_t		msg_lrpid;	/* last receive pid */
82283424Sdchagin	l_ulong		__unused4;
83283424Sdchagin	l_ulong		__unused5;
84283424Sdchagin};
85283424Sdchagin
86283424Sdchagin/*
87283424Sdchagin * The semid64_ds structure for i386 architecture.
88283424Sdchagin * Note extra padding because this structure is passed back and forth
89283424Sdchagin * between kernel and user space.
90283424Sdchagin *
91283424Sdchagin * Pad space is left for:
92283424Sdchagin * - 64-bit time_t to solve y2038 problem
93283424Sdchagin * - 2 miscellaneous 32-bit values
94283424Sdchagin */
95283424Sdchagin
96283424Sdchaginstruct l_semid64_ds {
97283424Sdchagin	struct l_ipc64_perm sem_perm;	/* permissions */
98283424Sdchagin	l_time_t	sem_otime;	/* last semop time */
99283424Sdchagin	l_ulong		__unused1;
100283424Sdchagin	l_time_t	sem_ctime;	/* last change time */
101283424Sdchagin	l_ulong		__unused2;
102283424Sdchagin	l_ulong		sem_nsems;	/* no. of semaphores in array */
103283424Sdchagin	l_ulong		__unused3;
104283424Sdchagin	l_ulong		__unused4;
105283424Sdchagin};
106283424Sdchagin
107283424Sdchagin/*
108283424Sdchagin * The shmid64_ds structure for i386 architecture.
109283424Sdchagin * Note extra padding because this structure is passed back and forth
110283424Sdchagin * between kernel and user space.
111283424Sdchagin *
112283424Sdchagin * Pad space is left for:
113283424Sdchagin * - 64-bit time_t to solve y2038 problem
114283424Sdchagin * - 2 miscellaneous 32-bit values
115283424Sdchagin */
116283424Sdchagin
117283424Sdchaginstruct l_shmid64_ds {
118283424Sdchagin	struct l_ipc64_perm shm_perm;	/* operation perms */
119283424Sdchagin	l_size_t	shm_segsz;	/* size of segment (bytes) */
120283424Sdchagin	l_time_t	shm_atime;	/* last attach time */
121283424Sdchagin	l_time_t	shm_dtime;	/* last detach time */
122283424Sdchagin	l_time_t	shm_ctime;	/* last change time */
123283424Sdchagin	l_pid_t		shm_cpid;	/* pid of creator */
124283424Sdchagin	l_pid_t		shm_lpid;	/* pid of last operator */
125283424Sdchagin	l_ulong		shm_nattch;	/* no. of current attaches */
126283424Sdchagin	l_ulong		__unused4;
127283424Sdchagin	l_ulong		__unused5;
128283424Sdchagin};
129283424Sdchagin
130283424Sdchaginstruct l_shminfo64 {
131283424Sdchagin	l_ulong		shmmax;
132283424Sdchagin	l_ulong		shmmin;
133283424Sdchagin	l_ulong		shmmni;
134283424Sdchagin	l_ulong		shmseg;
135283424Sdchagin	l_ulong		shmall;
136283424Sdchagin	l_ulong   	__unused1;
137283424Sdchagin	l_ulong		__unused2;
138283424Sdchagin	l_ulong		__unused3;
139283424Sdchagin	l_ulong		__unused4;
140283424Sdchagin};
141283424Sdchagin
142283424Sdchagin#endif /* !_AMD64_LINUX_LINUX_IPC64_H_ */
143