19 unsigned char body[64];
94 assert((
unsigned char *) (&lm) + 1 == md.
body_p);
136 assert(&lm == mdS.body_p);
147 assert((
unsigned char *) (&lm) + 2 == mdS.body_p);
153 sizeof(lm.
m2)}, NULL };
162 assert(&(lm.
m2) == mdS.body_p);
173 assert(&lm == mdS.body_p);
205 assert(NULL == md.
body_p);
226 assert(NULL == md.
body_p);
231 int main(
int argc,
char *argv[])
234 fprintf(stderr,
"Usage: %s test_id\n", argv[0]);
238 switch (argv[1][0]) {
267 fprintf(stderr,
"Invalid test_id: %s \n", argv[1]);
unsigned char header[HIPC_MSGHDR_SIZE]
static void test_hipcMsgdType(void)
static void test_hipcMsgdStruno(void)
int main(int argc, char *argv[])
enum HIPC_errno hipcGenmdSuccessToGet(hipc_msgd *const mds_p, hipc_msgd const *const mdr_p, void *const stru_p, const size_t stru_size)
Initializes mds_p as a response to mdr_p whose type must be GET.
static void test_hipcGenmdUnstru(void)
static void test_hipcMsgdBdySize_hipcMsgdBdyPtr(void)
enum HIPC_errno hipcGenmdUnstru(hipc_msgd *const md_p, const unsigned char type, const enum HIPC_errno hipc_errno, char *const errdtlstr, size_t errdtlstr_size)
Initializes a HIPC message data as a unstructured type message.
static void test_hipcMsgdHdrPtr(void)
unsigned char hipcMsgdStruno(hipc_msgd const *const md_p)
Returns structure number of a HIPC message data.
enum HIPC_errno hipcMsgdSetBdyForPut(hipc_msgd *const mdr_p, void *const stru_p, const size_t stru_size)
Sets a body to a HIPC message data that contains a header of a PUT message.
static void test_hipcMsgdSetBdyForPut(void)
static void test_hipcGenmdSuccessToGet(void)
unsigned char hipcMsgdBdySize(hipc_msgd const *const md_p)
Returns body size of a HIPC message data.
#define hipcGenmdQuit(md_p, hipc_errno, errdtlstr)
Initializes a HIPC message data as a QUIT message.
#define hipcGenmdSuccess(md_p)
Initializes a HIPC message data as a SUCCESS message.
static void test_hipcMsgdOffset(void)
unsigned char hipcMsgdOffset(hipc_msgd const *const md_p)
Returns offset of a HIPC message data.
#define hipcMsgdBdyPtr(md_p)
Returns a pointer to a body of a HIPC message data.
unsigned char hipcMsgdType(hipc_msgd const *const md_p)
Returns type of a HIPC message data.
unsigned char hipcMsgdRngsize(hipc_msgd const *const md_p)
Returns range size of a HIPC message data.
#define hipcMsgdHdrPtr(md_p)
Returns a pointer to a header of a HIPC message data.
static void test_hipcMsgdRngsize(void)