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
913450f1
Commit
913450f1
authored
Mar 19, 2018
by
yonghong-song
Committed by
GitHub
Mar 19, 2018
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #1635 from nirmoy/python_compat
properly retrieve IP address from array for python2.7
parents
d6f716bc
505f98d3
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
examples/networking/tc_perf_event.py
examples/networking/tc_perf_event.py
+2
-2
No files found.
examples/networking/tc_perf_event.py
View file @
913450f1
...
...
@@ -54,8 +54,8 @@ def print_skb_event(cpu, data, size):
# Only print for echo request
if
icmp_type
==
128
:
src_ip
=
bytes
(
skb_event
.
raw
[
22
:
38
]
)
dst_ip
=
bytes
(
skb_event
.
raw
[
38
:
54
]
)
src_ip
=
bytes
(
bytearray
(
skb_event
.
raw
[
22
:
38
])
)
dst_ip
=
bytes
(
bytearray
(
skb_event
.
raw
[
38
:
54
])
)
print
(
"%-3s %-32s %-12s 0x%08x"
%
(
cpu
,
socket
.
inet_ntop
(
socket
.
AF_INET6
,
src_ip
),
socket
.
inet_ntop
(
socket
.
AF_INET6
,
dst_ip
),
...
...
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