summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
Diffstat (limited to 'tools')
-rwxr-xr-xtools/asn2wrs.py27
-rwxr-xr-xtools/check_typed_item_calls.py3
-rwxr-xr-xtools/macos-setup-brew.sh11
-rwxr-xr-xtools/make-packet-dcm.py4
-rwxr-xr-xtools/make-pci-ids.py20
-rwxr-xr-xtools/make-services.py2
-rwxr-xr-xtools/make-version.py4
-rw-r--r--tools/msys2-setup.sh23
-rw-r--r--tools/win-setup.ps18
9 files changed, 62 insertions, 40 deletions
diff --git a/tools/asn2wrs.py b/tools/asn2wrs.py
index 6669be82..7f72443b 100755
--- a/tools/asn2wrs.py
+++ b/tools/asn2wrs.py
@@ -1550,21 +1550,19 @@ class EthCtx:
if self.conform.check_item('PDU', tname):
out += self.output_proto_root()
- cycle_size = 0
+ cycle_funcs = []
if self.eth_dep_cycle:
for cur_cycle in self.eth_dep_cycle:
t = self.type[cur_cycle[0]]['ethname']
if t == tname:
- cycle_size = len(cur_cycle)
+ cycle_funcs = cur_cycle
break
- if cycle_size > 0:
+ if len(cycle_funcs) > 1:
out += f'''\
- const int proto_id = GPOINTER_TO_INT(wmem_list_frame_data(wmem_list_tail(actx->pinfo->layers)));
- const unsigned cycle_size = {cycle_size};
- unsigned recursion_depth = p_get_proto_depth(actx->pinfo, proto_id);
- DISSECTOR_ASSERT(recursion_depth <= MAX_RECURSION_DEPTH);
- p_set_proto_depth(actx->pinfo, proto_id, recursion_depth + cycle_size);
+ // {' → '.join(cycle_funcs)}
+ actx->pinfo->dissection_depth += {len(cycle_funcs) - 1};
+ increment_dissection_depth(actx->pinfo);
'''
if self.conform.get_fn_presence(self.eth_type[tname]['ref'][0]):
@@ -1578,17 +1576,18 @@ class EthCtx:
# out += self.conform.get_fn_text(tname, 'FN_FTR')
#el
- add_recursion_check = False
+ cycle_funcs = []
if self.eth_dep_cycle:
for cur_cycle in self.eth_dep_cycle:
t = self.type[cur_cycle[0]]['ethname']
if t == tname:
- add_recursion_check = True
+ cycle_funcs = cur_cycle
break
- if add_recursion_check:
- out += '''\
- p_set_proto_depth(actx->pinfo, proto_id, recursion_depth - cycle_size);
+ if len(cycle_funcs) > 1:
+ out += f'''\
+ actx->pinfo->dissection_depth -= {len(cycle_funcs) - 1};
+ decrement_dissection_depth(actx->pinfo);
'''
if self.conform.get_fn_presence(self.eth_type[tname]['ref'][0]):
@@ -1875,8 +1874,6 @@ class EthCtx:
fx.write('\n')
i += 1
fx.write('\n')
- if add_depth_define:
- fx.write('#define MAX_RECURSION_DEPTH 100 // Arbitrarily chosen.\n')
for t in self.eth_type_ord1:
if self.eth_type[t]['import']:
continue
diff --git a/tools/check_typed_item_calls.py b/tools/check_typed_item_calls.py
index 4800203e..24520c6e 100755
--- a/tools/check_typed_item_calls.py
+++ b/tools/check_typed_item_calls.py
@@ -305,7 +305,8 @@ class ProtoTreeAddItemCheck(APICheck):
'seq_info->txt_enc | ENC_NA',
'BASE_SHOW_UTF_8_PRINTABLE',
'dhcp_secs_endian',
- 'is_mdns ? ENC_UTF_8|ENC_NA : ENC_ASCII|ENC_NA'
+ 'is_mdns ? ENC_UTF_8|ENC_NA : ENC_ASCII|ENC_NA',
+ 'xl_encoding'
}:
global warnings_found
diff --git a/tools/macos-setup-brew.sh b/tools/macos-setup-brew.sh
index 17c92ced..910f7e86 100755
--- a/tools/macos-setup-brew.sh
+++ b/tools/macos-setup-brew.sh
@@ -108,7 +108,6 @@ ADDITIONAL_LIST=(
libsmi
libssh
libxml2
- lua@5.1
lz4
minizip
opus
@@ -140,8 +139,13 @@ fi
install_formulae "${ACTUAL_LIST[@]}"
+if [ $INSTALL_OPTIONAL -ne 0 ] ; then
+ brew install lua@5.1 || printf "Lua 5.1 installation failed.\\n"
+fi
+
if [ $INSTALL_DMG_DEPS -ne 0 ] ; then
- pip3 install dmgbuild
+ printf "Sorry, you'll have to install dmgbuild yourself for the time being.\\n"
+ # pip3 install dmgbuild
fi
if [ $INSTALL_SPARKLE_DEPS -ne 0 ] ; then
@@ -149,7 +153,8 @@ if [ $INSTALL_SPARKLE_DEPS -ne 0 ] ; then
fi
if [ $INSTALL_TEST_DEPS -ne 0 ] ; then
- pip3 install pytest pytest-xdist
+ printf "Sorry, you'll have to install pytest and pytest-xdist yourself for the time being.\\n"
+ # pip3 install pytest pytest-xdist
fi
# Uncomment to add PNG compression utilities used by compress-pngs:
diff --git a/tools/make-packet-dcm.py b/tools/make-packet-dcm.py
index 028bde4e..51cbcf10 100755
--- a/tools/make-packet-dcm.py
+++ b/tools/make-packet-dcm.py
@@ -196,7 +196,7 @@ typedef struct dcm_tag {
const gboolean add_to_summary; /* Add to parent's item description */
} dcm_tag_t;
-static dcm_tag_t dcm_tag_data[] = {
+static dcm_tag_t const dcm_tag_data[] = {
/* Command Tags */
""" + text_for_rows(cmd_rows) + """
@@ -233,7 +233,7 @@ typedef struct dcm_uid {
""" + "\n".join(f'#define {uid_define_name(uid)} "{uid[0]}"'
for uid in uid_rows if uid[1] != '(Retired)') + """
-static dcm_uid_t dcm_uid_data[] = {
+static dcm_uid_t const dcm_uid_data[] = {
""" + "\n".join(f' {{ {uid_define_name(uid)}, "{uid[1]}", "{uid[3]}"}},'
for uid in uid_rows)+ """
};
diff --git a/tools/make-pci-ids.py b/tools/make-pci-ids.py
index 0a77f766..093637d7 100755
--- a/tools/make-pci-ids.py
+++ b/tools/make-pci-ids.py
@@ -44,7 +44,7 @@ typedef struct
uint16_t did;
uint16_t svid;
uint16_t ssid;
- char *name;
+ const char *name;
} pci_id_t;
@@ -52,14 +52,14 @@ typedef struct
{
uint16_t vid;
uint16_t count;
- pci_id_t *ids_ptr;
+ pci_id_t const *ids_ptr;
} pci_vid_index_t;
"""
CODE_POSTFIX = """
-static pci_vid_index_t *get_vid_index(uint16_t vid)
+static pci_vid_index_t const *get_vid_index(uint16_t vid)
{
uint32_t start_index = 0;
uint32_t end_index = 0;
@@ -96,9 +96,9 @@ static pci_vid_index_t *get_vid_index(uint16_t vid)
const char *pci_id_str(uint16_t vid, uint16_t did, uint16_t svid, uint16_t ssid)
{
unsigned int i;
- static char *not_found = \"Not found\";
- pci_vid_index_t *index_ptr;
- pci_id_t *ids_ptr;
+ static const char *not_found = \"Not found\";
+ pci_vid_index_t const *index_ptr;
+ pci_id_t const *ids_ptr;
index_ptr = get_vid_index(vid);
@@ -184,7 +184,7 @@ def main():
did = -1
svid = -1
ssid = -1
- out_lines += "pci_id_t pci_vid_%04X[] = {\n" % (vid)
+ out_lines += "static pci_id_t const pci_vid_%04X[] = {\n" % (vid)
out_lines += "{0x%04X, 0xFFFF, 0xFFFF, 0xFFFF, \"%s(0x%04X)\"},\n" % (vid, words[1].strip(), vid)
id_list.append(vid)
continue
@@ -227,7 +227,7 @@ def main():
out_lines += "}; /* pci_vid_%04X[] */\n" % (vid)
count_list.append(entries)
- out_lines += "\npci_vid_index_t pci_vid_index[] = {\n"
+ out_lines += "\nstatic pci_vid_index_t const pci_vid_index[] = {\n"
vendor_count = len(id_list)
device_count = 0
@@ -240,10 +240,10 @@ def main():
out_lines += CODE_POSTFIX
if vendor_count < MIN_VENDOR_COUNT:
- exit_msg(f'Too view vendors. Wanted {MIN_VENDOR_COUNT}, got {vendor_count}.')
+ exit_msg(f'Too few vendors. Wanted {MIN_VENDOR_COUNT}, got {vendor_count}.')
if device_count < MIN_DEVICE_COUNT:
- exit_msg(f'Too view devices. Wanted {MIN_DEVICE_COUNT}, got {device_count}.')
+ exit_msg(f'Too few devices. Wanted {MIN_DEVICE_COUNT}, got {device_count}.')
with open(OUTPUT_FILE, "w", encoding="utf-8") as pci_ids_f:
pci_ids_f.write(out_lines)
diff --git a/tools/make-services.py b/tools/make-services.py
index e608af7e..0f832bec 100755
--- a/tools/make-services.py
+++ b/tools/make-services.py
@@ -43,7 +43,7 @@ def parse_port(port_str):
if len(p) == 1:
return tuple([int(p[0])])
if len(p) == 2:
- return tuple([int(p[0]), int(p[1])])
+ return tuple(range(int(p[0]), int(p[1]) + 1))
except ValueError:
pass
return ()
diff --git a/tools/make-version.py b/tools/make-version.py
index 4adc7b29..69470995 100755
--- a/tools/make-version.py
+++ b/tools/make-version.py
@@ -44,8 +44,8 @@ GIT_ABBREV_LENGTH = 12
# If the text "$Format" is still present, it means that
# git archive did not replace the $Format string, which
# means that this not a git archive.
-GIT_EXPORT_SUBST_H = '40459284278611128aac5cef35a563218933f8da'
-GIT_EXPORT_SUBST_D = 'tag: wireshark-4.2.2, tag: v4.2.2, refs/merge-requests/13920/head, refs/keep-around/40459284278611128aac5cef35a563218933f8da'
+GIT_EXPORT_SUBST_H = '1fe5bce8d665c0d64e1af63545421c67596db165'
+GIT_EXPORT_SUBST_D = 'tag: wireshark-4.2.4, tag: v4.2.4, refs/merge-requests/15008/head, refs/keep-around/1fe5bce8d665c0d64e1af63545421c67596db165'
IS_GIT_ARCHIVE = not GIT_EXPORT_SUBST_H.startswith('$Format')
diff --git a/tools/msys2-setup.sh b/tools/msys2-setup.sh
index 0ca63299..be78607e 100644
--- a/tools/msys2-setup.sh
+++ b/tools/msys2-setup.sh
@@ -16,6 +16,7 @@ function print_usage() {
printf "The basic usage installs the needed software\\n\\n"
printf "Usage: %s [--install-optional] [...other options...]\\n" "$0"
printf "\\t--install-optional: install optional software as well\\n"
+ printf "\\t--install-nsis-deps: install packages required to build NSIS installer\\n"
printf "\\t--install-test-deps: install packages required to run all tests\\n"
printf "\\t--install-all: install everything\\n"
printf "\\t[other]: other options are passed as-is to pacman\\n"
@@ -34,11 +35,15 @@ for arg; do
--install-optional)
ADDITIONAL=1
;;
+ --install-nsis-deps)
+ NSISDEPS=1
+ ;;
--install-test-deps)
TESTDEPS=1
;;
--install-all)
ADDITIONAL=1
+ NSISDEPS=1
TESTDEPS=1
;;
*)
@@ -51,9 +56,11 @@ PACKAGE_PREFIX="${MINGW_PACKAGE_PREFIX:-mingw-w64-x86_64}"
#
# Lua packaging is kind of a mess. Lua 5.2 is not available. Some packages have
-# a hard dependy on LuaJIT and it conflicts with Lua 5.1 and vice-versa.
+# a hard dependency on LuaJIT and it conflicts with Lua 5.1 and vice-versa.
# This will probably have to be fixed by the MSYS2 maintainers.
-# XXX Is this still true?
+# XXX Is this still true? We can use Lua 5.3 and 5.4 now, though we still
+# might want to package our own version to use our UTF-8 on Windows patch
+# (though we don't apply that patch yet.)
#
BASIC_LIST="base-devel \
git \
@@ -100,6 +107,8 @@ ADDITIONAL_LIST="${PACKAGE_PREFIX}-asciidoctor \
${PACKAGE_PREFIX}-perl \
${PACKAGE_PREFIX}-ntldd"
+NSISDEPS_LIST="${PACKAGE_PREFIX}-nsis"
+
TESTDEPS_LIST="${PACKAGE_PREFIX}-python-pytest \
${PACKAGE_PREFIX}-python-pytest-xdist"
@@ -110,6 +119,11 @@ then
ACTUAL_LIST="$ACTUAL_LIST $ADDITIONAL_LIST"
fi
+if [ $NSISDEPS -ne 0 ]
+then
+ ACTUAL_LIST="$ACTUAL_LIST $NSISDEPS_LIST"
+fi
+
if [ $TESTDEPS -ne 0 ]
then
ACTUAL_LIST="$ACTUAL_LIST $TESTDEPS_LIST"
@@ -123,6 +137,11 @@ then
printf "\n*** Optional packages not installed. Rerun with --install-optional to have them.\n"
fi
+if [ $NSISDEPS -eq 0 ]
+then
+ printf "\n*** NSIS installer deps not installed. Rerun with --install-nsis-deps to have them.\n"
+fi
+
if [ $TESTDEPS -eq 0 ]
then
printf "\n*** Test deps not installed. Rerun with --install-test-deps to have them.\n"
diff --git a/tools/win-setup.ps1 b/tools/win-setup.ps1
index 0e2f7507..741c44d5 100644
--- a/tools/win-setup.ps1
+++ b/tools/win-setup.ps1
@@ -74,8 +74,8 @@ $X64Archives = @{
"AirPcap/AirPcap_Devpack_4_1_0_1622.zip" = "09d637f28a79b1d2ecb09f35436271a90c0f69bd0a1ee82b803abaaf63c18a69";
"bcg729/bcg729-1.0.4-win64ws.zip" = "9a095fda4c39860d96f0c568830faa6651cd17635f68e27aa6de46c689aa0ee2";
"brotli/brotli-1.0.9-1-win64ws.zip" = "3f8d24aec8668201994327ff8d8542fe507d1d468a500a1aec50d0415f695aab";
- "c-ares/c-ares-1.19.1-1-x64-windows-ws.zip" = "cecd95f125a34b6f1d5dfc9586792077cb70820764ffc10d43b0617c1861ae85";
- "gnutls/gnutls-3.8.2-1-x64-mingw-dynamic-ws.zip" = "6d8d30724e66fdf5370a78b67dbcbbdd00d2c4209cfb6eb43c0ee5a25fe18f1c";
+ "c-ares/c-ares-1.27.0-1-x64-windows-ws.zip" = "c9f1fb4836d55ae3aca0be077d2363678454820f9efad5c09371351a8770b5fc";
+ "gnutls/gnutls-3.8.3-1-x64-mingw-dynamic-ws.zip" = "0d8f99029319e1967fd916586eecfd776a9b564614468b233b6eda8bc23ca20d";
"krb5/krb5-1.20.1-1-x64-windows-ws.zip" = "a1e5c582afce6e2f72f0f5bd66df2c0f3cc984532a1da5314fc89d7b7f29cdbf";
"libgcrypt/libgcrypt-1.10.2-2-x64-mingw-dynamic-ws.zip" = "477cfce91d791b34df75a5ad83626f1ac2ee147eff7965e52266a4fc3da0f920";
"libilbc/libilbc-2.0.2-4-x64-windows-ws.zip" = "4f35a1ffa03c89bf473f38249282a7867b203988d2b6d3d2f0924764619fd5f5";
@@ -101,8 +101,8 @@ $X64Archives = @{
$Arm64Archives = @{
"bcg729/bcg729-1.1.1-1-win64armws.zip" = "f4d76b9acf0d0e12e87a020e9805d136a0e8775e061eeec23910a10828153625";
"brotli/brotli-1.0.9-1-win64armws.zip" = "5ba1b62ebc514d55c3eae85a00ff107e587b6e7cb1275e2d33fcddcd49f8e2af";
- "c-ares/c-ares-1.19.1-1-arm64-windows-ws.zip" = "ec13f3ca07c1916872d08d3abaec3eaeac266dc2befdbc15d5a1317f2a1dbe3c";
- "gnutls/gnutls-3.8.2-1-arm64-mingw-dynamic-ws.zip" = "7d47762a46f9d8985deccfbf600b57f7a8076f12bfc722dcd57923ea2812a956";
+ "c-ares/c-ares-1.27.0-1-arm64-windows-ws.zip" = "d96bd88aeed45350b2d14f023bd6d9e5dc63aa3bb0b47da85e4e125d6f74bfcf";
+ "gnutls/gnutls-3.8.3-1-arm64-mingw-dynamic-ws.zip" = "b9f0ee9cfe5012241aa5b9832212ea31408edf9bfc968762a2cfb091202fcc4b";
"krb5/krb5-1.20.1-1-arm64-windows-ws.zip" = "6afe3185ea7621224544683a89d7c724d32bef6f1b552738dbc713ceb2151437";
"libgcrypt/libgcrypt-1.10.2-2-arm64-mingw-dynamic-ws.zip" = "cd42fa2739a204e129d655e1b0dda83ceb27399812b8b2eccddae4a9ecd8d0ce";
"libilbc/libilbc-2.0.2-4-arm64-windows-ws.zip" = "00a506cc1aac8a2e31856e463a555d899b5a6ccf376485a124104858ccf0be6d";