src/internet-node/ipv4-loopback-interface.h
author Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
Mon, 04 Jun 2007 16:17:01 +0200
changeset 728 95c426b1cb60
parent 632 1e419ebb4012
child 1325 f3be9eed2d90
permissions -rw-r--r--
rename INode to Node
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
246
612b3c16b24e implement ipv4 loopback for testing
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
     1
/* -*- Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil; -*- */
612b3c16b24e implement ipv4 loopback for testing
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
     2
/*
612b3c16b24e implement ipv4 loopback for testing
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
     3
 * Copyright (c) 2007 INRIA
612b3c16b24e implement ipv4 loopback for testing
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
     4
 * All rights reserved.
612b3c16b24e implement ipv4 loopback for testing
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
     5
 *
612b3c16b24e implement ipv4 loopback for testing
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
     6
 * This program is free software; you can redistribute it and/or modify
612b3c16b24e implement ipv4 loopback for testing
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
     7
 * it under the terms of the GNU General Public License version 2 as
612b3c16b24e implement ipv4 loopback for testing
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
     8
 * published by the Free Software Foundation;
612b3c16b24e implement ipv4 loopback for testing
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
     9
 *
612b3c16b24e implement ipv4 loopback for testing
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    10
 * This program is distributed in the hope that it will be useful,
612b3c16b24e implement ipv4 loopback for testing
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    11
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
612b3c16b24e implement ipv4 loopback for testing
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    12
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
612b3c16b24e implement ipv4 loopback for testing
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    13
 * GNU General Public License for more details.
612b3c16b24e implement ipv4 loopback for testing
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    14
 *
612b3c16b24e implement ipv4 loopback for testing
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    15
 * You should have received a copy of the GNU General Public License
612b3c16b24e implement ipv4 loopback for testing
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    16
 * along with this program; if not, write to the Free Software
612b3c16b24e implement ipv4 loopback for testing
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    17
 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
612b3c16b24e implement ipv4 loopback for testing
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    18
 *
612b3c16b24e implement ipv4 loopback for testing
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    19
 * Authors: 
612b3c16b24e implement ipv4 loopback for testing
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    20
 *  Mathieu Lacage <mathieu.lacage@sophia.inria.fr>,
612b3c16b24e implement ipv4 loopback for testing
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    21
 */
612b3c16b24e implement ipv4 loopback for testing
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    22
#ifndef IPV4_LOOPBACK_INTERFACE_H
612b3c16b24e implement ipv4 loopback for testing
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    23
#define IPV4_LOOPBACK_INTERFACE_H
612b3c16b24e implement ipv4 loopback for testing
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    24
612b3c16b24e implement ipv4 loopback for testing
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    25
#include "ipv4-interface.h"
553
eb9d614accf0 convert more code to use Ptr<Node> instead of Node *
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 524
diff changeset
    26
#include "ns3/ptr.h"
246
612b3c16b24e implement ipv4 loopback for testing
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    27
612b3c16b24e implement ipv4 loopback for testing
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    28
namespace ns3 {
612b3c16b24e implement ipv4 loopback for testing
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    29
728
95c426b1cb60 rename INode to Node
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 632
diff changeset
    30
class Node;
632
1e419ebb4012 Internet-node module dox
Raj Bhattacharjea <raj.b@gatech.edu>
parents: 607
diff changeset
    31
/**
1e419ebb4012 Internet-node module dox
Raj Bhattacharjea <raj.b@gatech.edu>
parents: 607
diff changeset
    32
 * \brief An IPv4 loopback interface
1e419ebb4012 Internet-node module dox
Raj Bhattacharjea <raj.b@gatech.edu>
parents: 607
diff changeset
    33
 */
246
612b3c16b24e implement ipv4 loopback for testing
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    34
class Ipv4LoopbackInterface : public Ipv4Interface 
612b3c16b24e implement ipv4 loopback for testing
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    35
{
612b3c16b24e implement ipv4 loopback for testing
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    36
 public:
632
1e419ebb4012 Internet-node module dox
Raj Bhattacharjea <raj.b@gatech.edu>
parents: 607
diff changeset
    37
  /**
1e419ebb4012 Internet-node module dox
Raj Bhattacharjea <raj.b@gatech.edu>
parents: 607
diff changeset
    38
   * \brief Constructor
1e419ebb4012 Internet-node module dox
Raj Bhattacharjea <raj.b@gatech.edu>
parents: 607
diff changeset
    39
   * \param node Pointer to a node associated with this IPv4 interface
1e419ebb4012 Internet-node module dox
Raj Bhattacharjea <raj.b@gatech.edu>
parents: 607
diff changeset
    40
   */
728
95c426b1cb60 rename INode to Node
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 632
diff changeset
    41
  Ipv4LoopbackInterface (Ptr<Node> node);
246
612b3c16b24e implement ipv4 loopback for testing
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    42
  virtual ~Ipv4LoopbackInterface ();
612b3c16b24e implement ipv4 loopback for testing
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    43
612b3c16b24e implement ipv4 loopback for testing
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    44
 private:
612b3c16b24e implement ipv4 loopback for testing
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    45
  virtual void SendTo (Packet p, Ipv4Address dest);
345
47b41507a45a move channel.cc channel.h to node directory; merge ns-3-tracing from mathieu
Tom Henderson <tomh@tomh.org>
parents: 246
diff changeset
    46
  virtual TraceResolver *DoCreateTraceResolver (TraceContext const &context);
246
612b3c16b24e implement ipv4 loopback for testing
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    47
728
95c426b1cb60 rename INode to Node
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 632
diff changeset
    48
  Ptr<Node> m_node;
246
612b3c16b24e implement ipv4 loopback for testing
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    49
};
612b3c16b24e implement ipv4 loopback for testing
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    50
612b3c16b24e implement ipv4 loopback for testing
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    51
}//namespace ns3
612b3c16b24e implement ipv4 loopback for testing
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    52
612b3c16b24e implement ipv4 loopback for testing
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    53
612b3c16b24e implement ipv4 loopback for testing
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    54
#endif /* IPV4_LOOPBACK_INTERFACE_H */