![]() | ![]() | ![]() | GNetwork Library Manual | ![]() |
---|
Error Reporting — Error types, domains, and functions.
#define GNETWORK_DNS_ERROR enum GNetworkDnsError; G_CONST_RETURN gchar* gnetwork_dns_strerror (GNetworkDnsError error); #define GNETWORK_CONNECTION_ERROR enum GNetworkConnectionError; G_CONST_RETURN gchar* gnetwork_connection_strerror (GNetworkConnectionError error); #define GNETWORK_SERVER_ERROR enum GNetworkServerError; G_CONST_RETURN gchar* gnetwork_server_strerror (GNetworkServerError error); #define GNETWORK_TCP_PROXY_ERROR enum GNetworkTcpProxyError; #define GNETWORK_SSL_ERROR enum GNetworkSslError; #define GNETWORK_SSL_CERT_ERROR enum GNetworkSslCertErrorFlags; #define GNETWORK_DATAGRAM_ERROR enum GNetworkDatagramError; #define GNETWORK_UDP_DATAGRAM_ERROR enum GNetworkUdpDatagramError; #define GNETWORK_IP_MULTICAST_ERROR enum GNetworkIpMulticastError;
These are the error domains, types, and strerror-like functions that the GNetwork library uses.
#define GNETWORK_DNS_ERROR (gnetwork_dns_error_get_quark ())
The GQuark error domain for GNetworkDnsError.
typedef enum /* <prefix=GNETWORK_DNS_ERROR> */ { GNETWORK_DNS_ERROR_INTERNAL, GNETWORK_DNS_ERROR_NOT_FOUND, GNETWORK_DNS_ERROR_NO_RECOVERY, GNETWORK_DNS_ERROR_TRY_AGAIN } GNetworkDnsError;
An enumeration of the possible DNS lookup errors.
GNETWORK_DNS_ERROR_INTERNAL | there was an error in the GNetwork library. |
GNETWORK_DNS_ERROR_NOT_FOUND | the host record was not found. |
GNETWORK_DNS_ERROR_NO_RECOVERY | the DNS server is down. |
GNETWORK_DNS_ERROR_TRY_AGAIN | the DNS server is busy. |
G_CONST_RETURN gchar* gnetwork_dns_strerror (GNetworkDnsError error);
Retrieves a string message corresponding to error. The returned data should not be modified or freed.
error : | the DNS error code to use. |
Returns : | a string message. |
Since 1.0
#define GNETWORK_CONNECTION_ERROR (gnetwork_connection_error_get_quark ())
The GQuark error domain for GNetworkConnectionError.
typedef enum /* <prefix=GNETWORK_CONNECTION_ERROR> */ { GNETWORK_CONNECTION_ERROR_INTERNAL, GNETWORK_CONNECTION_ERROR_REFUSED, GNETWORK_CONNECTION_ERROR_TIMEOUT, GNETWORK_CONNECTION_ERROR_UNREACHABLE, GNETWORK_CONNECTION_ERROR_PERMISSIONS } GNetworkConnectionError;
An enumeration of common errors for GNetworkConnection implementations.
GNETWORK_CONNECTION_ERROR_INTERNAL | there was a (bizarre) error inside GNetwork. |
GNETWORK_CONNECTION_ERROR_REFUSED | the connection was refused. |
GNETWORK_CONNECTION_ERROR_TIMEOUT | the connection timed out. |
GNETWORK_CONNECTION_ERROR_UNREACHABLE | the server could not be reached. |
GNETWORK_CONNECTION_ERROR_PERMISSIONS | the connection was stopped because it violated some security policy. |
G_CONST_RETURN gchar* gnetwork_connection_strerror (GNetworkConnectionError error);
Retrieves a string message describing error. The returned data should not be modified or freed.
error : | the connection error code to use. |
Returns : | the string message describing error. |
Since 1.0
#define GNETWORK_SERVER_ERROR (gnetwork_server_error_get_quark ())
The GQuark error domain for GNetworkServerError.
typedef enum /* <prefix=GNETWORK_SERVER_ERROR> */ { GNETWORK_SERVER_ERROR_INTERNAL, GNETWORK_SERVER_ERROR_TOO_MANY_CONNECTIONS, GNETWORK_SERVER_ERROR_NO_MEMORY, GNETWORK_SERVER_ERROR_PERMISSIONS, GNETWORK_SERVER_ERROR_TOO_MANY_PROCESSES, GNETWORK_SERVER_ERROR_ALREADY_EXISTS } GNetworkServerError;
An enumeration of common errors for GNetworkServer implementations.
GNETWORK_SERVER_ERROR_INTERNAL | there was a (bizarre) eror inside GNetwork. |
GNETWORK_SERVER_ERROR_TOO_MANY_CONNECTIONS | there are too many connections open to accept the new incoming connection. |
GNETWORK_SERVER_ERROR_NO_MEMORY | there is not enough memory to open a server. |
GNETWORK_SERVER_ERROR_PERMISSIONS | the server does not permission to use the requested resource. |
GNETWORK_SERVER_ERROR_TOO_MANY_PROCESSES | there are too many running applications to open a server. |
GNETWORK_SERVER_ERROR_ALREADY_EXISTS | there is aready a server listening on the requested resource. |
G_CONST_RETURN gchar* gnetwork_server_strerror (GNetworkServerError error);
Retrieves an error message string for error. The returned value should not be modified or freed.
error : | the server error code to use. |
Returns : | the error message for error. |
Since 1.0
#define GNETWORK_TCP_PROXY_ERROR (gnetwork_tcp_proxy_error_get_quark ())
The GQuark error domain for GNetworkTcpProxyError.
typedef enum /* < prefix=GNETWORK_TCP_PROXY_ERROR > */ { GNETWORK_TCP_PROXY_ERROR_UNKNOWN, GNETWORK_TCP_PROXY_ERROR_CONNECTION_REFUSED, GNETWORK_TCP_PROXY_ERROR_TIMEOUT, GNETWORK_TCP_PROXY_ERROR_NETWORK_UNREACHABLE, GNETWORK_TCP_PROXY_ERROR_FIREWALL, GNETWORK_TCP_PROXY_ERROR_ABORTED, GNETWORK_TCP_PROXY_ERROR_AUTHENTICATION_FAILED, GNETWORK_TCP_PROXY_ERROR_SERVER_FAILED } GNetworkTcpProxyError;
Possible errors while traversing a proxy.
GNETWORK_TCP_PROXY_ERROR_UNKNOWN | there was an error inside GNetwork. |
GNETWORK_TCP_PROXY_ERROR_CONNECTION_REFUSED | the proxy server refused to allow us to connect. |
GNETWORK_TCP_PROXY_ERROR_TIMEOUT | the connection to the proxy server timed out. |
GNETWORK_TCP_PROXY_ERROR_NETWORK_UNREACHABLE | the network the proxy server is on is unreachable. |
GNETWORK_TCP_PROXY_ERROR_FIREWALL | the proxy server is blocked by a firewall rule. |
GNETWORK_TCP_PROXY_ERROR_ABORTED | the proxy server closed the connection before we could finish connecting. |
GNETWORK_TCP_PROXY_ERROR_AUTHENTICATION_FAILED | the proxy server could not verify our identity (bad password, username, etc.) |
GNETWORK_TCP_PROXY_ERROR_SERVER_FAILED | the proxy server is throwing a fit :-). |
#define GNETWORK_SSL_ERROR (gnetwork_ssl_error_get_quark ())
The GQuark error domain for GNetworkSslError.
typedef enum /* <prefix=GNETWORK_SSL_ERROR> */ { GNETWORK_SSL_ERROR_INTERNAL, GNETWORK_SSL_ERROR_TRY_AGAIN, GNETWORK_SSL_ERROR_INTERRUPTED, GNETWORK_SSL_ERROR_UNSUPPORTED_PROTOCOL, GNETWORK_SSL_ERROR_PROTOCOL_ALERT, GNETWORK_SSL_ERROR_HANDSHAKE_FAILED, GNETWORK_SSL_ERROR_AUTHENTICATION_FAILED } GNetworkSslError;
An enumeration of possible SSL errors.
GNETWORK_SSL_ERROR_INTERNAL | an internal error in the GNetwork library. |
GNETWORK_SSL_ERROR_TRY_AGAIN | the last action should be tried again. |
GNETWORK_SSL_ERROR_INTERRUPTED | the last action could not be completed. |
GNETWORK_SSL_ERROR_UNSUPPORTED_PROTOCOL | the requested SSL protocol version is not supported by the destination. |
GNETWORK_SSL_ERROR_PROTOCOL_ALERT | |
GNETWORK_SSL_ERROR_HANDSHAKE_FAILED | the handshake could not be completed. |
GNETWORK_SSL_ERROR_AUTHENTICATION_FAILED |
#define GNETWORK_SSL_CERT_ERROR
The GQuark error domain for GNetworkSslCertErrorFlags.
typedef enum /* <flags,prefix=GNETWORK_SSL_CERT_ERROR> */ { GNETWORK_SSL_CERT_ERROR_UNKNOWN = 0, GNETWORK_SSL_CERT_ERROR_NO_CERTIFICATE = (1 << 0), GNETWORK_SSL_CERT_ERROR_INVALID = (1 << 1), GNETWORK_SSL_CERT_ERROR_UNSIGNED = (1 << 2), GNETWORK_SSL_CERT_ERROR_NOT_TRUSTED = (1 << 3), GNETWORK_SSL_CERT_ERROR_REVOKED = (1 << 4), GNETWORK_SSL_CERT_ERROR_CORRUPTED = (1 << 5), GNETWORK_SSL_CERT_ERROR_UNSUPPORTED_TYPE = (1 << 6), GNETWORK_SSL_CERT_ERROR_EXPIRED = (1 << 7), GNETWORK_SSL_CERT_ERROR_NOT_ACTIVATED = (1 << 8), GNETWORK_SSL_CERT_ERROR_HOSTNAME_MISMATCH = (1 << 9), GNETWORK_SSL_CERT_ERROR_CANNOT_PARSE = (1 << 10) } GNetworkSslCertErrorFlags;
A bitwise flag for possible problems with certificates.
GNETWORK_SSL_CERT_ERROR_UNKNOWN | there is an unknown problem. |
GNETWORK_SSL_CERT_ERROR_NO_CERTIFICATE | a certificate was expected but none was received. |
GNETWORK_SSL_CERT_ERROR_INVALID | the certificate is invalid. |
GNETWORK_SSL_CERT_ERROR_UNSIGNED | the certificate was not signed by anyone else. |
GNETWORK_SSL_CERT_ERROR_NOT_TRUSTED | the certificate's signer is not trusted. |
GNETWORK_SSL_CERT_ERROR_REVOKED | the certificate has been revoked by one or more of the authorities which signed it. |
GNETWORK_SSL_CERT_ERROR_CORRUPTED | the certificate is broken. |
GNETWORK_SSL_CERT_ERROR_UNSUPPORTED_TYPE | the certificate is not in X.509 format. |
GNETWORK_SSL_CERT_ERROR_EXPIRED | the certificate has expired. |
GNETWORK_SSL_CERT_ERROR_NOT_ACTIVATED | the certificate does not become active until a later date. |
GNETWORK_SSL_CERT_ERROR_HOSTNAME_MISMATCH | the hostname of the certificate and the hostname set on the authentication scheme are not the same. |
GNETWORK_SSL_CERT_ERROR_CANNOT_PARSE | the certificate could not be parsed. |
#define GNETWORK_DATAGRAM_ERROR (gnetwork_datagram_error_get_quark ())
The GQuark error domain for GNetworkDatagramError.
typedef enum /* <prefix=GNETWORK_DATAGRAM_ERROR> */ { GNETWORK_DATAGRAM_ERROR_INTERNAL, GNETWORK_DATAGRAM_ERROR_UNREACHABLE, GNETWORK_DATAGRAM_ERROR_PERMISSIONS, GNETWORK_DATAGRAM_ERROR_ALREADY_EXISTS } GNetworkDatagramError;
An enumeration of common errors for GNetworkDatagram implementations.
GNETWORK_DATAGRAM_ERROR_INTERNAL | there was an error inside the object. |
GNETWORK_DATAGRAM_ERROR_UNREACHABLE | the destination could |
GNETWORK_DATAGRAM_ERROR_PERMISSIONS | there was a security-related problem. |
GNETWORK_DATAGRAM_ERROR_ALREADY_EXISTS | the socket could not be opened because another object or application is already using it. |
#define GNETWORK_UDP_DATAGRAM_ERROR (gnetwork_udp_datagram_error_get_quark ())
The GQuark error domain for GNetworkUdpDatagramError.
typedef enum { GNETWORK_UDP_DATAGRAM_ERROR_CANNOT_SET_TTL, GNETWORK_UDP_DATAGRAM_ERROR_CANNOT_SET_BROADCAST, GNETWORK_UDP_DATAGRAM_ERROR_CANNOT_SET_REUSE } GNetworkUdpDatagramError;
An enumeration of possible errors in the GNetworkUdpDatagram object.
GNETWORK_UDP_DATAGRAM_ERROR_CANNOT_SET_TTL | the time-to-live socket option could not be set. |
GNETWORK_UDP_DATAGRAM_ERROR_CANNOT_SET_BROADCAST | the broadcast socket option could not be set (cannot multicast) |
GNETWORK_UDP_DATAGRAM_ERROR_CANNOT_SET_REUSE | the socket could not be placed in "re-use" mode (no other applications may now bind to that interface and port). |
#define GNETWORK_IP_MULTICAST_ERROR (gnetwork_ip_multicast_error_get_quark ())
The GQuark error domain for GNetworkIpMulticastError.
typedef enum { GNETWORK_IP_MULTICAST_ERROR_CANNOT_SET_TTL, GNETWORK_IP_MULTICAST_ERROR_CANNOT_SET_LOOPBACK, GNETWORK_IP_MULTICAST_ERROR_JOIN_FAILED, GNETWORK_IP_MULTICAST_ERROR_LEAVE_FAILED, GNETWORK_IP_MULTICAST_ERROR_UNSUPPORTED_INTERFACE, GNETWORK_IP_MULTICAST_ERROR_IPV6_NOT_SUPPORTED } GNetworkIpMulticastError;
An enumeration of possible errors in the GNetworkIpMulticast object.
GNETWORK_IP_MULTICAST_ERROR_CANNOT_SET_TTL | the multicast time-to-live socket option could not be set. |
GNETWORK_IP_MULTICAST_ERROR_CANNOT_SET_LOOPBACK | the "fast echo" (loopback) socket option could not be set. |
GNETWORK_IP_MULTICAST_ERROR_JOIN_FAILED | the requested group could not be joined. |
GNETWORK_IP_MULTICAST_ERROR_LEAVE_FAILED | the requested group could not be left. |
GNETWORK_IP_MULTICAST_ERROR_UNSUPPORTED_INTERFACE | the interface the object is using does not support multicasting. |
GNETWORK_IP_MULTICAST_ERROR_IPV6_NOT_SUPPORTED |
<< GNetworkIpMulticast | IP Addresses >> |