I'm a linux newbie... & facing a problem in using "tcpdump"
I have a scenario where an encoder keeps throwing UDP packets on a specified port... each with some bytes of data (let's say 1000 bytes - that means "header + 1000 bytes")
on the other end, I have a program running which will call "tcpdump" from a .c file to receive the packets from the specified port with the given encoder IP.
Case 1: Woking FINE
===============
I call tcpdump from .c file by giving -w$(fileName) option and it dumps the packets to the file as required. When I see the generated pcap file in "etherreal" I can see all the packets. Each packet has some overhead followed by data... (let's say 44 bytes of header + 1000 bytes of data)
so if encoder throws 1000 packets, then all 1000 packets are dumped in single file... Data captured is right as well...
Case 2: NOT Woking
===============
I want a scenario where data is dumped in files in the chunk of 1 MB. I mean only data (1000 bytes only and not 44 bytes of header) should be dumped. so 1st 1MB data chunk in file "dump1.yuv", 2nd 1MB data chunk in file "dump2.yuv" and like wise.
I've used -c and -C options but they didn't work as per my expectation... how do I make this happen? If u have any hint/ code drop then please pass it on... It'll be a gr8 help
Thanks in advance...