Lines Matching +defs:match +defs:string
7 /* simple string or host pattern matching
11 /* int match_string(flags, string, pattern)
13 /* const char *string;
26 /* This module implements simple string and host name or address
28 /* has the form type:name, table lookup is used instead of string
31 /* match_string() matches the string against the pattern, requiring
32 /* an exact (case-insensitive) match. The flags argument is not used.
66 #include <string.h>
86 /* match_string - match a string literal */
88 int match_string(int unused_flags, const char *string, const char *pattern)
91 int match;
94 msg_info("%s: %s ~? %s", myname, string, pattern);
97 * Try dictionary lookup: exact match.
100 match = (dict_lookup(pattern, string) != 0);
101 if (match != 0)
109 * Try an exact string match.
111 if (strcasecmp(string, pattern) == 0) {
116 * No match found.
121 /* match_hostname - match a host by name */
129 int match;
136 * Try dictionary lookup: exact match and parent domains.
143 match = 0;
146 match = (dict_get(dict, entry) != 0);
150 match ? "found" : "notfound");
151 if (match != 0)
161 return (match);
165 * Try an exact match with the host name.
188 /* match_hostaddr - match host by address */
218 * Try an exact match with the host address.
242 * unambiguous and they did not match in the strcasecmp() calls above.