// Copyright (C) 2009
// Fraunhofer Institute for Open Communication Systems (FOKUS)
// Competence Center NETwork research (NET), St. Augustin, GERMANY
-// Dennis Goslar <dennis.goslar@inf.hochschule-bonn-rhein-sieg.de>
+// Dennis Goslar <dennis.goslar@inf.hochschule-bonn-rhein-sieg.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
#include "IPv4Packet.hh"
#include "IPv6Packet.hh"
-#include "../../Utils/auto_unit_test.hh"
+#include <senf/Utils/auto_unit_test.hh>
#include <boost/test/test_tools.hpp>
#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
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
}
-BOOST_AUTO_UNIT_TEST(tcpPacket_in_ipv6_parse)
+SENF_AUTO_UNIT_TEST(tcpPacket_in_ipv6_parse)
{
unsigned char data[] = {
// IPv6-Header
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,
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
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,