Imported Upstream version 0.1.16
[platform/upstream/libnice.git] / docs / reference / libnice / html / libnice-Network-interfaces-discovery.html
1 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
2 <html>
3 <head>
4 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
5 <title>Network interfaces discovery: libnice Reference Manual</title>
6 <meta name="generator" content="DocBook XSL Stylesheets Vsnapshot">
7 <link rel="home" href="index.html" title="libnice Reference Manual">
8 <link rel="up" href="ch02.html" title="Libnice helper functions">
9 <link rel="prev" href="libnice-Debug-messages.html" title="Debug messages">
10 <link rel="next" href="pt02.html" title="Part II. STUN Library">
11 <meta name="generator" content="GTK-Doc V1.29 (XML mode)">
12 <link rel="stylesheet" href="style.css" type="text/css">
13 </head>
14 <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
15 <table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="5"><tr valign="middle">
16 <td width="100%" align="left" class="shortcuts">
17 <a href="#" class="shortcut">Top</a><span id="nav_description">  <span class="dim">|</span> 
18                   <a href="#libnice-Network-interfaces-discovery.description" class="shortcut">Description</a></span>
19 </td>
20 <td><a accesskey="h" href="index.html"><img src="home.png" width="16" height="16" border="0" alt="Home"></a></td>
21 <td><a accesskey="u" href="ch02.html"><img src="up.png" width="16" height="16" border="0" alt="Up"></a></td>
22 <td><a accesskey="p" href="libnice-Debug-messages.html"><img src="left.png" width="16" height="16" border="0" alt="Prev"></a></td>
23 <td><a accesskey="n" href="pt02.html"><img src="right.png" width="16" height="16" border="0" alt="Next"></a></td>
24 </tr></table>
25 <div class="refentry">
26 <a name="libnice-Network-interfaces-discovery"></a><div class="titlepage"></div>
27 <div class="refnamediv"><table width="100%"><tr>
28 <td valign="top">
29 <h2><span class="refentrytitle"><a name="libnice-Network-interfaces-discovery.top_of_page"></a>Network interfaces discovery</span></h2>
30 <p>Network interfaces discovery — Utility functions to discover local network interfaces</p>
31 </td>
32 <td class="gallery_image" valign="top" align="right"></td>
33 </tr></table></div>
34 <div class="refsect1">
35 <a name="libnice-Network-interfaces-discovery.stability-level"></a><h2>Stability Level</h2>
36 <acronym title="The intention of a Stable interface is to enable arbitrary third parties to
37 develop applications to these interfaces, release them, and have confidence that
38 they will run on all minor releases of the product (after the one in which the
39 interface was introduced, and within the same major release). Even at a major
40 release, incompatible changes are expected to be rare, and to have strong
41 justifications.
42 "><span class="acronym">Stable</span></acronym>, unless otherwise indicated
43 </div>
44 <div class="refsect1">
45 <a name="libnice-Network-interfaces-discovery.functions"></a><h2>Functions</h2>
46 <div class="informaltable"><table class="informaltable" width="100%" border="0">
47 <colgroup>
48 <col width="150px" class="functions_return">
49 <col class="functions_name">
50 </colgroup>
51 <tbody>
52 <tr>
53 <td class="function_type">
54 <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"><span class="returnvalue">gchar</span></a> *
55 </td>
56 <td class="function_name">
57 <a class="link" href="libnice-Network-interfaces-discovery.html#nice-interfaces-get-ip-for-interface" title="nice_interfaces_get_ip_for_interface ()">nice_interfaces_get_ip_for_interface</a> <span class="c_punctuation">()</span>
58 </td>
59 </tr>
60 <tr>
61 <td class="function_type">
62 <a href="/usr/share/gtk-doc/html/glib/glib-Doubly-Linked-Lists.html#GList"><span class="returnvalue">GList</span></a> *
63 </td>
64 <td class="function_name">
65 <a class="link" href="libnice-Network-interfaces-discovery.html#nice-interfaces-get-local-interfaces" title="nice_interfaces_get_local_interfaces ()">nice_interfaces_get_local_interfaces</a> <span class="c_punctuation">()</span>
66 </td>
67 </tr>
68 <tr>
69 <td class="function_type">
70 <a href="/usr/share/gtk-doc/html/glib/glib-Doubly-Linked-Lists.html#GList"><span class="returnvalue">GList</span></a> *
71 </td>
72 <td class="function_name">
73 <a class="link" href="libnice-Network-interfaces-discovery.html#nice-interfaces-get-local-ips" title="nice_interfaces_get_local_ips ()">nice_interfaces_get_local_ips</a> <span class="c_punctuation">()</span>
74 </td>
75 </tr>
76 </tbody>
77 </table></div>
78 </div>
79 <div class="refsect1">
80 <a name="libnice-Network-interfaces-discovery.includes"></a><h2>Includes</h2>
81 <pre class="synopsis">#include &lt;interfaces.h&gt;
82 </pre>
83 </div>
84 <div class="refsect1">
85 <a name="libnice-Network-interfaces-discovery.description"></a><h2>Description</h2>
86 <p>These utility functions allow the discovery of local network interfaces
87 in a portable manner, they also allow finding the local ip addresses or
88 the address allocated to a network interface.</p>
89 </div>
90 <div class="refsect1">
91 <a name="libnice-Network-interfaces-discovery.functions_details"></a><h2>Functions</h2>
92 <div class="refsect2">
93 <a name="nice-interfaces-get-ip-for-interface"></a><h3>nice_interfaces_get_ip_for_interface ()</h3>
94 <pre class="programlisting"><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"><span class="returnvalue">gchar</span></a> *
95 nice_interfaces_get_ip_for_interface (<em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *interface_name</code></em>);</pre>
96 <p>Retrieves the IP address of an interface by its name. If this fails, <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>
97 is returned.</p>
98 <div class="refsect3">
99 <a name="nice-interfaces-get-ip-for-interface.parameters"></a><h4>Parameters</h4>
100 <div class="informaltable"><table class="informaltable" width="100%" border="0">
101 <colgroup>
102 <col width="150px" class="parameters_name">
103 <col class="parameters_description">
104 <col width="200px" class="parameters_annotations">
105 </colgroup>
106 <tbody><tr>
107 <td class="parameter_name"><p>interface_name</p></td>
108 <td class="parameter_description"><p>name of local interface</p></td>
109 <td class="parameter_annotations"> </td>
110 </tr></tbody>
111 </table></div>
112 </div>
113 <div class="refsect3">
114 <a name="nice-interfaces-get-ip-for-interface.returns"></a><h4>Returns</h4>
115 <p>a newly-allocated string with the IP
116 address. </p>
117 <p><span class="annotation">[<acronym title="NULL may be passed as the value in, out, in-out; or as a return value."><span class="acronym">nullable</span></acronym>][<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span></p>
118 </div>
119 </div>
120 <hr>
121 <div class="refsect2">
122 <a name="nice-interfaces-get-local-interfaces"></a><h3>nice_interfaces_get_local_interfaces ()</h3>
123 <pre class="programlisting"><a href="/usr/share/gtk-doc/html/glib/glib-Doubly-Linked-Lists.html#GList"><span class="returnvalue">GList</span></a> *
124 nice_interfaces_get_local_interfaces (<em class="parameter"><code><span class="type">void</span></code></em>);</pre>
125 <p>Get the list of local interfaces</p>
126 <div class="refsect3">
127 <a name="nice-interfaces-get-local-interfaces.returns"></a><h4>Returns</h4>
128 <p>a newly-allocated <a href="/usr/share/gtk-doc/html/glib/glib-Doubly-Linked-Lists.html#GList"><span class="type">GList</span></a> of
129 strings. The caller must free it. </p>
130 <p><span class="annotation">[<acronym title="Generics and defining elements of containers and arrays."><span class="acronym">element-type</span></acronym> utf8][<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span></p>
131 </div>
132 </div>
133 <hr>
134 <div class="refsect2">
135 <a name="nice-interfaces-get-local-ips"></a><h3>nice_interfaces_get_local_ips ()</h3>
136 <pre class="programlisting"><a href="/usr/share/gtk-doc/html/glib/glib-Doubly-Linked-Lists.html#GList"><span class="returnvalue">GList</span></a> *
137 nice_interfaces_get_local_ips (<em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a> include_loopback</code></em>);</pre>
138 <p>Get a list of local ipv4 interface addresses</p>
139 <div class="refsect3">
140 <a name="nice-interfaces-get-local-ips.parameters"></a><h4>Parameters</h4>
141 <div class="informaltable"><table class="informaltable" width="100%" border="0">
142 <colgroup>
143 <col width="150px" class="parameters_name">
144 <col class="parameters_description">
145 <col width="200px" class="parameters_annotations">
146 </colgroup>
147 <tbody><tr>
148 <td class="parameter_name"><p>include_loopback</p></td>
149 <td class="parameter_description"><p>Include any loopback devices</p></td>
150 <td class="parameter_annotations"> </td>
151 </tr></tbody>
152 </table></div>
153 </div>
154 <div class="refsect3">
155 <a name="nice-interfaces-get-local-ips.returns"></a><h4>Returns</h4>
156 <p>a newly-allocated <a href="/usr/share/gtk-doc/html/glib/glib-Doubly-Linked-Lists.html#GList"><span class="type">GList</span></a> of
157 strings. The caller must free it. </p>
158 <p><span class="annotation">[<acronym title="Generics and defining elements of containers and arrays."><span class="acronym">element-type</span></acronym> utf8][<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span></p>
159 </div>
160 </div>
161 </div>
162 <div class="refsect1">
163 <a name="libnice-Network-interfaces-discovery.other_details"></a><h2>Types and Values</h2>
164 </div>
165 </div>
166 <div class="footer">
167 <hr>Generated by GTK-Doc V1.29</div>
168 </body>
169 </html>