2015-06-08 16:37:40 -07:00
|
|
|
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
|
2015-06-10 07:52:23 -07:00
|
|
|
/*
|
|
|
|
|
* Copyright (c) 2008 INRIA
|
|
|
|
|
*
|
|
|
|
|
* This program is free software; you can redistribute it and/or modify
|
|
|
|
|
* it under the terms of the GNU General Public License version 2 as
|
|
|
|
|
* published by the Free Software Foundation;
|
|
|
|
|
*
|
|
|
|
|
* 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
|
|
|
|
|
*
|
|
|
|
|
* Author: Mathieu Lacage <mathieu.lacage@cutebugs.net>
|
|
|
|
|
*/
|
2015-06-08 16:37:40 -07:00
|
|
|
|
2008-03-17 12:12:17 -07:00
|
|
|
#include "header.h"
|
2012-11-16 22:27:18 +01:00
|
|
|
#include "ns3/log.h"
|
|
|
|
|
|
2008-03-17 12:12:17 -07:00
|
|
|
namespace ns3 {
|
|
|
|
|
|
2014-09-26 15:51:00 -07:00
|
|
|
NS_LOG_COMPONENT_DEFINE ("Header");
|
|
|
|
|
|
2014-03-05 17:06:59 -08:00
|
|
|
NS_OBJECT_ENSURE_REGISTERED (Header);
|
2008-03-17 13:12:17 -07:00
|
|
|
|
2008-03-17 12:12:17 -07:00
|
|
|
Header::~Header ()
|
2011-05-13 14:57:43 -04:00
|
|
|
{
|
2012-11-16 22:27:18 +01:00
|
|
|
NS_LOG_FUNCTION (this);
|
2011-05-13 14:57:43 -04:00
|
|
|
}
|
2008-03-17 12:12:17 -07:00
|
|
|
|
2011-05-13 14:57:43 -04:00
|
|
|
TypeId
|
2008-03-17 13:12:17 -07:00
|
|
|
Header::GetTypeId (void)
|
|
|
|
|
{
|
|
|
|
|
static TypeId tid = TypeId ("ns3::Header")
|
2008-03-17 17:37:25 -07:00
|
|
|
.SetParent<Chunk> ()
|
2015-03-27 07:03:58 -07:00
|
|
|
.SetGroupName("Network")
|
2011-05-13 14:57:43 -04:00
|
|
|
;
|
2008-03-17 13:12:17 -07:00
|
|
|
return tid;
|
|
|
|
|
}
|
|
|
|
|
|
2008-03-17 14:49:52 -07:00
|
|
|
std::ostream & operator << (std::ostream &os, const Header &header)
|
|
|
|
|
{
|
|
|
|
|
header.Print (os);
|
|
|
|
|
return os;
|
|
|
|
|
}
|
|
|
|
|
|
2008-03-17 12:12:17 -07:00
|
|
|
} // namespace ns3
|