*
* Copyright (c) International Business Machines Corp., 2001
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See
* the GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
* ipcmsg.h - common definitions for the IPC message tests.
*/
#ifndef __IPCMSG_H
#define __IPCMSG_H 1
#include <errno.h>
#include <sys/ipc.h>
#include <sys/msg.h>
#include <sys/types.h>
#include "test.h"
void cleanup(void);
void setup(void);
#define MSG_RD 0400
#define MSG_WR 0200
#define MSG_RW MSG_RD | MSG_WR
#define MSGSIZE 1024
#define MSGTYPE 1
#define NR_MSGQUEUES 16
typedef struct mbuf {
long mtype;
char mtext[MSGSIZE + 1];
} MSGBUF;
#ifdef LIBIPC
key_t msgkey;
#else
extern key_t msgkey;
#endif
void init_buf(MSGBUF *, int, int);
void rm_queue(int);
key_t getipckey();
int getuserid(char *);
int get_max_msgqueues(void);
int get_used_msgqueues(void);
#endif