Skip to content
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

Pkt ptrs/v42 #10926

Closed
wants to merge 50 commits into from
Closed

Pkt ptrs/v42 #10926

wants to merge 50 commits into from

Conversation

victorjulien
Copy link
Member

#10908 rebased, with int fixups.

To match function naming style.
Replace it with inline functions. Adds inline functions to
wrap PKT_IS_IPV4/PKT_IS_IPV6.

This is in preparation of removing the macro's, and cleaning up the
header pointers.
Improve readability by setting up data/data_len once before
passing on to the other decoders.

Work in preparation of other decoder changes.
In preparation of future Packet structure changes.
In preparation of making them union members.
Take less space in the TCPVars for tracking if SACKOK is set.

Reduces size by 16 bytes.
No longer use a pointer, but rather an offset.
SET_OPTS is now unused, so remove.
Addresses are pulled from embedded IPv4 header directly.
Embeded hlen was unused.
Remove unused L4 header pointers.
Only used in tests. For the tests, switch to getting headers from embedded IPv6 header.
Was only set, never checked.
Use a flag to indicate a calculated csum is available.

Allows packet reset to just use memset.
Replace PKT_IS_UDP macro with PacketIsUDP inline function.
@victorjulien victorjulien mentioned this pull request Apr 20, 2024
Avoid NULL pointer calculations.
@victorjulien victorjulien mentioned this pull request Apr 20, 2024
Copy link

codecov bot commented Apr 20, 2024

Codecov Report

Attention: Patch coverage is 93.85526% with 135 lines in your changes are missing coverage. Please review.

Project coverage is 82.80%. Comparing base (3a27cfd) to head (db9c1d6).
Report is 11 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master   #10926      +/-   ##
==========================================
+ Coverage   82.74%   82.80%   +0.06%     
==========================================
  Files         922      921       -1     
  Lines      247861   247770      -91     
==========================================
+ Hits       205081   205168      +87     
+ Misses      42780    42602     -178     
Flag Coverage Δ
fuzzcorpus 63.99% <71.54%> (-0.01%) ⬇️
suricata-verify 62.45% <71.46%> (+0.03%) ⬆️
unittests 62.26% <73.14%> (+0.04%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

@suricata-qa
Copy link

ERROR:

ERROR: QA failed on SURI_TLPW1_files_sha256.

Pipeline 20215

@inashivb inashivb added the needs rebase Needs rebase to master label Apr 24, 2024
@victorjulien victorjulien mentioned this pull request Apr 25, 2024
@victorjulien
Copy link
Member Author

Replaced by #10953.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs rebase Needs rebase to master
3 participants