You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafficserver.apache.org by ma...@apache.org on 2018/07/27 08:26:57 UTC
[trafficserver] branch quic-latest updated: Add be32toh and htobe32
This is an automated email from the ASF dual-hosted git repository.
maskit pushed a commit to branch quic-latest
in repository https://gitbox.apache.org/repos/asf/trafficserver.git
The following commit(s) were added to refs/heads/quic-latest by this push:
new 45a3512 Add be32toh and htobe32
45a3512 is described below
commit 45a351251275357365c67fc4bf6c3bf390e03738
Author: Masakazu Kitajo <ma...@apache.org>
AuthorDate: Fri Jul 27 17:26:23 2018 +0900
Add be32toh and htobe32
---
lib/ts/ink_endian.h | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/lib/ts/ink_endian.h b/lib/ts/ink_endian.h
index 30b3132..db8dad2 100644
--- a/lib/ts/ink_endian.h
+++ b/lib/ts/ink_endian.h
@@ -48,4 +48,14 @@ htobe64(uint64_t x)
{
return OSSwapHostToBigInt64(x);
}
+inline uint32_t
+be32toh(uint32_t x)
+{
+ return OSSwapBigToHostInt32(x);
+}
+inline uint32_t
+htobe32(uint32_t x)
+{
+ return OSSwapHostToBigInt32(x);
+}
#endif