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
b885f2b2
Commit
b885f2b2
authored
8 years ago
by
Michael Tüxen
Browse files
Options
Downloads
Patches
Plain Diff
Provide symbolic names for the TCP state.
Sponsored by: Netflix
parent
71200394
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
gtests/net/packetdrill/code.c
+28
-0
28 additions, 0 deletions
gtests/net/packetdrill/code.c
gtests/net/packetdrill/tcp.h
+3
-0
3 additions, 0 deletions
gtests/net/packetdrill/tcp.h
with
31 additions
and
0 deletions
gtests/net/packetdrill/code.c
+
28
−
0
View file @
b885f2b2
...
@@ -102,6 +102,34 @@ static void emit_var_end(struct code_state *code)
...
@@ -102,6 +102,34 @@ static void emit_var_end(struct code_state *code)
/* Write out a formatted representation of useful symbolic names. */
/* Write out a formatted representation of useful symbolic names. */
static
void
write_symbols
(
struct
code_state
*
code
)
static
void
write_symbols
(
struct
code_state
*
code
)
{
{
/* tcpi_state */
#if defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__NetBSD__)
emit_var
(
code
,
"TCPI_CLOSED"
,
TCPS_CLOSED
);
emit_var
(
code
,
"TCPI_LISTEN"
,
TCPS_LISTEN
);
emit_var
(
code
,
"TCPI_SYN_SENT"
,
TCPS_SYN_SENT
);
emit_var
(
code
,
"TCPI_SYN_RECEIVED"
,
TCPS_SYN_RECEIVED
);
emit_var
(
code
,
"TCPI_ESTABLISHED"
,
TCPS_ESTABLISHED
);
emit_var
(
code
,
"TCPI_CLOSE_WAIT"
,
TCPS_CLOSE_WAIT
);
emit_var
(
code
,
"TCPI_FIN_WAIT_1"
,
TCPS_FIN_WAIT_1
);
emit_var
(
code
,
"TCPI_CLOSING"
,
TCPS_CLOSING
);
emit_var
(
code
,
"TCPI_LAST_ACK"
,
TCPS_LAST_ACK
);
emit_var
(
code
,
"TCPI_FIN_WAIT_2"
,
TCPS_FIN_WAIT_2
);
emit_var
(
code
,
"TCPI_TIME_WAIT"
,
TCPS_TIME_WAIT
);
#endif
#ifdef linux
emit_var
(
code
,
"TCPI_CLOSED"
,
7
);
emit_var
(
code
,
"TCPI_LISTEN"
,
10
);
emit_var
(
code
,
"TCPI_SYN_SENT"
,
2
);
emit_var
(
code
,
"TCPI_SYN_RECEIVED"
,
3
);
emit_var
(
code
,
"TCPI_ESTABLISHED"
,
1
);
emit_var
(
code
,
"TCPI_CLOSE_WAIT"
,
8
);
emit_var
(
code
,
"TCPI_FIN_WAIT_1"
,
4
);
emit_var
(
code
,
"TCPI_CLOSING"
,
11
);
emit_var
(
code
,
"TCPI_LAST_ACK"
,
9
);
emit_var
(
code
,
"TCPI_FIN_WAIT_2"
,
5
);
emit_var
(
code
,
"TCPI_TIME_WAIT"
,
6
);
emit_var
(
code
,
"TCPI_NEW_SYN_RECV"
,
12
);
#endif
#ifdef linux
#ifdef linux
/* Emit symbolic names for tcpi_ca_state values. */
/* Emit symbolic names for tcpi_ca_state values. */
emit_var
(
code
,
"TCP_CA_Open"
,
TCP_CA_Open
);
emit_var
(
code
,
"TCP_CA_Open"
,
TCP_CA_Open
);
...
...
This diff is collapsed.
Click to expand it.
gtests/net/packetdrill/tcp.h
+
3
−
0
View file @
b885f2b2
...
@@ -34,6 +34,9 @@
...
@@ -34,6 +34,9 @@
#include
"types.h"
#include
"types.h"
#include
<netinet/tcp.h>
#include
<netinet/tcp.h>
#if defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__NetBSD__)
#include
<netinet/tcp_fsm.h>
#endif
#if defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__NetBSD__)
#if defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__NetBSD__)
#define SOL_TCP IPPROTO_TCP
#define SOL_TCP IPPROTO_TCP
...
...
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