aboutsummaryrefslogtreecommitdiffstats
path: root/lib/kernel
diff options
context:
space:
mode:
authorMicael Karlberg <[email protected]>2018-07-18 11:33:50 +0200
committerMicael Karlberg <[email protected]>2018-09-18 14:50:18 +0200
commitebd626e7b4259bdfb4ddb34ce2d298d0feb0a1c8 (patch)
tree53eae6b4432f2e2e1dcc4433db5c3583670e6b7f /lib/kernel
parent8d759e6f00b1cf834fe21654de3f53df706e8c0f (diff)
downloadotp-ebd626e7b4259bdfb4ddb34ce2d298d0feb0a1c8.tar.gz
otp-ebd626e7b4259bdfb4ddb34ce2d298d0feb0a1c8.tar.bz2
otp-ebd626e7b4259bdfb4ddb34ce2d298d0feb0a1c8.zip
[socket-nif] Add support for socket (level ipv6) option mtu
Added support for the VPv6 socket option MTU. OTP-14831.
Diffstat (limited to 'lib/kernel')
-rw-r--r--lib/kernel/test/socket_client.erl2
-rw-r--r--lib/kernel/test/socket_server.erl30
2 files changed, 26 insertions, 6 deletions
diff --git a/lib/kernel/test/socket_client.erl b/lib/kernel/test/socket_client.erl
index 8ec9a02374..0d332e8439 100644
--- a/lib/kernel/test/socket_client.erl
+++ b/lib/kernel/test/socket_client.erl
@@ -21,7 +21,7 @@
-module(socket_client).
-export([
- start/1,
+ start/1, start/5,
start_tcp/1, start_tcp/2, start_tcp6/1,
start_udp/1, start_udp/2, start_udp6/1
]).
diff --git a/lib/kernel/test/socket_server.erl b/lib/kernel/test/socket_server.erl
index 8a77b9b3c9..65069df60b 100644
--- a/lib/kernel/test/socket_server.erl
+++ b/lib/kernel/test/socket_server.erl
@@ -22,8 +22,10 @@
-export([
start/0, start/4,
- start_tcp/0, start_tcp/1,
- start_udp/0, start_udp/1
+ start_tcp/0, start_tcp/1, start_tcp/2,
+ start_tcp4/1, start_tcp6/1,
+ start_udp/0, start_udp/1, start_udp/2,
+ start_udp4/1, start_udp6/1
]).
-define(LIB, socket_lib).
@@ -41,13 +43,31 @@ start_tcp() ->
start_tcp(false).
start_tcp(Peek) ->
- start(inet, stream, tcp, Peek).
+ start_tcp4(Peek).
+
+start_tcp4(Peek) ->
+ start_tcp(inet, Peek).
+
+start_tcp6(Peek) ->
+ start_tcp(inet6, Peek).
+
+start_tcp(Domain, Peek) when is_boolean(Peek) ->
+ start(Domain, stream, tcp, Peek).
start_udp() ->
start_udp(false).
-start_udp(Peek) when is_boolean(Peek) ->
- start(inet, dgram, udp, Peek).
+start_udp(Peek) ->
+ start_udp4(Peek).
+
+start_udp4(Peek) ->
+ start_udp(inet, Peek).
+
+start_udp6(Peek) ->
+ start_udp(inet6, Peek).
+
+start_udp(Domain, Peek) when is_boolean(Peek) ->
+ start(Domain, dgram, udp, Peek).
start(Domain, Type, Proto, Peek) ->
put(sname, "starter"),