2016-01-10 20:35:36 +00:00
|
|
|
## Copyright (C) 2005-2016 Red Hat, Inc.
|
|
|
|
## Copyright (C) 2013 Yuto KAWAMURA(kawamuray) <kawamuray.dadada@gmail.com>
|
2013-05-14 23:42:12 +00:00
|
|
|
##
|
|
|
|
## This library is free software; you can redistribute it and/or
|
|
|
|
## modify it under the terms of the GNU Lesser General Public
|
|
|
|
## License as published by the Free Software Foundation; either
|
|
|
|
## version 2.1 of the License, or (at your option) any later version.
|
|
|
|
##
|
|
|
|
## This library is distributed in the hope that it will be useful,
|
|
|
|
## but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
|
|
## Lesser General Public License for more details.
|
|
|
|
##
|
|
|
|
## You should have received a copy of the GNU Lesser General Public
|
|
|
|
## License along with this library. If not, see
|
|
|
|
## <http://www.gnu.org/licenses/>.
|
2009-04-19 15:10:45 +00:00
|
|
|
|
2020-01-17 16:00:27 +00:00
|
|
|
# We do not want to accidentally include stuff from src/
|
|
|
|
# dir or public API dir. Specific files can
|
2019-08-08 09:23:26 +00:00
|
|
|
# still be included via their path relative to the root if
|
|
|
|
# needed
|
2016-01-10 20:35:36 +00:00
|
|
|
if WITH_WIRESHARK_DISSECTOR
|
|
|
|
|
|
|
|
ws_plugin_LTLIBRARIES = wireshark/src/libvirt.la
|
2017-11-16 13:34:31 +00:00
|
|
|
wireshark_src_libvirt_la_CFLAGS = \
|
wireshark: fix compilation errors
With meson introduction which is using the same CFLAGS for the whole
project some compilation errors were discovered. The wireshark plugin
library is the only one in tools directory that is not using AM_CFLAGS.
With the AM_CFLAGS we get these errors:
../../tools/wireshark/src/packet-libvirt.c: In function 'dissect_libvirt_fds':
../../tools/wireshark/src/packet-libvirt.c:348:31: error: unused parameter 'tvb' [-Werror=unused-parameter]
348 | dissect_libvirt_fds(tvbuff_t *tvb, gint start, gint32 nfds)
| ~~~~~~~~~~^~~
../../tools/wireshark/src/packet-libvirt.c:348:41: error: unused parameter 'start' [-Werror=unused-parameter]
348 | dissect_libvirt_fds(tvbuff_t *tvb, gint start, gint32 nfds)
| ~~~~~^~~~~
../../tools/wireshark/src/packet-libvirt.c:348:55: error: unused parameter 'nfds' [-Werror=unused-parameter]
348 | dissect_libvirt_fds(tvbuff_t *tvb, gint start, gint32 nfds)
| ~~~~~~~^~~~
At top level:
../../tools/wireshark/src/packet-libvirt.c:64:5: error: 'dissect_xdr_bool' defined but not used [-Werror=unused-function]
64 | dissect_xdr_##xtype(tvbuff_t *tvb, proto_tree *tree, XDR *xdrs, int hf) \
| ^~~~~~~~~~~~
../../tools/wireshark/src/packet-libvirt.c:88:1: note: in expansion of macro 'XDR_PRIMITIVE_DISSECTOR'
88 | XDR_PRIMITIVE_DISSECTOR(bool, bool_t, boolean)
| ^~~~~~~~~~~~~~~~~~~~~~~
../../tools/wireshark/src/packet-libvirt.c:64:5: error: 'dissect_xdr_float' defined but not used [-Werror=unused-function]
64 | dissect_xdr_##xtype(tvbuff_t *tvb, proto_tree *tree, XDR *xdrs, int hf) \
| ^~~~~~~~~~~~
../../tools/wireshark/src/packet-libvirt.c:86:1: note: in expansion of macro 'XDR_PRIMITIVE_DISSECTOR'
86 | XDR_PRIMITIVE_DISSECTOR(float, gfloat, float)
| ^~~~~~~~~~~~~~~~~~~~~~~
../../tools/wireshark/src/packet-libvirt.c:64:5: error: 'dissect_xdr_short' defined but not used [-Werror=unused-function]
64 | dissect_xdr_##xtype(tvbuff_t *tvb, proto_tree *tree, XDR *xdrs, int hf) \
| ^~~~~~~~~~~~
../../tools/wireshark/src/packet-libvirt.c:80:1: note: in expansion of macro 'XDR_PRIMITIVE_DISSECTOR'
80 | XDR_PRIMITIVE_DISSECTOR(short, gint16, int)
| ^~~~~~~~~~~~~~~~~~~~~~~
../../tools/wireshark/src/packet-libvirt.c: In function 'dissect_libvirt_message':
../../tools/wireshark/src/packet-libvirt.c:423:34: error: null pointer dereference [-Werror=null-dereference]
423 | vir_xdr_dissector_t xd = find_payload_dissector(proc, type, get_program_data(prog, VIR_PROGRAM_DISSECTORS),
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
424 | *(gsize *)get_program_data(prog, VIR_PROGRAM_DISSECTORS_LEN));
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2020-05-20 20:52:05 +00:00
|
|
|
-I wireshark/src $(WIRESHARK_DISSECTOR_CFLAGS) $(XDR_CFLAGS) $(AM_CFLAGS)
|
2016-01-10 20:35:36 +00:00
|
|
|
wireshark_src_libvirt_la_LDFLAGS = -avoid-version -module
|
|
|
|
wireshark_src_libvirt_la_SOURCES = \
|
|
|
|
wireshark/src/packet-libvirt.h \
|
2019-02-08 08:10:24 +00:00
|
|
|
wireshark/src/packet-libvirt.c \
|
|
|
|
wireshark/src/plugin.c
|
2016-01-10 20:35:36 +00:00
|
|
|
|
|
|
|
wireshark/src/packet-libvirt.c: wireshark/src/packet-libvirt.h \
|
|
|
|
wireshark/src/libvirt/protocol.h
|
|
|
|
|
|
|
|
WS_DISSECTOR_PROTO_FILES = \
|
|
|
|
$(abs_top_srcdir)/src/remote/remote_protocol.x \
|
|
|
|
$(abs_top_srcdir)/src/remote/qemu_protocol.x \
|
|
|
|
$(abs_top_srcdir)/src/remote/lxc_protocol.x \
|
|
|
|
$(abs_top_srcdir)/src/rpc/virkeepaliveprotocol.x
|
|
|
|
|
|
|
|
wireshark/src/libvirt/protocol.h: wireshark/util/genxdrstub.pl \
|
|
|
|
$(WS_DISSECTOR_PROTO_FILES)
|
2017-08-04 17:12:13 +00:00
|
|
|
$(AM_V_GEN)$(MKDIR_P) wireshark/src/libvirt && \
|
2016-01-10 20:35:36 +00:00
|
|
|
cd wireshark/src && \
|
|
|
|
LIBVIRT_VERSION=$(LIBVIRT_VERSION) \
|
|
|
|
$(PERL) $(abs_top_srcdir)/tools/wireshark/util/genxdrstub.pl \
|
|
|
|
$(WS_DISSECTOR_PROTO_FILES)
|
|
|
|
|
|
|
|
endif WITH_WIRESHARK_DISSECTOR
|