src/node/ipv4-loopback-interface.h
author Tom Henderson <tomh@tomh.org>
Sun, 18 Mar 2007 14:06:51 -0700
changeset 345 47b41507a45a
parent 246 612b3c16b24e
child 487 04c5878c0a61
permissions -rw-r--r--
move channel.cc channel.h to node directory; merge ns-3-tracing from mathieu
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"
612b3c16b24e implement ipv4 loopback for testing
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    26
612b3c16b24e implement ipv4 loopback for testing
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    27
namespace ns3 {
612b3c16b24e implement ipv4 loopback for testing
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    28
612b3c16b24e implement ipv4 loopback for testing
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    29
class Node;
612b3c16b24e implement ipv4 loopback for testing
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    30
612b3c16b24e implement ipv4 loopback for testing
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    31
class Ipv4LoopbackInterface : public Ipv4Interface 
612b3c16b24e implement ipv4 loopback for testing
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    32
{
612b3c16b24e implement ipv4 loopback for testing
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    33
 public:
612b3c16b24e implement ipv4 loopback for testing
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    34
  Ipv4LoopbackInterface (Node *node);
612b3c16b24e implement ipv4 loopback for testing
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    35
  virtual ~Ipv4LoopbackInterface ();
612b3c16b24e implement ipv4 loopback for testing
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    36
612b3c16b24e implement ipv4 loopback for testing
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    37
 private:
612b3c16b24e implement ipv4 loopback for testing
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    38
  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
    39
  virtual TraceResolver *DoCreateTraceResolver (TraceContext const &context);
246
612b3c16b24e implement ipv4 loopback for testing
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    40
  Node *GetNode (void) const;
612b3c16b24e implement ipv4 loopback for testing
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    41
612b3c16b24e implement ipv4 loopback for testing
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    42
  Node *m_node;
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
612b3c16b24e implement ipv4 loopback for testing
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    45
}//namespace ns3
612b3c16b24e implement ipv4 loopback for testing
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    46
612b3c16b24e implement ipv4 loopback for testing
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    47
612b3c16b24e implement ipv4 loopback for testing
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    48
#endif /* IPV4_LOOPBACK_INTERFACE_H */