HIPC  0.5
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros
msg.c
Go to the documentation of this file.
1 #include <hipc/msg.h>
2 
9 size_t hipcMsgTotalSize(const hipc_msg msg)
10 {
11  return hipcMsghdrBdysize(msg) + HIPC_MSGHDR_SIZE;
12 }
13 
20 unsigned char hipcMsgBdySize(const hipc_msg msg)
21 {
22  return hipcMsghdrBdysize(msg);
23 }
24 
31 const void *hipcMsgBdyPtr(const hipc_msg msg)
32 {
33  return &msg[HIPC_MSGHDR_SIZE];
34 }
35 
42 unsigned char hipcMsgType(const hipc_msg msg)
43 {
44  return msg[HIPC_MSGHDR_BYTE_TYPE];
45 }
46 
53 unsigned char hipcMsgOffset(const hipc_msg msg)
54 {
55  return msg[HIPC_MSGHDR_BYTE_OFFSET];
56 }
57 
64 unsigned char hipcMsgStruno(const hipc_msg msg)
65 {
66  return msg[HIPC_MSGHDR_BYTE_STRUNO];
67 }
68 
75 unsigned char hipcMsgRngsize(const hipc_msg msg)
76 {
77  return msg[HIPC_MSGHDR_BYTE_BDYSZ];
78 }
unsigned char hipc_msg[HIPC_MSG_ALLOCSIZE]
Definition: msg.h:8
unsigned char hipcMsgType(const hipc_msg msg)
Returns type of a HIPC message.
Definition: msg.c:42
unsigned char hipcMsgOffset(const hipc_msg msg)
Returns offset of a HIPC message.
Definition: msg.c:53
unsigned char hipcMsgRngsize(const hipc_msg msg)
Returns range size of a HIPC message.
Definition: msg.c:75
unsigned char hipcMsgBdySize(const hipc_msg msg)
Returns body size of a HIPC message.
Definition: msg.c:20
size_t hipcMsgTotalSize(const hipc_msg msg)
Returns total size of a HIPC message, which is the header size plus the body size.
Definition: msg.c:9
unsigned char hipcMsghdrBdysize(unsigned char const *const msghdr)
Returns message size determined by a message header.
Definition: hipc.c:12
const void * hipcMsgBdyPtr(const hipc_msg msg)
Returns a pointer to a body of a HIPC message.
Definition: msg.c:31
unsigned char hipcMsgStruno(const hipc_msg msg)
Returns structure number of a HIPC message.
Definition: msg.c:64