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