aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorRaimo Niskanen <[email protected]>2018-05-24 13:34:09 +0200
committerGitHub <[email protected]>2018-05-24 13:34:09 +0200
commit5c1d8ed81e66ef4977b7b68f573862bcbb9da7ca (patch)
tree01d14c8bb5e4aa56d46fda782ef7c9c7b9784ca3 /lib
parent5492027016319d674aa39d88d08a50d41157589e (diff)
parente785f86176f6b8d82377cb05a79c8b932e2b468d (diff)
downloadotp-5c1d8ed81e66ef4977b7b68f573862bcbb9da7ca.tar.gz
otp-5c1d8ed81e66ef4977b7b68f573862bcbb9da7ca.tar.bz2
otp-5c1d8ed81e66ef4977b7b68f573862bcbb9da7ca.zip
Merge pull request #1816 from cspiegel/netns-bind-device-typespecs
OTP-14359: Add typespecs for netns and bind_to_device options
Diffstat (limited to 'lib')
-rw-r--r--lib/kernel/src/gen_sctp.erl2
-rw-r--r--lib/kernel/src/gen_tcp.erl4
-rw-r--r--lib/kernel/src/gen_udp.erl2
3 files changed, 8 insertions, 0 deletions
diff --git a/lib/kernel/src/gen_sctp.erl b/lib/kernel/src/gen_sctp.erl
index a6aa0edd15..3526df3600 100644
--- a/lib/kernel/src/gen_sctp.erl
+++ b/lib/kernel/src/gen_sctp.erl
@@ -118,6 +118,8 @@ open() ->
| inet:address_family()
| {port,Port}
| {type,SockType}
+ | {netns, file:filename_all()}
+ | {bind_to_device, binary()}
| option(),
IP :: inet:ip_address() | any | loopback,
Port :: inet:port_number(),
diff --git a/lib/kernel/src/gen_tcp.erl b/lib/kernel/src/gen_tcp.erl
index ac61dbc792..253c63528f 100644
--- a/lib/kernel/src/gen_tcp.erl
+++ b/lib/kernel/src/gen_tcp.erl
@@ -102,6 +102,8 @@
inet:address_family() |
{port, inet:port_number()} |
{tcp_module, module()} |
+ {netns, file:filename_all()} |
+ {bind_to_device, binary()} |
option().
-type listen_option() ::
{ip, inet:socket_address()} |
@@ -111,6 +113,8 @@
{port, inet:port_number()} |
{backlog, B :: non_neg_integer()} |
{tcp_module, module()} |
+ {netns, file:filename_all()} |
+ {bind_to_device, binary()} |
option().
-type socket() :: port().
diff --git a/lib/kernel/src/gen_udp.erl b/lib/kernel/src/gen_udp.erl
index 3121544719..9ab58011ec 100644
--- a/lib/kernel/src/gen_udp.erl
+++ b/lib/kernel/src/gen_udp.erl
@@ -97,6 +97,8 @@ open(Port) ->
| {ifaddr, inet:socket_address()}
| inet:address_family()
| {port, inet:port_number()}
+ | {netns, file:filename_all()}
+ | {bind_to_device, binary()}
| option(),
Socket :: socket(),
Reason :: inet:posix().