diff options
author | Holger Hans Peter Freyther <zecke@selfish.org> | 2010-02-26 13:12:41 +0100 |
---|---|---|
committer | Holger Hans Peter Freyther <zecke@selfish.org> | 2010-02-26 13:12:41 +0100 |
commit | 2890d102c73db5bd535fbd87094733089059e615 (patch) | |
tree | 262e90518142febe7a6c8fde98a1ee81fcecf236 /openbsc | |
parent | 1ed97629adffa6b5345963ec8905526da835535a (diff) |
[rtp] Describe the struct in a way that it will work for Big Endian too
Play with the right bits on PPC.
Diffstat (limited to 'openbsc')
-rw-r--r-- | openbsc/src/rtp_proxy.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/openbsc/src/rtp_proxy.c b/openbsc/src/rtp_proxy.c index 9b1f4d91b..9f2e2fd76 100644 --- a/openbsc/src/rtp_proxy.c +++ b/openbsc/src/rtp_proxy.c @@ -19,6 +19,7 @@ * */ +#include <endian.h> #include <errno.h> #include <unistd.h> #include <sys/socket.h> @@ -63,12 +64,21 @@ struct rtcp_hdr { /* according to RFC 3550 */ struct rtp_hdr { +#if __BYTE_ORDER == __LITTLE_ENDIAN u_int8_t csrc_count:4, extension:1, padding:1, version:2; u_int8_t payload_type:7, marker:1; +#elif __BYTE_ORDER == __BIG_ENDIAN + u_int8_t version:2, + padding:1, + extension:1, + csrc_count:4; + u_int8_t marker:1, + payload_type:7; +#endif u_int16_t sequence; u_int32_t timestamp; u_int32_t ssrc; |