| MateVFS - Filesystem Abstraction library | ||||
|---|---|---|---|---|
| Top | Description | ||||
MateVFSResult mate_vfs_resolve (const char *hostname,MateVFSResolveHandle **handle); void mate_vfs_resolve_free (MateVFSResolveHandle *handle); gboolean mate_vfs_resolve_next_address (MateVFSResolveHandle *handle,MateVFSAddress **address); void mate_vfs_resolve_reset_to_beginning (MateVFSResolveHandle *handle); MateVFSAddress; MateVFSAddress * mate_vfs_address_dup (MateVFSAddress *address); void mate_vfs_address_free (MateVFSAddress *address); int mate_vfs_address_get_family_type (MateVFSAddress *address); guint32 mate_vfs_address_get_ipv4 (MateVFSAddress *address); GType mate_vfs_address_get_type (void); MateVFSAddress * mate_vfs_address_new_from_ipv4 (guint32 ipv4_address); MateVFSAddress * mate_vfs_address_new_from_sockaddr (struct sockaddr *sa,int len); MateVFSAddress * mate_vfs_address_new_from_string (const char *address); char * mate_vfs_address_to_string (MateVFSAddress *address);
MateVFSResult mate_vfs_resolve (const char *hostname,MateVFSResolveHandle **handle);
Tries to resolve hostname. If the operation was successful you can
get the resolved addresses in form of MateVFSAddress by calling
mate_vfs_resolve_next_address().
|
hostname you want to resolve. |
|
pointer to a pointer to a MateVFSResolveHandle. |
Returns : |
A MateVFSResult indicating the success of the operation. |
Since 2.8
void mate_vfs_resolve_free (MateVFSResolveHandle *handle);
Use this function to free a MateVFSResolveHandle returned by
mate_vfs_resolve().
|
a MateVFSResolveHandle. |
Since 2.8
gboolean mate_vfs_resolve_next_address (MateVFSResolveHandle *handle,MateVFSAddress **address);
Stores the next MateVFSAddress available in handle of the
former lookup in address.
|
a MateVFSResolveHandle. |
|
a pointer to a pointer to a MateVFSAddress. |
Returns : |
TRUE if the next address was stored in address or
FALSE if no other address is available.
|
Since 2.8
void mate_vfs_resolve_reset_to_beginning
(MateVFSResolveHandle *handle);
Reset handle so that a following call to mate_vfs_resolve_next_address()
will return the first resolved address.
|
a MateVFSResolveHandle. |
Since 2.8
MateVFSAddress * mate_vfs_address_dup (MateVFSAddress *address);
Duplicates address.
|
A MateVFSAddress. |
Returns : |
Duplicated address or NULL if address was not valid.
|
Since 2.8
void mate_vfs_address_free (MateVFSAddress *address);
Frees the memory allocated for address.
|
A MateVFSAddress. |
Since 2.8
int mate_vfs_address_get_family_type (MateVFSAddress *address);
Use this function to retrive the address family of address.
|
A pointer to a MateVFSAddress |
Returns : |
The address family of address.
|
Since 2.8
guint32 mate_vfs_address_get_ipv4 (MateVFSAddress *address);
|
A MateVFSAddress. |
Returns : |
The associated IPv4 address in network byte order. Note that you should avoid using this function because newly written code should be protocol independent. |
Since 2.8
MateVFSAddress * mate_vfs_address_new_from_ipv4 (guint32 ipv4_address);
Creates a new MateVFSAddress from ipv4_address.
Note that this function should be avoided because newly written code should be protocol independent.
|
A IPv4 Address in network byte order |
Returns : |
A new MateVFSAdress. |
Since 2.8
MateVFSAddress * mate_vfs_address_new_from_sockaddr (struct sockaddr *sa,int len);
Creates a new MateVFSAddress from sa.
|
A pointer to a sockaddr. |
|
The size of sa.
|
Returns : |
The new MateVFSAddress
or NULL if sa was invalid or the address family isn't supported.
|
Since 2.8
MateVFSAddress * mate_vfs_address_new_from_string (const char *address);
Creates a new MateVFSAddress from the given string or NULL
if address isn't a valid.
|
A string representation of the address. |
Returns : |
The new MateVFSAddress. |
Since 2.8
char * mate_vfs_address_to_string (MateVFSAddress *address);
Translate address to a printable string.
|
A pointer to a MateVFSAddress |
Returns : |
A newly alloced string representation of address which
the caller must free.
|
Since 2.8