HIPC  0.5
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros
Macros | Enumerations | Functions
hipc.h File Reference
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define HIPC_UNSTRU   255
 
#define HIPC_IMG_ALLOCSIZE   256
 
#define HIPC_MSG_ALLOCSIZE   260 /* 4+256 */
 

Enumerations

enum  HIPC_errno {
  HIPC_SUCCESS, HIPC_ERR_S_INV_UDATA, HIPC_ERR_S_INV_MSG_TYPE, HIPC_ERR_S_INV_STRUNO,
  HIPC_ERR_S_INV_RW_RANGE, HIPC_ERR_S_V_UNINIT_MSG, HIPC_ERR_S_IO_READ, HIPC_ERR_S_IO_WRITE,
  HIPC_ERR_S_INV_CFG, HIPC_ERR_S_INV_NULL, HIPC_ERR_S_BUF_SHTG, HIPC_ERR_S_OVERSIZED_STRU,
  HIPC_ERR_S_PBANK_STAT_MISMATCH, HIPC_ERR_C_STD, HIPC_ERR_INTERNAL_ERROR, HIPC_ERR_IO_READ,
  HIPC_ERR_IO_WRITE, HIPC_ERR_PROTOCOL_VIOLATION, HIPC_ERR_INV_ENDIAN, HIPC_ERR_INV_ID_STR,
  HIPC_ERR_INV_BASE_CLIENT, HIPC_ERR_MBR_SIZE_MISMATCH, HIPC_ERR_SESS_STATE_MISMATCH, HIPC_ERR_FOR_TESTING,
  HIPC_ERR_TEST_LIB_INTERNAL, HIPC_N_ERR
}
 
enum  {
  HIPC_MSGHDR_BYTE_TYPE, HIPC_MSGHDR_BYTE_STRUNO, HIPC_MSGHDR_BYTE_OFFSET, HIPC_MSGHDR_BYTE_BDYSZ,
  HIPC_MSGHDR_SIZE
}
 
enum  {
  HIPC_MESSAGE_TYPE_QUIT, HIPC_MESSAGE_TYPE_SUCCESS, HIPC_MESSAGE_TYPE_SYS, HIPC_MESSAGE_TYPE_CAST,
  HIPC_MESSAGE_TYPE_GET, HIPC_MESSAGE_TYPE_PUT, HIPC_MESSAGE_TYPE_BYE, HIPC_MESSAGE_TYPE_HELLO
}
 
enum  { HIPC_SYSMSG_TYPE_OVERVIEW, HIPC_SYSMSG_TYPE_OFFSET, HIPC_SYSMSG_TYPE_SIZE }
 

Functions

unsigned char hipcMsghdrBdysize (unsigned char const *const msghdr)
 Returns message size determined by a message header. More...
 
unsigned char hipcEndian (void)
 Returns endian of the system. More...
 

Macro Definition Documentation

#define HIPC_UNSTRU   255
#define HIPC_IMG_ALLOCSIZE   256
#define HIPC_MSG_ALLOCSIZE   260 /* 4+256 */

Definition at line 47 of file hipc.h.

Referenced by test_msg_basics().

Enumeration Type Documentation

enum HIPC_errno
Enumerator
HIPC_SUCCESS 
HIPC_ERR_S_INV_UDATA 
HIPC_ERR_S_INV_MSG_TYPE 
HIPC_ERR_S_INV_STRUNO 
HIPC_ERR_S_INV_RW_RANGE 
HIPC_ERR_S_V_UNINIT_MSG 
HIPC_ERR_S_IO_READ 
HIPC_ERR_S_IO_WRITE 
HIPC_ERR_S_INV_CFG 
HIPC_ERR_S_INV_NULL 
HIPC_ERR_S_BUF_SHTG 
HIPC_ERR_S_OVERSIZED_STRU 
HIPC_ERR_S_PBANK_STAT_MISMATCH 
HIPC_ERR_C_STD 
HIPC_ERR_INTERNAL_ERROR 
HIPC_ERR_IO_READ 
HIPC_ERR_IO_WRITE 
HIPC_ERR_PROTOCOL_VIOLATION 
HIPC_ERR_INV_ENDIAN 
HIPC_ERR_INV_ID_STR 
HIPC_ERR_INV_BASE_CLIENT 
HIPC_ERR_MBR_SIZE_MISMATCH 
HIPC_ERR_SESS_STATE_MISMATCH 
HIPC_ERR_FOR_TESTING 
HIPC_ERR_TEST_LIB_INTERNAL 
HIPC_N_ERR 

Definition at line 4 of file hipc.h.

anonymous enum
Enumerator
HIPC_MSGHDR_BYTE_TYPE 
HIPC_MSGHDR_BYTE_STRUNO 
HIPC_MSGHDR_BYTE_OFFSET 
HIPC_MSGHDR_BYTE_BDYSZ 
HIPC_MSGHDR_SIZE 

Definition at line 36 of file hipc.h.

anonymous enum
Enumerator
HIPC_MESSAGE_TYPE_QUIT 
HIPC_MESSAGE_TYPE_SUCCESS 
HIPC_MESSAGE_TYPE_SYS 
HIPC_MESSAGE_TYPE_CAST 
HIPC_MESSAGE_TYPE_GET 
HIPC_MESSAGE_TYPE_PUT 
HIPC_MESSAGE_TYPE_BYE 
HIPC_MESSAGE_TYPE_HELLO 

Definition at line 49 of file hipc.h.

anonymous enum
Enumerator
HIPC_SYSMSG_TYPE_OVERVIEW 
HIPC_SYSMSG_TYPE_OFFSET 
HIPC_SYSMSG_TYPE_SIZE 

Definition at line 60 of file hipc.h.

Function Documentation

unsigned char hipcMsghdrBdysize ( unsigned char const *const  msghdr)

Returns message size determined by a message header.

Only GET type is treated specially.

Parameters
msghdrHIPC message header
Returns
message size

Definition at line 12 of file hipc.c.

References HIPC_MESSAGE_TYPE_GET, HIPC_MSGHDR_BYTE_BDYSZ, and HIPC_MSGHDR_BYTE_TYPE.

Referenced by hipcMsgBdySize(), hipcMsgdBdySize(), hipcMsgTotalSize(), hipcUsocAccept(), hipcUsocAcceptSimple(), and test_hipcMsghdrBdysize().

Here is the caller graph for this function:

unsigned char hipcEndian ( void  )

Returns endian of the system.

Returns
ASCII character value according to endian; 'B': Big, 'l': little, 'o': other

Definition at line 25 of file hipc.c.

Referenced by hipcClientInit(), hipcScfgInit(), and test_hipcEndian().

Here is the caller graph for this function: