summaryrefslogtreecommitdiffstats
path: root/crypto/openssh/match.h
diff options
context:
space:
mode:
authorkris <kris@FreeBSD.org>2000-03-26 07:07:24 +0000
committerkris <kris@FreeBSD.org>2000-03-26 07:07:24 +0000
commitb201b15ee1575ab28ed4f9b5a7d430e835a7c7ae (patch)
tree561c850bc04e7b62c9fc641be89ac412589219c1 /crypto/openssh/match.h
parentfc557ff7d97438559e69347575f5aa8ef03a5f50 (diff)
downloadFreeBSD-src-b201b15ee1575ab28ed4f9b5a7d430e835a7c7ae.zip
FreeBSD-src-b201b15ee1575ab28ed4f9b5a7d430e835a7c7ae.tar.gz
Virgin import of OpenSSH sources dated 2000/03/25
Diffstat (limited to 'crypto/openssh/match.h')
-rw-r--r--crypto/openssh/match.h18
1 files changed, 18 insertions, 0 deletions
diff --git a/crypto/openssh/match.h b/crypto/openssh/match.h
new file mode 100644
index 0000000..4625d97
--- /dev/null
+++ b/crypto/openssh/match.h
@@ -0,0 +1,18 @@
+#ifndef MATCH_H
+#define MATCH_H
+
+/*
+ * Returns true if the given string matches the pattern (which may contain ?
+ * and * as wildcards), and zero if it does not match.
+ */
+int match_pattern(const char *s, const char *pattern);
+
+/*
+ * Tries to match the host name (which must be in all lowercase) against the
+ * comma-separated sequence of subpatterns (each possibly preceded by ! to
+ * indicate negation). Returns true if there is a positive match; zero
+ * otherwise.
+ */
+int match_hostname(const char *host, const char *pattern, unsigned int len);
+
+#endif
OpenPOWER on IntegriCloud