Gitiles
Code Review
Sign In
gerrit.openbmc.org
/
openbmc
/
openbmc-tools
/
4a44a383054a1aba73ab67b6293bd11dcf3d44c7
/
.
/
dbus-vis
/
linecount.py
blob: ef7dd83f556e479da41e25e755c492dcc9db692c [
file
] [
log
] [
blame
]
# This script is used for printing out the number of packets in a pcap file
from
scapy
.
all
import
rdpcap
import
sys
file_name
=
sys
.
argv
[
1
]
try
:
stream
=
rdpcap
(
file_name
)
n
=
0
for
packet
in
stream
:
n
+=
1
print
(
n
)
except
Exception
as
e
:
pass