aboutsummaryrefslogtreecommitdiffstats
path: root/erts/preloaded
diff options
context:
space:
mode:
authorMicael Karlberg <[email protected]>2018-10-09 12:23:59 +0200
committerMicael Karlberg <[email protected]>2018-10-09 12:26:56 +0200
commit789d5cefd0f710fd83dec27ad2239ea299737a49 (patch)
treea317d875e074e09057105de96ae7b9018b18d6f2 /erts/preloaded
parent46c3090432a391f27b9af8f6b19ee27310257c76 (diff)
downloadotp-789d5cefd0f710fd83dec27ad2239ea299737a49.tar.gz
otp-789d5cefd0f710fd83dec27ad2239ea299737a49.tar.bz2
otp-789d5cefd0f710fd83dec27ad2239ea299737a49.zip
[socket-nif] The supports function now also handles sctp and ipv6
The supports function now also handles testing for SCTP and IPv6 support. Basic test at the moment, but better then nothing. OTP-14831
Diffstat (limited to 'erts/preloaded')
-rw-r--r--erts/preloaded/ebin/socket.beambin66960 -> 67144 bytes
-rw-r--r--erts/preloaded/src/socket.erl10
2 files changed, 9 insertions, 1 deletions
diff --git a/erts/preloaded/ebin/socket.beam b/erts/preloaded/ebin/socket.beam
index 0387e534d8..6b3d488086 100644
--- a/erts/preloaded/ebin/socket.beam
+++ b/erts/preloaded/ebin/socket.beam
Binary files differ
diff --git a/erts/preloaded/src/socket.erl b/erts/preloaded/src/socket.erl
index 882e305b26..d0e074c817 100644
--- a/erts/preloaded/src/socket.erl
+++ b/erts/preloaded/src/socket.erl
@@ -818,6 +818,8 @@
-define(SOCKET_SUPPORTS_OPTIONS, 16#0001).
+-define(SOCKET_SUPPORTS_SCTP, 16#0002).
+-define(SOCKET_SUPPORTS_IPV6, 16#0003).
%% ===========================================================================
@@ -849,10 +851,16 @@ info() ->
-spec supports() -> list().
supports() ->
- [{options, supports(options)}].
+ [{options, supports(options)},
+ {sctp, supports(sctp)},
+ {ipv6, supports(ipv6)}].
supports(options) ->
nif_supports(?SOCKET_SUPPORTS_OPTIONS);
+supports(sctp) ->
+ nif_supports(?SOCKET_SUPPORTS_SCTP);
+supports(ipv6) ->
+ nif_supports(?SOCKET_SUPPORTS_IPV6);
supports(_) ->
false.