-
Notifications
You must be signed in to change notification settings - Fork 679
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add GTPv2 layer #1634
Add GTPv2 layer #1634
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## dev #1634 +/- ##
==========================================
+ Coverage 83.14% 83.34% +0.20%
==========================================
Files 276 276
Lines 47315 48086 +771
Branches 9528 9686 +158
==========================================
+ Hits 39339 40078 +739
- Misses 7089 7115 +26
- Partials 887 893 +6
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
} | ||
|
||
auto teidOffset = sizeof(gtpv2_basic_header); | ||
if (!shortenLayer(static_cast<int>(teidOffset), sizeof(uint32_t))) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if (!shortenLayer(static_cast<uint32_t>(teidOffset), sizeof(uint32_t)))
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see, I thought the first and the second arguments should be the same types.
|
||
// clang-format off | ||
auto expectedIEValues = std::vector<std::tuple<pcpp::GtpV2InformationElement::Type, size_t, size_t, uint8_t, uint8_t, uint8_t, uint8_t>> { | ||
std::tuple<pcpp::GtpV2InformationElement::Type, size_t, size_t, uint8_t, uint8_t, uint8_t, uint8_t>{ pcpp::GtpV2InformationElement::Type::Uli, 17, 13, 0, 0, 0x18, 0x64 }, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Consider giveing this std::tuple<pcpp::GtpV2InformationElement::Type, size_t, size_t, uint8_t, uint8_t, uint8_t, uint8_t>
a shorthand.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed in 4f24ebd
@tigercosmos do you want to re-review the PR before I merge it? Or should I go ahead and merge? |
Add GTPv2 protocol, described in:
Addresses this issue: #917