Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
B
bcc
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
bcc
Commits
8ba998ed
Commit
8ba998ed
authored
Jul 31, 2016
by
Mark Drayton
Committed by
4ast
Jul 31, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
tcpretrans: ntohs dport (#639)
parent
a2d669c5
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
2 deletions
+4
-2
tools/tcpretrans.py
tools/tcpretrans.py
+4
-2
No files found.
tools/tcpretrans.py
View file @
8ba998ed
...
...
@@ -92,8 +92,9 @@ static int trace_event(struct pt_regs *ctx, struct sock *sk, int type)
&skp->__sk_common.skc_rcv_saddr);
bpf_probe_read(&data4.daddr, sizeof(u32),
&skp->__sk_common.skc_daddr);
// lport is host order
data4.lport = lport;
data4.dport =
dport
;
data4.dport =
ntohs(dport)
;
data4.state = state;
ipv4_events.perf_submit(ctx, &data4, sizeof(data4));
...
...
@@ -103,8 +104,9 @@ static int trace_event(struct pt_regs *ctx, struct sock *sk, int type)
&skp->__sk_common.skc_v6_rcv_saddr.in6_u.u6_addr32);
bpf_probe_read(&data6.daddr, sizeof(data6.daddr),
&skp->__sk_common.skc_v6_daddr.in6_u.u6_addr32);
// lport is host order
data6.lport = lport;
data6.dport =
dport
;
data6.dport =
ntohs(dport)
;
data6.state = state;
ipv6_events.perf_submit(ctx, &data6, sizeof(data6));
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment