diff options
author | Chris Spiegel <[email protected]> | 2018-05-13 13:40:48 -0700 |
---|---|---|
committer | Chris Spiegel <[email protected]> | 2018-05-13 13:40:48 -0700 |
commit | e785f86176f6b8d82377cb05a79c8b932e2b468d (patch) | |
tree | b911b4b6206bcfa6fd146db80a8a4700fcd35092 /lib/kernel/src/gen_sctp.erl | |
parent | b873e5cd6d78191d303c7c828ab7df7cd7fdf4d2 (diff) | |
download | otp-e785f86176f6b8d82377cb05a79c8b932e2b468d.tar.gz otp-e785f86176f6b8d82377cb05a79c8b932e2b468d.tar.bz2 otp-e785f86176f6b8d82377cb05a79c8b932e2b468d.zip |
Add typespecs for netns and bind_to_device options
Some networking functions accept the options netns (to switch network
namespaces) and bind_to_device (to bind to a device with
SO_BINDTODEVICE), but these functions are not annotated to accept these
options, which causes dialyzer to raise issues.
This patch applies these type specs to the options for
gen_tcp:connect/3,4, gen_tcp:listen/2, gen_udp:open/1,2, and
gen_sctp:open/0,1,2, as these are the documented functions which accept
the netns and bind_to_device options.
Diffstat (limited to 'lib/kernel/src/gen_sctp.erl')
-rw-r--r-- | lib/kernel/src/gen_sctp.erl | 2 |
1 files changed, 2 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(), |