{
char buffer[PREFIX_STRLEN];
- zlog_debug("frrlua: pushing prefix table");
-
lua_newtable(L);
lua_pushstring(L, prefix2str(prefix, buffer, PREFIX_STRLEN));
lua_setfield(L, -2, "network");
void lua_pushinterface(lua_State *L, const struct interface *ifp)
{
- zlog_debug("frrlua: pushing interface table");
-
lua_newtable(L);
lua_pushstring(L, ifp->name);
lua_setfield(L, -2, "name");
void lua_pushinaddr(lua_State *L, const struct in_addr *addr)
{
- zlog_debug("frrlua: pushing inaddr table");
-
char buf[INET_ADDRSTRLEN];
inet_ntop(AF_INET, addr, buf, sizeof(buf));
void lua_pushin6addr(lua_State *L, const struct in6_addr *addr)
{
- zlog_debug("frrlua: pushing in6addr table");
-
char buf[INET6_ADDRSTRLEN];
inet_ntop(AF_INET6, addr, buf, sizeof(buf));
void lua_pushsockunion(lua_State *L, const union sockunion *su)
{
- zlog_debug("frrlua: pushing sockunion table");
-
char buf[SU_ADDRSTRLEN];
sockunion2str(su, buf, sizeof(buf));
c.typename = env[i].typename;
arg = env[i].val;
- zlog_debug("Script argument | Bind name: %s | Type: %s",
- bindname, c.typename);
-
struct frrscript_codec *codec = hash_lookup(codec_hash, &c);
assert(codec && "No encoder for type");
codec->encoder(fs->L, arg);
{
struct frrscript_codec c = *codec;
- zlog_debug("Registering codec for '%s'", codec->typename);
-
if (hash_lookup(codec_hash, &c)) {
zlog_backtrace(LOG_ERR);
assert(!"Type codec double-registered.");