]>
git.proxmox.com Git - mirror_frr.git/blob - lib/lua.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.
33 * These functions are helper functions that
34 * try to glom some of the lua_XXX functionality
35 * into what we actually need, instead of having
36 * to make multiple calls to set up what
41 * Script function run failure. This will translate into a
46 * No Match was found for the route map function
50 * Match was found but no changes were made to the
55 * Match was found and data was modified, so
56 * figure out what changed
58 LUA_RM_MATCH_AND_CHANGE
,
62 * Open up the lua.scr file and parse
63 * initial global values, if any.
65 lua_State
*lua_initialize(const char *file
);
67 void lua_setup_prefix_table(lua_State
*L
, const struct prefix
*prefix
);
69 enum lua_rm_status
lua_run_rm_rule(lua_State
*L
, const char *rule
);
72 * Get particular string/integer information
73 * from a table. It is *assumed* that
74 * the table has already been selected
76 const char *get_string(lua_State
*L
, const char *key
);
77 int get_integer(lua_State
*L
, const char *key
);