]> git.proxmox.com Git - mirror_frr.git/blob - bgpd/bgp_flowspec.h
yang: change EIGRP authentication enum name
[mirror_frr.git] / bgpd / bgp_flowspec.h
1 /* BGP Flowspec header for packet handling
2 * Copyright (C) 2018 6WIND
3 *
4 * FRRouting is free software; you can redistribute it and/or modify it
5 * under the terms of the GNU General Public License as published by the
6 * Free Software Foundation; either version 2, or (at your option) any
7 * later version.
8 *
9 * FRRouting is distributed in the hope that it will be useful, but
10 * WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * General Public License for more details.
13 *
14 * You should have received a copy of the GNU General Public License along
15 * with this program; see the file COPYING; if not, write to the Free Software
16 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
17 */
18
19 #ifndef _FRR_BGP_FLOWSPEC_H
20 #define _FRR_BGP_FLOWSPEC_H
21
22 #define NLRI_STRING_FORMAT_LARGE 0
23 #define NLRI_STRING_FORMAT_DEBUG 1
24 #define NLRI_STRING_FORMAT_MIN 2
25 #define NLRI_STRING_FORMAT_JSON 3
26 #define NLRI_STRING_FORMAT_JSON_SIMPLE 4
27
28 #define BGP_FLOWSPEC_NLRI_STRING_MAX 512
29
30 extern int bgp_nlri_parse_flowspec(struct peer *peer, struct attr *attr,
31 struct bgp_nlri *packet, int withdraw);
32
33 extern void bgp_flowspec_vty_init(void);
34
35 extern int bgp_show_table_flowspec(struct vty *vty, struct bgp *bgp, afi_t afi,
36 struct bgp_table *table,
37 enum bgp_show_type type, void *output_arg,
38 bool use_json, int is_last,
39 unsigned long *output_cum,
40 unsigned long *total_cum);
41
42 extern void bgp_fs_nlri_get_string(unsigned char *nlri_content, size_t len,
43 char *return_string, int format,
44 json_object *json_path);
45
46 extern void route_vty_out_flowspec(struct vty *vty, struct prefix *p,
47 struct bgp_path_info *path, int display,
48 json_object *json_paths);
49 extern int bgp_fs_config_write_pbr(struct vty *vty, struct bgp *bgp,
50 afi_t afi, safi_t safi);
51
52 extern int bgp_flowspec_display_match_per_ip(afi_t afi, struct bgp_table *rib,
53 struct prefix *match,
54 int prefix_check, struct vty *vty,
55 bool use_json,
56 json_object *json_paths);
57
58 #endif /* _FRR_BGP_FLOWSPEC_H */