]>
git.proxmox.com Git - mirror_frr.git/blob - lib/frrlua.h
2 * This file defines the lua interface into
5 * Copyright (C) 2016 Cumulus Networks, Inc.
8 * This file is part of FreeRangeRouting (FRR).
10 * FRR is free software; you can redistribute it and/or modify it under the
11 * terms of the GNU General Public License as published by the Free Software
12 * Foundation; either version 2, or (at your option) any later version.
14 * FRR is distributed in the hope that it will be useful, but WITHOUT ANY
15 * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
16 * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
19 * You should have received a copy of the GNU General Public License along
20 * with FRR; see the file COPYING. If not, write to the Free Software
21 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
37 * These functions are helper functions that
38 * try to glom some of the lua_XXX functionality
39 * into what we actually need, instead of having
40 * to make multiple calls to set up what
45 * Script function run failure. This will translate into a
50 * No Match was found for the route map function
54 * Match was found but no changes were made to the
59 * Match was found and data was modified, so
60 * figure out what changed
62 LUA_RM_MATCH_AND_CHANGE
,
66 * Open up the lua.scr file and parse
67 * initial global values, if any.
69 lua_State
*lua_initialize(const char *file
);
71 void lua_setup_prefix_table(lua_State
*L
, const struct prefix
*prefix
);
73 enum lua_rm_status
lua_run_rm_rule(lua_State
*L
, const char *rule
);
76 * Get particular string/integer information
77 * from a table. It is *assumed* that
78 * the table has already been selected
80 const char *get_string(lua_State
*L
, const char *key
);
81 int get_integer(lua_State
*L
, const char *key
);