]> git.proxmox.com Git - mirror_frr.git/blame - bgpd/bgp_script.h
*: manual SPDX License ID conversions
[mirror_frr.git] / bgpd / bgp_script.h
CommitLineData
b4becb06
QY
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 */
fa22080d
QY
20#ifndef __BGP_SCRIPT__
21#define __BGP_SCRIPT__
b4becb06
QY
22
23#include <zebra.h>
b7da61c1 24#include "bgpd.h"
b4becb06 25
fa22080d
QY
26#ifdef HAVE_SCRIPTING
27
b7da61c1
DL
28#include "frrlua.h"
29
b4becb06
QY
30/*
31 * Initialize scripting stuff.
32 */
33void bgp_script_init(void);
fa22080d 34
b7da61c1
DL
35void lua_pushpeer(lua_State *L, const struct peer *peer);
36
37void lua_pushattr(lua_State *L, const struct attr *attr);
38
39void lua_decode_attr(lua_State *L, int idx, struct attr *attr);
40
41void *lua_toattr(lua_State *L, int idx);
42
fa22080d
QY
43#endif /* HAVE_SCRIPTING */
44
45#endif /* __BGP_SCRIPT__ */