[BACK]Return to match.h CVS log [TXT][DIR] Up to [local] / src / usr.bin / ssh

File: [local] / src / usr.bin / ssh / match.h (download)

Revision 1.1.2.1, Mon Jun 12 02:37:34 2000 UTC (23 years, 11 months ago) by jason
Branch: OPENBSD_2_7
Changes since 1.1: +2 -2 lines

lovin' CVS... update patch branch to OpenSSH-2.1.1

#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 -1 if negation matches, 1 if there is
 * a positive match, 0 if there is no match at all.
 */
int     match_hostname(const char *host, const char *pattern, unsigned int len);

#endif