]> git.proxmox.com Git - mirror_frr.git/blame - bgpd/bgp_flowspec.h
vtysh: add flowspec address family cmd support
[mirror_frr.git] / bgpd / bgp_flowspec.h
CommitLineData
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
dba3c1d3
PG
22#define NLRI_STRING_FORMAT_LARGE 0
23#define NLRI_STRING_FORMAT_DEBUG 1
24#define NLRI_STRING_FORMAT_MIN 2
25
26#define BGP_FLOWSPEC_NLRI_STRING_MAX 512
27
7c40bf39 28extern int bgp_nlri_parse_flowspec(struct peer *peer, struct attr *attr,
29 struct bgp_nlri *packet, int withdraw);
30
31extern void bgp_flowspec_vty_init(void);
32
dba3c1d3
PG
33extern int bgp_show_table_flowspec(struct vty *vty, struct bgp *bgp, afi_t afi,
34 struct bgp_table *table,
35 enum bgp_show_type type,
36 void *output_arg, uint8_t use_json,
37 int is_last,
38 unsigned long *output_cum,
39 unsigned long *total_cum);
40
41extern void bgp_fs_nlri_get_string(unsigned char *nlri_content, size_t len,
42 char *return_string, int format);
43
44extern void route_vty_out_flowspec(struct vty *vty, struct prefix *p,
45 struct bgp_info *binfo,
46 int display, json_object *json_paths);
7c40bf39 47#endif /* _FRR_BGP_FLOWSPEC_H */