Age | Commit message (Collapse) | Author | Files | Lines |
|
|
|
Move the top-level user-guide.adoc and developer-guide.adoc to their
respective source directores. This is in preparation for a future
toolchain revamp.
Move the wsug_graphics directory to wsug_src/images and wsdg_graphics
directory to wsdg_src/images. Copy common_graphics/* to the each images
directory and remove common_graphics. We only have five admonition
graphics; duplicating them lets us remove some build config overhead.
Rename wsluarm.adoc to wsdg_src/wsdg_lua_support.adoc.
Remove a dummy file.
Tested visually and by enabling `--failure-level=WARN`.
|
|
- ws_assert does not work, because _ASSERT_ENABLED is false and gets optimized
- add _U_ to unused variables because of compile flag /W3
- local variables need suppression of warning 4189
|
|
|
|
Fix
wireshark\epan\wslua\wslua_proto_field.c(423,29): error C2220: the following warning is treated as an error [wireshark\build\epan\wslua\wslua.vcxproj]
wireshark\epan\wslua\wslua_proto_field.c(423,29): error C2220: mask = (guint64)wslua_optguint32(L, idx, default_value); [wireshark\build\epan\wslua\wslua.vcxproj]
wireshark\epan\wslua\wslua_proto_field.c(423,29): error C2220: ^ [wireshark\build\epan\wslua\wslua.vcxproj]
wireshark\epan\wslua\wslua_proto_field.c(423,29): warning C4244: 'function': conversion from 'guint64' to 'lua_Number', possible loss of data [wireshark\build\epan\wslua\wslua.vcxproj]
wireshark\epan\wslua\wslua_proto_field.c(423,29): warning C4244: mask = (guint64)wslua_optguint32(L, idx, default_value); [wireshark\build\epan\wslua\wslua.vcxproj]
wireshark\epan\wslua\wslua_proto_field.c(423,29): warning C4244: ^ [wireshark\build\epan\wslua\wslua.vcxproj]
on Windows and
wireshark/epan/wslua/wslua_proto_field.c:1462:48: error: format specifies type 'unsigned long' but the argument has type 'guint64' (aka 'unsigned long long') [-Werror,-Wformat]
f->vs,f->mask,f->blob);
^~~~~~~
wireshark/wsutil/wmem/wmem_strutl.h:51:56: note: expanded from macro 'ws_strdup_printf'
#define ws_strdup_printf(...) wmem_strdup_printf(NULL, __VA_ARGS__)
^~~~~~~~~~~
on macOS.
|
|
Mask might be specified using a (Lua) number, a string or a UInt64
object.
It is useful to handle 64 bit bitfields.
|
|
Adds APIs for parsing different kinds of integer from a lua ByteArray:
-16, 32 and 64 bit
-singed or unsigned
-encoded little endian or big endian
|
|
|
|
Treat a `FT_CHAR` field like a `FT_UINT*` field, the same as Wireshark's
`proto_tree_add_item()` does.
Closes #18353
|
|
Don't just indicate that they exist and are settable, indicate what the
*do*.
See https://ask.wireshark.org/question/29843/how-to-maintain-a-packetfile-specific-var/.
|
|
This adds support to Wireshark for custom context menus for packets, so
that when a packet's context menu is opened (e.g., by right-clicking),
Wireshark can support doing things like "run a program" or
"open a URL" with a field from the packet as a parameter. Note that
this is similar to ArcSight's integration commands feature.
For example, it could be used like the following:
```
ROBTEX_URL = "https://www.robtex.com/dns-lookup/"
local function search_robtex(...)
local fields = {...};
for i, field in ipairs( fields ) do
if (field.name == 'http.host') then
browser_open_url(ROBTEX_URL .. field.value)
break
end
end
end
register_packet_menu("Search host in Robtex", search_robtex, "http.host");
```
Fixes issue #14998
|
|
Return an struct containing error information. This simplifies
the interface to more easily provide richer diagnostics in the future.
Add an error code besides a human-readable error string to allow
checking programmatically for errors in a robust manner. Currently
there is only a generic error code, it is expected to increase
in the future.
Move error location information to the struct. Change callers and
implementation to use the new interface.
|
|
obj.__typeof exists only for "table" objects (see c4f1777a)
|
|
Ping #18075
|
|
|
|
|
|
|
|
Add support for FT_STRINGZPAD in FieldInfo.
|
|
Rename dissector_handle_get_long_name() and
dissector_handle_get_short_name() to
dissector_handle_get_protocol_long_name() and
dissector_handle_get_protocol_short_name(), to clarify that they fetch
names for the protocol that the dissector dissects, not for the
dissector *itself*. Leave a deprecated
dissector_handle_get_short_name() wrapper, and export
dissector_handle_get_protocol_long_name(), as it's now used in some
dissectors.
Change some calls to dissector_handle_get_description() back to
dissector_handle_get_protocol_short_name(), as they appear to be made in
order to display a *protocol* name.
Rename some methods, variables, enums, and table column names to reflect
cases where the dissector description is being used.
|
|
It defaults to the short name of the protocol dissected by the
descriptor, but it's now possible to register a dissector with an
explicit description.
This is mainly for use in the Decode As UI. It handles the case where
the same protocol might have different "Decode As..."-specifiable
dissectors for different situations.
|
|
|
|
Rename wslua_util.c to wslua_utility.c so that our file name has the
form "wslua_<lower case lua module name>.c", which is the case for our
other modules.
|
|
Add a register_wslua target and have lrexlib depend on it so that
declare_wslual.h is generated in the right order. The working directory
when we create declare_wslua.h and register_wslua.c is epan/wslua,
so there's no need to explicitly set it. Remove an unneeded lrexlib
include path.
|
|
|
|
Test wth:
for _,tap_name in pairs(Listener.list()) do
foo1 = Listener.new(tap_name)
print (foo1)
end
|
|
Capitalize words in our markup instead of depending on make-wsluarm.pl.
Add a single space after "Mode:".
|
|
|
|
Include paths will be added until morale improves.
|
|
Make sure our argument definitions match their corresponding function
names.
|
|
Try to fix
C:\gitlab-builds\builds\-fyeYoMP\0\wireshark\wireshark\epan\wslua\lrexlib\pcre2\../../wslua.h(52,1): fatal error C1083: Cannot open include file: 'epan/wslua/declare_wslua.h': No such file or directory [C:\gitlab-builds\builds\-fyeYoMP\0\wireshark\wireshark\build\epan\wslua\lrexlib\lrexlib.vcxproj]
C:\gitlab-builds\builds\-fyeYoMP\0\wireshark\wireshark\epan\wslua\lrexlib\pcre2\../../wslua.h(52,1): fatal error C1083: #include <epan/wslua/declare_wslua.h> [C:\gitlab-builds\builds\-fyeYoMP\0\wireshark\wireshark\build\epan\wslua\lrexlib\lrexlib.vcxproj]
C:\gitlab-builds\builds\-fyeYoMP\0\wireshark\wireshark\epan\wslua\lrexlib\pcre2\../../wslua.h(52,1): fatal error C1083: ^ [C:\gitlab-builds\builds\-fyeYoMP\0\wireshark\wireshark\build\epan\wslua\lrexlib\lrexlib.vcxproj]
|
|
lpcre2.c:506:13: warning: no previous prototype for function 'luaopen_rex_pcre2'
lpcre2_f.c:207:5: warning: no previous prototype for function 'Lpcre2_config'
lpcre2_f.c:234:5: warning: no previous prototype for function 'Lpcre2_get_flags'
|
|
Switch to the name "Logray" for the log analyzer. Rays are biological
cousins of sharks and more people like the name "Logray" in a completely
unscientific survey here. Apologies for any inconvenience this might
cause.
|
|
Make some scripts executable and use the shebang line recommended at
https://docs.python.org/3/using/unix.html#miscellaneous
|
|
Port the script that creates init.lua to Python3. The generated init.lua
removes one newline and adds another, otherwise the output is identical
to the Perl version.
Ping #18152.
|
|
Port the script that creates taps_wslua.c and taps.txt to Python3. The
generated taps_wslua.c has one less newline, otherwise the output is
identical to the Perl version. Make the "taps" configuration file an
ConfigParser / .ini file.
Ping #18152.
|
|
Explicitly set "encoding='utf-8'" for each of the files we read and
write in make-reg.py and generate_authors.py.
|
|
Port the script that creates
declare_wslua.h and register_wslua.c
to Python3.
Ping #18152.
|
|
|
|
|
|
This allows flags to be passed by the registering listener
to the collection of information
|
|
|
|
The warning is harmless and we want to keep upstream code
as pristine as possible (unless there is a real issue in
the code of course) so disable the warning.
|
|
|
|
Add the de facto standard Lua regex API to Wireshark. Upstream
code is copied verbatim and the module opened in the "rex" table.
This is just a user convenience and developer quality of life improvement
over the GRegex Lua API because it has always been possible to
load lrexlib-pcre2 as a Lua module from Wireshark.
|
|
This code has been unmaintained and does not pass the lrexlib test
suite. GRegex itself has been obsolescent for some time, although GNOME
has recently restarted trying to move it to PCRE2.
Remove it in preparation for a move to lrexlib-pcre2.
|
|
|
|
```
cd /home/petro/work/wireshark/epan/wslua && /usr/bin/cc -DG_DISABLE_DEPRECATED -DG_DISABLE_SINGLE_INCLUDES -DWS_BUILD_DLL -I/home/petro/work/wireshark -I/home/petro/work/wireshark/include -isystem /usr/include/glib-2.0 -isystem /usr/lib64/glib-2.0/include -isystem /usr/include/lua-5.1 -isystem /home/petro/work/wireshark/epan/wslua -fvisibility=hidden -fexcess-precision=fast -Wall -Wextra -Wendif-labels -Wpointer-arith -Wformat-security -fwrapv -fno-strict-overflow -Wvla -Waddress -Wattributes -Wdiv-by-zero -Wignored-qualifiers -Wpragmas -Wno-overlength-strings -Wno-long-long -Wredundant-decls -Wno-error=maybe-uninitialized -Wno-format-truncation -Wframe-larger-than=32768 -Wunused-const-variable -Wshadow -Wold-style-definition -Wstrict-prototypes -Wlogical-op -Wjump-misses-init -Werror=implicit -Wno-pointer-sign -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fexceptions -fstack-protector-strong -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -fmacro-prefix-map=/home/petro/work/wireshark/= -fmacro-prefix-map=/home/petro/work/wireshark/= -O2 -g -DNDEBUG -fPIC -std=gnu11 -Werror -MD -MT epan/wslua/CMakeFiles/wslua.dir/init_wslua.c.o -MF CMakeFiles/wslua.dir/init_wslua.c.o.d -o CMakeFiles/wslua.dir/init_wslua.c.o -c /home/petro/work/wireshark/epan/wslua/init_wslua.c
/home/petro/work/wireshark/epan/wslua/wslua_tree.c: In function ‘TreeItem_add_packet_field’:
/home/petro/work/wireshark/epan/wslua/wslua_tree.c:79:17: error: variable ‘item’ might be clobbered by ‘longjmp’ or ‘vfork’ [-Werror=clobbered]
79 | proto_item* item = NULL;
| ^~~~
Consolidate compiler generated dependencies of target dissectors
cc1: all warnings being treated as errors
make[2]: *** [epan/wslua/CMakeFiles/wslua.dir/build.make:508: epan/wslua/CMakeFiles/wslua.dir/wslua_tree.c.o] Error 1
make[2]: *** Waiting for unfinished jobs....
```
Signed-off-by: Peter Lemenkov <lemenkov@gmail.com>
|
|
Update to match ca04f4c8cb.
|
|
Add log-specific statistics groups, and use them to limit the dynamic
menu items in Wireshark and Logwolf.
|
|
|