From Tamas Regos via bug 4699:

Added get_version() Lua function to get Wireshark version.

svn path=/trunk/; revision=32521
This commit is contained in:
Stig Bjørlykke 2010-04-20 06:24:30 +00:00
parent ea25410415
commit 1c73f4eece
1 changed files with 6 additions and 0 deletions

View File

@ -56,6 +56,12 @@ WSLUA_API const gchar* lua_shiftstring(lua_State* L, int i) {
}
}
WSLUA_FUNCTION wslua_get_version(lua_State* L) { /* Get Wireshark version */
gchar* str = VERSION;
lua_pushstring(L,str);
WSLUA_RETURN(1); /* version string */
}
WSLUA_FUNCTION wslua_format_date(lua_State* LS) { /* Formats an absolute timestamp into a human readable date */
#define WSLUA_ARG_format_date_TIMESTAMP 1 /* A timestamp value to convert. */
lua_Number timestamp = luaL_checknumber(LS,WSLUA_ARG_format_date_TIMESTAMP);