tizen 2.0 init
[framework/multimedia/gst-plugins-base0.10.git] / docs / libs / html / gst-plugins-base-libs-gstnetbuffer.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>gstnetbuffer</title>
6 <meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
7 <link rel="home" href="index.html" title="GStreamer Base Plugins 0.10 Library Reference Manual">
8 <link rel="up" href="gstreamer-netbuffer.html" title="Network Buffer Library">
9 <link rel="prev" href="gstreamer-netbuffer.html" title="Network Buffer Library">
10 <link rel="next" href="gstreamer-riff.html" title="Riff Media Library">
11 <meta name="generator" content="GTK-Doc V1.18 (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="2">
16 <tr valign="middle">
17 <td><a accesskey="p" href="gstreamer-netbuffer.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td>
18 <td><a accesskey="u" href="gstreamer-netbuffer.html"><img src="up.png" width="24" height="24" border="0" alt="Up"></a></td>
19 <td><a accesskey="h" href="index.html"><img src="home.png" width="24" height="24" border="0" alt="Home"></a></td>
20 <th width="100%" align="center">GStreamer Base Plugins 0.10 Library Reference Manual</th>
21 <td><a accesskey="n" href="gstreamer-riff.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td>
22 </tr>
23 <tr><td colspan="5" class="shortcuts">
24 <a href="#gst-plugins-base-libs-gstnetbuffer.synopsis" class="shortcut">Top</a>
25                    | 
26                   <a href="#gst-plugins-base-libs-gstnetbuffer.description" class="shortcut">Description</a>
27 </td></tr>
28 </table>
29 <div class="refentry">
30 <a name="gst-plugins-base-libs-gstnetbuffer"></a><div class="titlepage"></div>
31 <div class="refnamediv"><table width="100%"><tr>
32 <td valign="top">
33 <h2><span class="refentrytitle"><a name="gst-plugins-base-libs-gstnetbuffer.top_of_page"></a>gstnetbuffer</span></h2>
34 <p>gstnetbuffer — Buffer for use in network sources and sinks</p>
35 </td>
36 <td valign="top" align="right"></td>
37 </tr></table></div>
38 <div class="refsynopsisdiv">
39 <a name="gst-plugins-base-libs-gstnetbuffer.synopsis"></a><h2>Synopsis</h2>
40 <pre class="synopsis">
41 #include &lt;gst/netbuffer/gstnetbuffer.h&gt;
42
43 struct              <a class="link" href="gst-plugins-base-libs-gstnetbuffer.html#GstNetBuffer" title="struct GstNetBuffer">GstNetBuffer</a>;
44 enum                <a class="link" href="gst-plugins-base-libs-gstnetbuffer.html#GstNetType" title="enum GstNetType">GstNetType</a>;
45 #define             <a class="link" href="gst-plugins-base-libs-gstnetbuffer.html#GST-NETADDRESS-MAX-LEN:CAPS" title="GST_NETADDRESS_MAX_LEN">GST_NETADDRESS_MAX_LEN</a>
46 struct              <a class="link" href="gst-plugins-base-libs-gstnetbuffer.html#GstNetAddress" title="struct GstNetAddress">GstNetAddress</a>;
47 <a class="link" href="gst-plugins-base-libs-gstnetbuffer.html#GstNetBuffer" title="struct GstNetBuffer"><span class="returnvalue">GstNetBuffer</span></a> *      <a class="link" href="gst-plugins-base-libs-gstnetbuffer.html#gst-netbuffer-new" title="gst_netbuffer_new ()">gst_netbuffer_new</a>                   (<em class="parameter"><code><span class="type">void</span></code></em>);
48 <a class="link" href="gst-plugins-base-libs-gstnetbuffer.html#GstNetType" title="enum GstNetType"><span class="returnvalue">GstNetType</span></a>          <a class="link" href="gst-plugins-base-libs-gstnetbuffer.html#gst-netaddress-get-net-type" title="gst_netaddress_get_net_type ()">gst_netaddress_get_net_type</a>         (<em class="parameter"><code>const <a class="link" href="gst-plugins-base-libs-gstnetbuffer.html#GstNetAddress" title="struct GstNetAddress"><span class="type">GstNetAddress</span></a> *naddr</code></em>);
49 <span class="returnvalue">void</span>                <a class="link" href="gst-plugins-base-libs-gstnetbuffer.html#gst-netaddress-set-ip4-address" title="gst_netaddress_set_ip4_address ()">gst_netaddress_set_ip4_address</a>      (<em class="parameter"><code><a class="link" href="gst-plugins-base-libs-gstnetbuffer.html#GstNetAddress" title="struct GstNetAddress"><span class="type">GstNetAddress</span></a> *naddr</code></em>,
50                                                          <em class="parameter"><code><span class="type">guint32</span> address</code></em>,
51                                                          <em class="parameter"><code><span class="type">guint16</span> port</code></em>);
52 <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>            <a class="link" href="gst-plugins-base-libs-gstnetbuffer.html#gst-netaddress-get-ip4-address" title="gst_netaddress_get_ip4_address ()">gst_netaddress_get_ip4_address</a>      (<em class="parameter"><code>const <a class="link" href="gst-plugins-base-libs-gstnetbuffer.html#GstNetAddress" title="struct GstNetAddress"><span class="type">GstNetAddress</span></a> *naddr</code></em>,
53                                                          <em class="parameter"><code><span class="type">guint32</span> *address</code></em>,
54                                                          <em class="parameter"><code><span class="type">guint16</span> *port</code></em>);
55 <span class="returnvalue">void</span>                <a class="link" href="gst-plugins-base-libs-gstnetbuffer.html#gst-netaddress-set-ip6-address" title="gst_netaddress_set_ip6_address ()">gst_netaddress_set_ip6_address</a>      (<em class="parameter"><code><a class="link" href="gst-plugins-base-libs-gstnetbuffer.html#GstNetAddress" title="struct GstNetAddress"><span class="type">GstNetAddress</span></a> *naddr</code></em>,
56                                                          <em class="parameter"><code><span class="type">guint8</span> address[16]</code></em>,
57                                                          <em class="parameter"><code><span class="type">guint16</span> port</code></em>);
58 <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>            <a class="link" href="gst-plugins-base-libs-gstnetbuffer.html#gst-netaddress-get-ip6-address" title="gst_netaddress_get_ip6_address ()">gst_netaddress_get_ip6_address</a>      (<em class="parameter"><code>const <a class="link" href="gst-plugins-base-libs-gstnetbuffer.html#GstNetAddress" title="struct GstNetAddress"><span class="type">GstNetAddress</span></a> *naddr</code></em>,
59                                                          <em class="parameter"><code><span class="type">guint8</span> address[16]</code></em>,
60                                                          <em class="parameter"><code><span class="type">guint16</span> *port</code></em>);
61 <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gint"><span class="returnvalue">gint</span></a>                <a class="link" href="gst-plugins-base-libs-gstnetbuffer.html#gst-netaddress-get-address-bytes" title="gst_netaddress_get_address_bytes ()">gst_netaddress_get_address_bytes</a>    (<em class="parameter"><code>const <a class="link" href="gst-plugins-base-libs-gstnetbuffer.html#GstNetAddress" title="struct GstNetAddress"><span class="type">GstNetAddress</span></a> *naddr</code></em>,
62                                                          <em class="parameter"><code><span class="type">guint8</span> address[16]</code></em>,
63                                                          <em class="parameter"><code><span class="type">guint16</span> *port</code></em>);
64 <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gint"><span class="returnvalue">gint</span></a>                <a class="link" href="gst-plugins-base-libs-gstnetbuffer.html#gst-netaddress-set-address-bytes" title="gst_netaddress_set_address_bytes ()">gst_netaddress_set_address_bytes</a>    (<em class="parameter"><code><a class="link" href="gst-plugins-base-libs-gstnetbuffer.html#GstNetAddress" title="struct GstNetAddress"><span class="type">GstNetAddress</span></a> *naddr</code></em>,
65                                                          <em class="parameter"><code><a class="link" href="gst-plugins-base-libs-gstnetbuffer.html#GstNetType" title="enum GstNetType"><span class="type">GstNetType</span></a> type</code></em>,
66                                                          <em class="parameter"><code><span class="type">guint8</span> address[16]</code></em>,
67                                                          <em class="parameter"><code><span class="type">guint16</span> port</code></em>);
68 <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>            <a class="link" href="gst-plugins-base-libs-gstnetbuffer.html#gst-netaddress-equal" title="gst_netaddress_equal ()">gst_netaddress_equal</a>                (<em class="parameter"><code>const <a class="link" href="gst-plugins-base-libs-gstnetbuffer.html#GstNetAddress" title="struct GstNetAddress"><span class="type">GstNetAddress</span></a> *naddr1</code></em>,
69                                                          <em class="parameter"><code>const <a class="link" href="gst-plugins-base-libs-gstnetbuffer.html#GstNetAddress" title="struct GstNetAddress"><span class="type">GstNetAddress</span></a> *naddr2</code></em>);
70 <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gint"><span class="returnvalue">gint</span></a>                <a class="link" href="gst-plugins-base-libs-gstnetbuffer.html#gst-netaddress-to-string" title="gst_netaddress_to_string ()">gst_netaddress_to_string</a>            (<em class="parameter"><code>const <a class="link" href="gst-plugins-base-libs-gstnetbuffer.html#GstNetAddress" title="struct GstNetAddress"><span class="type">GstNetAddress</span></a> *naddr</code></em>,
71                                                          <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *dest</code></em>,
72                                                          <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gulong"><span class="type">gulong</span></a> len</code></em>);
73 </pre>
74 </div>
75 <div class="refsect1">
76 <a name="gst-plugins-base-libs-gstnetbuffer.description"></a><h2>Description</h2>
77 <p>
78 <a class="link" href="gst-plugins-base-libs-gstnetbuffer.html#GstNetBuffer" title="struct GstNetBuffer"><span class="type">GstNetBuffer</span></a> is a subclass of a normal <a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/gstreamer-GstBuffer.html#GstBuffer"><span class="type">GstBuffer</span></a> that contains two
79 additional metadata fields of type <a class="link" href="gst-plugins-base-libs-gstnetbuffer.html#GstNetAddress" title="struct GstNetAddress"><span class="type">GstNetAddress</span></a> named 'to' and 'from'. The
80 buffer can be used to store additional information about the origin of the
81 buffer data and is used in various network elements to track the to and from
82 addresses.
83 </p>
84 <p>
85 Last reviewed on 2006-08-21 (0.10.10)
86 </p>
87 </div>
88 <div class="refsect1">
89 <a name="gst-plugins-base-libs-gstnetbuffer.details"></a><h2>Details</h2>
90 <div class="refsect2">
91 <a name="GstNetBuffer"></a><h3>struct GstNetBuffer</h3>
92 <pre class="programlisting">struct GstNetBuffer {
93   GstBuffer buffer;
94
95   GstNetAddress from;
96   GstNetAddress to;
97 };
98 </pre>
99 <p>
100 buffer for use in network sources and sinks.
101 It contains the source or destination address of the buffer.
102 </p>
103 <div class="variablelist"><table border="0">
104 <col align="left" valign="top">
105 <tbody>
106 <tr>
107 <td><p><span class="term"><a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/gstreamer-GstBuffer.html#GstBuffer"><span class="type">GstBuffer</span></a> <em class="structfield"><code><a name="GstNetBuffer.buffer"></a>buffer</code></em>;</span></p></td>
108 <td>the parent <a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/gstreamer-GstBuffer.html#GstBuffer"><span class="type">GstBuffer</span></a>
109 </td>
110 </tr>
111 <tr>
112 <td><p><span class="term"><a class="link" href="gst-plugins-base-libs-gstnetbuffer.html#GstNetAddress" title="struct GstNetAddress"><span class="type">GstNetAddress</span></a> <em class="structfield"><code><a name="GstNetBuffer.from"></a>from</code></em>;</span></p></td>
113 <td>the address where this buffer came from.</td>
114 </tr>
115 <tr>
116 <td><p><span class="term"><a class="link" href="gst-plugins-base-libs-gstnetbuffer.html#GstNetAddress" title="struct GstNetAddress"><span class="type">GstNetAddress</span></a> <em class="structfield"><code><a name="GstNetBuffer.to"></a>to</code></em>;</span></p></td>
117 <td>the address where this buffer should go to.</td>
118 </tr>
119 </tbody>
120 </table></div>
121 </div>
122 <hr>
123 <div class="refsect2">
124 <a name="GstNetType"></a><h3>enum GstNetType</h3>
125 <pre class="programlisting">typedef enum {
126   GST_NET_TYPE_UNKNOWN,
127   GST_NET_TYPE_IP4,
128   GST_NET_TYPE_IP6,
129 } GstNetType;
130 </pre>
131 <p>
132 The Address type used in <a class="link" href="gst-plugins-base-libs-gstnetbuffer.html#GstNetAddress" title="struct GstNetAddress"><span class="type">GstNetAddress</span></a>.
133 </p>
134 <div class="variablelist"><table border="0">
135 <col align="left" valign="top">
136 <tbody>
137 <tr>
138 <td><p><a name="GST-NET-TYPE-UNKNOWN:CAPS"></a><span class="term"><code class="literal">GST_NET_TYPE_UNKNOWN</code></span></p></td>
139 <td>unknown address type
140 </td>
141 </tr>
142 <tr>
143 <td><p><a name="GST-NET-TYPE-IP4:CAPS"></a><span class="term"><code class="literal">GST_NET_TYPE_IP4</code></span></p></td>
144 <td>an IPv4 address type
145 </td>
146 </tr>
147 <tr>
148 <td><p><a name="GST-NET-TYPE-IP6:CAPS"></a><span class="term"><code class="literal">GST_NET_TYPE_IP6</code></span></p></td>
149 <td>and IPv6 address type
150 </td>
151 </tr>
152 </tbody>
153 </table></div>
154 </div>
155 <hr>
156 <div class="refsect2">
157 <a name="GST-NETADDRESS-MAX-LEN:CAPS"></a><h3>GST_NETADDRESS_MAX_LEN</h3>
158 <pre class="programlisting">#define GST_NETADDRESS_MAX_LEN 64
159 </pre>
160 <p>
161 The maximum length of a string representation of a GstNetAddress as produced
162 by <a class="link" href="gst-plugins-base-libs-gstnetbuffer.html#gst-netaddress-to-string" title="gst_netaddress_to_string ()"><code class="function">gst_netaddress_to_string()</code></a>.
163 </p>
164 <p class="since">Since 0.10.24</p>
165 </div>
166 <hr>
167 <div class="refsect2">
168 <a name="GstNetAddress"></a><h3>struct GstNetAddress</h3>
169 <pre class="programlisting">struct GstNetAddress {
170 };
171 </pre>
172 <p>
173 An opaque network address as used in <a class="link" href="gst-plugins-base-libs-gstnetbuffer.html#GstNetBuffer" title="struct GstNetBuffer"><span class="type">GstNetBuffer</span></a>.
174 </p>
175 </div>
176 <hr>
177 <div class="refsect2">
178 <a name="gst-netbuffer-new"></a><h3>gst_netbuffer_new ()</h3>
179 <pre class="programlisting"><a class="link" href="gst-plugins-base-libs-gstnetbuffer.html#GstNetBuffer" title="struct GstNetBuffer"><span class="returnvalue">GstNetBuffer</span></a> *      gst_netbuffer_new                   (<em class="parameter"><code><span class="type">void</span></code></em>);</pre>
180 <p>
181 Create a new network buffer.
182 </p>
183 <div class="variablelist"><table border="0">
184 <col align="left" valign="top">
185 <tbody><tr>
186 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
187 <td>a new <a class="link" href="gst-plugins-base-libs-gstnetbuffer.html#GstNetBuffer" title="struct GstNetBuffer"><span class="type">GstNetBuffer</span></a>.</td>
188 </tr></tbody>
189 </table></div>
190 </div>
191 <hr>
192 <div class="refsect2">
193 <a name="gst-netaddress-get-net-type"></a><h3>gst_netaddress_get_net_type ()</h3>
194 <pre class="programlisting"><a class="link" href="gst-plugins-base-libs-gstnetbuffer.html#GstNetType" title="enum GstNetType"><span class="returnvalue">GstNetType</span></a>          gst_netaddress_get_net_type         (<em class="parameter"><code>const <a class="link" href="gst-plugins-base-libs-gstnetbuffer.html#GstNetAddress" title="struct GstNetAddress"><span class="type">GstNetAddress</span></a> *naddr</code></em>);</pre>
195 <p>
196 Get the type of address stored in <em class="parameter"><code>naddr</code></em>.
197 </p>
198 <div class="variablelist"><table border="0">
199 <col align="left" valign="top">
200 <tbody>
201 <tr>
202 <td><p><span class="term"><em class="parameter"><code>naddr</code></em> :</span></p></td>
203 <td>a network address</td>
204 </tr>
205 <tr>
206 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
207 <td>the network type stored in <em class="parameter"><code>naddr</code></em>.</td>
208 </tr>
209 </tbody>
210 </table></div>
211 </div>
212 <hr>
213 <div class="refsect2">
214 <a name="gst-netaddress-set-ip4-address"></a><h3>gst_netaddress_set_ip4_address ()</h3>
215 <pre class="programlisting"><span class="returnvalue">void</span>                gst_netaddress_set_ip4_address      (<em class="parameter"><code><a class="link" href="gst-plugins-base-libs-gstnetbuffer.html#GstNetAddress" title="struct GstNetAddress"><span class="type">GstNetAddress</span></a> *naddr</code></em>,
216                                                          <em class="parameter"><code><span class="type">guint32</span> address</code></em>,
217                                                          <em class="parameter"><code><span class="type">guint16</span> port</code></em>);</pre>
218 <p>
219 Set <em class="parameter"><code>naddr</code></em> with the IPv4 <em class="parameter"><code>address</code></em> and <em class="parameter"><code>port</code></em> pair.
220 </p>
221 <p>
222 Note that <em class="parameter"><code>port</code></em> and <em class="parameter"><code>address</code></em> must be expressed in network byte order,
223 use <a href="http://library.gnome.org/devel/glib/unstable/glib-Byte-Order-Macros.html#g-htons"><code class="function">g_htons()</code></a> and <a href="http://library.gnome.org/devel/glib/unstable/glib-Byte-Order-Macros.html#g-htonl"><code class="function">g_htonl()</code></a> to convert them to network byte order.
224 </p>
225 <div class="variablelist"><table border="0">
226 <col align="left" valign="top">
227 <tbody>
228 <tr>
229 <td><p><span class="term"><em class="parameter"><code>naddr</code></em> :</span></p></td>
230 <td>a network address</td>
231 </tr>
232 <tr>
233 <td><p><span class="term"><em class="parameter"><code>address</code></em> :</span></p></td>
234 <td>an IPv4 network address.</td>
235 </tr>
236 <tr>
237 <td><p><span class="term"><em class="parameter"><code>port</code></em> :</span></p></td>
238 <td>a port number to set.</td>
239 </tr>
240 </tbody>
241 </table></div>
242 </div>
243 <hr>
244 <div class="refsect2">
245 <a name="gst-netaddress-get-ip4-address"></a><h3>gst_netaddress_get_ip4_address ()</h3>
246 <pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>            gst_netaddress_get_ip4_address      (<em class="parameter"><code>const <a class="link" href="gst-plugins-base-libs-gstnetbuffer.html#GstNetAddress" title="struct GstNetAddress"><span class="type">GstNetAddress</span></a> *naddr</code></em>,
247                                                          <em class="parameter"><code><span class="type">guint32</span> *address</code></em>,
248                                                          <em class="parameter"><code><span class="type">guint16</span> *port</code></em>);</pre>
249 <p>
250 Get the IPv4 address stored in <em class="parameter"><code>naddr</code></em> into <em class="parameter"><code>address</code></em>. This function requires
251 that the address type of <em class="parameter"><code>naddr</code></em> is of type <a class="link" href="gst-plugins-base-libs-gstnetbuffer.html#GST-NET-TYPE-IP4:CAPS"><span class="type">GST_NET_TYPE_IP4</span></a>.
252 </p>
253 <p>
254 Note that <em class="parameter"><code>port</code></em> and <em class="parameter"><code>address</code></em> are expressed in network byte order, use
255 <a href="http://library.gnome.org/devel/glib/unstable/glib-Byte-Order-Macros.html#g-ntohs"><code class="function">g_ntohs()</code></a> and <a href="http://library.gnome.org/devel/glib/unstable/glib-Byte-Order-Macros.html#g-ntohl"><code class="function">g_ntohl()</code></a> to convert them to host order.
256 </p>
257 <div class="variablelist"><table border="0">
258 <col align="left" valign="top">
259 <tbody>
260 <tr>
261 <td><p><span class="term"><em class="parameter"><code>naddr</code></em> :</span></p></td>
262 <td>a network address</td>
263 </tr>
264 <tr>
265 <td><p><span class="term"><em class="parameter"><code>address</code></em> :</span></p></td>
266 <td>a location to store the address.</td>
267 </tr>
268 <tr>
269 <td><p><span class="term"><em class="parameter"><code>port</code></em> :</span></p></td>
270 <td>a location to store the port.</td>
271 </tr>
272 <tr>
273 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
274 <td>TRUE if the address could be retrieved.</td>
275 </tr>
276 </tbody>
277 </table></div>
278 </div>
279 <hr>
280 <div class="refsect2">
281 <a name="gst-netaddress-set-ip6-address"></a><h3>gst_netaddress_set_ip6_address ()</h3>
282 <pre class="programlisting"><span class="returnvalue">void</span>                gst_netaddress_set_ip6_address      (<em class="parameter"><code><a class="link" href="gst-plugins-base-libs-gstnetbuffer.html#GstNetAddress" title="struct GstNetAddress"><span class="type">GstNetAddress</span></a> *naddr</code></em>,
283                                                          <em class="parameter"><code><span class="type">guint8</span> address[16]</code></em>,
284                                                          <em class="parameter"><code><span class="type">guint16</span> port</code></em>);</pre>
285 <p>
286 Set <em class="parameter"><code>naddr</code></em> with the IPv6 <em class="parameter"><code>address</code></em> and <em class="parameter"><code>port</code></em> pair.
287 </p>
288 <p>
289 Note that <em class="parameter"><code>port</code></em> must be expressed in network byte order, use <a href="http://library.gnome.org/devel/glib/unstable/glib-Byte-Order-Macros.html#g-htons"><code class="function">g_htons()</code></a> to convert
290 it to network byte order.
291 </p>
292 <div class="variablelist"><table border="0">
293 <col align="left" valign="top">
294 <tbody>
295 <tr>
296 <td><p><span class="term"><em class="parameter"><code>naddr</code></em> :</span></p></td>
297 <td>a network address</td>
298 </tr>
299 <tr>
300 <td><p><span class="term"><em class="parameter"><code>address</code></em> :</span></p></td>
301 <td>an IPv6 network address.</td>
302 </tr>
303 <tr>
304 <td><p><span class="term"><em class="parameter"><code>port</code></em> :</span></p></td>
305 <td>a port number to set.</td>
306 </tr>
307 </tbody>
308 </table></div>
309 </div>
310 <hr>
311 <div class="refsect2">
312 <a name="gst-netaddress-get-ip6-address"></a><h3>gst_netaddress_get_ip6_address ()</h3>
313 <pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>            gst_netaddress_get_ip6_address      (<em class="parameter"><code>const <a class="link" href="gst-plugins-base-libs-gstnetbuffer.html#GstNetAddress" title="struct GstNetAddress"><span class="type">GstNetAddress</span></a> *naddr</code></em>,
314                                                          <em class="parameter"><code><span class="type">guint8</span> address[16]</code></em>,
315                                                          <em class="parameter"><code><span class="type">guint16</span> *port</code></em>);</pre>
316 <p>
317 Get the IPv6 address stored in <em class="parameter"><code>naddr</code></em> into <em class="parameter"><code>address</code></em>.
318 </p>
319 <p>
320 If <em class="parameter"><code>naddr</code></em> is of type GST_NET_TYPE_IP4, the transitional IP6 address is
321 returned.
322 </p>
323 <p>
324 Note that <em class="parameter"><code>port</code></em> is expressed in network byte order, use <a href="http://library.gnome.org/devel/glib/unstable/glib-Byte-Order-Macros.html#g-ntohs"><code class="function">g_ntohs()</code></a> to convert
325 it to host order.
326 </p>
327 <div class="variablelist"><table border="0">
328 <col align="left" valign="top">
329 <tbody>
330 <tr>
331 <td><p><span class="term"><em class="parameter"><code>naddr</code></em> :</span></p></td>
332 <td>a network address</td>
333 </tr>
334 <tr>
335 <td><p><span class="term"><em class="parameter"><code>address</code></em> :</span></p></td>
336 <td>a location to store the result.</td>
337 </tr>
338 <tr>
339 <td><p><span class="term"><em class="parameter"><code>port</code></em> :</span></p></td>
340 <td>a location to store the port.</td>
341 </tr>
342 <tr>
343 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
344 <td>TRUE if the address could be retrieved.</td>
345 </tr>
346 </tbody>
347 </table></div>
348 </div>
349 <hr>
350 <div class="refsect2">
351 <a name="gst-netaddress-get-address-bytes"></a><h3>gst_netaddress_get_address_bytes ()</h3>
352 <pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gint"><span class="returnvalue">gint</span></a>                gst_netaddress_get_address_bytes    (<em class="parameter"><code>const <a class="link" href="gst-plugins-base-libs-gstnetbuffer.html#GstNetAddress" title="struct GstNetAddress"><span class="type">GstNetAddress</span></a> *naddr</code></em>,
353                                                          <em class="parameter"><code><span class="type">guint8</span> address[16]</code></em>,
354                                                          <em class="parameter"><code><span class="type">guint16</span> *port</code></em>);</pre>
355 <p>
356 Get just the address bytes stored in <em class="parameter"><code>naddr</code></em> into <em class="parameter"><code>address</code></em>.
357 </p>
358 <p>
359 Note that <em class="parameter"><code>port</code></em> is expressed in network byte order, use <a href="http://library.gnome.org/devel/glib/unstable/glib-Byte-Order-Macros.html#g-ntohs"><code class="function">g_ntohs()</code></a> to convert
360 it to host order. IP4 addresses are also stored in network byte order.
361 </p>
362 <div class="variablelist"><table border="0">
363 <col align="left" valign="top">
364 <tbody>
365 <tr>
366 <td><p><span class="term"><em class="parameter"><code>naddr</code></em> :</span></p></td>
367 <td>a network address</td>
368 </tr>
369 <tr>
370 <td><p><span class="term"><em class="parameter"><code>address</code></em> :</span></p></td>
371 <td>a location to store the result.</td>
372 </tr>
373 <tr>
374 <td><p><span class="term"><em class="parameter"><code>port</code></em> :</span></p></td>
375 <td>a location to store the port.</td>
376 </tr>
377 <tr>
378 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
379 <td>number of bytes actually copied</td>
380 </tr>
381 </tbody>
382 </table></div>
383 <p class="since">Since 0.10.22</p>
384 </div>
385 <hr>
386 <div class="refsect2">
387 <a name="gst-netaddress-set-address-bytes"></a><h3>gst_netaddress_set_address_bytes ()</h3>
388 <pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gint"><span class="returnvalue">gint</span></a>                gst_netaddress_set_address_bytes    (<em class="parameter"><code><a class="link" href="gst-plugins-base-libs-gstnetbuffer.html#GstNetAddress" title="struct GstNetAddress"><span class="type">GstNetAddress</span></a> *naddr</code></em>,
389                                                          <em class="parameter"><code><a class="link" href="gst-plugins-base-libs-gstnetbuffer.html#GstNetType" title="enum GstNetType"><span class="type">GstNetType</span></a> type</code></em>,
390                                                          <em class="parameter"><code><span class="type">guint8</span> address[16]</code></em>,
391                                                          <em class="parameter"><code><span class="type">guint16</span> port</code></em>);</pre>
392 <p>
393 Set just the address bytes stored in <em class="parameter"><code>naddr</code></em> into <em class="parameter"><code>address</code></em>.
394 </p>
395 <p>
396 Note that <em class="parameter"><code>port</code></em> must be expressed in network byte order, use <a href="http://library.gnome.org/devel/glib/unstable/glib-Byte-Order-Macros.html#g-htons"><code class="function">g_htons()</code></a> to
397 convert it to network byte order. IP4 address bytes must also be
398 stored in network byte order.
399 </p>
400 <div class="variablelist"><table border="0">
401 <col align="left" valign="top">
402 <tbody>
403 <tr>
404 <td><p><span class="term"><em class="parameter"><code>naddr</code></em> :</span></p></td>
405 <td>a network address</td>
406 </tr>
407 <tr>
408 <td><p><span class="term"><em class="parameter"><code>type</code></em> :</span></p></td>
409 <td>the address type (IPv4 or IPV6)</td>
410 </tr>
411 <tr>
412 <td><p><span class="term"><em class="parameter"><code>address</code></em> :</span></p></td>
413 <td>a location to store the result.</td>
414 </tr>
415 <tr>
416 <td><p><span class="term"><em class="parameter"><code>port</code></em> :</span></p></td>
417 <td>a location to store the port.</td>
418 </tr>
419 <tr>
420 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
421 <td>number of bytes actually copied</td>
422 </tr>
423 </tbody>
424 </table></div>
425 <p class="since">Since 0.10.22</p>
426 </div>
427 <hr>
428 <div class="refsect2">
429 <a name="gst-netaddress-equal"></a><h3>gst_netaddress_equal ()</h3>
430 <pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>            gst_netaddress_equal                (<em class="parameter"><code>const <a class="link" href="gst-plugins-base-libs-gstnetbuffer.html#GstNetAddress" title="struct GstNetAddress"><span class="type">GstNetAddress</span></a> *naddr1</code></em>,
431                                                          <em class="parameter"><code>const <a class="link" href="gst-plugins-base-libs-gstnetbuffer.html#GstNetAddress" title="struct GstNetAddress"><span class="type">GstNetAddress</span></a> *naddr2</code></em>);</pre>
432 <p>
433 Compare two <a class="link" href="gst-plugins-base-libs-gstnetbuffer.html#GstNetAddress" title="struct GstNetAddress"><span class="type">GstNetAddress</span></a> structures
434 </p>
435 <div class="variablelist"><table border="0">
436 <col align="left" valign="top">
437 <tbody>
438 <tr>
439 <td><p><span class="term"><em class="parameter"><code>naddr1</code></em> :</span></p></td>
440 <td>The first <a class="link" href="gst-plugins-base-libs-gstnetbuffer.html#GstNetAddress" title="struct GstNetAddress"><span class="type">GstNetAddress</span></a>
441 </td>
442 </tr>
443 <tr>
444 <td><p><span class="term"><em class="parameter"><code>naddr2</code></em> :</span></p></td>
445 <td>The second <a class="link" href="gst-plugins-base-libs-gstnetbuffer.html#GstNetAddress" title="struct GstNetAddress"><span class="type">GstNetAddress</span></a>
446 </td>
447 </tr>
448 <tr>
449 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
450 <td>TRUE if they are identical, FALSE otherwise</td>
451 </tr>
452 </tbody>
453 </table></div>
454 <p class="since">Since 0.10.18</p>
455 </div>
456 <hr>
457 <div class="refsect2">
458 <a name="gst-netaddress-to-string"></a><h3>gst_netaddress_to_string ()</h3>
459 <pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gint"><span class="returnvalue">gint</span></a>                gst_netaddress_to_string            (<em class="parameter"><code>const <a class="link" href="gst-plugins-base-libs-gstnetbuffer.html#GstNetAddress" title="struct GstNetAddress"><span class="type">GstNetAddress</span></a> *naddr</code></em>,
460                                                          <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *dest</code></em>,
461                                                          <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gulong"><span class="type">gulong</span></a> len</code></em>);</pre>
462 <p>
463 Copies a string representation of <em class="parameter"><code>naddr</code></em> into <em class="parameter"><code>dest</code></em>. Up to <em class="parameter"><code>len</code></em> bytes are
464 copied.
465 </p>
466 <div class="variablelist"><table border="0">
467 <col align="left" valign="top">
468 <tbody>
469 <tr>
470 <td><p><span class="term"><em class="parameter"><code>naddr</code></em> :</span></p></td>
471 <td>a <a class="link" href="gst-plugins-base-libs-gstnetbuffer.html#GstNetAddress" title="struct GstNetAddress"><span class="type">GstNetAddress</span></a>
472 </td>
473 </tr>
474 <tr>
475 <td><p><span class="term"><em class="parameter"><code>dest</code></em> :</span></p></td>
476 <td>destination</td>
477 </tr>
478 <tr>
479 <td><p><span class="term"><em class="parameter"><code>len</code></em> :</span></p></td>
480 <td>len of <em class="parameter"><code>dest</code></em>
481 </td>
482 </tr>
483 <tr>
484 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
485 <td>the number of bytes which would be produced if the buffer was large
486 enough</td>
487 </tr>
488 </tbody>
489 </table></div>
490 <p class="since">Since 0.10.24</p>
491 </div>
492 </div>
493 </div>
494 <div class="footer">
495 <hr>
496           Generated by GTK-Doc V1.18</div>
497 </body>
498 </html>