From e977995b9e97c8f7a795843c753ff59468510c4d Mon Sep 17 00:00:00 2001 From: james <> Date: Thu, 14 Feb 2008 12:17:42 +0000 Subject: *** empty log message *** --- src/ipc.h | 110 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 110 insertions(+) create mode 100644 src/ipc.h (limited to 'src/ipc.h') diff --git a/src/ipc.h b/src/ipc.h new file mode 100644 index 0000000..e8d224c --- /dev/null +++ b/src/ipc.h @@ -0,0 +1,110 @@ +/* + * ipc.h: + * + * Copyright (c) 2008 James McKenzie , + * All rights reserved. + * + */ + +/* + * $Id$ + */ + +/* + * $Log$ + * Revision 1.1 2008/02/14 12:17:42 james + * *** empty log message *** + * + */ + +#ifndef __IPC_H__ +#define __IPC_H__ + +#define IPC_MAX_BUF 1024 + +#define IPC_MSG_TYPE_NOOP 0 +#define IPC_MSG_TYPE_DEBUG 1 +#define IPC_MSG_TYPE_HISTORY 2 +#define IPC_MSG_TYPE_VT102 3 +#define IPC_MSG_TYPE_KEY 4 +#define IPC_MSG_TYPE_TERM 5 +#define IPC_MSG_TYPE_STATUS 6 + +typedef struct +{ + int32_t size; + int32_t type; + uint8_t payload[0]; +} IPC_Msg_hdr; + + +typedef struct +{ + int32_t size; + int32_t type; +} IPC_Msg_noop; + + +typedef struct +{ + int32_t size; + int32_t type; + char msg[0]; +} IPC_Msg_debug; + +typedef struct +{ + int32_t size; + int32_t type; + History_ent history; +} IPC_Msg_history; + +typedef struct +{ + int32_t size; + int32_t type; + int32_t len; + VT102 vt102; +} IPC_Msg_VT102; + + +typedef struct +{ + int32_t size; + int32_t type; + int32_t key; +} IPC_Msg_key; + +typedef struct +{ + int32_t size; + int32_t type; + int32_t len; + uint8_t term[0]; +} IPC_Msg_term; + + +typedef struct +{ + int32_t size; + int32_t type; + char status[0]; +} IPC_Msg_status; + + + +typedef union +{ +IPC_Msg_hdr hdr; +IPC_Msg_noop noop; +IPC_Msg_debug debug; +IPC_Msg_history history; +IPC_Msg_VT102 vt102; +IPC_Msg_key key; +IPC_Msg_term term; +IPC_Msg_status status; +} IPC_Msg; + + + +#endif /* __IPC_H__ */ -- cgit v1.2.3