xref: /netbsd-src/crypto/external/bsd/openssh/dist/match.h (revision 2d3b0f52dcde5e4d743340648f4f266a1ed1f05c)
1 /*	$NetBSD: match.h,v 1.11 2020/12/04 18:42:50 christos Exp $	*/
2 /* $OpenBSD: match.h,v 1.20 2020/07/05 23:59:45 djm Exp $ */
3 
4 /*
5  * Author: Tatu Ylonen <ylo@cs.hut.fi>
6  * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
7  *                    All rights reserved
8  *
9  * As far as I am concerned, the code I have written for this software
10  * can be used freely for any purpose.  Any derived versions of this
11  * software must be clearly marked as such, and if the derived work is
12  * incompatible with the protocol description in the RFC file, it must be
13  * called by a name other than "ssh" or "Secure Shell".
14  */
15 #ifndef MATCH_H
16 #define MATCH_H
17 
18 int	 match_pattern(const char *, const char *);
19 int	 match_pattern_list(const char *, const char *, int);
20 int	 match_usergroup_pattern_list(const char *, const char *);
21 int	 match_hostname(const char *, const char *);
22 int	 match_host_and_ip(const char *, const char *, const char *);
23 int	 match_user(const char *, const char *, const char *, const char *);
24 char	*match_list(const char *, const char *, u_int *);
25 char	*match_filter_denylist(const char *, const char *);
26 char	*match_filter_allowlist(const char *, const char *);
27 
28 /* addrmatch.c */
29 int	 addr_match_list(const char *, const char *);
30 int	 addr_match_cidr_list(const char *, const char *);
31 #endif
32