Repository navigation
Add serialization support for BgpLayer (all message types) - #2366
Conversation
|
Thanks @seladb for the thorough review! I've addressed all 11 comments: 1. Removed redundant field serialization (6 comments):
2. Adopted
3. Removed empty override (1 comment):
4. Moved serialization tests into existing parsing tests (1 comment):
Additional fix: While validating, I found the three All 287 tests pass locally; clang-format and cppcheck are clean. Ready for re-review! |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## dev #2366 +/- ##
==========================================
+ Coverage 83.13% 83.17% +0.04%
==========================================
Files 350 350
Lines 68819 68972 +153
Branches 14237 14759 +522
==========================================
+ Hits 57212 57370 +158
- Misses 10198 10650 +452
+ Partials 1409 952 -457
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
|
Thank you @Hack15951 for working on this PR, much appreciated 🙏 |
Description
Implements structured serialization for
BgpLayer, as part of the serialization rollout tracked in #2278 (claims the BgpLayer task approved by @seladb in that issue).BgpLayernow provides:SerializedFieldsstruct declaring every field as aFieldDescriptor(units, byte order and string formats documented in Doxygen comments), includingLayer::SerializedFields.serializeLayer(ObjectScope&)override that writes every field fromall().all()matches what is written.Covers all BGP message types: OPEN, UPDATE, NOTIFICATION, KEEPALIVE, ROUTE-REFRESH.
Definition of done (per #2278)
SerializedFieldsstruct with aFieldDescriptorper field andall(), includingLayer::SerializedFieldsserializeLayer(ObjectScope&)override writing every field inall()all()matchNotes
pre-commit run --filesis clean: clang-format passes; cppcheck reports only the pre-existingLogger.hfunctionStatic(cppcheck 2.22 is stricter than the CI's 2.9) — no issues in the added code.Test plan
Tests/Packet++Test/Tests/BgpTests.cppadds BGP serialization round-trip tests.