diff options
author | Micael Karlberg <[email protected]> | 2018-05-08 15:40:07 +0200 |
---|---|---|
committer | Micael Karlberg <[email protected]> | 2018-09-18 13:01:37 +0200 |
commit | 3d719906dd0ad8d07547c3a20a2190a416dda364 (patch) | |
tree | e138e87266d9dedc15472e17a7d194d1f62546e7 /erts/preloaded | |
parent | 56641fca11c50306c6c62266844f7828e325ae7d (diff) | |
download | otp-3d719906dd0ad8d07547c3a20a2190a416dda364.tar.gz otp-3d719906dd0ad8d07547c3a20a2190a416dda364.tar.bz2 otp-3d719906dd0ad8d07547c3a20a2190a416dda364.zip |
[socket-nif] setopt of socket option dontroute
Diffstat (limited to 'erts/preloaded')
-rw-r--r-- | erts/preloaded/src/socket.erl | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/erts/preloaded/src/socket.erl b/erts/preloaded/src/socket.erl index 4c903bb759..f1b5623362 100644 --- a/erts/preloaded/src/socket.erl +++ b/erts/preloaded/src/socket.erl @@ -432,15 +432,16 @@ -define(SOCKET_OPT_OTP_DEBUG, 0). -define(SOCKET_OPT_OTP_IOW, 1). +-define(SOCKET_OPT_SOCK_DONTROUTE, 7). -define(SOCKET_OPT_SOCK_KEEPALIVE, 9). -define(SOCKET_OPT_SOCK_LINGER, 10). -define(SOCKET_OPT_SOCK_PRIORITY, 16). -define(SOCKET_OPT_SOCK_REUSEADDR, 21). --define(SOCKET_OPT_IP_RECVTOS, 0). --define(SOCKET_OPT_IP_ROUTER_ALERT, 1). --define(SOCKET_OPT_IP_TOS, 2). --define(SOCKET_OPT_IP_TTL, 3). +-define(SOCKET_OPT_IP_RECVTOS, 25). +-define(SOCKET_OPT_IP_ROUTER_ALERT, 28). +-define(SOCKET_OPT_IP_TOS, 30). +-define(SOCKET_OPT_IP_TTL, 32). -define(SOCKET_OPT_IPV6_HOPLIMIT, 12). @@ -1803,8 +1804,8 @@ enc_sockopt_key(socket, busy_poll = Opt, _Dir, _D, _T, _P) -> not_supported(Opt); enc_sockopt_key(socket, debug = Opt, _Dir, _D, _T, _P) -> not_supported(Opt); -enc_sockopt_key(socket, dontroute = Opt, _Dir, _D, _T, _P) -> - not_supported(Opt); +enc_sockopt_key(socket, dontroute = _Opt, _Dir, _D, _T, _P) -> + ?SOCKET_OPT_SOCK_DONTROUTE; enc_sockopt_key(socket, error = Opt, get = _Dir, _D, _T, _P) -> not_supported(Opt); %% This is only for connection-oriented sockets, but who are those? |