]> git.proxmox.com Git - mirror_frr.git/blob - bgpd/bgp_script.h
Merge pull request #8930 from pjdruddy/ospf6_packet_debug
[mirror_frr.git] / bgpd / bgp_script.h
1 /* BGP scripting foo
2 * Copyright (C) 2020 NVIDIA Corporation
3 * Quentin Young
4 *
5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation; either version 2 of the License, or
8 * (at your option) any later version.
9 *
10 * This program is distributed in the hope that it will be useful, but
11 * WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 * General Public License for more details.
14 *
15 * You should have received a copy of the GNU General Public License
16 * along with this program; see the file COPYING; if not, write to the
17 * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,
18 * MA 02110-1301 USA
19 */
20 #ifndef __BGP_SCRIPT__
21 #define __BGP_SCRIPT__
22
23 #include <zebra.h>
24 #include "bgpd.h"
25
26 #ifdef HAVE_SCRIPTING
27
28 #include "frrlua.h"
29
30 /*
31 * Initialize scripting stuff.
32 */
33 void bgp_script_init(void);
34
35 void lua_pushpeer(lua_State *L, const struct peer *peer);
36
37 void lua_pushattr(lua_State *L, const struct attr *attr);
38
39 void lua_decode_attr(lua_State *L, int idx, struct attr *attr);
40
41 void *lua_toattr(lua_State *L, int idx);
42
43 #endif /* HAVE_SCRIPTING */
44
45 #endif /* __BGP_SCRIPT__ */