aboutsummaryrefslogtreecommitdiffstats
path: root/erts/emulator/nifs/common/socket_util.h
diff options
context:
space:
mode:
authorMicael Karlberg <[email protected]>2018-07-10 17:41:40 +0200
committerMicael Karlberg <[email protected]>2018-09-18 14:50:18 +0200
commit8118227d80fc41efac23d30a5601fdfadb75931f (patch)
treee2f3ce7582c1bdd5bff6716c3c9db791e37d1ac4 /erts/emulator/nifs/common/socket_util.h
parent59586c412340d24188f78730c5b2c45db772c8ca (diff)
downloadotp-8118227d80fc41efac23d30a5601fdfadb75931f.tar.gz
otp-8118227d80fc41efac23d30a5601fdfadb75931f.tar.bz2
otp-8118227d80fc41efac23d30a5601fdfadb75931f.zip
[socket-nif] Add support for socket (level ip) option multicast_if
Added support for the IP option MULTICAST_IF. OTP-14831
Diffstat (limited to 'erts/emulator/nifs/common/socket_util.h')
-rw-r--r--erts/emulator/nifs/common/socket_util.h18
1 files changed, 6 insertions, 12 deletions
diff --git a/erts/emulator/nifs/common/socket_util.h b/erts/emulator/nifs/common/socket_util.h
index cd8cc7e1fb..f1c122e281 100644
--- a/erts/emulator/nifs/common/socket_util.h
+++ b/erts/emulator/nifs/common/socket_util.h
@@ -32,10 +32,6 @@
#define ESOCK_ABORT(E) esock_abort(E, __func__, __FILE__, __LINE__)
#define ESOCK_ASSERT(e) ((void) ((e) ? 1 : (ESOCK_ABORT(#e), 0)))
-/* Two byte integer decoding */
-#define get_int16(s) ((((unsigned char*) (s))[0] << 8) | \
- (((unsigned char*) (s))[1]))
-
extern
char* esock_decode_sockaddr(ErlNifEnv* env,
ERL_NIF_TERM eSockAddr,
@@ -85,10 +81,9 @@ char* esock_encode_sockaddr_un(ErlNifEnv* env,
#endif
extern
-char* esock_decode_ip4_address(ErlNifEnv* env,
- ERL_NIF_TERM eAddr,
- struct sockaddr_in* sockAddrP,
- unsigned int* addrLen);
+char* esock_decode_ip4_address(ErlNifEnv* env,
+ ERL_NIF_TERM eAddr,
+ struct in_addr* inAddrP);
extern
char* esock_encode_ip4_address(ErlNifEnv* env,
struct in_addr* addrP,
@@ -96,10 +91,9 @@ char* esock_encode_ip4_address(ErlNifEnv* env,
#if defined(HAVE_IN6) && defined(AF_INET6)
extern
-char* esock_decode_ip6_address(ErlNifEnv* env,
- ERL_NIF_TERM eAddr,
- struct sockaddr_in6* sockAddrP,
- unsigned int* addrLen);
+char* esock_decode_ip6_address(ErlNifEnv* env,
+ ERL_NIF_TERM eAddr,
+ struct in6_addr* inAddrP);
extern
char* esock_encode_ip6_address(ErlNifEnv* env,
struct in6_addr* addrP,