1 /* 2 * This header was generated from the Linux kernel headers by update_headers.py, 3 * to provide necessary information from kernel to userspace, such as constants, 4 * structures, and macros, and thus, contains no copyrightable information. 5 */ 6 #ifndef _UAPI_LINUX_MSG_H 7 #define _UAPI_LINUX_MSG_H 8 #include <linux/ipc.h> 9 #define MSG_STAT 11 10 #define MSG_INFO 12 11 #define MSG_STAT_ANY 13 12 #define MSG_NOERROR 010000 13 #define MSG_EXCEPT 020000 14 #define MSG_COPY 040000 15 struct __kernel_legacy_msqid_ds { 16 struct __kernel_legacy_ipc_perm msg_perm; 17 struct msg *msg_first; 18 struct msg *msg_last; 19 __kernel_time_t msg_stime; 20 __kernel_time_t msg_rtime; 21 __kernel_time_t msg_ctime; 22 unsigned long msg_lcbytes; 23 unsigned long msg_lqbytes; 24 unsigned short msg_cbytes; 25 unsigned short msg_qnum; 26 unsigned short msg_qbytes; 27 __kernel_ipc_pid_t msg_lspid; 28 __kernel_ipc_pid_t msg_lrpid; 29 }; 30 #include <asm/msgbuf.h> 31 struct msgbuf { 32 __kernel_long_t mtype; 33 char mtext[1]; 34 }; 35 struct msginfo { 36 int msgpool; 37 int msgmap; 38 int msgmax; 39 int msgmnb; 40 int msgmni; 41 int msgssz; 42 int msgtql; 43 unsigned short msgseg; 44 }; 45 #define MSGMNI 32000 46 #define MSGMAX 8192 47 #define MSGMNB 16384 48 #define MSGPOOL (MSGMNI * MSGMNB / 1024) 49 #define MSGTQL MSGMNB 50 #define MSGMAP MSGMNB 51 #define MSGSSZ 16 52 #define __MSGSEG ((MSGPOOL * 1024) / MSGSSZ) 53 #define MSGSEG (__MSGSEG <= 0xffff ? __MSGSEG : 0xffff) 54 #endif 55