linux/include/uapi/linux/msg.h

/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
#ifndef _UAPI_LINUX_MSG_H
#define _UAPI_LINUX_MSG_H

#include <linux/ipc.h>

/* ipcs ctl commands */
#define MSG_STAT
#define MSG_INFO
#define MSG_STAT_ANY

/* msgrcv options */
#define MSG_NOERROR
#define MSG_EXCEPT
#define MSG_COPY

/* Obsolete, used only for backwards compatibility and libc5 compiles */
struct msqid_ds {};

/* Include the definition of msqid64_ds */
#include <asm/msgbuf.h>

/* message buffer for msgsnd and msgrcv calls */
struct msgbuf {};

/* buffer for msgctl calls IPC_INFO, MSG_INFO */
struct msginfo {};

/*
 * MSGMNI, MSGMAX and MSGMNB are default values which can be
 * modified by sysctl.
 *
 * MSGMNI is the upper limit for the number of messages queues per
 * namespace.
 * It has been chosen to be as large possible without facilitating
 * scenarios where userspace causes overflows when adjusting the limits via
 * operations of the form retrieve current limit; add X; update limit".
 *
 * MSGMNB is the default size of a new message queue. Non-root tasks can
 * decrease the size with msgctl(IPC_SET), root tasks
 * (actually: CAP_SYS_RESOURCE) can both increase and decrease the queue
 * size. The optimal value is application dependent.
 * 16384 is used because it was always used (since 0.99.10)
 *
 * MAXMAX is the maximum size of an individual message, it's a global
 * (per-namespace) limit that applies for all message queues.
 * It's set to 1/2 of MSGMNB, to ensure that at least two messages fit into
 * the queue. This is also an arbitrary choice (since 2.6.0).
 */

#define MSGMNI
#define MSGMAX
#define MSGMNB

/* unused */
#define MSGPOOL
#define MSGTQL
#define MSGMAP
#define MSGSSZ
#define __MSGSEG
#define MSGSEG


#endif /* _UAPI_LINUX_MSG_H */