Lines Matching refs:hostname
49 static bool pmatch(const char *hostname, size_t hostlen,
54 return strncasecompare(hostname, pattern, hostlen);
58 * Match a hostname against a wildcard pattern.
81 static bool hostmatch(const char *hostname,
90 DEBUGASSERT(hostname);
93 /* normalize pattern and hostname by stripping off trailing dots */
94 if(hostname[hostlen-1]=='.')
100 return pmatch(hostname, hostlen, pattern, patternlen);
102 /* detect IP address as hostname and fail the match if so */
103 else if(Curl_host_is_ipnum(hostname))
111 return pmatch(hostname, hostlen, pattern, patternlen);
113 const char *hostname_label_end = memchr(hostname, '.', hostlen);
115 size_t skiphost = hostname_label_end - hostname;
128 const char *hostname, size_t hostlen)
130 if(match && *match && hostname && *hostname)
131 return hostmatch(hostname, hostlen, match, matchlen);