/*****************************************************************************
* 	Project 	: Network Based Message Queue System		    **
*	Course		: CIS 650 - Software Engineering		    **
*	Location 	: ~sameer/cis650/proj/cl                 	    **
*	File		: shutdown.cc       	       			    **
*	Description 	: program to shutdown the message queue 	    **
*****************************************************************************/

#include <iostream.h>
#include "uai.h"
#include <sys/ipc.h>
#include <sys/msg.h>

struct nmsgbuf *ptr;

main()
{
  int msqid, n1, n2, clientID;
  nmsqid_ds *request;

  msqid = nmsgget(1001, 0666);

  clientID = ngetownid();

  ptr = new nmsgbuf;

  request = new nmsqid_ds;

  nmsgctl(msqid, IPC_RMID, request);
  exit(0);
}



