// $Id$
//
// Copyright (C) 2006
-// Fraunhofer Institut fuer offene Kommunikationssysteme (FOKUS)
-// Kompetenzzentrum fuer Satelitenkommunikation (SatCom)
-// Stefan Bund <stefan.bund@fokus.fraunhofer.de>
+// Fraunhofer Institute for Open Communication Systems (FOKUS)
+// Competence Center NETwork research (NET), St. Augustin, GERMANY
+// Stefan Bund <g0dil@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
while (true) { // forever
senf::EthernetPacket packet (senf::EthernetPacket::create(
- senf::EthernetPacket::noinit));
+ senf::noinit));
sock.read(packet.data(),0);
packet.dump(std::cout);
senf::hexdump(
senf::PacketSocketHandle sock;
public:
- Sniffer(std::string const & interface)
+ Sniffer(std::string const & interface)
{
- sock.bind(senf::LLSocketAddress(interface));
+ sock.bind(senf::LLSocketAddress(interface));
}
- void run()
+ void run()
{
senf::Scheduler::instance().add(
sock, senf::membind(&Sniffer::dumpPacket, this));
senf::Scheduler::instance().process();
}
-
+
private:
void dumpPacket(senf::Scheduler::EventId event)
{
senf::EthernetPacket packet (
- senf::EthernetPacket::create(senf::EthernetPacket::noinit));
+ senf::EthernetPacket::create(senf::noinit));
sock.read(packet.data(),0);
packet.dump(std::cout);
senf::hexdump(