\brief Connector classes
A connector has two independent properties
- \li it may be \e active or \e passive
- \li it may be an \e input or an \e output
+ - it may be \e active or \e passive
+ - it may be an \e input or an \e output
\e Active connectors are activated from within the module, \e passive connectors are
signaled by the external framework. \e Input modules receive packets, \e output modules send
input modules possess a packet queue.
We therefore have 4 connector types:
- \li senf::ppi::connector::ActiveInput
- \li senf::ppi::connector::ActiveOutput
- \li senf::ppi::connector::PassiveInput
- \li senf::ppi::connector::PassiveOutput.
+ - senf::ppi::connector::ActiveInput
+ - senf::ppi::connector::ActiveOutput
+ - senf::ppi::connector::PassiveInput
+ - senf::ppi::connector::PassiveOutput.
Connectors are declared as module data members and are then externally connected to other
modules.
Passive connectors always handle two throttling states:
- \li The \e native throttling state is set manually by the module. It is the throttling state
+ - The \e native throttling state is set manually by the module. It is the throttling state
originating in the current module
- \li The \e forwarded throttling state is the state as it is received by throttling
+ - The \e forwarded throttling state is the state as it is received by throttling
notifications
The accumulative throttling state is generated by combining all sub-states.
that read packets are returned as \a PacketType instead of generic senf::Packet references.
\see GenericActiveInput \n
- senf::ppi::connectro
+ senf::ppi::connector
*/
template <class PacketType>
class ActiveInput : public GenericActiveInput
// Copyright (C) 2007
// Fraunhofer Institute for Open Communication Systems (FOKUS)
// Competence Center NETwork research (NET), St. Augustin, GERMANY
-// Stefan Bund <g0dil@berlios.de>
+// 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
if (p->ip_datagram_version().value() == 4)
return IPv4Packet::factory();
if (p->ip_datagram_version().value() == 6)
- return IPv4Packet::factory();
+ return IPv6Packet::factory();
}
return no_factory();
}
/** \defgroup packet_module Packet Handling
- The basic groundwork of the Packet library is the packet handling:
+ The basic groundwork of the %Packet library is the packet handling:
\li The packet classes provide access to a chain of packet headers (more generically called
interpreters).
///\addtogroup packet_module
///@{
- /** \brief Main Packet class
+ /** \brief Main %Packet class
- Packet is the main externally visible class of the packet library. Packet is a handle into
- the internal packet representation. From Packet you may access the data of that specific
+ %Packet is the main externally visible class of the packet library. %Packet is a handle into
+ the internal packet representation. From %Packet you may access the data of that specific
sub-packet/header/interpreter and navigate to the neighboring
sub-packets/headers/interpreters.
- Packet is protocol agnostic. This class only provides non-protocol dependent members. To
+ %Packet is protocol agnostic. This class only provides non-protocol dependent members. To
access the protocol specific features of a packet (like header fields) the ConcretePacket
- class extending Packet is provided.
+ class extending %Packet is provided.
\section packet_semantics Semantics
\ref ConcretePacket < \ref EthernetPacketType >).
\see
- \ref ConcretePacket for the type specific interface\n
+ \ref ConcretePacket for the %type specific interface\n
\ref PacketData for the sequence interface\n
\ref packetparser for a specification of the parser interface
*/
///\name Sequence interface to raw data
///@{
- iterator begin() const; /**< Returns an <em>random access iterator</em> referring
- to the first byte of the packet data. */
- iterator end() const; /**< Returns an <em>random access iterator</em> referring to the
- element past the end of the packet data. */
+ iterator begin() const; ///< Return iterator to beginning
+ /**< Returns an <em>random access iterator</em> referring to the
+ first byte of the packet data. */
+ iterator end() const; ///< Return iterator to end
+ /**< Returns an <em>random access iterator</em> referring to the
+ byte past the end of the packet data. */
size_type size() const; ///< Returns the number of bytes in the packet data.
bool empty() const; ///< Test whether the packet data is empty.
- /**< Returns whether the packet data is empty, i.e.
- whether its size is 0. This function does not modify
- the content of the packet data in any way. To clear
- the content use clear() */
- byte operator[](size_type n) const;
- byte & operator[](size_type n);
+ /**< Returns whether the packet data is empty, i.e. whether its size
+ is 0. This function does not modify the content of the packet
+ data in any way. To clear the content use clear() */
+ byte operator[](size_type n) const; ///< Access byte in the packet data
+ byte & operator[](size_type n); ///< Access byte in the packet data
// Modifying the raw packet data
void erase(iterator pos);
void erase(iterator first, iterator last);
- void clear(); /**< All bytes of the packet data dropped,
- leaving the container with a size of 0. */
+ void clear(); ///< All bytes of the packet data dropped, leaving the container with a size of 0. */
void resize(size_type n, byte v=0);