| GStreamer Base Plugins 0.10 Library Reference Manual | ||||
|---|---|---|---|---|
#include <gst/netbuffer/gstnetbuffer.h>
GstNetBuffer;
enum GstNetType;
GstNetAddress;
GstNetBuffer* gst_netbuffer_new (void);
gboolean gst_netaddress_get_ip4_address (GstNetAddress *naddr,
guint32 *address,
guint16 *port);
gboolean gst_netaddress_get_ip6_address (GstNetAddress *naddr,
guint8 address[16],
guint16 *port);
GstNetType gst_netaddress_get_net_type (GstNetAddress *naddr);
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);
GstNetBuffer is a subclass of a normal GstBuffer that contains two additional metadata fields of type GstNetAddress named 'to' and 'from'. The buffer can be used to store additional information about the origin of the buffer data and is used in various network elements to track the to and from addresses.
Last reviewed on 2006-08-21 (0.10.10)
typedef struct {
GstBuffer buffer;
GstNetAddress from;
GstNetAddress to;
} GstNetBuffer;
buffer for use in network sources and sinks. It contains the source or destination address of the buffer.
buffer;GstBufferbuffer the parent GstBuffer
the parent GstBuffer
GstBufferGstBufferGstNetAddress from;GstNetAddressfrom the address where this buffer came from.
the address where this buffer came from.
GstNetAddress to;GstNetAddressto the address where this buffer should go to.
the address where this buffer should go to.
GstBuffer buffer; |
the parent GstBuffer |
GstNetAddress from; |
the address where this buffer came from. |
GstNetAddress to; |
the address where this buffer should go to. |
typedef enum {
GST_NET_TYPE_UNKNOWN,
GST_NET_TYPE_IP4,
GST_NET_TYPE_IP6,
} GstNetType;
The Address type used in GstNetAddress.
GST_NET_TYPE_UNKNOWNGST_NET_TYPE_UNKNOWN unknown address type
unknown address type
GST_NET_TYPE_IP4GST_NET_TYPE_IP4 an IPv4 address type
an IPv4 address type
GST_NET_TYPE_IP6GST_NET_TYPE_IP6 and IPv6 address type
and IPv6 address type
GST_NET_TYPE_UNKNOWN |
unknown address type |
GST_NET_TYPE_IP4 |
an IPv4 address type |
GST_NET_TYPE_IP6 |
and IPv6 address type |
GstNetBuffer* gst_netbuffer_new (void);
Create a new network buffer.
| Returns : | a new GstNetBuffer. |
gboolean gst_netaddress_get_ip4_address (GstNetAddress *naddr, guint32 *address, guint16 *port);
Get the IPv4 address stored in naddr into address.
naddr :naddr a network address
a network address
address :address a location to store the address.
a location to store the address.
port :port a location to store the port.
a location to store the port.
Returns :Returns TRUE if the address could be retrieved.
TRUE if the address could be retrieved.
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_ip6_address (GstNetAddress *naddr, guint8 address[16], guint16 *port);
Get the IPv6 address stored in naddr into address.
naddr :naddr a network address
a network address
address :address a location to store the result.
a location to store the result.
port :port a location to store the port.
a location to store the port.
Returns :Returns TRUE if the address could be retrieved.
TRUE if the address could be retrieved.
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. |
GstNetType gst_netaddress_get_net_type (GstNetAddress *naddr);
Get the type of address stored in naddr.
naddr :naddr a network address
a network address
Returns :Returns the network type stored in naddr.
the network type stored in naddr.
naddr
naddr : |
a network address |
| Returns : | the network type stored in naddr.
|
void gst_netaddress_set_ip4_address (GstNetAddress *naddr, guint32 address, guint16 port);
Set naddr with the IPv4 address and port pair.
naddr :naddr a network address
a network address
address :address an IPv4 network address.
an IPv4 network address.
port :port a port number to set.
a port number to set.
naddr : |
a network address |
address : |
an IPv4 network address. |
port : |
a port number to set. |
void gst_netaddress_set_ip6_address (GstNetAddress *naddr, guint8 address[16], guint16 port);
Set naddr with the IPv6 address and port pair.
naddr :naddr a network address
a network address
address :address an IPv6 network address.
an IPv6 network address.
port :port a port number to set.
a port number to set.
naddr : |
a network address |
address : |
an IPv6 network address. |
port : |
a port number to set. |