]>
Commit | Line | Data |
---|---|---|
bcbf86ec | 1 | /* |
2 | * Author: Tatu Ylonen <ylo@cs.hut.fi> | |
3 | * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland | |
4 | * All rights reserved | |
5 | * This file contains various auxiliary functions related to multiple | |
6 | * precision integers. | |
7 | * | |
8 | * As far as I am concerned, the code I have written for this software | |
9 | * can be used freely for any purpose. Any derived versions of this | |
10 | * software must be clearly marked as such, and if the derived work is | |
11 | * incompatible with the protocol description in the RFC file, it must be | |
12 | * called by a name other than "ssh" or "Secure Shell". | |
13 | */ | |
4fe2af09 | 14 | #ifndef MATCH_H |
15 | #define MATCH_H | |
16 | ||
17 | /* | |
18 | * Returns true if the given string matches the pattern (which may contain ? | |
19 | * and * as wildcards), and zero if it does not match. | |
20 | */ | |
21 | int match_pattern(const char *s, const char *pattern); | |
22 | ||
23 | /* | |
24 | * Tries to match the host name (which must be in all lowercase) against the | |
25 | * comma-separated sequence of subpatterns (each possibly preceded by ! to | |
fa649821 | 26 | * indicate negation). Returns -1 if negation matches, 1 if there is |
27 | * a positive match, 0 if there is no match at all. | |
4fe2af09 | 28 | */ |
1e3b8b07 | 29 | int match_hostname(const char *host, const char *pattern, u_int len); |
4fe2af09 | 30 | |
31 | #endif |