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/v45 #10961

Closed
wants to merge 50 commits into from
Closed

Pkt ptrs/v45 #10961

wants to merge 50 commits into from

Conversation

For better readability and type checking.

Ticket: OISF#5517.
To match function naming style.

Ticket: OISF#5517.
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.

Ticket: OISF#5517.
To prepare future changes to the Packet header pointers.

Ticket: OISF#5517.
Improve readability by setting up data/data_len once before
passing on to the other decoders.

Work in preparation of other decoder changes.

Ticket: OISF#5517.
In preparation of future Packet structure changes.

Ticket: OISF#6938.
In preparation of making them union members.
Store IPv4 decoder vars in a new Packet::l3 section in the packet.

Use inline functions instead of the often multi-layer macro's for
various IPv4 header getters.

Ticket: OISF#6938.
Store IPv6 decoder vars in a new Packet::l3 section in the packet.

Use inline functions instead of the often multi-layer macro's for
various IPv6 header getters.

Ticket: OISF#6938.
Take less space in the TCPVars for tracking if SACKOK is set.

Reduces size by 16 bytes.

Ticket: OISF#6938.
Part of effort to make Packet more compact.

Ticket: OISF#6938.
Part of effort to make Packet more compact.

Ticket: OISF#6938.
Part of effort to make Packet more compact.

Ticket: OISF#6938.
Part of effort to make Packet more compact.

Ticket: OISF#6938.
No longer use a pointer, but rather an offset.

Part of effort to make Packet more compact.

Ticket: OISF#6938.
SET_OPTS is now unused, so remove.
Addresses are pulled from embedded IPv4 header directly.
Embeded hlen was unused.

Part of effort to make Packet more compact.

Ticket: OISF#6938.
Remove unused L4 header pointers.

Part of effort to make Packet more compact.

Ticket: OISF#6938.
Not used, so no need to keep them.

Part of effort to make Packet more compact.

Ticket: OISF#6938.
Only used in tests. For the tests, switch to getting headers from embedded IPv6 header.

Part of effort to make Packet more compact.

Ticket: OISF#6938.
Was only set, never checked.

Part of effort to make Packet more compact.

Ticket: OISF#6938.
Part of effort to make Packet more compact.

Ticket: OISF#6938.
To prepare future changes to the Packet header pointers.

Ticket: OISF#5517.
Use a flag to indicate a calculated csum is available.

Allows packet reset to just use memset.
To prepare future changes to the Packet header pointers.

Ticket: OISF#5517.
To prepare future changes to the Packet header pointers.

Ticket: OISF#5517.
Replace PKT_IS_UDP macro with PacketIsUDP inline function.

For better readability and type checking.

Ticket: OISF#5517.
For better readability and type checking.

Ticket: OISF#5517.
For better readability and type checking.

Ticket: OISF#5517.
For better readability and type checking.

Ticket: OISF#5517.
To reduce Packet size.

Ticket: OISF#6938.
To reduce Packet size.

Ticket: OISF#6938.
Also start vars section in L4 for icmpv6vars.

To reduce Packet size.

Ticket: OISF#6938.
Remove header pointer from Packet as there were no users of it.

Ticket: OISF#6938.
Remove from Packet struct as there were no users of it.

Ticket: OISF#6938.
L2 section similar to L3 and L4 sections.

Ticket: OISF#6938.
To recude Packet size.

Ticket: OISF#6938.
To reduce Packet size.

Ticket: OISF#6938.
To reduce Packet size and make similar fields follow the same pattern.

Ticket: OISF#6938.
Reduce gaps in the structure.

Ticket: OISF#6938.
Reduces direct pointer usage and reduces Packet size.

Ticket: OISF#6938.
Reduces direct pointer usage and reduces Packet size.

Ticket: OISF#6938.
Avoid NULL pointer calculations.
@victorjulien victorjulien mentioned this pull request Apr 26, 2024
Copy link
Member

@jasonish jasonish left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Commits read much better; overall a nice cleanup. Have been running the previous version of this PR live since yesterday. And it satisfies the tickets.

@victorjulien victorjulien added this to the 8.0 milestone Apr 26, 2024
@suricata-qa
Copy link

Information: QA ran without warnings.

Pipeline 20368

@victorjulien
Copy link
Member Author

Merged in #10971, thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
3 participants