69 return "infrastructure";
71 case TLD_STATUS_EXAMPLE:
108 && (
size_t) n <
sizeof(buf))
112 for(
int idx = 0; idx < n; ++idx)
114 if(word[idx] >=
'A' && word[idx] <=
'Z')
116 buf[idx] = word[idx] | 0x20;
120 buf[idx] = word[idx];
128 if(strcmp(buf,
"brand") == 0)
135 if(strcmp(buf,
"contact") == 0)
139 if(strcmp(buf,
"country") == 0)
146 if(strcmp(buf,
"entrepreneurial") == 0)
153 if(strcmp(buf,
"international") == 0)
160 if(strcmp(buf,
"group") == 0)
167 if(strcmp(buf,
"language") == 0)
171 if(strcmp(buf,
"location") == 0)
178 if(strcmp(buf,
"professionals") == 0)
185 if(strcmp(buf,
"region") == 0)
192 if(strcmp(buf,
"technical") == 0)
The public header of the libtld library.
@ TLD_CATEGORY_PROFESSIONALS
Professional TLDs.
@ TLD_CATEGORY_LANGUAGE
Language specific TLDs.
@ TLD_CATEGORY_BRAND
The TLD is owned and represents a brand.
@ TLD_CATEGORY_COUNTRY
A country extension.
@ TLD_CATEGORY_GROUP
Groups specific TLDs.
@ TLD_CATEGORY_TECHNICAL
Technical extensions are considered internal.
@ TLD_CATEGORY_LOCATION
Another region specific TLDs.
@ TLD_CATEGORY_INTERNATIONAL
International TLDs.
@ TLD_CATEGORY_UNDEFINED
The TLD was not found.
@ TLD_CATEGORY_ENTREPRENEURIAL
A private extension.
@ TLD_CATEGORY_REGION
Region specific TLDs.
@ TLD_CATEGORY_CONTACT
The attached TLD has contact information.
@ TLD_STATUS_EXCEPTION
Special status to indicate an exception which is not directly a TLD.
@ TLD_STATUS_UNDEFINED
Special status to indicate we did not find the TLD.
@ TLD_STATUS_RESERVED
The TLD is reserved so no one can use it.
@ TLD_STATUS_VALID
The TLD is currently valid.
@ TLD_STATUS_INFRASTRUCTURE
These TLDs are reserved for the Internet infrastructure.
@ TLD_STATUS_UNUSED
The TLD was officially assigned but not put to use.
@ TLD_STATUS_DEPRECATED
The TLD was once in use.
@ TLD_STATUS_PROPOSED
The TLD was proposed but not yet accepted.
enum tld_category tld_word_to_category(const char *word, int n)
This is for backward compatibility.
const char * tld_status_to_string(enum tld_status status)
Transform the status to a string.