diff options
-rwxr-xr-x | docbook/make-wsluarm.pl | 2 | ||||
-rw-r--r-- | docbook/wsluarm.asciidoc | 2 | ||||
-rw-r--r-- | epan/wslua/wslua_struct.c | 1 | ||||
-rw-r--r-- | epan/wslua/wslua_tvb.c | 42 |
4 files changed, 36 insertions, 11 deletions
diff --git a/docbook/make-wsluarm.pl b/docbook/make-wsluarm.pl index 4bd121426b..35f92a8644 100755 --- a/docbook/make-wsluarm.pl +++ b/docbook/make-wsluarm.pl @@ -310,7 +310,7 @@ my $asciidoc_template = { "==== %s\n\n", #class_desc => "\t\t<para>%s</para>\n", class_attr_header => "[[lua_class_attrib_%s]]\n\n" . - "==== %s\n\n", + "===== %s\n\n", #class_attr_descr => "\t\t\t<para>%s%s</para>\n", class_attr_footer => "// End %s\n\n", function_header => "[[lua_fn_%s]]\n\n" . diff --git a/docbook/wsluarm.asciidoc b/docbook/wsluarm.asciidoc index a92aafc503..2142092c55 100644 --- a/docbook/wsluarm.asciidoc +++ b/docbook/wsluarm.asciidoc @@ -164,7 +164,7 @@ register_menu("Test/Packets", menuable_tap, MENU_TOOLS_UNSORTED) [[wsluarm_modules]] -=== Wireshark's Lua API Reference Manual +== Wireshark's Lua API Reference Manual This Part of the User Guide describes the Wireshark specific functions in the embedded Lua. diff --git a/epan/wslua/wslua_struct.c b/epan/wslua/wslua_struct.c index ea9e36d2c5..f5d562e9e1 100644 --- a/epan/wslua/wslua_struct.c +++ b/epan/wslua/wslua_struct.c @@ -155,6 +155,7 @@ so unpacking a 64-bit field (`i8`/`I8`) will lose precision. Use `e`/`E` to unpack into a Wireshark `Int64`/`UInt64` object instead. + @since 1.11.3 */ diff --git a/epan/wslua/wslua_tvb.c b/epan/wslua/wslua_tvb.c index 3c65d57ef3..30610a4351 100644 --- a/epan/wslua/wslua_tvb.c +++ b/epan/wslua/wslua_tvb.c @@ -37,7 +37,13 @@ WSLUA_CLASS_DEFINE(ByteArray,FAIL_ON_NULL("ByteArray"),NOP); -WSLUA_CONSTRUCTOR ByteArray_new(lua_State* L) { /* Creates a `ByteArray` object. */ +WSLUA_CONSTRUCTOR ByteArray_new(lua_State* L) { + /* Creates a `ByteArray` object. + + Starting in version 1.11.3, if the second argument is a boolean `true`, + then the first argyument is treated as a raw Lua string of bytes to use, + instead of a hexadecimal string. + */ #define WSLUA_OPTARG_ByteArray_new_HEXBYTES 1 /* A string consisting of hexadecimal bytes like "00 B1 A2" or "1a2b3c4d". */ #define WSLUA_OPTARG_ByteArray_new_SEPARATOR 2 /* A string separator between hex bytes/words (default=" "), or if the boolean value `true` is used, then the first argument @@ -248,7 +254,10 @@ WSLUA_METHOD ByteArray_subset(lua_State* L) { } WSLUA_METHOD ByteArray_base64_decode(lua_State* L) { - /* Obtain a base64 decoded `ByteArray`. */ + /* Obtain a base64 decoded `ByteArray`. + + @since 1.11.3 + */ ByteArray ba = checkByteArray(L,1); ByteArray ba2; gchar *data; @@ -268,7 +277,10 @@ WSLUA_METHOD ByteArray_base64_decode(lua_State* L) { } WSLUA_METHOD ByteArray_raw(lua_State* L) { - /* Obtain a Lua string of the binary bytes in a `ByteArray`. */ + /* Obtain a Lua string of the binary bytes in a `ByteArray`. + + @since 1.11.3 + */ #define WSLUA_OPTARG_ByteArray_raw_OFFSET 2 /* The position of the first byte (default=0/first). */ #define WSLUA_OPTARG_ByteArray_raw_LENGTH 3 /* The length of the segment to get (default=all). */ ByteArray ba = checkByteArray(L,1); @@ -291,7 +303,10 @@ WSLUA_METHOD ByteArray_raw(lua_State* L) { } WSLUA_METHOD ByteArray_tohex(lua_State* L) { - /* Obtain a Lua string of the bytes in a `ByteArray` as hex-ascii, with given separator */ + /* Obtain a Lua string of the bytes in a `ByteArray` as hex-ascii, with given separator + + @since 1.11.3 + */ #define WSLUA_OPTARG_ByteArray_tohex_LOWERCASE 2 /* True to use lower-case hex characters (default=false). */ #define WSLUA_OPTARG_ByteArray_tohex_SEPARATOR 3 /* A string separator to insert between hex bytes (default=nil). */ ByteArray ba = checkByteArray(L,1); @@ -622,7 +637,10 @@ WSLUA_METHOD Tvb_range(lua_State* L) { } WSLUA_METHOD Tvb_raw(lua_State* L) { - /* Obtain a Lua string of the binary bytes in a `Tvb`. */ + /* Obtain a Lua string of the binary bytes in a `Tvb`. + + @since 1.11.3 + */ #define WSLUA_OPTARG_Tvb_raw_OFFSET 2 /* The position of the first byte (default=0/first). */ #define WSLUA_OPTARG_Tvb_raw_LENGTH 3 /* The length of the segment to get (default=all). */ Tvb tvb = checkTvb(L,1); @@ -1242,7 +1260,10 @@ WSLUA_METHOD TvbRange_stringz(lua_State* L) { WSLUA_METHOD TvbRange_strsize(lua_State* L) { /* Find the size of a zero terminated string from a `TvbRange`. - The size of the string includes the terminating zero. */ + The size of the string includes the terminating zero. + + @since 1.11.3 + */ #define WSLUA_OPTARG_TvbRange_strsize_ENCODING 2 /* The encoding to use. Defaults to ENC_ASCII. */ TvbRange tvbr = checkTvbRange(L,1); guint encoding = (guint)luaL_optinteger(L,WSLUA_OPTARG_TvbRange_strsize_ENCODING, ENC_ASCII|ENC_NA); @@ -1450,8 +1471,8 @@ WSLUA_METHOD TvbRange_range(lua_State* L) { return 0; } -static int TvbRange_uncompress(lua_State* L) { - /* Obtain a uncompressed TvbRange from a TvbRange */ +WSLUA_METHOD TvbRange_uncompress(lua_State* L) { + /* Obtain an uncompressed TvbRange from a TvbRange */ #define WSLUA_ARG_TvbRange_uncompress_NAME 2 /* The name to be given to the new data-source. */ TvbRange tvbr = checkTvbRange(L,1); #ifdef HAVE_LIBZ @@ -1518,7 +1539,10 @@ WSLUA_METHOD TvbRange_offset(lua_State* L) { } WSLUA_METHOD TvbRange_raw(lua_State* L) { - /* Obtain a Lua string of the binary bytes in a `TvbRange`. */ + /* Obtain a Lua string of the binary bytes in a `TvbRange`. + + @since 1.11.3 + */ #define WSLUA_OPTARG_TvbRange_raw_OFFSET 2 /* The position of the first byte (default=0/first). */ #define WSLUA_OPTARG_TvbRange_raw_LENGTH 3 /* The length of the segment to get (default=all). */ TvbRange tvbr = checkTvbRange(L,1); |