Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
P
Packetdrill_tarr_ext
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Stefan Gense
Packetdrill_tarr_ext
Commits
04576a1d
Commit
04576a1d
authored
8 years ago
by
Shivansh Rai
Browse files
Options
Downloads
Patches
Plain Diff
Test for checking if FIN is generated after connection close
parent
00035bb2
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
gtests/net/packetdrill/tests/bsd/tcp/close/close-read-data-fin.pkt
+39
-0
39 additions, 0 deletions
...t/packetdrill/tests/bsd/tcp/close/close-read-data-fin.pkt
with
39 additions
and
0 deletions
gtests/net/packetdrill/tests/bsd/tcp/close/close-read-data-fin.pkt
0 → 100644
+
39
−
0
View file @
04576a1d
// Test for checking whether a FIN is generated when
// we close the connection after read()'ing what the
// client sent. This behavior conforms to RFC 793.
0.000 socket(..., SOCK_STREAM, IPPROTO_TCP) = 3
0.000 setsockopt(3, SOL_SOCKET, SO_REUSEADDR, [1], 4) = 0
0.000 bind(3, ..., ...) = 0
0.000 listen(3, 1) = 0
0.100 < S 0:0(0) win 65535 <mss 1460,sackOK,nop,nop,nop,wscale 7>
0.100 > S. 0:0(0) ack 1 <...>
0.200 < . 1:1(0) ack 1 win 65535
0.200 accept(3, ..., ...) = 4
// We receive first segment
0.210 < P. 1:1001(1000) ack 1 win 65535
0.350 > . 1:1(0) ack 1001 win 1026
// Our application writes 1000 bytes
0.400 write(4, ..., 1000) = 1000
0.400 > P. 1:1001(1000) ack 1001
0.410 < . 1001:1001(0) ack 1001 win 65535
0.420 read(4, ..., 1000) = 1000
// Client closes connection
0.450 < F. 1001:1001(0) ack 1001 win 65535
// TODO: ack or delayed ack ?
0.460 > . 1001:1001(0) ack 1002 win 1026
// We close the connection with a delay, in case there
// is still data left to send
0.470 close(4) = 0
0.480 > F. 1001:1001(0) ack 1002 win 1026
// The success of the tests depends on the correctness
// of the inbound sniffed packet on line 36.
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment