]>
Commit | Line | Data |
---|---|---|
7c40bf39 | 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 | ||
d33fc23b PG |
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 | |
dba3c1d3 PG |
27 | |
28 | #define BGP_FLOWSPEC_NLRI_STRING_MAX 512 | |
29 | ||
7c40bf39 | 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 | ||
dba3c1d3 PG |
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, | |
38 | void *output_arg, uint8_t use_json, | |
39 | int is_last, | |
40 | unsigned long *output_cum, | |
41 | unsigned long *total_cum); | |
42 | ||
43 | extern void bgp_fs_nlri_get_string(unsigned char *nlri_content, size_t len, | |
d33fc23b PG |
44 | char *return_string, int format, |
45 | json_object *json_path); | |
dba3c1d3 PG |
46 | |
47 | extern void route_vty_out_flowspec(struct vty *vty, struct prefix *p, | |
48 | struct bgp_info *binfo, | |
49 | int display, json_object *json_paths); | |
4762c213 PG |
50 | extern int bgp_fs_config_write_pbr(struct vty *vty, struct bgp *bgp, |
51 | afi_t afi, safi_t safi); | |
52 | ||
63a0b7a9 PG |
53 | extern int bgp_flowspec_display_match_per_ip(afi_t afi, |
54 | struct bgp_table *rib, | |
55 | struct prefix *match, | |
56 | int prefix_check, | |
57 | struct vty *vty, | |
58 | uint8_t use_json, | |
59 | json_object *json_paths); | |
60 | ||
7c40bf39 | 61 | #endif /* _FRR_BGP_FLOWSPEC_H */ |