mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-25 11:11:08 +00:00
netbuffer: document that the port is network order
Document the fact that we store the port number in network order in GstNetAddress and that the caller should byteswap appropriately.
This commit is contained in:
parent
2e5c946501
commit
796f8e2f76
1 changed files with 18 additions and 0 deletions
|
@ -137,6 +137,9 @@ gst_netbuffer_new (void)
|
||||||
* @port: a port number to set.
|
* @port: a port number to set.
|
||||||
*
|
*
|
||||||
* Set @naddr with the IPv4 @address and @port pair.
|
* Set @naddr with the IPv4 @address and @port pair.
|
||||||
|
*
|
||||||
|
* Note that @port must be expressed in network byte order, use g_htons() to convert
|
||||||
|
* it to network byte order order.
|
||||||
*/
|
*/
|
||||||
void
|
void
|
||||||
gst_netaddress_set_ip4_address (GstNetAddress * naddr, guint32 address,
|
gst_netaddress_set_ip4_address (GstNetAddress * naddr, guint32 address,
|
||||||
|
@ -156,6 +159,9 @@ gst_netaddress_set_ip4_address (GstNetAddress * naddr, guint32 address,
|
||||||
* @port: a port number to set.
|
* @port: a port number to set.
|
||||||
*
|
*
|
||||||
* Set @naddr with the IPv6 @address and @port pair.
|
* Set @naddr with the IPv6 @address and @port pair.
|
||||||
|
*
|
||||||
|
* Note that @port must be expressed in network byte order, use g_htons() to convert
|
||||||
|
* it to network byte order order.
|
||||||
*/
|
*/
|
||||||
void
|
void
|
||||||
gst_netaddress_set_ip6_address (GstNetAddress * naddr, guint8 address[16],
|
gst_netaddress_set_ip6_address (GstNetAddress * naddr, guint8 address[16],
|
||||||
|
@ -193,6 +199,9 @@ gst_netaddress_get_net_type (GstNetAddress * naddr)
|
||||||
* Get the IPv4 address stored in @naddr into @address. This function requires
|
* Get the IPv4 address stored in @naddr into @address. This function requires
|
||||||
* that the address type of @naddr is of type #GST_NET_TYPE_IP4.
|
* that the address type of @naddr is of type #GST_NET_TYPE_IP4.
|
||||||
*
|
*
|
||||||
|
* Note that @port is expressed in network byte order, use g_ntohs() to convert
|
||||||
|
* it to host order.
|
||||||
|
*
|
||||||
* Returns: TRUE if the address could be retrieved.
|
* Returns: TRUE if the address could be retrieved.
|
||||||
*/
|
*/
|
||||||
gboolean
|
gboolean
|
||||||
|
@ -223,6 +232,9 @@ gst_netaddress_get_ip4_address (GstNetAddress * naddr, guint32 * address,
|
||||||
* If @naddr is of type GST_NET_TYPE_IP4, the transitional IP6 address is
|
* If @naddr is of type GST_NET_TYPE_IP4, the transitional IP6 address is
|
||||||
* returned.
|
* returned.
|
||||||
*
|
*
|
||||||
|
* Note that @port is expressed in network byte order, use g_ntohs() to convert
|
||||||
|
* it to host order.
|
||||||
|
*
|
||||||
* Returns: TRUE if the address could be retrieved.
|
* Returns: TRUE if the address could be retrieved.
|
||||||
*/
|
*/
|
||||||
gboolean
|
gboolean
|
||||||
|
@ -258,6 +270,9 @@ gst_netaddress_get_ip6_address (GstNetAddress * naddr, guint8 address[16],
|
||||||
*
|
*
|
||||||
* Get just the address bytes stored in @naddr into @address.
|
* Get just the address bytes stored in @naddr into @address.
|
||||||
*
|
*
|
||||||
|
* Note that @port is expressed in network byte order, use g_ntohs() to convert
|
||||||
|
* it to host order.
|
||||||
|
*
|
||||||
* Returns: number of bytes actually copied
|
* Returns: number of bytes actually copied
|
||||||
*
|
*
|
||||||
* Since: 0.10.22
|
* Since: 0.10.22
|
||||||
|
@ -296,6 +311,9 @@ gst_netaddress_get_address_bytes (GstNetAddress * naddr, guint8 address[16],
|
||||||
*
|
*
|
||||||
* Set just the address bytes stored in @naddr into @address.
|
* Set just the address bytes stored in @naddr into @address.
|
||||||
*
|
*
|
||||||
|
* Note that @port must be expressed in network byte order, use g_htons() to convert
|
||||||
|
* it to network byte order order.
|
||||||
|
*
|
||||||
* Returns: number of bytes actually copied
|
* Returns: number of bytes actually copied
|
||||||
*
|
*
|
||||||
* Since: 0.10.22
|
* Since: 0.10.22
|
||||||
|
|
Loading…
Reference in a new issue