]> git.proxmox.com Git - mirror_frr.git/blame - bgpd/bgp_flowspec.h
Merge pull request #12837 from donaldsharp/unlikely_routemap
[mirror_frr.git] / bgpd / bgp_flowspec.h
CommitLineData
acddc0ed 1// SPDX-License-Identifier: GPL-2.0-or-later
7c40bf39 2/* BGP Flowspec header for packet handling
3 * Copyright (C) 2018 6WIND
7c40bf39 4 */
5
6#ifndef _FRR_BGP_FLOWSPEC_H
7#define _FRR_BGP_FLOWSPEC_H
8
d33fc23b
PG
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
dba3c1d3
PG
14
15#define BGP_FLOWSPEC_NLRI_STRING_MAX 512
16
7c40bf39 17extern int bgp_nlri_parse_flowspec(struct peer *peer, struct attr *attr,
18 struct bgp_nlri *packet, int withdraw);
19
20extern void bgp_flowspec_vty_init(void);
21
dba3c1d3
PG
22extern int bgp_show_table_flowspec(struct vty *vty, struct bgp *bgp, afi_t afi,
23 struct bgp_table *table,
088f1098
DS
24 enum bgp_show_type type, void *output_arg,
25 bool use_json, int is_last,
dba3c1d3
PG
26 unsigned long *output_cum,
27 unsigned long *total_cum);
28
29extern void bgp_fs_nlri_get_string(unsigned char *nlri_content, size_t len,
d33fc23b 30 char *return_string, int format,
1840384b
PG
31 json_object *json_path,
32 afi_t afi);
dba3c1d3 33
bd494ec5 34extern void route_vty_out_flowspec(struct vty *vty, const struct prefix *p,
9b6d8fcf 35 struct bgp_path_info *path, int display,
4b7e6066 36 json_object *json_paths);
4762c213
PG
37extern int bgp_fs_config_write_pbr(struct vty *vty, struct bgp *bgp,
38 afi_t afi, safi_t safi);
39
088f1098
DS
40extern 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);
63a0b7a9 45
7c40bf39 46#endif /* _FRR_BGP_FLOWSPEC_H */