diff options
author | Micael Karlberg <[email protected]> | 2018-07-24 15:03:36 +0200 |
---|---|---|
committer | Micael Karlberg <[email protected]> | 2018-09-18 14:50:18 +0200 |
commit | 7d5b6e7bf640eb5d64679e3bf7b440b8e21e3a4d (patch) | |
tree | 3f28de3cea2604a7bfacdb53b00107e1ddccfede /lib | |
parent | b598160c2f1162658ea948284aee5b53951a3b9e (diff) | |
download | otp-7d5b6e7bf640eb5d64679e3bf7b440b8e21e3a4d.tar.gz otp-7d5b6e7bf640eb5d64679e3bf7b440b8e21e3a4d.tar.bz2 otp-7d5b6e7bf640eb5d64679e3bf7b440b8e21e3a4d.zip |
[socket-nif] Add support for socket (level ipv6) option router_alert
Added support for the IPv6 socket option ROUTER_ALERT.
Only supported for raw sockets.
OTP-14831.
Diffstat (limited to 'lib')
-rw-r--r-- | lib/kernel/test/socket_server.erl | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/lib/kernel/test/socket_server.erl b/lib/kernel/test/socket_server.erl index 2cb505cabc..54e9244d19 100644 --- a/lib/kernel/test/socket_server.erl +++ b/lib/kernel/test/socket_server.erl @@ -247,6 +247,17 @@ do_manager_init(Domain, seqpacket = Type, sctp = Proto, _Peek) -> EXP(close_socket, ok, socket:close(Sock)); {error, Reason} -> exit({failed_open, Reason}) + end; +do_manager_init(Domain, raw = Type, Proto, Peek) when is_integer(Proto) -> + do_manager_init(Domain, Type, {raw, Proto}, Peek); +do_manager_init(Domain, raw = Type, Proto, _Peek) -> + case socket:open(Domain, Type, Proto) of + {ok, Sock} -> + i("(sctp) socket opened: " + "~n ~p", [Sock]), + socket:close(Sock); + {error, Reason} -> + exit({failed_open, Reason}) end. |