Functions
camel_getaddrinfo ()
struct addrinfo *
camel_getaddrinfo (const gchar *name,
                   const gchar *service,
                   const struct addrinfo *hints,
                   GCancellable *cancellable,
                   GError **error);
Returns
. 
[transfer none]
 
Since: 2.22
 
camel_freeaddrinfo ()
void
camel_freeaddrinfo (struct addrinfo *host);
Since: 2.22
 
camel_host_idna_to_ascii ()
gchar *
camel_host_idna_to_ascii (const gchar *host);
Converts IDN (Internationalized Domain Name) into ASCII representation.
If there's a failure or the host
 has only ASCII letters, then a copy
of host
 is returned.
Returns
 Newly allocated string with only ASCII letters describing the host
.
Free it with g_free() when done with it.
 
Since: 3.16
 
 
Types and Values
socklen_t
#define socklen_t int
 
struct addrinfo
struct addrinfo {
	gint ai_flags;
	gint ai_family;
	gint ai_socktype;
	gint ai_protocol;
	gsize ai_addrlen;
	struct sockaddr *ai_addr;
	gchar *ai_canonname;
	struct addrinfo *ai_next;
};
 
AI_CANONNAME
#define AI_CANONNAME 0x0002 /* Request for canonical name.  */
 
AI_NUMERICHOST
#define AI_NUMERICHOST 0x0004 /* Don't use name resolution.  */
 
EAI_BADFLAGS
#define EAI_BADFLAGS	  -1 /* Invalid value for `ai_flags' field.  */
 
EAI_NONAME
#define EAI_NONAME	  -2 /* NAME or SERVICE is unknown.  */
 
EAI_AGAIN
#define EAI_AGAIN	  -3 /* Temporary failure in name resolution.  */
 
EAI_FAIL
#define EAI_FAIL	  -4 /* Non-recoverable failure in name res.  */
 
EAI_NODATA
#define EAI_NODATA	  -5 /* No address associated with NAME.  */
 
EAI_FAMILY
#define EAI_FAMILY	  -6 /* `ai_family' not supported.  */
 
EAI_SOCKTYPE
#define EAI_SOCKTYPE	  -7 /* `ai_socktype' not supported.  */
 
EAI_SERVICE
#define EAI_SERVICE	  -8 /* SERVICE not supported for `ai_socktype'.  */
 
EAI_ADDRFAMILY
#define EAI_ADDRFAMILY	  -9 /* Address family for NAME not supported.  */
 
EAI_MEMORY
#define EAI_MEMORY	  -10 /* Memory allocation failure.  */
 
EAI_SYSTEM
#define EAI_SYSTEM	  -11 /* System error returned in `errno'.  */
 
EAI_OVERFLOW
#define EAI_OVERFLOW	  -12 /* Argument buffer overflow.  */
 
NI_NUMERICHOST
#define NI_NUMERICHOST 1	/* Don't try to look up hostname.  */
 
NI_NUMERICSERV
#define NI_NUMERICSERV 2	/* Don't convert port number to name.  */
 
NI_NOFQDN
#define NI_NOFQDN 4	/* Only return nodename portion.  */
 
NI_NAMEREQD
#define NI_NAMEREQD 8	/* Don't return numeric addresses.  */
 
NI_DGRAM
#define NI_DGRAM 16 /* Look up UDP service rather than TCP.  */
 
struct sockaddr
struct sockaddr;