X-Git-Url: http://g0dil.de/git?a=blobdiff_plain;f=senf%2FPackets%2FMPEGDVBBundle%2FGREPacket.hh;h=16339f475b69b4a992f0f58b92a1c4e5a7270f9c;hb=ddb2132be4265f8a0d7d4c954c7c9401e59d027c;hp=99434a29dd8f8937ed5a5ad6b586e74105a60c3a;hpb=26610f603ebdd465307b9621f532c1fe19fd5571;p=senf.git diff --git a/senf/Packets/MPEGDVBBundle/GREPacket.hh b/senf/Packets/MPEGDVBBundle/GREPacket.hh index 99434a2..16339f4 100644 --- a/senf/Packets/MPEGDVBBundle/GREPacket.hh +++ b/senf/Packets/MPEGDVBBundle/GREPacket.hh @@ -2,48 +2,50 @@ // // Copyright (C) 2007 // Fraunhofer Institute for Open Communication Systems (FOKUS) -// Competence Center NETwork research (NET), St. Augustin, GERMANY -// Joachim Kaeber // -// 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. +// The contents of this file are subject to the Fraunhofer FOKUS Public License +// Version 1.0 (the "License"); you may not use this file except in compliance +// with the License. You may obtain a copy of the License at +// http://senf.berlios.de/license.html // -// 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. +// The Fraunhofer FOKUS Public License Version 1.0 is based on, +// but modifies the Mozilla Public License Version 1.1. +// See the full license text for the amendments. // -// 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. - +// Software distributed under the License is distributed on an "AS IS" basis, +// WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License +// for the specific language governing rights and limitations under the License. +// +// The Original Code is Fraunhofer FOKUS code. +// +// The Initial Developer of the Original Code is Fraunhofer-Gesellschaft e.V. +// (registered association), Hansastraße 27 c, 80686 Munich, Germany. +// All Rights Reserved. +// +// Contributor(s): +// Joachim Kaeber /** \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 -#include #include //#include "GREPacket.mpp" -///////////////////////////////hh.p//////////////////////////////////////// +//-///////////////////////////////////////////////////////////////////////////////////////////////// namespace senf { /** \brief Parse a GRE packet Parser implementing the header of a General Routing Encapsulation (GRE, RFC 2784) Packet - + \see GREPacketType */ struct GREChecksumParser : public PacketParserBase { -# include SENF_PARSER() +# include SENF_PARSER() SENF_PARSER_FIELD ( checksum1_, UInt16Parser ); SENF_PARSER_PRIVATE_FIELD ( reserved1_, UInt16Parser ); SENF_PARSER_FINALIZE(GREChecksumParser); @@ -59,16 +61,16 @@ namespace senf { SENF_PARSER_FIELD ( protocol_type, UInt16Parser ); SENF_PARSER_PRIVATE_VARIANT ( checksum_, checksum_present, (VoidPacketParser) (GREChecksumParser) ); - + SENF_PARSER_FINALIZE( GREPacketParser ); - private: + private: UInt16Parser checksum() const /// only defined if checksum_present() == \c true { return checksum_().get<1>().checksum1_(); } }; - + /** \brief GRE packet - + \par Packet type (typedef): \ref GREPacket @@ -85,12 +87,12 @@ namespace senf { typedef PacketTypeMixin mixin; typedef ConcretePacket packet; typedef GREPacketParser parser; - + using mixin::nextPacketRange; using mixin::nextPacketType; using mixin::init; using mixin::initSize; - + static void dump(packet p, std::ostream & os); static EtherTypes::key_t nextPacketKey(packet p) { return p->protocol_type(); @@ -99,22 +101,22 @@ namespace senf { p->protocol_type() << key(p.next(nothrow)); p->version_number() = 0; // as per RFC2784, 2.3.1 - if (p->checksum_present()) { + if (p->checksum_present()) { // compute checksum } else { // ??? } } }; - + /** \brief GRE packet typedef */ typedef GREPacketType::packet GREPacket; - - + + } -///////////////////////////////hh.e//////////////////////////////////////// +//-///////////////////////////////////////////////////////////////////////////////////////////////// //#include "TransportPacket.cci" //#include "TransportPacket.ct" //#include "TransportPacket.cti"