home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Club Amiga de Montreal - CAM
/
CAM_CD_1.iso
/
files
/
164.lha
/
IPC
/
Sources
/
IPCPorts.h
< prev
next >
Wrap
C/C++ Source or Header
|
1988-04-28
|
4KB
|
98 lines
#ifndef IPC_PORTS_H
#define IPC_PORTS_H
/*** include this BEFORE IPC.H (if required) ***/
/*******************************************************************
* *
* IPCPorts.h *
* *
* Inter-Process-Communication Port Format *
* *
* Release 1.2 -- 1988 July 22 *
* *
* Copyright 1988 Peter Goodeve *
* *
* This source is freely distributable, and may be used freely *
* in any program, but the structures should not be modified *
* without prior consultation with the author. (This is just to * *
* prevent proliferation of incompatible variants. Don't be *
* inhibited from suggesting enhancements!) *
* *
*******************************************************************/
/*******************************************************************
* *
* 88:7:22 ipp_BrokerInfo added to IPCPort *
* *
*******************************************************************/
#ifndef EXEC_TYPES_H
#include "exec/types.h"
#endif
#ifndef EXEC_PORTS_H
#include "exec/ports.h"
#endif
/*******************************************************************
* *
* IPC Ports are essentially standard Exec message Ports except *
* for added fields to keep track of their usage. Also they *
* are kept on their own list. *
* *
* Note that the port name has to be kept WITHIN the structure *
* also, as the process that created it may go away. The size *
* field holds the size of the structure including the name, so *
* it may be deleted safely when no longer needed. *
* *
*******************************************************************/
struct IPCPort {
struct MsgPort ipp_Port;
ULONG ipp_Id; /* for future use */
UWORD ipp_UseCount, /* number of connections to the port */
ipp_Flags, /* internal information */
ipp_Size; /* size of the WHOLE structure */
void * ipp_Broker_Info; /* pointer to private information */
char ipp_Name[1]; /* where name is actually kept! */
};
/* ipp_Flags -- defined in IPC.h: */
/***********************************
#define IPP_SERVED 0x8000
#define IPP_SHUT 0x4000
#define IPP_REOPEN 0x2000
#define IPP_LOADING 0x1000
#define IPP_NOTIFY 0x0001
***********************************/
#define IPP_SERVER_FLAGS 0x00FF
/*******************************************************************
* *
* Only one IPCBasePort structure will exist in the system. *
* It is the only IPC Port on the public Exec port list, and *
* has the standard name "IPC_Base_Port". (Note that the name *
* string begins in the last location of the IPCPort structure; *
* "moreName" is just to provide the necessary space, so the *
* list header begins at a defined offset.) *
* *
*******************************************************************/
struct IPCBasePort {
struct IPCPort ipcb_Port; /* used to place in public Port list */
/* also will be public port for a Broker */
char moreName[20]; /* enough space for name */
struct List ipcb_PortList; /* List of current IPCPorts */
};
/*******************************************************************/
#endif