summaryrefslogtreecommitdiff
path: root/lib/frrlua.h
diff options
context:
space:
mode:
authorQuentin Young <qlyoung@nvidia.com>2020-11-29 16:00:36 -0500
committerQuentin Young <qlyoung@nvidia.com>2020-12-01 18:37:14 -0500
commit42ae55b5d4dcfed694862b969e8c6fb201418a0d (patch)
treefae5ce10b26d6e72ae0e9e81b45270f519a67e82 /lib/frrlua.h
parent9e47ee98a3de9c7c3f6ee4eb527f59015a5515b5 (diff)
lib: add more type encoder funcs
- in_addr - in6_addr - sockunion Signed-off-by: Quentin Young <qlyoung@nvidia.com>
Diffstat (limited to 'lib/frrlua.h')
-rw-r--r--lib/frrlua.h24
1 files changed, 19 insertions, 5 deletions
diff --git a/lib/frrlua.h b/lib/frrlua.h
index 6e646e337d..a411751172 100644
--- a/lib/frrlua.h
+++ b/lib/frrlua.h
@@ -43,12 +43,26 @@ int lua_pushprefix(lua_State *L, const struct prefix *prefix);
int lua_pushinterface(lua_State *L, const struct interface *ifp);
/*
- * Retrieve a string from table on the top of the stack.
- *
- * key
- * Key of string value in table
+ * Pushes a new table containing both numeric and string representations of an
+ * in_addr to the stack.
+ */
+int lua_pushinaddr(lua_State *L, const struct in_addr *addr);
+
+/*
+ * Pushes a new table containing both numeric and string representations of an
+ * in6_addr to the stack.
+ */
+int lua_pushin6addr(lua_State *L, const struct in6_addr *addr);
+
+/*
+ * Pushes a time_t to the stack.
+ */
+int lua_pushtimet(lua_State *L, const time_t *time);
+
+/*
+ * Pushes a table representing a sockunion to the stack.
*/
-const char *frrlua_table_get_string(lua_State *L, const char *key);
+int lua_pushsockunion(lua_State *L, const union sockunion *su);
/*
* Retrieve an integer from table on the top of the stack.