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

Fix logs, memory usage, header size #21

Merged
merged 5 commits into from
Nov 19, 2019
Merged

Conversation

pboothe
Copy link
Contributor

@pboothe pboothe commented Nov 19, 2019

Fixes #18
Fixes #20

This change is Reviewable

Instead, buffer packet headers in in-memory files.

Fixes #20
@coveralls
Copy link

coveralls commented Nov 19, 2019

Pull Request Test Coverage Report for Build 94

  • 45 of 45 (100.0%) changed or added relevant lines in 2 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage remained the same at 100.0%

Totals Coverage Status
Change from base Build 83: 0.0%
Covered Lines: 435
Relevant Lines: 435

💛 - Coveralls

Copy link
Contributor

@stephen-soltesz stephen-soltesz left a comment

Choose a reason for hiding this comment

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

Blocking only b/c the definition of "LayerContents" and "LayerPayload" is still a little fuzzy to me. It sounded like you were planning to add a comment.

Reviewable status: 1 change requests, 0 of 1 approvals obtained (waiting on @pboothe and @stephen-soltesz)


saver/tcp.go, line 160 at r2 (raw file):

https://en.wikipedia.org/wiki/Transmission_Control_Protocol#TCP_segment_structure

I actually don't have a good grasp on which parts of the packet correspond to "LayerContents" and "LayerPayload". Please help me with this either conversationally or an extra comment.


saver/tcp_test.go, line 123 at r2 (raw file):

	s.state = &tracker

	h, err := pcap.OpenOffline("../testdata/v4.pcap")

... how did these work before? ... O_o

Copy link
Contributor Author

@pboothe pboothe left a comment

Choose a reason for hiding this comment

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

Reviewable status: 1 change requests, 0 of 1 approvals obtained (waiting on @stephen-soltesz)


saver/tcp.go, line 160 at r2 (raw file):

Previously, stephen-soltesz (Stephen Soltesz) wrote…
https://en.wikipedia.org/wiki/Transmission_Control_Protocol#TCP_segment_structure

I actually don't have a good grasp on which parts of the packet correspond to "LayerContents" and "LayerPayload". Please help me with this either conversationally or an extra comment.

Done.


saver/tcp_test.go, line 123 at r2 (raw file):

Previously, stephen-soltesz (Stephen Soltesz) wrote…

... how did these work before? ... O_o

When the UUID stuff happened before packet handling, we didn't need to read any packets to exercise UUID error cases.

Copy link
Contributor

@stephen-soltesz stephen-soltesz left a comment

Choose a reason for hiding this comment

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

:lgtm:

Reviewed 2 of 3 files at r1, 1 of 1 files at r3.
Reviewable status: :shipit: complete! 1 of 1 approvals obtained (waiting on @pboothe)


saver/tcp.go, line 160 at r3 (raw file):

	tl := p.TransportLayer()
	if tl != nil {
		// "LayerContents" == the header (I don't know why it's not "LayerHeader")

"the header" == "the TCP header"?

@pboothe pboothe merged commit d7b6430 into master Nov 19, 2019
@pboothe pboothe deleted the fix-logs-memusage-headers branch November 25, 2019 19:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Memory usage is too high Header length should be set with a different algorithm
3 participants