bug 282: remove Ipv4L4Demux
This commit is contained in:
@@ -168,6 +168,10 @@ def register_Ns3InternetStackHelper_methods(root_module, cls):
|
||||
cls.add_method('Install',
|
||||
'void',
|
||||
[param('ns3::NodeContainer', 'c')])
|
||||
## internet-stack-helper.h: void ns3::InternetStackHelper::SetNscStack(std::string soname) [member function]
|
||||
cls.add_method('SetNscStack',
|
||||
'void',
|
||||
[param('std::string', 'soname')])
|
||||
## internet-stack-helper.h: static void ns3::InternetStackHelper::EnablePcapAll(std::string filename) [member function]
|
||||
cls.add_method('EnablePcapAll',
|
||||
'void',
|
||||
|
||||
@@ -343,8 +343,6 @@ def register_Ns3TcpHeader_methods(root_module, cls):
|
||||
def register_Ns3Ipv4L3Protocol_methods(root_module, cls):
|
||||
## ipv4-l3-protocol.h: ns3::Ipv4L3Protocol::PROT_NUMBER [variable]
|
||||
cls.add_static_attribute('PROT_NUMBER', 'uint16_t const', is_const=True)
|
||||
## ipv4-l3-protocol.h: ns3::Ipv4L3Protocol::Ipv4L3Protocol(ns3::Ipv4L3Protocol const & arg0) [copy constructor]
|
||||
cls.add_constructor([param('ns3::Ipv4L3Protocol const &', 'arg0')])
|
||||
## ipv4-l3-protocol.h: static ns3::TypeId ns3::Ipv4L3Protocol::GetTypeId() [member function]
|
||||
cls.add_method('GetTypeId',
|
||||
'ns3::TypeId',
|
||||
@@ -356,6 +354,18 @@ def register_Ns3Ipv4L3Protocol_methods(root_module, cls):
|
||||
cls.add_method('SetNode',
|
||||
'void',
|
||||
[param('ns3::Ptr< ns3::Node >', 'node')])
|
||||
## ipv4-l3-protocol.h: void ns3::Ipv4L3Protocol::Insert(ns3::Ptr<ns3::Ipv4L4Protocol> protocol) [member function]
|
||||
cls.add_method('Insert',
|
||||
'void',
|
||||
[param('ns3::Ptr< ns3::Ipv4L4Protocol >', 'protocol')])
|
||||
## ipv4-l3-protocol.h: ns3::Ptr<ns3::Ipv4L4Protocol> ns3::Ipv4L3Protocol::GetProtocol(int protocolNumber) [member function]
|
||||
cls.add_method('GetProtocol',
|
||||
'ns3::Ptr< ns3::Ipv4L4Protocol >',
|
||||
[param('int', 'protocolNumber')])
|
||||
## ipv4-l3-protocol.h: void ns3::Ipv4L3Protocol::Remove(ns3::Ptr<ns3::Ipv4L4Protocol> protocol) [member function]
|
||||
cls.add_method('Remove',
|
||||
'void',
|
||||
[param('ns3::Ptr< ns3::Ipv4L4Protocol >', 'protocol')])
|
||||
## ipv4-l3-protocol.h: void ns3::Ipv4L3Protocol::SetDefaultTtl(uint8_t ttl) [member function]
|
||||
cls.add_method('SetDefaultTtl',
|
||||
'void',
|
||||
@@ -627,6 +637,10 @@ def register_functions(root_module):
|
||||
module.add_function('AddInternetStack',
|
||||
'void',
|
||||
[param('ns3::Ptr< ns3::Node >', 'node')])
|
||||
## internet-stack.h: extern void ns3::AddNscInternetStack(ns3::Ptr<ns3::Node> node, std::string const & soname) [free function]
|
||||
module.add_function('AddNscInternetStack',
|
||||
'void',
|
||||
[param('ns3::Ptr< ns3::Node >', 'node'), param('std::string const &', 'soname')])
|
||||
register_functions_ns3_internal(module.get_submodule('internal'), root_module)
|
||||
register_functions_ns3_TimeStepPrecision(module.get_submodule('TimeStepPrecision'), root_module)
|
||||
register_functions_ns3_Config(module.get_submodule('Config'), root_module)
|
||||
|
||||
@@ -675,8 +675,8 @@ def register_Ns3Ssid_methods(root_module, cls):
|
||||
cls.add_constructor([param('ns3::Ssid const &', 'arg0')])
|
||||
## ssid.h: ns3::Ssid::Ssid() [constructor]
|
||||
cls.add_constructor([])
|
||||
## ssid.h: ns3::Ssid::Ssid(char const * ssid) [constructor]
|
||||
cls.add_constructor([param('char const *', 'ssid')])
|
||||
## ssid.h: ns3::Ssid::Ssid(std::string s) [constructor]
|
||||
cls.add_constructor([param('std::string', 's')])
|
||||
## ssid.h: ns3::Ssid::Ssid(char const * ssid, uint8_t length) [constructor]
|
||||
cls.add_constructor([param('char const *', 'ssid'), param('uint8_t', 'length')])
|
||||
## ssid.h: ns3::Buffer::Iterator ns3::Ssid::Deserialize(ns3::Buffer::Iterator i) [member function]
|
||||
|
||||
@@ -23,7 +23,6 @@
|
||||
#include "ns3/node.h"
|
||||
#include "ns3/core-config.h"
|
||||
|
||||
#include "ipv4-l4-demux.h"
|
||||
#include "udp-l4-protocol.h"
|
||||
#include "tcp-l4-protocol.h"
|
||||
#include "ipv4-l3-protocol.h"
|
||||
@@ -48,22 +47,22 @@ AddArpStack (Ptr<Node> node)
|
||||
}
|
||||
|
||||
static void
|
||||
AddUdpStack(Ptr<Node> node, Ptr<Ipv4L4Demux> ipv4L4Demux)
|
||||
AddUdpStack(Ptr<Node> node, Ptr<Ipv4L3Protocol> ipv4)
|
||||
{
|
||||
Ptr<UdpL4Protocol> udp = CreateObject<UdpL4Protocol> ();
|
||||
udp->SetNode (node);
|
||||
ipv4L4Demux->Insert (udp);
|
||||
ipv4->Insert (udp);
|
||||
Ptr<UdpSocketFactoryImpl> udpFactory = CreateObject<UdpSocketFactoryImpl> ();
|
||||
udpFactory->SetUdp (udp);
|
||||
node->AggregateObject (udpFactory);
|
||||
}
|
||||
|
||||
static void
|
||||
AddTcpStack(Ptr<Node> node, Ptr<Ipv4L4Demux> ipv4L4Demux)
|
||||
AddTcpStack(Ptr<Node> node, Ptr<Ipv4L3Protocol> ipv4)
|
||||
{
|
||||
Ptr<TcpL4Protocol> tcp = CreateObject<TcpL4Protocol> ();
|
||||
tcp->SetNode (node);
|
||||
ipv4L4Demux->Insert (tcp);
|
||||
ipv4->Insert (tcp);
|
||||
Ptr<TcpSocketFactoryImpl> tcpFactory = CreateObject<TcpSocketFactoryImpl> ();
|
||||
tcpFactory->SetTcp (tcp);
|
||||
node->AggregateObject (tcpFactory);
|
||||
@@ -74,7 +73,6 @@ AddIpv4Impl(Ptr<Node> node, Ptr<Ipv4L3Protocol> ipv4)
|
||||
{
|
||||
Ptr<Ipv4Impl> ipv4Impl = CreateObject<Ipv4Impl> ();
|
||||
ipv4Impl->SetIpv4 (ipv4);
|
||||
node->AggregateObject (ipv4);
|
||||
node->AggregateObject (ipv4Impl);
|
||||
}
|
||||
|
||||
@@ -85,25 +83,22 @@ AddInternetStack (Ptr<Node> node)
|
||||
Ptr<Ipv4L3Protocol> ipv4 = CreateObject<Ipv4L3Protocol> ();
|
||||
ipv4->SetNode (node);
|
||||
|
||||
Ptr<Ipv4L4Demux> ipv4L4Demux = CreateObject<Ipv4L4Demux> ();
|
||||
ipv4L4Demux->SetNode (node);
|
||||
|
||||
AddUdpStack (node, ipv4L4Demux);
|
||||
AddTcpStack (node, ipv4L4Demux);
|
||||
AddUdpStack (node, ipv4);
|
||||
AddTcpStack (node, ipv4);
|
||||
|
||||
AddIpv4Impl (node, ipv4);
|
||||
node->AggregateObject (ipv4L4Demux);
|
||||
node->AggregateObject (ipv4);
|
||||
}
|
||||
|
||||
|
||||
#ifdef NETWORK_SIMULATION_CRADLE
|
||||
static void
|
||||
AddNscStack(Ptr<Node> node, Ptr<Ipv4L4Demux> ipv4L4Demux, const std::string &soname)
|
||||
AddNscStack(Ptr<Node> node, Ptr<Ipv4L3Protocol> ipv4, const std::string &soname)
|
||||
{
|
||||
Ptr<NscTcpL4Protocol> tcp = CreateObject<NscTcpL4Protocol> ();
|
||||
tcp->SetNscLibrary(soname);
|
||||
tcp->SetNode (node);
|
||||
ipv4L4Demux->Insert (tcp);
|
||||
ipv4->Insert (tcp);
|
||||
Ptr<NscTcpSocketFactoryImpl> tcpFactory = CreateObject<NscTcpSocketFactoryImpl> ();
|
||||
tcpFactory->SetTcp (tcp);
|
||||
node->AggregateObject (tcpFactory);
|
||||
@@ -117,14 +112,10 @@ AddNscInternetStack (Ptr<Node> node, const std::string &soname)
|
||||
Ptr<Ipv4L3Protocol> ipv4 = CreateObject<Ipv4L3Protocol> ();
|
||||
ipv4->SetNode (node);
|
||||
|
||||
Ptr<Ipv4L4Demux> ipv4L4Demux = CreateObject<Ipv4L4Demux> ();
|
||||
ipv4L4Demux->SetNode (node);
|
||||
|
||||
AddUdpStack (node, ipv4L4Demux);
|
||||
AddNscStack (node, ipv4L4Demux, soname);
|
||||
AddUdpStack (node, ipv4);
|
||||
AddNscStack (node, ipv4, soname);
|
||||
|
||||
AddIpv4Impl (node, ipv4);
|
||||
node->AggregateObject (ipv4L4Demux);
|
||||
}
|
||||
#else
|
||||
void
|
||||
|
||||
@@ -38,7 +38,6 @@
|
||||
#include "ipv4-interface.h"
|
||||
#include "ipv4-loopback-interface.h"
|
||||
#include "arp-ipv4-interface.h"
|
||||
#include "ipv4-l4-demux.h"
|
||||
|
||||
NS_LOG_COMPONENT_DEFINE ("Ipv4L3Protocol");
|
||||
|
||||
@@ -91,6 +90,29 @@ Ipv4L3Protocol::~Ipv4L3Protocol ()
|
||||
NS_LOG_FUNCTION (this);
|
||||
}
|
||||
|
||||
void
|
||||
Ipv4L3Protocol::Insert(Ptr<Ipv4L4Protocol> protocol)
|
||||
{
|
||||
m_protocols.push_back (protocol);
|
||||
}
|
||||
Ptr<Ipv4L4Protocol>
|
||||
Ipv4L3Protocol::GetProtocol(int protocolNumber)
|
||||
{
|
||||
for (L4List_t::iterator i = m_protocols.begin(); i != m_protocols.end(); ++i)
|
||||
{
|
||||
if ((*i)->GetProtocolNumber () == protocolNumber)
|
||||
{
|
||||
return *i;
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
void
|
||||
Ipv4L3Protocol::Remove (Ptr<Ipv4L4Protocol> protocol)
|
||||
{
|
||||
m_protocols.remove (protocol);
|
||||
}
|
||||
|
||||
void
|
||||
Ipv4L3Protocol::SetNode (Ptr<Node> node)
|
||||
{
|
||||
@@ -102,6 +124,13 @@ void
|
||||
Ipv4L3Protocol::DoDispose (void)
|
||||
{
|
||||
NS_LOG_FUNCTION (this);
|
||||
for (L4List_t::iterator i = m_protocols.begin(); i != m_protocols.end(); ++i)
|
||||
{
|
||||
(*i)->Dispose ();
|
||||
*i = 0;
|
||||
}
|
||||
m_protocols.clear ();
|
||||
|
||||
for (Ipv4InterfaceList::const_iterator i = m_interfaces.begin (); i != m_interfaces.end (); ++i)
|
||||
{
|
||||
Ptr<Ipv4Interface> interface = *i;
|
||||
@@ -699,8 +728,7 @@ Ipv4L3Protocol::ForwardUp (Ptr<Packet> p, Ipv4Header const&ip,
|
||||
{
|
||||
NS_LOG_FUNCTION (this << p << &ip);
|
||||
|
||||
Ptr<Ipv4L4Demux> demux = m_node->GetObject<Ipv4L4Demux> ();
|
||||
Ptr<Ipv4L4Protocol> protocol = demux->GetProtocol (ip.GetProtocol ());
|
||||
Ptr<Ipv4L4Protocol> protocol = GetProtocol (ip.GetProtocol ());
|
||||
protocol->Receive (p, ip.GetSource (), ip.GetDestination (), incomingInterface);
|
||||
}
|
||||
|
||||
|
||||
@@ -40,6 +40,7 @@ class Ipv4Address;
|
||||
class Ipv4Header;
|
||||
class Ipv4Route;
|
||||
class Node;
|
||||
class Ipv4L4Protocol;
|
||||
|
||||
|
||||
/**
|
||||
@@ -59,6 +60,35 @@ public:
|
||||
|
||||
void SetNode (Ptr<Node> node);
|
||||
|
||||
/**
|
||||
* \param protocol a template for the protocol to add to this L4 Demux.
|
||||
* \returns the L4Protocol effectively added.
|
||||
*
|
||||
* Invoke Copy on the input template to get a copy of the input
|
||||
* protocol which can be used on the Node on which this L4 Demux
|
||||
* is running. The new L4Protocol is registered internally as
|
||||
* a working L4 Protocol and returned from this method.
|
||||
* The caller does not get ownership of the returned pointer.
|
||||
*/
|
||||
void Insert(Ptr<Ipv4L4Protocol> protocol);
|
||||
/**
|
||||
* \param protocolNumber number of protocol to lookup
|
||||
* in this L4 Demux
|
||||
* \returns a matching L4 Protocol
|
||||
*
|
||||
* This method is typically called by lower layers
|
||||
* to forward packets up the stack to the right protocol.
|
||||
* It is also called from NodeImpl::GetUdp for example.
|
||||
*/
|
||||
Ptr<Ipv4L4Protocol> GetProtocol(int protocolNumber);
|
||||
/**
|
||||
* \param protocol protocol to remove from this demux.
|
||||
*
|
||||
* The input value to this method should be the value
|
||||
* returned from the Ipv4L4Protocol::Insert method.
|
||||
*/
|
||||
void Remove (Ptr<Ipv4L4Protocol> protocol);
|
||||
|
||||
/**
|
||||
* \param ttl default ttl to use
|
||||
*
|
||||
@@ -187,12 +217,16 @@ private:
|
||||
void ForwardUp (Ptr<Packet> p, Ipv4Header const&ip, Ptr<Ipv4Interface> incomingInterface);
|
||||
uint32_t AddIpv4Interface (Ptr<Ipv4Interface> interface);
|
||||
void SetupLoopback (void);
|
||||
Ipv4L3Protocol(const Ipv4L3Protocol &);
|
||||
Ipv4L3Protocol &operator = (const Ipv4L3Protocol &);
|
||||
|
||||
typedef std::list<Ptr<Ipv4Interface> > Ipv4InterfaceList;
|
||||
typedef std::list<std::pair<Ipv4Address, Ipv4Address> >
|
||||
Ipv4MulticastGroupList;
|
||||
typedef std::list< std::pair< int, Ptr<Ipv4RoutingProtocol> > > Ipv4RoutingProtocolList;
|
||||
|
||||
typedef std::list<Ptr<Ipv4L4Protocol> > L4List_t;
|
||||
L4List_t m_protocols;
|
||||
Ipv4InterfaceList m_interfaces;
|
||||
uint32_t m_nInterfaces;
|
||||
uint8_t m_defaultTtl;
|
||||
|
||||
@@ -1,97 +0,0 @@
|
||||
// -*- Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil; -*-
|
||||
//
|
||||
// Copyright (c) 2006 Georgia Tech Research Corporation
|
||||
//
|
||||
// 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: George F. Riley<riley@ece.gatech.edu>
|
||||
//
|
||||
|
||||
// Define the layer 4 demultiplexer object for ns3.
|
||||
// George F. Riley, Georgia Tech, Fall 2006
|
||||
|
||||
#include <sstream>
|
||||
#include "ns3/node.h"
|
||||
#include "ns3/object-vector.h"
|
||||
#include "ipv4-l4-demux.h"
|
||||
#include "ipv4-l4-protocol.h"
|
||||
|
||||
namespace ns3 {
|
||||
|
||||
NS_OBJECT_ENSURE_REGISTERED (Ipv4L4Demux);
|
||||
|
||||
TypeId
|
||||
Ipv4L4Demux::GetTypeId (void)
|
||||
{
|
||||
static TypeId tid = TypeId ("ns3::Ipv4L4Demux")
|
||||
.SetParent<Object> ()
|
||||
.AddAttribute ("Protocols", "The set of protocols registered with this demux.",
|
||||
ObjectVectorValue (),
|
||||
MakeObjectVectorAccessor (&Ipv4L4Demux::m_protocols),
|
||||
MakeObjectVectorChecker<Ipv4L4Protocol> ())
|
||||
;
|
||||
return tid;
|
||||
}
|
||||
|
||||
Ipv4L4Demux::Ipv4L4Demux ()
|
||||
{}
|
||||
|
||||
Ipv4L4Demux::~Ipv4L4Demux()
|
||||
{}
|
||||
|
||||
void
|
||||
Ipv4L4Demux::SetNode (Ptr<Node> node)
|
||||
{
|
||||
m_node = node;
|
||||
}
|
||||
|
||||
void
|
||||
Ipv4L4Demux::DoDispose (void)
|
||||
{
|
||||
for (L4List_t::iterator i = m_protocols.begin(); i != m_protocols.end(); ++i)
|
||||
{
|
||||
(*i)->Dispose ();
|
||||
*i = 0;
|
||||
}
|
||||
m_protocols.clear ();
|
||||
m_node = 0;
|
||||
Object::DoDispose ();
|
||||
}
|
||||
|
||||
void
|
||||
Ipv4L4Demux::Insert(Ptr<Ipv4L4Protocol> protocol)
|
||||
{
|
||||
m_protocols.push_back (protocol);
|
||||
}
|
||||
Ptr<Ipv4L4Protocol>
|
||||
Ipv4L4Demux::GetProtocol(int protocolNumber)
|
||||
{
|
||||
for (L4List_t::iterator i = m_protocols.begin(); i != m_protocols.end(); ++i)
|
||||
{
|
||||
if ((*i)->GetProtocolNumber () == protocolNumber)
|
||||
{
|
||||
return *i;
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
void
|
||||
Ipv4L4Demux::Remove (Ptr<Ipv4L4Protocol> protocol)
|
||||
{
|
||||
m_protocols.remove (protocol);
|
||||
}
|
||||
|
||||
|
||||
|
||||
}//namespace ns3
|
||||
@@ -1,88 +0,0 @@
|
||||
// -*- Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil; -*-
|
||||
//
|
||||
// Copyright (c) 2006 Georgia Tech Research Corporation
|
||||
//
|
||||
// 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: George F. Riley<riley@ece.gatech.edu>
|
||||
//
|
||||
|
||||
// Define the layer 4 demultiplexer object for ns3.
|
||||
// George F. Riley, Georgia Tech, Fall 2006
|
||||
|
||||
#ifndef IPV4_L4_DEMUX_H
|
||||
#define IPV4_L4_DEMUX_H
|
||||
|
||||
#include <list>
|
||||
#include "ns3/object.h"
|
||||
#include "ns3/ptr.h"
|
||||
|
||||
namespace ns3 {
|
||||
|
||||
class Ipv4L4Protocol;
|
||||
class Node;
|
||||
|
||||
/**
|
||||
* \brief L4 Ipv4 Demux
|
||||
*
|
||||
* This class demultiplexes IP datagrams to the correct layer four protocol
|
||||
* object. This demux sits between IP and layer 4.
|
||||
*/
|
||||
class Ipv4L4Demux : public Object
|
||||
{
|
||||
public:
|
||||
static TypeId GetTypeId (void);
|
||||
Ipv4L4Demux ();
|
||||
virtual ~Ipv4L4Demux();
|
||||
|
||||
void SetNode (Ptr<Node> node);
|
||||
|
||||
/**
|
||||
* \param protocol a template for the protocol to add to this L4 Demux.
|
||||
* \returns the L4Protocol effectively added.
|
||||
*
|
||||
* Invoke Copy on the input template to get a copy of the input
|
||||
* protocol which can be used on the Node on which this L4 Demux
|
||||
* is running. The new L4Protocol is registered internally as
|
||||
* a working L4 Protocol and returned from this method.
|
||||
* The caller does not get ownership of the returned pointer.
|
||||
*/
|
||||
void Insert(Ptr<Ipv4L4Protocol> protocol);
|
||||
/**
|
||||
* \param protocolNumber number of protocol to lookup
|
||||
* in this L4 Demux
|
||||
* \returns a matching L4 Protocol
|
||||
*
|
||||
* This method is typically called by lower layers
|
||||
* to forward packets up the stack to the right protocol.
|
||||
* It is also called from NodeImpl::GetUdp for example.
|
||||
*/
|
||||
Ptr<Ipv4L4Protocol> GetProtocol(int protocolNumber);
|
||||
/**
|
||||
* \param protocol protocol to remove from this demux.
|
||||
*
|
||||
* The input value to this method should be the value
|
||||
* returned from the Ipv4L4Protocol::Insert method.
|
||||
*/
|
||||
void Remove (Ptr<Ipv4L4Protocol> protocol);
|
||||
protected:
|
||||
virtual void DoDispose (void);
|
||||
private:
|
||||
typedef std::list<Ptr<Ipv4L4Protocol> > L4List_t;
|
||||
L4List_t m_protocols;
|
||||
Ptr<Node> m_node;
|
||||
};
|
||||
|
||||
} //namespace ns3
|
||||
#endif
|
||||
@@ -37,10 +37,6 @@ Ipv4L4Protocol::GetTypeId (void)
|
||||
UintegerValue (0),
|
||||
MakeUintegerAccessor (&Ipv4L4Protocol::GetProtocolNumber),
|
||||
MakeUintegerChecker<int> ())
|
||||
.AddAttribute ("Version", "The version of the protocol.",
|
||||
UintegerValue (0),
|
||||
MakeUintegerAccessor (&Ipv4L4Protocol::GetVersion),
|
||||
MakeUintegerChecker<int> ())
|
||||
;
|
||||
return tid;
|
||||
}
|
||||
|
||||
@@ -49,10 +49,6 @@ public:
|
||||
* \returns the protocol number of this protocol.
|
||||
*/
|
||||
virtual int GetProtocolNumber (void) const = 0;
|
||||
/**
|
||||
* \returns the version number of this protocol.
|
||||
*/
|
||||
virtual int GetVersion (void) const = 0;
|
||||
|
||||
/**
|
||||
* \param p packet to forward up
|
||||
|
||||
@@ -361,11 +361,6 @@ TcpL4Protocol::GetProtocolNumber (void) const
|
||||
{
|
||||
return PROT_NUMBER;
|
||||
}
|
||||
int
|
||||
TcpL4Protocol::GetVersion (void) const
|
||||
{
|
||||
return 2;
|
||||
}
|
||||
|
||||
void
|
||||
TcpL4Protocol::DoDispose (void)
|
||||
|
||||
@@ -62,7 +62,6 @@ public:
|
||||
void SetNode (Ptr<Node> node);
|
||||
|
||||
virtual int GetProtocolNumber (void) const;
|
||||
virtual int GetVersion (void) const;
|
||||
|
||||
/**
|
||||
* \return A smart Socket pointer to a TcpSocketImpl, allocated by this instance
|
||||
|
||||
@@ -26,7 +26,6 @@
|
||||
#include "tcp-socket-impl.h"
|
||||
#include "tcp-l4-protocol.h"
|
||||
#include "ipv4-end-point.h"
|
||||
#include "ipv4-l4-demux.h"
|
||||
#include "ns3/simulation-singleton.h"
|
||||
#include "tcp-typedefs.h"
|
||||
#include "ns3/simulator.h"
|
||||
|
||||
@@ -77,11 +77,6 @@ UdpL4Protocol::GetProtocolNumber (void) const
|
||||
{
|
||||
return PROT_NUMBER;
|
||||
}
|
||||
int
|
||||
UdpL4Protocol::GetVersion (void) const
|
||||
{
|
||||
return 2;
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
|
||||
@@ -47,7 +47,6 @@ public:
|
||||
void SetNode (Ptr<Node> node);
|
||||
|
||||
virtual int GetProtocolNumber (void) const;
|
||||
virtual int GetVersion (void) const;
|
||||
|
||||
/**
|
||||
* \return A smart Socket pointer to a UdpSocket, allocated by this instance
|
||||
|
||||
@@ -30,7 +30,6 @@
|
||||
#include "udp-socket-impl.h"
|
||||
#include "udp-l4-protocol.h"
|
||||
#include "ipv4-end-point.h"
|
||||
#include "ipv4-l4-demux.h"
|
||||
|
||||
NS_LOG_COMPONENT_DEFINE ("UdpSocketImpl");
|
||||
|
||||
|
||||
@@ -62,7 +62,6 @@ def build(bld):
|
||||
obj = bld.create_ns3_module('internet-stack', ['node'])
|
||||
obj.source = [
|
||||
'internet-stack.cc',
|
||||
'ipv4-l4-demux.cc',
|
||||
'ipv4-l4-protocol.cc',
|
||||
'udp-header.cc',
|
||||
'tcp-header.cc',
|
||||
|
||||
@@ -241,7 +241,6 @@ int main (int argc, char *argv[])
|
||||
info.RecordAggregationInfo ("ns3::Node", "ns3::PacketSocketFactory");
|
||||
info.RecordAggregationInfo ("ns3::Node", "ns3::olsr::Agent");
|
||||
info.RecordAggregationInfo ("ns3::Node", "ns3::MobilityModel");
|
||||
info.RecordAggregationInfo ("ns3::Node", "ns3::Ipv4L4Demux");
|
||||
info.RecordAggregationInfo ("ns3::Node", "ns3::Ipv4L3Protocol");
|
||||
info.RecordAggregationInfo ("ns3::Node", "ns3::ArpL3Protocol");
|
||||
|
||||
|
||||
Reference in New Issue
Block a user