author | Mathieu Lacage <mathieu.lacage@sophia.inria.fr> |
Mon, 14 May 2007 10:06:12 +0200 | |
changeset 607 | 1b7abeccfcda |
parent 568 | e1660959ecbb |
child 728 | 95c426b1cb60 |
permissions | -rw-r--r-- |
242 | 1 |
/* -*- Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil; -*- */ |
2 |
/* |
|
3 |
* Copyright (c) 2007 INRIA |
|
4 |
* All rights reserved. |
|
5 |
* |
|
6 |
* This program is free software; you can redistribute it and/or modify |
|
7 |
* it under the terms of the GNU General Public License version 2 as |
|
8 |
* published by the Free Software Foundation; |
|
9 |
* |
|
10 |
* This program is distributed in the hope that it will be useful, |
|
11 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
12 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
13 |
* GNU General Public License for more details. |
|
14 |
* |
|
15 |
* You should have received a copy of the GNU General Public License |
|
16 |
* along with this program; if not, write to the Free Software |
|
17 |
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
|
18 |
* |
|
19 |
* Authors: |
|
20 |
* Mathieu Lacage <mathieu.lacage@sophia.inria.fr>, |
|
21 |
*/ |
|
22 |
#ifndef ARP_IPV4_INTERFACE_H |
|
23 |
#define ARP_IPV4_INTERFACE_H |
|
24 |
||
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" |
242 | 27 |
|
28 |
namespace ns3 { |
|
29 |
||
607
1b7abeccfcda
rename Node to INode
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
568
diff
changeset
|
30 |
class INode; |
242 | 31 |
|
410 | 32 |
/** |
33 |
* \brief an Ipv4 Interface which uses ARP |
|
34 |
* |
|
35 |
* If you need to use ARP on top of a specific NetDevice, you |
|
36 |
* can use this Ipv4Interface subclass to wrap it for the Ipv4 class |
|
37 |
* when calling Ipv4::AddInterface. |
|
38 |
*/ |
|
242 | 39 |
class ArpIpv4Interface : public Ipv4Interface |
40 |
{ |
|
41 |
public: |
|
345
47b41507a45a
move channel.cc channel.h to node directory; merge ns-3-tracing from mathieu
Tom Henderson <tomh@tomh.org>
parents:
242
diff
changeset
|
42 |
enum TraceType { |
47b41507a45a
move channel.cc channel.h to node directory; merge ns-3-tracing from mathieu
Tom Henderson <tomh@tomh.org>
parents:
242
diff
changeset
|
43 |
NETDEVICE, |
47b41507a45a
move channel.cc channel.h to node directory; merge ns-3-tracing from mathieu
Tom Henderson <tomh@tomh.org>
parents:
242
diff
changeset
|
44 |
ARP, |
47b41507a45a
move channel.cc channel.h to node directory; merge ns-3-tracing from mathieu
Tom Henderson <tomh@tomh.org>
parents:
242
diff
changeset
|
45 |
}; |
607
1b7abeccfcda
rename Node to INode
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
568
diff
changeset
|
46 |
ArpIpv4Interface (Ptr<INode> node, Ptr<NetDevice> device); |
242 | 47 |
virtual ~ArpIpv4Interface (); |
48 |
||
49 |
private: |
|
50 |
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:
242
diff
changeset
|
51 |
virtual TraceResolver *DoCreateTraceResolver (TraceContext const &context); |
607
1b7abeccfcda
rename Node to INode
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
568
diff
changeset
|
52 |
Ptr<INode> m_node; |
242 | 53 |
}; |
54 |
||
55 |
}//namespace ns3 |
|
56 |
||
57 |
||
58 |
#endif /* ARP_IPV4_INTERFACE_H */ |