// $Id$
//
// Copyright (C) 2007
-// Fraunhofer Institut fuer offene Kommunikationssysteme (FOKUS)
-// Kompetenzzentrum fuer Satelitenkommunikation (SatCom)
-// Thorsten Horstmann <thorsten.horstmann@fokus.fraunhofer.de>
+// Fraunhofer Institute for Open Communication Systems (FOKUS)
+// Competence Center NETwork research (NET), St. Augustin, GERMANY
+// Thorsten Horstmann <tho@berlios.de>
//
// This program is free software; you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
#include <iomanip>
#include <sys/ioctl.h>
#include <linux/sockios.h>
-#include <linux/dvb/dmx.h>
+#include <linux/dvb/dmx.h>
#include <senf/Scheduler/Scheduler.hh>
#include <senf/Packets/DefaultBundle/EthernetPacket.hh>
-#include <senf/Packets/MPEGDVBBundle/DatagramSection.hh>
+#include <senf/Packets/MPEGDVBBundle/MPESection.hh>
#include <senf/Utils/membind.hh>
#include <senf/Utils/hexdump.hh>
#include <senf/Socket/Protocols/DVB.hh>
public:
MySniffer(unsigned short adapter=0, unsigned short device=0)
- : handle( adapter, device )
+ : handle( adapter, device )
{
struct dmx_sct_filter_params sec_filter;
memset(&sec_filter, 0, sizeof (struct dmx_sct_filter_params));
sec_filter.flags |= DMX_CHECK_CRC;
handle.protocol().setSectionFilter( &sec_filter );
-
+
senf::Scheduler::instance().add(
handle, senf::membind(&MySniffer::dumpSection, this));
}
private:
- void dumpSection(senf::FileHandle /* ignored */, senf::Scheduler::EventId event)
+ void dumpSection(senf::Scheduler::EventId event)
{
std::string data (handle.read());
- senf::DatagramSection section (senf::DatagramSection::create(data));
+ senf::MPESection section (senf::MPESection::create(data));
section.dump(std::cout);
senf::PacketData & datagramData (section.next().data());
senf::hexdump(datagramData.begin(), datagramData.end(), std::cout);
// c-file-style: "senf"
// indent-tabs-mode: nil
// ispell-local-dictionary: "american"
-// compile-command: "scons -u test"
+// compile-command: "scons -u"
// comment-column: 40
// End: