aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/core/lib/iomgr/socket_utils.h
diff options
context:
space:
mode:
authorGravatar Juanli Shen <juanlishen@google.com>2018-06-18 15:22:04 -0700
committerGravatar Juanli Shen <juanlishen@google.com>2018-06-18 16:20:21 -0700
commit332b32555cb70f40ed15808d7194dcda7b9f9c00 (patch)
tree96eeb78d77257b271ae3610035ea351469f40b5b /src/core/lib/iomgr/socket_utils.h
parentf9035befc6c9b24f7111914d620102e58e80e94f (diff)
Add endianness conversion for long
Diffstat (limited to 'src/core/lib/iomgr/socket_utils.h')
-rw-r--r--src/core/lib/iomgr/socket_utils.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/core/lib/iomgr/socket_utils.h b/src/core/lib/iomgr/socket_utils.h
index cf1a7be648..dba2896b74 100644
--- a/src/core/lib/iomgr/socket_utils.h
+++ b/src/core/lib/iomgr/socket_utils.h
@@ -29,6 +29,12 @@ uint16_t grpc_htons(uint16_t hostshort);
/* A wrapper for ntohs on POSIX and WINDOWS */
uint16_t grpc_ntohs(uint16_t netshort);
+/* A wrapper for htonl on POSIX and Windows */
+uint32_t grpc_htonl(uint32_t hostlong);
+
+/* A wrapper for ntohl on POSIX and WINDOWS */
+uint32_t grpc_ntohl(uint32_t netlong);
+
/* A wrapper for inet_pton on POSIX and WINDOWS */
int grpc_inet_pton(int af, const char* src, void* dst);