aboutsummaryrefslogtreecommitdiffstats
path: root/erts/emulator/nifs/common/socket_util.h
diff options
context:
space:
mode:
authorMicael Karlberg <[email protected]>2018-06-18 18:19:39 +0200
committerMicael Karlberg <[email protected]>2018-09-18 14:50:18 +0200
commitb63a16d0958bd748644d22f13f35f8956a903d6c (patch)
tree23f56ff33354c084b344804f73d71f1235a10b59 /erts/emulator/nifs/common/socket_util.h
parent978a8a855c57bdfb20d3bcd8a6055968f3be3887 (diff)
downloadotp-b63a16d0958bd748644d22f13f35f8956a903d6c.tar.gz
otp-b63a16d0958bd748644d22f13f35f8956a903d6c.tar.bz2
otp-b63a16d0958bd748644d22f13f35f8956a903d6c.zip
[socket+net-nif] Moved common functions into util files
The common stuff, like decode and encode of common types (soch as socket address), has been moved into a util file (socket_util). The debug stuff has also been moved into its own file. Also introduced a common include file for common macros and types. OTP-14831
Diffstat (limited to 'erts/emulator/nifs/common/socket_util.h')
-rw-r--r--erts/emulator/nifs/common/socket_util.h11
1 files changed, 9 insertions, 2 deletions
diff --git a/erts/emulator/nifs/common/socket_util.h b/erts/emulator/nifs/common/socket_util.h
index f5594c408e..dedeb8dd7d 100644
--- a/erts/emulator/nifs/common/socket_util.h
+++ b/erts/emulator/nifs/common/socket_util.h
@@ -110,7 +110,6 @@ extern
char* esock_decode_domain(ErlNifEnv* env,
ERL_NIF_TERM eDomain,
int* domain);
-
extern
char* esock_encode_domain(ErlNifEnv* env,
int domain,
@@ -120,13 +119,21 @@ extern
char* esock_decode_type(ErlNifEnv* env,
ERL_NIF_TERM eType,
int* type);
-
extern
char* esock_encode_type(ErlNifEnv* env,
int type,
ERL_NIF_TERM* eType);
extern
+char* esock_decode_protocol(ErlNifEnv* env,
+ ERL_NIF_TERM eProtocol,
+ int* protocol);
+extern
+char* esock_encode_protocol(ErlNifEnv* env,
+ int type,
+ ERL_NIF_TERM* eProtocol);
+
+extern
BOOLEAN_T esock_decode_bool(ERL_NIF_TERM val);
extern
ERL_NIF_TERM esock_encode_bool(BOOLEAN_T val);