//-/////////////////////////////////////////////////////////////////////////////////////////////////
// senf::ppi::module::ActiveFeeder
-//-/////////////////////////////////////////////////////////////////////////////////////////////////
-// private members
+prefix_ senf::ppi::module::ActiveFeeder::ActiveFeeder()
+{
+ route(input,idle_);
+ route(idle_,output);
+ registerEvent(idle_, &ActiveFeeder::request);
+}
prefix_ void senf::ppi::module::ActiveFeeder::request()
{
+++ /dev/null
-// $Id$
-//
-// Copyright (C) 2007
-// 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
-// the Free Software Foundation; either version 2 of the License, or
-// (at your option) any later version.
-//
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with this program; if not, write to the
-// Free Software Foundation, Inc.,
-// 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-
-/** \file
- \brief ActiveFeeder inline non-template implementation */
-
-// Custom includes
-
-#define prefix_ inline
-//-/////////////////////////////////////////////////////////////////////////////////////////////////
-
-//-/////////////////////////////////////////////////////////////////////////////////////////////////
-// senf::ppi::module::ActiveFeeder
-
-prefix_ senf::ppi::module::ActiveFeeder::ActiveFeeder()
-{
- route(input,idle_);
- route(idle_,output);
- registerEvent(idle_, & ActiveFeeder::request);
-}
-
-//-/////////////////////////////////////////////////////////////////////////////////////////////////
-#undef prefix_
-
-\f
-// Local Variables:
-// mode: c++
-// fill-column: 100
-// comment-column: 40
-// c-file-style: "senf"
-// indent-tabs-mode: nil
-// ispell-local-dictionary: "american"
-// compile-command: "scons -u test"
-// End:
}}}
//-/////////////////////////////////////////////////////////////////////////////////////////////////
-#include "ActiveFeeder.cci"
+//#include "ActiveFeeder.cci"
//#include "ActiveFeeder.ct"
//#include "ActiveFeeder.cti"
#endif
#define prefix_
//-/////////////////////////////////////////////////////////////////////////////////////////////////
-prefix_ void
-senf::ppi::module::ActiveDuplicator::connectorSetup(ActiveDuplicator::ConnectorType & conn)
+prefix_ senf::ppi::module::ActiveDuplicator::ActiveDuplicator()
+{
+ noroute(input);
+ input.onRequest(&ActiveDuplicator::request);
+}
+
+prefix_ void senf::ppi::module::ActiveDuplicator::connectorSetup(ConnectorType & conn)
{
route(input, conn);
}
prefix_ void senf::ppi::module::ActiveDuplicator::request()
{
Packet p (input());
- ActiveDuplicator::ContainerType::iterator i (connectors().begin());
- ActiveDuplicator::ContainerType::iterator const i_end (connectors().end());
+ ContainerType::iterator i (connectors().begin());
+ ContainerType::iterator const i_end (connectors().end());
for (; i != i_end; ++i)
(*i)(p);
}
+++ /dev/null
-// $Id$
-//
-// Copyright (C) 2009
-// 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
-// the Free Software Foundation; either version 2 of the License, or
-// (at your option) any later version.
-//
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with this program; if not, write to the
-// Free Software Foundation, Inc.,
-// 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-
-/** \file
- \brief Duplicators inline non-template implementation */
-
-//#include "Duplicators.ih"
-
-// Custom includes
-
-#define prefix_ inline
-//-/////////////////////////////////////////////////////////////////////////////////////////////////
-
-//-/////////////////////////////////////////////////////////////////////////////////////////////////
-// senf::ppi::module::ActiveDuplicator
-
-prefix_ senf::ppi::module::ActiveDuplicator::ActiveDuplicator()
-{
- noroute(input);
- input.onRequest(&ActiveDuplicator::request);
-}
-
-//-/////////////////////////////////////////////////////////////////////////////////////////////////
-#undef prefix_
-
-\f
-// Local Variables:
-// mode: c++
-// fill-column: 100
-// comment-column: 40
-// c-file-style: "senf"
-// indent-tabs-mode: nil
-// ispell-local-dictionary: "american"
-// compile-command: "scons -u test"
-// End:
#define HH_SENF_PPI_Duplicators_ 1
// Custom includes
-#include <boost/ptr_container/ptr_vector.hpp>
-#include "predecl.hh"
#include "Connectors.hh"
#include "Module.hh"
#include "MultiConnectorMixin.hh"
ActiveDuplicator will take every received packet and push it out to each connected output.
- Since ActiveDuplicator allows any number of incoming packet streams, the input connectors
- are dynamically managed. A special senf::ppi::connect() overload is used to dynamically
- create the needed input connectors. This hides this extra functionality from the user.
- \code
- senf::ppi::module::ActiveDuplicator dup;
-
- senf::ppi::connect(sourceModule, dup);
- senf::ppi::connect(dup, targetModule1);
- senf::ppi::connect(dup, targetModule2.some_input);
- \endcode
-
\ingroup routing_modules
*/
class ActiveDuplicator
//-/////////////////////////////////////////////////////////////////////////////////////////////////
-#include "Duplicators.cci"
+//#include "Duplicators.cci"
//#include "Duplicators.ct"
//#include "Duplicators.cti"
#endif
#include <boost/ptr_container/ptr_map.hpp>
#include <boost/ptr_container/ptr_vector.hpp>
#include <boost/mpl/if.hpp>
-#include "Connectors.hh"
-#include "Setup.hh"
#ifndef SENF_MULTI_CONNECTOR_MAX_ARGS
#define SENF_MULTI_CONNECTOR_MAX_ARGS 3
#define IH_SENF_PPI_MultiConnectorMixin_ 1
// Custom includes
+#include "Setup.hh"
//-/////////////////////////////////////////////////////////////////////////////////////////////////
// Definition of 802.11 WLAN Beacon Packet non-inline non-template functions
-// Custom includes
#include "WLANBeaconPacket.hh"
-#include <senf/Packets/Packets.hh>
+// Custom includes
#include <boost/io/ios_state.hpp>
#define prefix_
#define HH_SENF_Packets_80221Bundle_TLVParser_ 1
// Custom includes
-#include <algorithm>
#include <senf/Packets/Packets.hh>
#include "MIHTypes.hh"
#define HH_SENF_Packets_DefaultBundle_EthernetPacket_ 1
// Custom includes
-#include <algorithm>
#include <senf/Socket/Protocols/Raw/MACAddress.hh>
#include <senf/Packets/Packets.hh>
// Definition of non-inline non-template functions
-// Custom includes
-#include <senf/Packets/Packets.hh>
-#include "ICMPv6Packet.hh"
#include "ICMPv6TypePacket.hh"
+// Custom includes
+
#define prefix_
//-/////////////////////////////////////////////////////////////////////////////////////////////////
SENF_PACKET_REGISTRY_REGISTER( senf::ICMPTypes, 143, senf::MLDv2ListenerReport );
}
+prefix_ void senf::ICMPv6ErrDestUnreachableParser::setErrCode(int code)
+{
+ ICMPv6Packet icmpv6 (Packet().rfind<ICMPv6Packet>(senf::nothrow));
+ icmpv6->code() = code;
+}
+
+prefix_ void senf::ICMPv6ErrParamProblemParser::setErrCode(int code)
+{
+ ICMPv6Packet icmpv6 (packet().rfind<ICMPv6Packet>(senf::nothrow));
+ icmpv6->code() = code;
+}
+
+prefix_ void senf::ICMPv6ErrTimeExceededParser::setErrCode(int code)
+{
+ ICMPv6Packet icmpv6 (packet().rfind<ICMPv6Packet>(senf::nothrow));
+ icmpv6->code() = code;
+}
+
prefix_ void senf::ICMPv6EchoRequestType::dump(packet p, std::ostream & os)
{
os << "ICMPv6 Echo Request:\n"
<< senf::fieldName("Querier's Robustness Variable") << unsigned(p->qrv()) << "\n"
<< senf::fieldName("Querier's Query Interval Code") << unsigned(p->qqic()) << "\n"
<< " Source Addresses:\n";
- senf::MLDv2ListenerQuery::Parser::srcAddresses_t::container c (p->srcAddresses());
- senf::MLDv2ListenerQuery::Parser::srcAddresses_t::container::iterator i (c.begin());
+ parser::srcAddresses_t::container c (p->srcAddresses());
+ parser::srcAddresses_t::container::iterator i (c.begin());
for (unsigned int nr =1; i != c.end(); ++i, ++nr)
os << " " << nr << ".) " << *i << "\n";
os << "\n";
{
os << "ICMPv6 Neighbor Discovery Router Solicitation Message:\n"
<< senf::fieldName("Reserved(32Bit)") << unsigned(p->reserved()) << "\n";
- senf::NDPRouterSolicitationMessage::Parser::options_t::container optC(p->options() );
- senf::NDPRouterSolicitationMessage::Parser::options_t::container::const_iterator listIter (optC.begin());
+ parser::options_t::container optC (p->options());
+ parser::options_t::container::const_iterator listIter (optC.begin());
for (; listIter != optC.end(); ++listIter) {
- listIter->dump(os);
+ listIter->dump(os);
}
}
<< senf::fieldName("Router Lifetime") << unsigned(p->routerLifetime()) << "\n"
<< senf::fieldName("Reachable Time") << unsigned(p->reachableTime()) << "\n"
<< senf::fieldName("Retrans Timer") << unsigned(p->retransTimer()) << "\n";
- senf::NDPRouterAdvertisementMessage::Parser::options_t::container optC(p->options() );
- senf::NDPRouterAdvertisementMessage::Parser::options_t::container::const_iterator listIter (optC.begin());
+ parser::options_t::container optC (p->options());
+ parser::options_t::container::const_iterator listIter (optC.begin());
for (; listIter != optC.end(); ++listIter) {
listIter->dump(os);
}
os << "ICMPv6 Neighbor Discovery Neighbor Solicitation Message:\n"
<< senf::fieldName("Reserved(32Bit)") << unsigned(p->reserved()) << "\n"
<< senf::fieldName("Target Address") << p->target() << "\n";
- senf::NDPNeighborSolicitationMessage::Parser::options_t::container optC(p->options() );
- senf::NDPNeighborSolicitationMessage::Parser::options_t::container::const_iterator listIter (optC.begin());
+ parser::options_t::container optC (p->options());
+ parser::options_t::container::const_iterator listIter (optC.begin());
for (; listIter != optC.end(); ++listIter) {
listIter->dump(os);
}
<< senf::fieldName("Override Flag") << unsigned(p->o()) << "\n"
<< senf::fieldName("Reserved(29Bit)") << unsigned(p->reserved()) << "\n"
<< senf::fieldName("Target Address") << p->target() << "\n";
- senf::NDPNeighborAdvertisementMessage::Parser::options_t::container optC(p->options() );
- senf::NDPNeighborAdvertisementMessage::Parser::options_t::container::const_iterator listIter (optC.begin());
+ parser::options_t::container optC(p->options() );
+ parser::options_t::container::const_iterator listIter (optC.begin());
for (; listIter != optC.end(); ++listIter) {
listIter->dump(os);
}
<< senf::fieldName("Reserved(32Bit)") << unsigned(p->reserved()) << "\n"
<< senf::fieldName("Target Address") << p->target() << "\n"
<< senf::fieldName("Destination Address") << p->destination() << "\n";
- senf::NDPRedirectMessage::Parser::options_t::container optC(p->options() );
- senf::NDPRedirectMessage::Parser::options_t::container::const_iterator listIter (optC.begin());
+ parser::options_t::container optC(p->options() );
+ parser::options_t::container::const_iterator listIter (optC.begin());
for (; listIter != optC.end(); ++listIter) {
- listIter->dump(os);
+ listIter->dump(os);
}
}
//-/////////////////////////////////////////////////////////////////////////////////////////////////
// Custom includes
#include <senf/Packets/Packets.hh>
-#include "IPv6Packet.hh"
-#include "ICMPv6Packet.hh"
-#include "ListOptionTypeParser.hh"
#include "NDPOptions.hh"
+#include "ICMPv6Packet.hh"
//-/////////////////////////////////////////////////////////////////////////////////////////////////
namespace senf {
4 - Port unreachable
5 - Source address failed ingress/egress policy
6 - Reject route to destination */
- void setErrCode(int code) {
- ICMPv6Packet icmpv6 (senf::Packet().rfind<ICMPv6Packet>(senf::nothrow));
- icmpv6->code() = code;
- }
+ void setErrCode(int code);
SENF_PARSER_FINALIZE ( ICMPv6ErrDestUnreachableParser );
};
SENF_PARSER_FIELD ( unused, UInt32Parser );
/* Code 0 - Hop limit exceeded in transit
1 - Fragment reassembly time exceeded */
- void setErrCode(int code)
- {
- ICMPv6Packet icmpv6 (packet().rfind<ICMPv6Packet>(senf::nothrow));
- icmpv6->code() = code;
- }
+ void setErrCode(int code);
SENF_PARSER_FINALIZE ( ICMPv6ErrTimeExceededParser );
};
1 - Unrecognized Next Header type encountered
2 - Unrecognized IPv6 option encountered */
- void setErrCode(int code)
- {
- ICMPv6Packet icmpv6 (packet().rfind<ICMPv6Packet>(senf::nothrow));
- icmpv6->code() = code;
- }
+ void setErrCode(int code);
+
SENF_PARSER_FINALIZE ( ICMPv6ErrParamProblemParser );
};
// Custom includes
#include <iomanip>
-#include <sys/socket.h>
-#include <netinet/in.h>
-#include <arpa/inet.h>
#include <boost/io/ios_state.hpp>
#include <senf/Utils/IpChecksum.hh>
#include "EthernetPacket.hh"
//#include "IPv6Extensions.ih"
// Custom includes
-#include <senf/Utils/hexdump.hh>
//#include "IPv6Extensions.mpp"
#define prefix_
#define HH_SENF_Packets_DefaultBundle_LlcSnapPacket_ 1
// Custom includes
-#include <algorithm>
#include "EthernetPacket.hh"
-#include <senf/Packets/Packets.hh>
//#include "LlcSnapPacket.mpp"
//-/////////////////////////////////////////////////////////////////////////////////////////////////
// Definition of non-inline non-template functions
// Custom includes
-
#include "ICMPv6Packet.hh"
#include "ICMPv6TypePacket.hh"
#include <senf/Packets/DataPacket.hh>
\brief RTPPacket non-inline non-template implementation */
#include "RTPPacket.hh"
-//#include "UDPPacket.ih"
// Custom includes
#include <boost/io/ios_state.hpp>
#define prefix_
+//-/////////////////////////////////////////////////////////////////////////////////////////////////
namespace
{
}
}
-prefix_ void senf::RTPPacketType::dump(packet p, std::ostream &os)
+prefix_ void senf::RTPPacketType::dump(packet p, std::ostream & os)
{
boost::io::ios_all_saver ias(os);
os << "Real Time Protocol:\n"
<< senf::fieldName("sync source id") << p->synSourceId() << "\n";
}
+//-/////////////////////////////////////////////////////////////////////////////////////////////////
#undef prefix_
/** \file
\brief RTPPacket public header */
-// Custom includes
#ifndef HH_SENF_Packets_DefaultBundle_RTPPacket_
-#define HH_SENF_Packets_DefaultBundle_RTPPacket_
+#define HH_SENF_Packets_DefaultBundle_RTPPacket_ 1
+// Custom includes
#include <senf/Packets/Packets.hh>
-#include <senf/Socket/Protocols/INet/INet6Address.hh>
-
+//-/////////////////////////////////////////////////////////////////////////////////////////////////
namespace senf {
struct RTPPacketParser : public PacketParserBase
SENF_PARSER_BITFIELD ( marker, 1, bool ); //Marker M=1, used to signal speech silent compression; further use in combination with PT to be defined
SENF_PARSER_BITFIELD ( payloadType, 7, unsigned ); //Payload Type; e.g. PCM=8 (RFC 3550)
SENF_PARSER_FIELD ( seqNumber, UInt16Parser ); //random number to identify initial segment of a stream, increment by 1 used to resequence segments at receiver
- SENF_PARSER_FIELD ( timeStamp, UInt32Parser ); //signals sampling time of 1st byte of payload; initialised; used to calculate Jitter between segments
- SENF_PARSER_FIELD ( synSourceId, UInt32Parser ); //Synchronisation source identifier; identifier of RFTP stream source (random number) in case of conferencing identifier of mixer
+ SENF_PARSER_FIELD ( timeStamp, UInt32Parser ); //signals sampling time of 1st byte of payload; initialized; used to calculate Jitter between segments
+ SENF_PARSER_FIELD ( synSourceId, UInt32Parser ); //Synchronization source identifier; identifier of RFTP stream source (random number) in case of conferencing identifier of mixer
SENF_PARSER_VECTOR (csrcOpt, csrcCount, UInt32Parser );
- bool valid() const {return version() == 2;}
SENF_PARSER_FINALIZE(RTPPacketParser);
+
+ bool valid() const { return version() == 2; }
};
struct RTPPacketType
typedef RTPPacketType::packet RTPPacket;
}
+
+//-/////////////////////////////////////////////////////////////////////////////////////////////////
#endif
// Custom includes
#include <iomanip>
#include <boost/io/ios_state.hpp>
-#include <senf/Packets/Packets.hh>
#include <senf/Utils/IpChecksum.hh>
-#include "IPv4Packet.hh"
#include "IPv6Packet.hh"
#define prefix_
// Custom includes
#include <iomanip>
#include <boost/io/ios_state.hpp>
-#include <senf/Packets/Packets.hh>
#include <senf/Utils/IpChecksum.hh>
-#include "IPv4Packet.hh"
#include "IPv6Packet.hh"
#define prefix_
/** \file
\brief DTCPPacket non-inline non-template implementation */
-//#include "DTCPPacket.hh"
+#include "DTCPPacket.hh"
//#include "DTCPPacket.ih"
// Custom includes
-#include "DTCPPacket.hh"
#include <boost/io/ios_state.hpp>
#include <iomanip>
#define HH_SENF_Packets_MPEGDVBBundle_DTCPPacket_ 1
// Custom includes
-#include <senf/Packets/Packets.hh>
-#include <senf/Packets/DefaultBundle/IPv4Packet.hh>
#include <senf/Packets/DefaultBundle/IPv6Packet.hh>
//#include "DTCPPacket.mpp"
/** \file
\brief GREPacket public header */
-#ifndef HH_GREPacket
-#define HH_GREPacket 1
+#ifndef HH_SENF_Packets_MPEGDVBBundle_GREPacket_
+#define HH_SENF_Packets_MPEGDVBBundle_GREPacket_ 1
// Custom includes
-#include <algorithm>
-#include <senf/Packets/Packets.hh>
#include <senf/Packets/DefaultBundle/EthernetPacket.hh>
//#include "GREPacket.mpp"
// Custom includes
#include <boost/crc.hpp>
-#include <algorithm>
#include <senf/Packets/Packets.hh>
//#include "MPESection.mpp"
// Custom includes
#include <iomanip>
-#include <senf/Packets/DefaultBundle/EthernetPacket.hh>
-
#define prefix_
//-/////////////////////////////////////////////////////////////////////////////////////////////////
#define HH_SENF_Packets_MPEGDVBBundle_SNDUPacket_ 1
// Custom includes
-#include <algorithm>
#include <boost/crc.hpp>
#include <senf/Packets/Packets.hh>
#include <senf/Packets/DefaultBundle/EthernetPacket.hh>
/** \brief Explicitly ignore a value
- To explicitly ingore a value (e.g. the return value of a function), pass that value to
+ To explicitly ignore a value (e.g. the return value of a function), pass that value to
senf::IGNORE(). This has the added benefit of silencing \em any warnings about ignored
values by g++.
*/