tcpdump giving error

5,623 views
Skip to first unread message

ypeksen

unread,
Mar 14, 2011, 11:46:33 AM3/14/11
to ns-3-users
Hello all,

I run a ns3 program. and .pcap (packet capture) files were generated.
When I execute the command "tcpdump -r ....0-0.pcap -nn -tt" to check
whether the result of it is as expected, I get this error:

tcpdump: truncated dump file; tried to read 4 file header bytes, only
got 0

I have no idea how to solve it. I searched for the problem in the
forum and googled it but did not find anything. Is something wrong or
missing in the program?

ypeksen

halil yetcom

unread,
Mar 14, 2011, 1:07:54 PM3/14/11
to ns-3-...@googlegroups.com
Maybe you need root Privilege to run Tcpdump. Try it.

2011/3/14 ypeksen <yavuzpe...@gmail.com>

--
You received this message because you are subscribed to the Google Groups "ns-3-users" group.
To post to this group, send email to ns-3-...@googlegroups.com.
To unsubscribe from this group, send email to ns-3-users+...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/ns-3-users?hl=en.




--
University of Southampton
MSc - Wireless Communications
----------------------------------
www.halilyetgin.com

Lalith Suresh

unread,
Mar 14, 2011, 4:42:19 PM3/14/11
to ns-3-...@googlegroups.com, ypeksen
Hello,

Check the size of the pcap files. Your simulation probably generated blank files because no data was exchanged.
 

ypeksen

--
You received this message because you are subscribed to the Google Groups "ns-3-users" group.
To post to this group, send email to ns-3-...@googlegroups.com.
To unsubscribe from this group, send email to ns-3-users+...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/ns-3-users?hl=en.




--
Lalith Suresh
Department of Computer Science and Engineering
Instituto Superior Técnico
www.lalith.in

ypeksen

unread,
Mar 15, 2011, 7:48:20 AM3/15/11
to ns-3-users
Sorry for the late response. I have been deeply working on my
program.

@Halil Yetcom;
I tried it with root privilege but I got this; tcpdump: wifi-simple-
adhoc-grid-0-0.pcap: Permission denied. By the way,my name is Yavuz :)
happy to see you around..

and then,

@Lalith Suresh;
You were right, It generated blank files but i did not understand why
it did. What might be the cause of this? Since I saw that packets were
flowing from a node to another node. during the simulation with
visualization tool. Thank you for the progress...

ypeksen,


On Mar 14, 10:42 pm, Lalith Suresh <suresh.lal...@gmail.com> wrote:
> Hello,
>
> *Instituto Superior Técnico*www.lalith.in

Lalith Suresh

unread,
Mar 15, 2011, 1:07:43 PM3/15/11
to ns-3-...@googlegroups.com, ypeksen
Hello,

On Tue, Mar 15, 2011 at 11:48 AM, ypeksen <yavuzpe...@gmail.com> wrote:

@Lalith Suresh;
You were right, It generated blank files but i did not understand why
it did. What might be the cause of this? Since I saw that packets were
flowing from a node to another node. during the simulation with
visualization tool. Thank you for the progress...


Have you enabled PCAP tracing on the right NetDevice helper and/or the right nodes?
 


--
Lalith Suresh
Department of Computer Science and Engineering
Instituto Superior Técnico
www.lalith.in

B Brian

unread,
Apr 20, 2015, 7:59:24 PM4/20/15
to ns-3-...@googlegroups.com
One thing to try might be to specifically set the interface you are capturing from.

List all the available interfaces.
tcpdump -D 

It should numerically list your interfaces.
Then when capturing it may require you to specify which interface to capture from.

tcpdump -i 1,2,3 etc

Not sure if this helps however it was my first thought when you mentioned 0 captures and a file with nothing in it.
Reply all
Reply to author
Forward
0 new messages