aboutsummaryrefslogtreecommitdiff
path: root/wireshark/util.lua
diff options
context:
space:
mode:
Diffstat (limited to 'wireshark/util.lua')
-rw-r--r--wireshark/util.lua5
1 files changed, 5 insertions, 0 deletions
diff --git a/wireshark/util.lua b/wireshark/util.lua
new file mode 100644
index 0000000..e23f958
--- /dev/null
+++ b/wireshark/util.lua
@@ -0,0 +1,5 @@
+function bits(idx, len)
+ len = len or 1
+ return ((2^len)-1) * 2^idx
+end
+