remove dead files
parent
b20e550e89
commit
e24a6a189a
|
@ -1,54 +0,0 @@
|
|||
// -*- Mode:NS3 -*-
|
||||
//
|
||||
// Copyright (c) 2006 Georgia Tech Research Corporation
|
||||
// All rights reserved.
|
||||
//
|
||||
// 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>
|
||||
//
|
||||
// NS3 Base class for IPV4 and IPV6 addresses, and masks.
|
||||
// George F. Riley, Georgia Tech, Spring 2007
|
||||
|
||||
#ifndef __IPADDR_H__
|
||||
#define __IPADDR_H__
|
||||
|
||||
#include <string>
|
||||
|
||||
#include "protocol.h"
|
||||
namespace ns3 {
|
||||
|
||||
class IPMask
|
||||
{
|
||||
public:
|
||||
virtual ~IPMask();
|
||||
virtual uint32_t Size() const = 0; // Size of mask in bytes
|
||||
virtual IPMask* Copy() const = 0; // Copy this mask
|
||||
virtual Proto_t L3Proto() const = 0; // Associated layer 3 protocol number
|
||||
};
|
||||
|
||||
class IPAddr {
|
||||
public:
|
||||
virtual ~IPAddr() {}
|
||||
virtual uint32_t Size() const = 0; // Number of bytes in this address
|
||||
virtual IPAddr* Copy() const = 0; // Copy this address
|
||||
virtual Proto_t L3Proto() const = 0; // Associated layer 3 protocol number
|
||||
virtual std::string ToString() const = 0;// Convert to dotted notation
|
||||
virtual operator std::string() const = 0;// For convenience, a string typecast
|
||||
virtual IPMask& GetMask(uint32_t) const;// Get a compatible mask
|
||||
};
|
||||
|
||||
} //namespace ns3
|
||||
|
||||
#endif
|
|
@ -1,45 +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>
|
||||
//
|
||||
|
||||
// NS3 - Layer 4 Protocol base class
|
||||
// George F. Riley, Georgia Tech, Spring 2007
|
||||
|
||||
#ifndef __l4proto_h__
|
||||
#define __l4proto_h__
|
||||
|
||||
#include "protocol.h"
|
||||
|
||||
namespace ns3 {
|
||||
|
||||
class Node;
|
||||
|
||||
class L4Protocol : public Protocol {
|
||||
public:
|
||||
L4Protocol() : m_node(0) {}
|
||||
virtual Layer_t Layer () const { return 4; }
|
||||
virtual L4Protocol* Copy() const = 0;
|
||||
// L4 protocols have an associated Node object
|
||||
public:
|
||||
Node* m_node;
|
||||
};
|
||||
|
||||
} // Namespace ns3
|
||||
|
||||
#endif
|
|
@ -1,63 +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>
|
||||
//
|
||||
// NS3 - Protocol base class
|
||||
// George F. Riley. Georgia Tech, Spring 2007
|
||||
|
||||
// Class protocol is for any protocol stack layer implementation
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
#ifndef __PROTOCOL_H__
|
||||
#define __PROTOCOL_H__
|
||||
|
||||
namespace ns3{
|
||||
|
||||
typedef int Layer_t; // Protocol layer number
|
||||
typedef int Proto_t; // Protocol identifier
|
||||
typedef int Version_t; // Which version of protocol
|
||||
typedef int Priority_t; // Protocol priority
|
||||
typedef int32_t PortId_t;
|
||||
#define NO_PORT ((PortId_t)-1)
|
||||
typedef uint32_t Size_t;
|
||||
|
||||
// All Protocol subclasses must implement the Layer, Proto, and
|
||||
// Version methods, although they are free to indicate that the
|
||||
// particular value if meaningless by returning -1. For example,
|
||||
// most layer 2 protocols do not include a "version number", nor
|
||||
// a "protocol number". The Proto values must be used
|
||||
// if the protocol is to be inserted into the protocol graph.
|
||||
//
|
||||
// Additionally, all protocols must be able to copy themselves, using
|
||||
// the virtual Copy method. THis is used when copying protocol graphs
|
||||
// when creating Node objects from a pre-configured node. See the
|
||||
// code in Node::Create() and Node::Prototype() in the node implementation.
|
||||
class Protocol {
|
||||
public:
|
||||
Protocol() { }
|
||||
virtual ~Protocol() { }
|
||||
virtual Layer_t GetLayer() const = 0; // Get protocol layer
|
||||
virtual Proto_t GetProtocolNumber() const = 0; // Get proto number
|
||||
virtual Version_t GetVersion() const = 0; // Get proto version number
|
||||
virtual Protocol* Copy() const = 0; // Copy this protocol
|
||||
};
|
||||
|
||||
} //namespace ns3
|
||||
#endif
|
||||
|
|
@ -1,45 +0,0 @@
|
|||
// -*- Mode:NS3 -*-
|
||||
//
|
||||
// Copyright (c) 2006 Georgia Tech Research Corporation
|
||||
// All rights reserved.
|
||||
//
|
||||
// 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>
|
||||
// Based on original class declaration by Mathieu Lacage
|
||||
//
|
||||
|
||||
#ifndef __REF_COUNTED_OBJECT__
|
||||
#define __REF_COUNTED_OBJECT__
|
||||
|
||||
class RefCountedObject
|
||||
{
|
||||
public:
|
||||
RefCountedObject() : m_count(1) {}
|
||||
virtual ~RefCountedObject() {}
|
||||
|
||||
void Ref()
|
||||
{
|
||||
m_count++;
|
||||
}
|
||||
|
||||
void Unref()
|
||||
{
|
||||
if (!--m_count) delete this; // Refcount to zero, delete
|
||||
}
|
||||
private:
|
||||
uint32_t m_count;
|
||||
};
|
||||
#endif
|
||||
|
Loading…
Reference in New Issue