seladb
seladb
Sure @yahyayozo , every contribution is highly welcome and appreciated, thank you! 🙏 Can you provide some info about the Modbus protocol? Mostly about the different PDUs and message types....
@yahyayozo my understanding is that Modubs layer has: - 7 first bytes - always present and have the same structure (as mentioned above) - 1 byte - to specify the...
@Dimi1010 how do you envision people using this layer (once it's been desirialized)? ```cpp auto modbusLayer = modbusPacket.getLayerOfType(); // get the common header fields modbusLayer->getTransactionId(); modbusLayer->getLength(); // get the specific...
Thank you @Dimi1010 for the detailed explanation! I think this approach is cleaner than what I proposed and makes a lot of sense. Few comments / questions: - What should...
> return type, but that is cpp17. We might want to add an `optional` backport implementation or use `std::unique_ptr` at the cost of heap allocation. I guess `decodePDU()` can return...
@yahyayozo is there anything else you need from us in order to get started? If you want, you can implement it gradually using multiple PRs, which will probably be easier...
> [@seladb](https://github.com/seladb) i think i can start Is there any code style i need to figure follow? Or doxygen documentation needed? Yes, you can read most of it in [`CONTRIBUTING.md`](https://github.com/seladb/PcapPlusPlus/blob/master/CONTRIBUTING.md)....
Done in #1823 . Thank you so much @yahyayozo for working on it! 🙏
@yahyayozo we usually have at least 2 c'tors, sometimes more: 1. As part of the packet parsing flow. For example: https://github.com/seladb/PcapPlusPlus/blob/a49a79e0b67b402ad75ffa96c1795def36df75c8/Packet%2B%2B/header/MplsLayer.h#L37 which is used here (and in some other places...
@yahyayozo sure! You can learn about tests here: https://pcapplusplus.github.io/docs/tests At a high level: - You should add your tests under `Tests/Packet++Test/Tests` (don't forget to add your `.cpp` file to `CMakeFiles.txt`)...