I'm getting started creating a Dissector for an IEEE 802.15.4 packet. I'm using the TI cc2531 dongle and the python script ccsniffpip to get data into Wireshark. So far so good as I can see the packets as raw 802.15.4 packets just fine. My problem is with dissecting the payload with my custom protocol. It seems that Wireshark is designed assuming that the 802.15.4 destination addresses significant in the sense that ports are intended to hint at what the packet type is. For 15.4 that is often just not the case. For 15.4 the destination is more akin to an IP address. I want to decode every 15.4 packet I see. In my case, I have my protocol hiding inside the "data" section of 15.4 packets with the first byte of the data indicating the packet type. I have no problem creating a simple Lua dissector to walk through things and build out some simple trees, but as fas as I can tell, I have to go in by hand in the GUI and tell the program to Decode As "MyProtocol" for each new destination address that becomes allocated by the master 15.4 device. My need to to make my dissector promiscuous to all 15.4 destination addresses. I've fond notes where dissector_add for_decode_as was exposed to Lua ( "Wireshark-commits: [Wireshark-commits] master 016769d: Expose dissector_add_for_decode_as() to Lua"), but I can't find any examples on how to use it in Lua for 15.4.
Also any high level architecture suggestions would be greatly appreciated. My simple dissector that I have written seems to not be able to highlight the particular data in the bottom data pane so I assume that I am not using Wireshark in the right way.
FYI I got started using this related SO note: Wireshark Lua Dissector for IEEE 802.15.4 - DissectorTable name?