Or, you could take a look at Net::Pcap which provides a native interface
for libpcap in Perl (the library behind tcpdump).  There are
excellent examples included.  You can even use NetPacket to decode and
analyze the packets! ;)

On Fri, Mar 25, 2011 at 12:46:53PM +0530, Chandrashekar Bhat wrote:
> Hi Ted,
> 
> Thank you for the reply. Will look into 'dvbsnoop'.
> 
> Thanks,
> Shekar
> 
> 
> 
> On Fri, Mar 25, 2011 at 12:28 PM, Ted Mittelstaedt 
> <[email protected]>wrote:
> 
> > what about dvbsnoop that is command line?
> >
> > Ted
> >
> >
> > On 3/24/2011 10:43 PM, Chandrashekar Bhat wrote:
> >
> >> Hi All,
> >>
> >> I am looking for something capturing UDP packet on a server. These are
> >> MpegTS packets, which will have TS data, PAT/PMT and Video Audio PIDs.
> >> I am able to check that packets are coming fine or not using tcpdump.
> >>
> >> <code>
> >>         system(" tcpdump -v -i eth1 dst 227.1.1.0>  file.txt&  ");
> >>         my $PID=`ps aux | grep  'tcpdump ' | grep -v grep | awk '{print
> >> \$2}'`;
> >>         chomp($PID);
> >>         print "SLEEEPING FOR 5 seconds....\n";
> >>         sleep(5);
> >>         print "KILLING PROCESS ID  ------->|$PID|\n";
> >>         system("kill -9 $PID");
> >>         my $LINES=`wc -l file.txt | awk '{ print \$1}'`;
> >>         chomp($LINES);
> >>         if($LINES>  5) {
> >>                 print "SUCCESS..\n";
> >>         } else {
> >>                 print "FAIL...UDP Packets are not coming\n";
> >>         }
> >> </code>
> >>
> >> above code works fine. But i am not able to look for packet with TS
> >> details.
> >> After googling, i found that i need to use TS analyzer, that would be
> >> difficult as TS analyzers are software without command line (as i need to
> >> automate testing :( .. ).
> >>
> >> Has anybody come across  capturing TS UDP packets using Perl?
> >> Any pointers will be helpful.
> >>
> >> Thanks,
> >> Shekar
> >>
> >>
> >
> > --
> > To unsubscribe, e-mail: [email protected]
> > For additional commands, e-mail: [email protected]
> > http://learn.perl.org/
> >
> >
> >

-- 
Brad Lhotsky

-- 
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
http://learn.perl.org/


Reply via email to