summaryrefslogtreecommitdiff
path: root/lib/kernel/doc/src/net.xml
diff options
context:
space:
mode:
Diffstat (limited to 'lib/kernel/doc/src/net.xml')
-rw-r--r--lib/kernel/doc/src/net.xml49
1 files changed, 49 insertions, 0 deletions
diff --git a/lib/kernel/doc/src/net.xml b/lib/kernel/doc/src/net.xml
index 6fbc37076c..c8844f5257 100644
--- a/lib/kernel/doc/src/net.xml
+++ b/lib/kernel/doc/src/net.xml
@@ -36,6 +36,10 @@
<note>
<p>There is currently <em>no</em> support for Windows. </p>
</note>
+ <note>
+ <p>The content of this file is <em>only</em> valid if the system has
+ been built with 'socket' (esock) support, which is the default. </p>
+ </note>
</description>
<datatypes>
@@ -43,6 +47,34 @@
<name name="address_info"/>
</datatype>
<datatype>
+ <name name="ifaddrs"/>
+ <desc>
+ <p>This type defines all addresses (and flags) associated with
+ the interface. </p>
+ <p>Not all fields of this map has to be present.
+ The flags field can be used to test this for some of the fields.
+ For example <c>broadaddr</c> will only be present if the
+ <c>broadcast</c> flag is present in flags. </p>
+ </desc>
+ </datatype>
+ <datatype>
+ <name name="ifaddrs_flag"/>
+ </datatype>
+ <datatype>
+ <name name="ifaddrs_filter_map"/>
+ <desc>
+ <p>The '<c>default</c>' value for <c>family</c> is interpreted
+ as <c>inet</c> <em>and</em> <c>inet6</c>. </p>
+ <p>Also, the <c>family</c> field can only have the specified values
+ (and not the all the values of socket:domain()). </p>
+ <p>The use of the <c>flags</c> field is that any flag provided must
+ exist for the interface. </p>
+ <p>For example, if <c>family</c> is set to <c>inet</c> and <c>flags</c>
+ to <c>[broadcast, multicast]</c> only interfaces address family <c>inet</c>
+ and the flags <c>broadcast</c> and <c>multicast</c> will be listen. </p>
+ </desc>
+ </datatype>
+ <datatype>
<name name="name_info"/>
</datatype>
<datatype>
@@ -100,6 +132,23 @@
</func>
<func>
+ <name name="getifaddrs" arity="0" since="@OTP-16212@"/>
+ <name name="getifaddrs" arity="1" clause_i="1" since="@OTP-16212@"/>
+ <name name="getifaddrs" arity="1" clause_i="2" since="@OTP-16212@"/>
+ <name name="getifaddrs" arity="2" since="@OTP-16212@"/>
+ <fsummary>Get interface addresses.</fsummary>
+ <desc>
+ <p>Get interface addresses.</p>
+ <p>This function is used to get the machines interface addresses,
+ possibly filtered with the <c>FilterMap</c>. </p>
+ <p>By default, a filter with the content:
+ <c>#{family => default, flags => any}</c> is used.
+ This will return all interfaces with adresses in the
+ <c>inet</c> and <c>inet6</c> families. </p>
+ </desc>
+ </func>
+
+ <func>
<name name="if_name2index" arity="1" since="OTP 22.0"/>
<fsummary>Mappings between network interface names and indexes.</fsummary>
<desc>