open-dis / open-dis-cpp

C++ implementation of the IEEE-1278.1 Distributed Interactive Simulation (DIS) application protocol v6 and v7
BSD 2-Clause "Simplified" License
90 stars 65 forks source link

Minor issue. 1278 specifies that the beam data length is a char (DIS 6) #69

Open jcassagnol-public opened 2 years ago

jcassagnol-public commented 2 years ago

I'm not certain about the DIS7 implementation, but it looks like the DIS6 UaPDU has a slight problem with the Acoustic Beam Data struct. The beam data length field is listed as a 8 bit value in the 1278 spec so I changed it from a short to a char and adjusted the marshalled size function by one as well.

This time the PR has the correct committer email :D

leif81 commented 2 years ago

Thankyou @jcassagnol-public Do you happen to have a sample pcap that contains a PDU that we could add to a unit test to verify the fix?

jcassagnol-public commented 2 years ago

Good point! I'll generate a PDU with these changes shortly!

edit: maybe not shortly haha. I'll get back with the PDU in a bit. :) Thanks for the quick response though!

jcassagnol-public commented 2 years ago

I'll see if I can get the generated PDU later this week, if not this will be delayed by about a month.

jcassagnol-public commented 2 years ago

Ouch. I've generated the PDU but it appears that the beams are supposed to be shoved to the end of the PDU. I have to verify that in the 1278 which I'll try to get to tomorrow. I can attach the current pcap but Wireshark fails to decode the second system's beams correctly, which appears to be due to the beam infixing.

jcassagnol-public commented 2 years ago

Here's the suspect PCAP (zipped as GitHub appears to block pcaps but allows zips... :D) suspect_ua_pdu.zip