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
a1140168
Commit
a1140168
authored
May 05, 2018
by
Paul Chaignon
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
tcpconnect: Remove unnecessary bpf_probe_read calls
parent
f1e9abe7
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
5 deletions
+3
-5
tools/old/tcpconnect.py
tools/old/tcpconnect.py
+3
-5
No files found.
tools/old/tcpconnect.py
View file @
a1140168
...
...
@@ -75,12 +75,10 @@ static int trace_connect_return(struct pt_regs *ctx, short ipver)
struct sock *skp = *skpp;
u32 saddr = 0, daddr = 0;
u16 dport = 0;
bpf_probe_read(&dport, sizeof(dport), &skp->__sk_common.skc_dport)
;
dport = skp->__sk_common.skc_dport
;
if (ipver == 4) {
bpf_probe_read(&saddr, sizeof(saddr),
&skp->__sk_common.skc_rcv_saddr);
bpf_probe_read(&daddr, sizeof(daddr),
&skp->__sk_common.skc_daddr);
saddr = skp->__sk_common.skc_rcv_saddr;
daddr = skp->__sk_common.skc_daddr;
// output
bpf_trace_printk("4 %x %x %d
\
\
n", saddr, daddr, ntohs(dport));
...
...
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