diff options
| author | Greg Kroah-Hartman <greg@kroah.com> | 2002-07-14 22:51:26 -0700 |
|---|---|---|
| committer | Greg Kroah-Hartman <greg@kroah.com> | 2002-07-14 22:51:26 -0700 |
| commit | daf90caf6ff25de4e24decd05a4e46b84eae1a54 (patch) | |
| tree | a052c6311de541506f99dc99a19d19c2abe7ba4b /include/linux/msg.h | |
| parent | 182147c1e9cae403852ec2e1107fe62b390012be (diff) | |
LSM: move the struct msg_msg and struct msg_queue definitions out of the msg.c file to the msg.h file
Also move where the msg->q_perm.mode and .key values get set to before
ipc_addid() gets called to make placing a hook there easier.
Diffstat (limited to 'include/linux/msg.h')
| -rw-r--r-- | include/linux/msg.h | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/include/linux/msg.h b/include/linux/msg.h index 4dfca8d4952c..4b64aebf312e 100644 --- a/include/linux/msg.h +++ b/include/linux/msg.h @@ -63,6 +63,35 @@ struct msginfo { #ifdef __KERNEL__ +/* one msg_msg structure for each message */ +struct msg_msg { + struct list_head m_list; + long m_type; + int m_ts; /* message text size */ + struct msg_msgseg* next; + /* the actual message follows immediately */ +}; + +#define DATALEN_MSG (PAGE_SIZE-sizeof(struct msg_msg)) +#define DATALEN_SEG (PAGE_SIZE-sizeof(struct msg_msgseg)) + +/* one msq_queue structure for each present queue on the system */ +struct msg_queue { + struct kern_ipc_perm q_perm; + time_t q_stime; /* last msgsnd time */ + time_t q_rtime; /* last msgrcv time */ + time_t q_ctime; /* last change time */ + unsigned long q_cbytes; /* current number of bytes on queue */ + unsigned long q_qnum; /* number of messages in queue */ + unsigned long q_qbytes; /* max number of bytes on queue */ + pid_t q_lspid; /* pid of last msgsnd */ + pid_t q_lrpid; /* last receive pid */ + + struct list_head q_messages; + struct list_head q_receivers; + struct list_head q_senders; +}; + asmlinkage long sys_msgget (key_t key, int msgflg); asmlinkage long sys_msgsnd (int msqid, struct msgbuf *msgp, size_t msgsz, int msgflg); asmlinkage long sys_msgrcv (int msqid, struct msgbuf *msgp, size_t msgsz, long msgtyp, int msgflg); |
