diff options
author | 2018-06-20 18:13:00 -0700 | |
---|---|---|
committer | 2018-06-20 18:13:00 -0700 | |
commit | c82cd7c5cb139bd723fd00dca4c03c041f7cfdf0 (patch) | |
tree | f766a4dcd2cd8a5c0cc6cb0844ac32d368d6e55d /src/core/lib/iomgr/socket_utils_common_posix.cc | |
parent | 9f28775bd14a7ccfa72bf1cb7b818d2fb7daa948 (diff) | |
parent | ac1b24f55579a7ef8112b50637f43281ef7474bc (diff) |
Merge pull request #15799 from AspirinSJL/htonl
Add endianness conversion for long
Diffstat (limited to 'src/core/lib/iomgr/socket_utils_common_posix.cc')
-rw-r--r-- | src/core/lib/iomgr/socket_utils_common_posix.cc | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/core/lib/iomgr/socket_utils_common_posix.cc b/src/core/lib/iomgr/socket_utils_common_posix.cc index caee652307..c4b991c94d 100644 --- a/src/core/lib/iomgr/socket_utils_common_posix.cc +++ b/src/core/lib/iomgr/socket_utils_common_posix.cc @@ -339,6 +339,10 @@ uint16_t grpc_htons(uint16_t hostshort) { return htons(hostshort); } uint16_t grpc_ntohs(uint16_t netshort) { return ntohs(netshort); } +uint32_t grpc_htonl(uint32_t hostlong) { return htonl(hostlong); } + +uint32_t grpc_ntohl(uint32_t netlong) { return ntohl(netlong); } + int grpc_inet_pton(int af, const char* src, void* dst) { return inet_pton(af, src, dst); } |