]>
git.proxmox.com Git - mirror_frr.git/blob - bgpd/bgp_flowspec.h
1 // SPDX-License-Identifier: GPL-2.0-or-later
2 /* BGP Flowspec header for packet handling
3 * Copyright (C) 2018 6WIND
6 #ifndef _FRR_BGP_FLOWSPEC_H
7 #define _FRR_BGP_FLOWSPEC_H
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
15 #define BGP_FLOWSPEC_NLRI_STRING_MAX 512
17 extern int bgp_nlri_parse_flowspec(struct peer
*peer
, struct attr
*attr
,
18 struct bgp_nlri
*packet
, int withdraw
);
20 extern void bgp_flowspec_vty_init(void);
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
);
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
,
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
);
40 extern int bgp_flowspec_display_match_per_ip(afi_t afi
, struct bgp_table
*rib
,
42 int prefix_check
, struct vty
*vty
,
44 json_object
*json_paths
);
46 #endif /* _FRR_BGP_FLOWSPEC_H */