}
/**
- * gst_netaddress_set_ip4_address:
+ * gst_net_address_set_ip4_address:
* @naddr: a network address
* @address: an IPv4 network address.
* @port: a port number to set.
* use g_htons() and g_htonl() to convert them to network byte order.
*/
void
-gst_netaddress_set_ip4_address (GstNetAddress * naddr, guint32 address,
+gst_net_address_set_ip4_address (GstNetAddress * naddr, guint32 address,
guint16 port)
{
g_return_if_fail (naddr != NULL);
}
/**
- * gst_netaddress_set_ip6_address:
+ * gst_net_address_set_ip6_address:
* @naddr: a network address
* @address: an IPv6 network address.
* @port: a port number to set.
* it to network byte order.
*/
void
-gst_netaddress_set_ip6_address (GstNetAddress * naddr, guint8 address[16],
+gst_net_address_set_ip6_address (GstNetAddress * naddr, guint8 address[16],
guint16 port)
{
g_return_if_fail (naddr != NULL);
}
/**
- * gst_netaddress_get_net_type:
+ * gst_net_address_get_net_type:
* @naddr: a network address
*
* Get the type of address stored in @naddr.
* Returns: the network type stored in @naddr.
*/
GstNetType
-gst_netaddress_get_net_type (const GstNetAddress * naddr)
+gst_net_address_get_net_type (const GstNetAddress * naddr)
{
g_return_val_if_fail (naddr != NULL, GST_NET_TYPE_UNKNOWN);
}
/**
- * gst_netaddress_get_ip4_address:
+ * gst_net_address_get_ip4_address:
* @naddr: a network address
* @address: a location to store the address.
* @port: a location to store the port.
* Returns: TRUE if the address could be retrieved.
*/
gboolean
-gst_netaddress_get_ip4_address (const GstNetAddress * naddr, guint32 * address,
+gst_net_address_get_ip4_address (const GstNetAddress * naddr, guint32 * address,
guint16 * port)
{
g_return_val_if_fail (naddr != NULL, FALSE);
}
/**
- * gst_netaddress_get_ip6_address:
+ * gst_net_address_get_ip6_address:
* @naddr: a network address
* @address: a location to store the result.
* @port: a location to store the port.
* Returns: TRUE if the address could be retrieved.
*/
gboolean
-gst_netaddress_get_ip6_address (const GstNetAddress * naddr, guint8 address[16],
- guint16 * port)
+gst_net_address_get_ip6_address (const GstNetAddress * naddr,
+ guint8 address[16], guint16 * port)
{
static guint8 ip4_transition[16] =
{ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0xFF, 0xFF };
}
/**
- * gst_netaddress_get_address_bytes:
+ * gst_net_address_get_address_bytes:
* @naddr: a network address
* @address: a location to store the result.
* @port: a location to store the port.
* Since: 0.10.22
*/
gint
-gst_netaddress_get_address_bytes (const GstNetAddress * naddr,
+gst_net_address_get_address_bytes (const GstNetAddress * naddr,
guint8 address[16], guint16 * port)
{
gint ret = 0;
}
/**
- * gst_netaddress_set_address_bytes:
+ * gst_net_address_set_address_bytes:
* @naddr: a network address
* @type: the address type (IPv4 or IPV6)
* @address: a location to store the result.
* Since: 0.10.22
*/
gint
-gst_netaddress_set_address_bytes (GstNetAddress * naddr, GstNetType type,
+gst_net_address_set_address_bytes (GstNetAddress * naddr, GstNetType type,
guint8 address[16], guint16 port)
{
gint len = 0;
}
/**
- * gst_netaddress_equal:
+ * gst_net_address_equal:
* @naddr1: The first #GstNetAddress
* @naddr2: The second #GstNetAddress
*
* Since: 0.10.18
*/
gboolean
-gst_netaddress_equal (const GstNetAddress * naddr1,
+gst_net_address_equal (const GstNetAddress * naddr1,
const GstNetAddress * naddr2)
{
g_return_val_if_fail (naddr1 != NULL, FALSE);
}
/**
- * gst_netaddress_to_string:
+ * gst_net_address_to_string:
* @naddr: a #GstNetAddress
* @dest: destination
* @len: len of @dest
* Since: 0.10.24
*/
gint
-gst_netaddress_to_string (const GstNetAddress * naddr, gchar * dest, gulong len)
+gst_net_address_to_string (const GstNetAddress * naddr, gchar * dest,
+ gulong len)
{
gint result;
guint32 address;
guint16 port;
- gst_netaddress_get_ip4_address (naddr, &address, &port);
+ gst_net_address_get_ip4_address (naddr, &address, &port);
address = g_ntohl (address);
result = g_snprintf (dest, len, "%d.%d.%d.%d:%d", (address >> 24) & 0xff,
guint8 address[16];
guint16 port;
- gst_netaddress_get_ip6_address (naddr, address, &port);
+ gst_net_address_get_ip6_address (naddr, address, &port);
result =
g_snprintf (dest, len, "[%04x:%04x:%04x:%04x:%04x:%04x:%04x:%04x]:%d",
* GST_NETADDRESS_MAX_LEN:
*
* The maximum length of a string representation of a GstNetAddress as produced
- * by gst_netaddress_to_string().
+ * by gst_net_address_to_string().
*
* Since: 0.10.24
*/
((GstNetAddressMeta*)gst_buffer_add_meta((b),GST_NET_ADDRESS_META_INFO,NULL))
/* address operations */
-void gst_netaddress_set_ip4_address (GstNetAddress *naddr, guint32 address, guint16 port);
-void gst_netaddress_set_ip6_address (GstNetAddress *naddr, guint8 address[16], guint16 port);
-gint gst_netaddress_set_address_bytes (GstNetAddress *naddr, GstNetType type,
- guint8 address[16], guint16 port);
+void gst_net_address_set_ip4_address (GstNetAddress *naddr, guint32 address, guint16 port);
+void gst_net_address_set_ip6_address (GstNetAddress *naddr, guint8 address[16], guint16 port);
+gint gst_net_address_set_address_bytes (GstNetAddress *naddr, GstNetType type,
+ guint8 address[16], guint16 port);
-GstNetType gst_netaddress_get_net_type (const GstNetAddress *naddr);
-gboolean gst_netaddress_get_ip4_address (const GstNetAddress *naddr, guint32 *address, guint16 *port);
-gboolean gst_netaddress_get_ip6_address (const GstNetAddress *naddr, guint8 address[16], guint16 *port);
-gint gst_netaddress_get_address_bytes (const GstNetAddress *naddr, guint8 address[16], guint16 *port);
+GstNetType gst_net_address_get_net_type (const GstNetAddress *naddr);
+gboolean gst_net_address_get_ip4_address (const GstNetAddress *naddr, guint32 *address, guint16 *port);
+gboolean gst_net_address_get_ip6_address (const GstNetAddress *naddr, guint8 address[16], guint16 *port);
+gint gst_net_address_get_address_bytes (const GstNetAddress *naddr, guint8 address[16], guint16 *port);
-gboolean gst_netaddress_equal (const GstNetAddress *naddr1,
- const GstNetAddress *naddr2);
+gboolean gst_net_address_equal (const GstNetAddress *naddr1,
+ const GstNetAddress *naddr2);
-gint gst_netaddress_to_string (const GstNetAddress *naddr, gchar *dest, gulong len);
+gint gst_net_address_to_string (const GstNetAddress *naddr, gchar *dest, gulong len);
G_END_DECLS