]> git.proxmox.com Git - mirror_frr.git/blob - bgpd/bgp_regex.h
*: auto-convert to SPDX License IDs
[mirror_frr.git] / bgpd / bgp_regex.h
1 // SPDX-License-Identifier: GPL-2.0-or-later
2 /* AS regular expression routine
3 * Copyright (C) 1999 Kunihiro Ishiguro
4 */
5
6 #ifndef _FRR_BGP_REGEX_H
7 #define _FRR_BGP_REGEX_H
8
9 #include <zebra.h>
10
11 #ifdef HAVE_LIBPCRE2_POSIX
12 #ifndef _FRR_PCRE2_POSIX
13 #define _FRR_PCRE2_POSIX
14 #include <pcre2posix.h>
15 #endif /* _FRR_PCRE2_POSIX */
16 #elif defined(HAVE_LIBPCREPOSIX)
17 #include <pcreposix.h>
18 #else
19 #include <regex.h>
20 #endif /* HAVE_LIBPCRE2_POSIX */
21
22 extern void bgp_regex_free(regex_t *regex);
23 extern regex_t *bgp_regcomp(const char *str);
24 extern int bgp_regexec(regex_t *regex, struct aspath *aspath);
25
26 #endif /* _FRR_BGP_REGEX_H */