| GNU Libidn API Reference Manual | ||||
|---|---|---|---|---|
| Top | Description | ||||
#define IDNAPI typedef Tld_table_element; typedef Tld_table; enum Tld_rc; const char * tld_strerror (Tld_rc rc); int tld_get_4 (const uint32_t *in,size_t inlen,char **out); int tld_get_4z (const uint32_t *in,char **out); int tld_get_z (const char *in,char **out); const Tld_table * tld_get_table (const char *tld,const Tld_table **tables); const Tld_table * tld_default_table (const char *tld,const Tld_table **overrides); int tld_check_4t (const uint32_t *in,size_t inlen,size_t *errpos,const Tld_table *tld); int tld_check_4tz (const uint32_t *in,size_t *errpos,const Tld_table *tld); int tld_check_4 (const uint32_t *in,size_t inlen,size_t *errpos,const Tld_table **overrides); int tld_check_4z (const uint32_t *in,size_t *errpos,const Tld_table **overrides); int tld_check_8z (const char *in,size_t *errpos,const Tld_table **overrides); int tld_check_lz (const char *in,size_t *errpos,const Tld_table **overrides);
typedef enum
{
TLD_SUCCESS = 0,
TLD_INVALID = 1, /* Invalid character found. */
TLD_NODATA = 2, /* Char, domain or inlen = 0. */
TLD_MALLOC_ERROR = 3,
TLD_ICONV_ERROR = 4,
TLD_NO_TLD = 5,
/* Workaround typo in earlier versions. */
TLD_NOTLD = TLD_NO_TLD
} Tld_rc;
Enumerated return codes of the TLD checking functions. The value 0 is guaranteed to always correspond to success.
| Successful operation. This value is guaranteed to always be zero, the remaining ones are only guaranteed to hold non-zero values, for logical comparison purposes. | |
| Invalid character found. | |
| No input data was provided. | |
| Error during memory allocation. | |
| Error during iconv string conversion. | |
| No top-level domain found in domain string. | |
int tld_get_4 (const uint32_t *in,size_t inlen,char **out);
|
|
|
|
|
|
Returns : |
const Tld_table * tld_get_table (const char *tld,const Tld_table **tables);
|
|
|
|
Returns : |
const Tld_table * tld_default_table (const char *tld,const Tld_table **overrides);
|
|
|
|
Returns : |
int tld_check_4t (const uint32_t *in,size_t inlen,size_t *errpos,const Tld_table *tld);
|
|
|
|
|
|
|
|
Returns : |
int tld_check_4tz (const uint32_t *in,size_t *errpos,const Tld_table *tld);
|
|
|
|
|
|
Returns : |
int tld_check_4 (const uint32_t *in,size_t inlen,size_t *errpos,const Tld_table **overrides);
|
|
|
|
|
|
|
|
Returns : |
int tld_check_4z (const uint32_t *in,size_t *errpos,const Tld_table **overrides);
|
|
|
|
|
|
Returns : |
int tld_check_8z (const char *in,size_t *errpos,const Tld_table **overrides);
|
|
|
|
|
|
Returns : |
int tld_check_lz (const char *in,size_t *errpos,const Tld_table **overrides);
|
|
|
|
|
|
Returns : |