diff options
author | Raimo Niskanen <[email protected]> | 2018-09-21 15:50:39 +0200 |
---|---|---|
committer | Raimo Niskanen <[email protected]> | 2018-10-02 15:40:52 +0200 |
commit | b32911645a20230864eaee965d6a7f1be248e47e (patch) | |
tree | c227679b03a23781afe9e921c3f48b0dd14994e3 /lib/kernel/src/inet_dns.hrl | |
parent | 50274e72fa6278f4f43ffe9fbf461683916dce09 (diff) | |
download | otp-b32911645a20230864eaee965d6a7f1be248e47e.tar.gz otp-b32911645a20230864eaee965d6a7f1be248e47e.tar.bz2 otp-b32911645a20230864eaee965d6a7f1be248e47e.zip |
Implement {netns,NS} option for inet:getifaddrs/1
Also implement the same option for the legacy undocumented functions
inet:getif/1,getiflist/1,ifget/2,ifset/2.
The arity 1 functions had before this change got signatures that
took a socket port that was used to do the needed syscall, so now
the signature was extended to also take an option list with the
only supported option {netns,Namespace}. The Socket argument
variant remains unsupported.
For inet:getifaddrs/1 the documentation file was changed to old
style function name definition so be able to hide the Socket
argument variant that is visible in the type spec.
The arity 2 functions had got an option list as second argument.
This list had to be partitioned into one list for the namespace
option(s) and the other for the rest.
The namespace option list was then fed to the already existing
namespace support for socket opening, which places the socket
in a namespace and hence made all these functions that in
inet_drv.c used getsockopt() work without change.
The functions that used getifaddrs() in inet_drv.c had to be
changed in inet_drv.c to swap namespaces around the
getifaddrs() syscall. This functionality was separated into
a new function call_getifaddrs().
Diffstat (limited to 'lib/kernel/src/inet_dns.hrl')
0 files changed, 0 insertions, 0 deletions