]>
Commit | Line | Data |
---|---|---|
1 | // SPDX-License-Identifier: GPL-2.0-or-later | |
2 | /* BGP Flowspec header for packet handling | |
3 | * Copyright (C) 2018 6WIND | |
4 | */ | |
5 | ||
6 | #ifndef _FRR_BGP_FLOWSPEC_H | |
7 | #define _FRR_BGP_FLOWSPEC_H | |
8 | ||
9 | #define NLRI_STRING_FORMAT_LARGE 0 | |
10 | #define NLRI_STRING_FORMAT_DEBUG 1 | |
11 | #define NLRI_STRING_FORMAT_MIN 2 | |
12 | #define NLRI_STRING_FORMAT_JSON 3 | |
13 | #define NLRI_STRING_FORMAT_JSON_SIMPLE 4 | |
14 | ||
15 | #define BGP_FLOWSPEC_NLRI_STRING_MAX 512 | |
16 | ||
17 | extern int bgp_nlri_parse_flowspec(struct peer *peer, struct attr *attr, | |
18 | struct bgp_nlri *packet, bool withdraw); | |
19 | ||
20 | extern void bgp_flowspec_vty_init(void); | |
21 | ||
22 | extern int bgp_show_table_flowspec(struct vty *vty, struct bgp *bgp, afi_t afi, | |
23 | struct bgp_table *table, | |
24 | enum bgp_show_type type, void *output_arg, | |
25 | bool use_json, int is_last, | |
26 | unsigned long *output_cum, | |
27 | unsigned long *total_cum); | |
28 | ||
29 | extern void bgp_fs_nlri_get_string(unsigned char *nlri_content, size_t len, | |
30 | char *return_string, int format, | |
31 | json_object *json_path, | |
32 | afi_t afi); | |
33 | ||
34 | extern void route_vty_out_flowspec(struct vty *vty, const struct prefix *p, | |
35 | struct bgp_path_info *path, int display, | |
36 | json_object *json_paths); | |
37 | extern int bgp_fs_config_write_pbr(struct vty *vty, struct bgp *bgp, | |
38 | afi_t afi, safi_t safi); | |
39 | ||
40 | extern int bgp_flowspec_display_match_per_ip(afi_t afi, struct bgp_table *rib, | |
41 | struct prefix *match, | |
42 | int prefix_check, struct vty *vty, | |
43 | bool use_json, | |
44 | json_object *json_paths); | |
45 | ||
46 | #endif /* _FRR_BGP_FLOWSPEC_H */ |