kmpm / wireshark-nmea

nmea 0183 over ethernet protocol dissector for wireshark written in lua
Apache License 2.0
19 stars 6 forks source link

Expanded plugins #7

Open Magister3k opened 1 year ago

Magister3k commented 1 year ago

Hi! I'm noob in Lua, but decided to practice with your very useful plugin. Thank you so much for it. I've slightly expanded plugin and would be proud if you posted my version. Work on it continues (ToDo: segmented packets, heuristic dissector). nmea0183.zip

kmpm commented 1 year ago

Thanks, I'll gladly include it but first...

  1. Have you tried your code against the sample files included in this repository?
  2. Please clone the repository and create a Pull request with your changes.
  3. Please provide sample(s) that include at least some of the new functionality.
Magister3k commented 1 year ago

Hello! Thanks for the answer. Unfortunately, in your example there is no AIS message encapsulated in the NMEA 0183 protocol in principle. If all that remains of your source code is copyright, can I remove it and place the plugin in my repository so as not to bother you?

kmpm commented 1 year ago

Have a look at branch https://github.com/kmpm/wireshark-nmea/tree/fix/issue7 . I made some stylistic changes to your (and my) code, added some subtrees and added a pcapng where some AIS messages are encapsulated sim2.pcapng.

I really like what you started at but my personal dislike with arr-prefixed variables (if using types in variable names then one should be consistent and use it everywhere, and that is really hard to do and in my opinion hard to read) was most of the 'obvious' changes. Then I reordered segments of the code to at least start to get some structure of constants, lookup tables, helper functions etc.

I also added configurable preferences for which port should be regarded as NMEA.

If those changes is OK by you then I'll include it and give you credit in the copyright as well.

Magister3k commented 1 year ago

Peter, Hi!

Everything you did was great! Let me test your changes on a real stream over the weekend. No need to include me in the copyright If you plan to continue supporting the project. To transmit AIS messages, TCP port 5631, UDP port 4713 (!BSVDO), TCP ports 3421, 2182 (!AIVDO) are most often used. That is, there is no fixed port and it will be necessary to make a postdissector and/or heuristic one. For ease of change, I planned to extract Talker IDs, Talker Proprietary Codes and possibly Message Types into separate csv files. What do you think about it?

With best regards, Andrey.

ср, 4 окт. 2023 г., 19:02 Peter Magnusson @.***>:

Have a look at branch https://github.com/kmpm/wireshark-nmea/tree/fix/issue7 . I made some stylistic changes to your (and my) code, added some subtrees and added a pcapng where some AIS messages are encapsulated sim2.pcapng.

I really like what you started at but my personal dislike with arr-prefixed variables (if using types in variable names then one should be consistent and use it everywhere, and that is really hard to do and in my opinion hard to read) was most of the 'obvious' changes. Then I reordered segments of the code to at least start to get some structure of constants, lookup tables, helper functions etc.

I also added configurable preferences for which port should be regarded as NMEA.

If those changes is OK by you then I'll include it and give you credit in the copyright as well.

— Reply to this email directly, view it on GitHub https://github.com/kmpm/wireshark-nmea/issues/7#issuecomment-1747205769, or unsubscribe https://github.com/notifications/unsubscribe-auth/BCS2WMVEQPC3ODBBLAU5RL3X5WCABAVCNFSM6AAAAAA5FANKIKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTONBXGIYDKNZWHE . You are receiving this because you authored the thread.Message ID: @.***>

kmpm commented 1 year ago
  1. Do you have a wireshark capture file of these AIS messages, with different protocols (TCP/UDP) and ports?
  2. Do you know any software that could simulate AIS packages being sent on these different protocols and ports?
  3. Are AIS messages always embedded in NMEA packets, otherwise it might be good to create another plugin just for AIS?