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

[feature] Remove debugging statements in ring buffer source #54

Merged
merged 2 commits into from
Sep 3, 2023

Conversation

fako1024
Copy link
Owner

Preparation for initial release of slimcap. Will merge once all alpha tests check out.

Closes #6

@fako1024 fako1024 added enhancement New feature or request performance Performance / optimization related topics labels Aug 15, 2023
@fako1024 fako1024 added this to the Initial Release (v1) milestone Aug 15, 2023
@fako1024 fako1024 requested a review from els0r August 15, 2023 11:24
@fako1024 fako1024 self-assigned this Aug 15, 2023
@fako1024 fako1024 linked an issue Aug 15, 2023 that may be closed by this pull request
3 tasks
@@ -398,8 +398,6 @@ func (s *Source) determineTotalPktLen(payload []byte) (uint16, error) {
return toUint16(payload[s.ipLayerOffset+4 : s.ipLayerOffset+6]), nil
}

// TODO: What about jumbo packets? At least for IPv6 such packets carry additional
Copy link
Owner Author

Choose a reason for hiding this comment

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

Note: I checked, regular Jumbo packets are handled correctly. Only IPv6 Jumbograms would fail as they carry extended information in the header (which would also affect the ring buffer source I assume). Unfortunately I wasn't able to simulate such packets (nor was I able to find a pcap source or similar). It seems its use is so uncommon that almost nobody has succeeded in crafting valid data that uses this feature, so I assume it's a non-issue in real life.

@fako1024 fako1024 mentioned this pull request Aug 15, 2023
3 tasks
Copy link
Collaborator

@els0r els0r left a comment

Choose a reason for hiding this comment

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

Thx

@fako1024 fako1024 merged commit 5dd9137 into main Sep 3, 2023
4 checks passed
@fako1024 fako1024 deleted the 6-remove-debugging-statements-in-ring-buffer-source branch September 3, 2023 14:42
golang.org/x/net v0.8.0
golang.org/x/sys v0.6.0
github.com/stretchr/testify v1.8.4
go.uber.org/zap v1.25.0
Copy link
Collaborator

Choose a reason for hiding this comment

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

This could (aka should) be log/slog :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request performance Performance / optimization related topics
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Remove debugging statements in ring buffer source
2 participants