HIPC
0.5
Main Page
Data Structures
Files
File List
Globals
All
Data Structures
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Macros
hipc
hipc.c
Go to the documentation of this file.
1
#include <stdint.h>
2
3
#include <
hipc.h
>
4
12
unsigned
char
hipcMsghdrBdysize
(
unsigned
char
const
*
const
msghdr)
13
{
14
if
(
HIPC_MESSAGE_TYPE_GET
== msghdr[
HIPC_MSGHDR_BYTE_TYPE
]) {
15
return
0;
16
}
17
return
msghdr[
HIPC_MSGHDR_BYTE_BDYSZ
];
18
}
19
25
unsigned
char
hipcEndian
(
void
)
26
{
27
uint16_t tmp;
28
unsigned
char
endian;
29
30
tmp = 0x0102U;
31
if
((0x01 == ((
unsigned
char
*) &tmp)[0]) &&
32
(0x02 == ((
unsigned
char
*) &tmp)[1])) {
33
endian = 0x42;
/* 'B' */
34
}
else
if
((0x02 == ((
unsigned
char
*) &tmp)[0]) &&
35
(0x01 == ((
unsigned
char
*) &tmp)[1])) {
36
endian = 0x6c;
/* 'l' */
37
}
else
{
38
endian = 0x6f;
/* 'o' */
39
}
40
return
endian;
41
}
HIPC_MSGHDR_BYTE_TYPE
Definition:
hipc.h:37
hipc.h
HIPC_MESSAGE_TYPE_GET
Definition:
hipc.h:54
HIPC_MSGHDR_BYTE_BDYSZ
Definition:
hipc.h:40
hipcMsghdrBdysize
unsigned char hipcMsghdrBdysize(unsigned char const *const msghdr)
Returns message size determined by a message header.
Definition:
hipc.c:12
hipcEndian
unsigned char hipcEndian(void)
Returns endian of the system.
Definition:
hipc.c:25
Generated on Sat Jun 27 2015 09:23:13 for HIPC by
1.8.6