diff options
author | Micael Karlberg <[email protected]> | 2018-07-19 14:36:34 +0200 |
---|---|---|
committer | Micael Karlberg <[email protected]> | 2018-09-18 14:50:18 +0200 |
commit | f0a2e68a31ac585780ad05f777f1b7551770420e (patch) | |
tree | a45d1a46e617e7d71142b3ce5e87504ca33c3515 /erts/preloaded/src | |
parent | d28129b7098bce154264937862fcdafb21541433 (diff) | |
download | otp-f0a2e68a31ac585780ad05f777f1b7551770420e.tar.gz otp-f0a2e68a31ac585780ad05f777f1b7551770420e.tar.bz2 otp-f0a2e68a31ac585780ad05f777f1b7551770420e.zip |
[socket-nif] Add support for socket (level sctp) option disable_fragments
Added support for the SCTP option DISABLE_FRAGMENTS.
OTP-14831
Diffstat (limited to 'erts/preloaded/src')
-rw-r--r-- | erts/preloaded/src/socket.erl | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/erts/preloaded/src/socket.erl b/erts/preloaded/src/socket.erl index 74b6bfd543..e3fb417a35 100644 --- a/erts/preloaded/src/socket.erl +++ b/erts/preloaded/src/socket.erl @@ -647,7 +647,7 @@ %% -define(SOCKET_OPT_SCTP_CONTEXT, 9). %% -define(SOCKET_OPT_SCTP_DEFAULT_SEND_PARAMS, 10). %% -define(SOCKET_OPT_SCTP_DELAYED_ACK_TIME, 11). -%% -define(SOCKET_OPT_SCTP_DISABLE_FRAGMENTS, 12). +-define(SOCKET_OPT_SCTP_DISABLE_FRAGMENTS, 12). %% -define(SOCKET_OPT_SCTP_HMAC_IDENT, 13). -define(SOCKET_OPT_SCTP_EVENTS, 14). %% -define(SOCKET_OPT_SCTP_EXPLICIT_EOR, 15). @@ -2175,6 +2175,9 @@ enc_setopt_value(udp = L, Opt, _V, _D, _T, _P) -> enc_setopt_value(sctp, autoclose, V, _D, _T, P) when is_integer(V) andalso (P =:= sctp) -> V; +enc_setopt_value(sctp, disable_fragments, V, _D, _T, P) + when is_boolean(V) andalso (P =:= sctp) -> + V; enc_setopt_value(sctp, events, #{data_in := DataIn, association := Assoc, address := Addr, @@ -2612,8 +2615,8 @@ enc_sockopt_key(sctp = L, default_send_params = Opt, _Dir, _D, _T, _P) -> not_supported({L, Opt}); enc_sockopt_key(sctp = L, delayed_ack_time = Opt, _Dir, _D, _T, _P) -> not_supported({L, Opt}); -enc_sockopt_key(sctp = L, disable_fragments = Opt, _Dir, _D, _T, _P) -> - not_supported({L, Opt}); +enc_sockopt_key(sctp = _L, disable_fragments = _Opt, _Dir, _D, _T, _P) -> + ?SOCKET_OPT_SCTP_DISABLE_FRAGMENTS; enc_sockopt_key(sctp = L, hmac_ident = Opt, _Dir, _D, _T, _P) -> not_supported({L, Opt}); enc_sockopt_key(sctp = _L, events = _Opt, set = _Dir, _D, _T, _P) -> |