A Discrete-Event Network Simulator
API
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
mesh-l2-routing-protocol.h
Go to the documentation of this file.
1 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
2 /*
3  * Copyright (c) 2008,2009 IITP RAS
4  *
5  * This program is free software; you can redistribute it and/or modify
6  * it under the terms of the GNU General Public License version 2 as
7  * published by the Free Software Foundation;
8  *
9  * This program is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12  * GNU General Public License for more details.
13  *
14  * You should have received a copy of the GNU General Public License
15  * along with this program; if not, write to the Free Software
16  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17  *
18  * Authors: Kirill Andreev <andreev@iitp.ru>
19  * Pavel Boyko <boyko@iitp.ru>
20  */
21 
22 #ifndef MESH_L2_ROUTING_PROTOCOL_H
23 #define MESH_L2_ROUTING_PROTOCOL_H
24 
25 #include "ns3/object.h"
26 #include "ns3/mac48-address.h"
27 #include "ns3/packet.h"
28 
29 namespace ns3 {
30 
31 class Packet;
32 class MeshPointDevice;
33 
45 {
46 public:
48  static TypeId GetTypeId ();
50  virtual ~MeshL2RoutingProtocol ();
73  typedef Callback<void, /* return type */
74  bool, /* flag */
75  Ptr<Packet>, /* packet */
76  Mac48Address, /* src */
77  Mac48Address, /* dst */
78  uint16_t, /* protocol */
79  uint32_t /* out interface ID */
97  virtual bool RequestRoute (uint32_t sourceIface, const Mac48Address source, const Mac48Address destination, Ptr<
98  const Packet> packet, uint16_t protocolType, RouteReplyCallback routeReply) = 0;
113  virtual bool RemoveRoutingStuff (uint32_t fromIface, const Mac48Address source, const Mac48Address destination, Ptr<
114  Packet> packet, uint16_t & protocolType) = 0;
116  void
120  GetMeshPoint () const;
121 protected:
124 };
125 } // namespace ns3
126 #endif