Ask Your Question

DavidA_2018's profile - activity

2024-04-12 23:56:17 +0000 received badge  Famous Question (source)
2024-04-12 23:56:17 +0000 received badge  Notable Question (source)
2024-04-12 23:56:17 +0000 received badge  Popular Question (source)
2024-03-21 20:18:46 +0000 received badge  Notable Question (source)
2024-03-21 20:18:46 +0000 received badge  Popular Question (source)
2023-01-19 09:46:57 +0000 commented question Preference not working in Wireshark 4.0

Thanks for your answer. That fixed my problem.

2023-01-18 15:20:36 +0000 asked a question Preference not working in Wireshark 4.0

Preference not working in Wireshark 4.0 Using Wireshark 4.0.2 on Windows 11. I have a protocol preference defined as:

2023-01-18 14:58:20 +0000 commented answer 'Attempt to index global (a nil value)' when lua is in APPDATA directory

Thank you.

2023-01-18 14:58:13 +0000 marked best answer 'Attempt to index global (a nil value)' when lua is in APPDATA directory

Hi,

I am running Wireshark 4.0.2 on Windows 11.

I have 3 lua files that constitute our custom dissector. The top level lua file is general.lua which creates a protocol object:

xran_protocol = Proto("xran", "<snip>")

xran_protocol.prefs.c_plane_debug_level = Pref.enum("C-plane debug", 0, "C-plane debug printing level", debug_pref_enum, false)

A lower level lua file accesses that object:

debug_level = xran_protocol.prefs.c_plane_debug_level <--- A

If my lua files are in the global plugin folder:

"C:\Program Files\Wireshark\plugins\4.0"

it works fine. But if I move the lua files to the personal plugin folder:

%APPDATA%\Wireshark\plugins

line A above gives error:

Lua Error: ...rs\<name>\AppData\Roaming\Wireshark\plugins\cplane.lua:333: attempt to index global 'xran_protocol' (a nil value)

Please can you suggest why it works in the global folder but not in the personal folder?

2023-01-18 14:31:46 +0000 asked a question 'Attempt to index global (a nil value)' when lua is in APPDATA directory

'Attempt to index global (a nil value)' when lua is in APPDATA directory Hi, I am running Wireshark 4.0.2 on Windows 1

2022-11-30 14:22:59 +0000 commented answer How to write/capture a pcap file to test dissector?

Thanks for your answer.

2022-11-30 14:22:34 +0000 commented question How to write/capture a pcap file to test dissector?

Hi Chris, thanks very much for answering my question. Your reply was very helpful. David.

2022-11-29 18:30:32 +0000 asked a question How to write/capture a pcap file to test dissector?

How to write/capture a pcap file to test dissector? Hi, we have a mature Lua dissector which we need to continue to deve

2020-11-10 17:46:50 +0000 commented question Npcap loopback adapter not showing in Windows > Network Connections

Thanks, I'll try 127.0.0.1. However, I'm sure I used to be able to set it in CP.

2020-11-10 11:20:47 +0000 asked a question Npcap loopback adapter not showing in Windows > Network Connections

npcap adaptor not showing in Windows > Network Connections Hi, I am running Windows 10 1903 and have installed Wire

2020-10-15 10:47:20 +0000 asked a question Help needed to debug LUA script

Help needed to debug LUA script Hi, I have written a LUA script to dissect a complex UDP packet. I pass the payload to a

2020-09-04 08:41:34 +0000 commented answer Help needed with DissectorTable

Thanks, that solved my problem.

2020-09-04 08:41:03 +0000 marked best answer Help needed with DissectorTable

Hi, I wrote a lua dissector about a year ago and have forgotten some of my understanding of how dissectors work. The Ethernet packet I need to dissect has the following structure (simplified):

  • TransportHeader (which includes MessageType and PayloadLength fields)
  • Message (of type: MessageType and of length: PayloadLength)

I have a top-level 'general.lua' file that parses the TransportHeader and which creates a DissectorTable. The next level dissector (for the specific message type) is invoked by calling:

xran_dissector_table:try(ecpriMessage, buffer(8):tvb(),pinfo,tree)

My problem is that the lower level dissector currently doesn't know the length of Message. (The buffer passed to it contains the message and some padding). I can see two possibilities:

  1. Pass PayloadLength to the lower level dissector
  2. Limit the buffer passed to the lower level dissector to length PayloadLength

I don't know how to do either of these. Which would be the best solution and how would I do it?

2020-09-04 08:41:03 +0000 received badge  Scholar (source)
2020-09-03 16:01:13 +0000 asked a question Help needed with DissectorTable

Help needed with DissectorTable Hi, I wrote a lua dissector about a year ago and have forgotten some of my understanding