X-Git-Url: http://g0dil.de/git?a=blobdiff_plain;f=senf%2FPackets%2FDefaultBundle%2FTCPPacket.test.cc;h=9acca3d6d1f79d7f0fc7f05e632f104d47e6e000;hb=refs%2Fheads%2Fmaster;hp=70ada0c4dae54ec862033b57ae191b5097ad6ab5;hpb=601d1f509f5bb24df167a4dd5a20da67a0af9af8;p=senf.git diff --git a/senf/Packets/DefaultBundle/TCPPacket.test.cc b/senf/Packets/DefaultBundle/TCPPacket.test.cc index 70ada0c..9acca3d 100644 --- a/senf/Packets/DefaultBundle/TCPPacket.test.cc +++ b/senf/Packets/DefaultBundle/TCPPacket.test.cc @@ -2,23 +2,27 @@ // // Copyright (C) 2009 // Fraunhofer Institute for Open Communication Systems (FOKUS) -// Competence Center NETwork research (NET), St. Augustin, GERMANY -// Dennis Goslar // -// 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): /** \file \brief TCPPacket unit tests */ @@ -31,15 +35,14 @@ #include "IPv4Packet.hh" #include "IPv6Packet.hh" -#include "../../Utils/auto_unit_test.hh" +#include #include #define prefix_ -///////////////////////////////cc.p//////////////////////////////////////// +//-///////////////////////////////////////////////////////////////////////////////////////////////// -BOOST_AUTO_UNIT_TEST(tcpPacket_parse) +SENF_AUTO_UNIT_TEST(tcpPacket_parse) { - unsigned char data[] = { 0x80, 0xA6, 0x00, 0x50, 0x2E, 0x93, 0x31, 0xB8, 0x66, 0xF9, 0xB7, 0xA1, 0x80, 0x18, 0x00, 0x2E, 0xCF, 0x65, 0x00, 0x00 @@ -66,7 +69,7 @@ BOOST_AUTO_UNIT_TEST(tcpPacket_parse) SENF_CHECK_NO_THROW( p.dump( oss)); } -BOOST_AUTO_UNIT_TEST(tcpPacket_in_ipv4_parse) +SENF_AUTO_UNIT_TEST(tcpPacket_in_ipv4_parse) { unsigned char data[] = { //20 Byte IPv4-Header @@ -100,7 +103,7 @@ BOOST_AUTO_UNIT_TEST(tcpPacket_in_ipv4_parse) } -BOOST_AUTO_UNIT_TEST(tcpPacket_in_ipv6_parse) +SENF_AUTO_UNIT_TEST(tcpPacket_in_ipv6_parse) { unsigned char data[] = { // IPv6-Header @@ -108,11 +111,11 @@ BOOST_AUTO_UNIT_TEST(tcpPacket_in_ipv6_parse) 0x60, 0xa0, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x68, 0x20, 0x01, 0x06, 0x38, 0x04, 0x08, 0x02, 0x01, 0xef, 0xdc, 0x71, 0x52, 0x17, 0x2c, 0x44, 0x3e, - + // 20 Byte TCP-Header without Options 0x00, 0x50, 0xac, 0x3e, 0x82, 0x99, 0x60, 0xa6, 0xa4, 0xfa, 0x32, 0x83, 0x50, 0x18, 0x19, 0x20, 0xd7, 0xcd, 0x00, 0x00, - + // TCP-Payload 0x1a, 0x01, 0x52, 0x0e, 0x26, 0x6f, 0xac, 0xd9, 0x78, 0x0c, 0x3c, 0x69, 0x3c, 0xa6, 0x49, 0xc6, 0x85, 0xc2, 0xa9, 0x72, 0x75, 0x9a, @@ -136,7 +139,7 @@ BOOST_AUTO_UNIT_TEST(tcpPacket_in_ipv6_parse) BOOST_CHECK( tcp->validateChecksum() ); } -BOOST_AUTO_UNIT_TEST(tcpPacket_in_ipv6_create) +SENF_AUTO_UNIT_TEST(tcpPacket_in_ipv6_create) { unsigned char data[] = { // IPv6-Header @@ -145,7 +148,7 @@ BOOST_AUTO_UNIT_TEST(tcpPacket_in_ipv6_create) 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, - + // TCP-Header + TCP-Payload 0x5b, 0xa0, 0x30, 0x39, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x00, 0x00, 0x00, @@ -174,7 +177,7 @@ BOOST_AUTO_UNIT_TEST(tcpPacket_in_ipv6_create) BOOST_CHECK( tcp->validateChecksum() ); } -///////////////////////////////cc.e//////////////////////////////////////// +//-///////////////////////////////////////////////////////////////////////////////////////////////// #undef prefix_