author | Lalith Suresh <suresh.lalith@gmail.com> |
Sat, 05 Mar 2011 01:00:13 +0000 | |
changeset 6862 | c80b4c6453d5 |
parent 6851 | src/mesh/model/mesh.h@7fdad61b88f1 |
child 7233 | be0d7443b4ff |
permissions | -rw-r--r-- |
4804
a0d0d688a271
src/devices/mesh directory tree and doxygen module created.
Pavel Boyko <boyko@iitp.ru>
parents:
diff
changeset
|
1 |
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */ |
4812
adcb26652e1d
Coding style changes: indentation, spaces.
Andrey Mazo <mazo@iitp.ru>
parents:
4804
diff
changeset
|
2 |
/* |
4804
a0d0d688a271
src/devices/mesh directory tree and doxygen module created.
Pavel Boyko <boyko@iitp.ru>
parents:
diff
changeset
|
3 |
* Copyright (c) 2009 IITP RAS |
4812
adcb26652e1d
Coding style changes: indentation, spaces.
Andrey Mazo <mazo@iitp.ru>
parents:
4804
diff
changeset
|
4 |
* |
4804
a0d0d688a271
src/devices/mesh directory tree and doxygen module created.
Pavel Boyko <boyko@iitp.ru>
parents:
diff
changeset
|
5 |
* This program is free software; you can redistribute it and/or modify |
a0d0d688a271
src/devices/mesh directory tree and doxygen module created.
Pavel Boyko <boyko@iitp.ru>
parents:
diff
changeset
|
6 |
* it under the terms of the GNU General Public License version 2 as |
a0d0d688a271
src/devices/mesh directory tree and doxygen module created.
Pavel Boyko <boyko@iitp.ru>
parents:
diff
changeset
|
7 |
* published by the Free Software Foundation; |
a0d0d688a271
src/devices/mesh directory tree and doxygen module created.
Pavel Boyko <boyko@iitp.ru>
parents:
diff
changeset
|
8 |
* |
a0d0d688a271
src/devices/mesh directory tree and doxygen module created.
Pavel Boyko <boyko@iitp.ru>
parents:
diff
changeset
|
9 |
* This program is distributed in the hope that it will be useful, |
a0d0d688a271
src/devices/mesh directory tree and doxygen module created.
Pavel Boyko <boyko@iitp.ru>
parents:
diff
changeset
|
10 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
a0d0d688a271
src/devices/mesh directory tree and doxygen module created.
Pavel Boyko <boyko@iitp.ru>
parents:
diff
changeset
|
11 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
a0d0d688a271
src/devices/mesh directory tree and doxygen module created.
Pavel Boyko <boyko@iitp.ru>
parents:
diff
changeset
|
12 |
* GNU General Public License for more details. |
a0d0d688a271
src/devices/mesh directory tree and doxygen module created.
Pavel Boyko <boyko@iitp.ru>
parents:
diff
changeset
|
13 |
* |
a0d0d688a271
src/devices/mesh directory tree and doxygen module created.
Pavel Boyko <boyko@iitp.ru>
parents:
diff
changeset
|
14 |
* You should have received a copy of the GNU General Public License |
a0d0d688a271
src/devices/mesh directory tree and doxygen module created.
Pavel Boyko <boyko@iitp.ru>
parents:
diff
changeset
|
15 |
* along with this program; if not, write to the Free Software |
a0d0d688a271
src/devices/mesh directory tree and doxygen module created.
Pavel Boyko <boyko@iitp.ru>
parents:
diff
changeset
|
16 |
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
4812
adcb26652e1d
Coding style changes: indentation, spaces.
Andrey Mazo <mazo@iitp.ru>
parents:
4804
diff
changeset
|
17 |
* |
5172 | 18 |
* Authors: Kirill Andreev <andreev@itp.ru> |
19 |
* Aleksander Safonov <safa@iitp.ru> |
|
20 |
* Pavel Boyko <boyko@iitp.ru> |
|
4812
adcb26652e1d
Coding style changes: indentation, spaces.
Andrey Mazo <mazo@iitp.ru>
parents:
4804
diff
changeset
|
21 |
* |
5172 | 22 |
* This is top level mesh module description |
4804
a0d0d688a271
src/devices/mesh directory tree and doxygen module created.
Pavel Boyko <boyko@iitp.ru>
parents:
diff
changeset
|
23 |
*/ |
a0d0d688a271
src/devices/mesh directory tree and doxygen module created.
Pavel Boyko <boyko@iitp.ru>
parents:
diff
changeset
|
24 |
|
a0d0d688a271
src/devices/mesh directory tree and doxygen module created.
Pavel Boyko <boyko@iitp.ru>
parents:
diff
changeset
|
25 |
/** |
a0d0d688a271
src/devices/mesh directory tree and doxygen module created.
Pavel Boyko <boyko@iitp.ru>
parents:
diff
changeset
|
26 |
* \ingroup devices |
a0d0d688a271
src/devices/mesh directory tree and doxygen module created.
Pavel Boyko <boyko@iitp.ru>
parents:
diff
changeset
|
27 |
* \defgroup mesh Mesh |
4812
adcb26652e1d
Coding style changes: indentation, spaces.
Andrey Mazo <mazo@iitp.ru>
parents:
4804
diff
changeset
|
28 |
* |
5167 | 29 |
* \brief MAC-layer mobile mesh networking. |
5170
21bcd2217830
Some doxygen fixes (spelling, etc).
Andrey Mazo <mazo@iitp.ru>
parents:
5167
diff
changeset
|
30 |
* \section MeshOverview Overview of Layer-2 Mesh networking protocols |
5172 | 31 |
* |
5173 | 32 |
* The main goal of this module is to provide MAC-layer routing functionality. |
5172 | 33 |
|
5173 | 34 |
* The main part of MAC-layer routing model is specific type of a network device -- |
35 |
* ns3::MeshPointDevice. Being an interface to upper-layer protocols, it provides routing functionality |
|
5172 | 36 |
* hidden from upper-layer protocols, by means of ns3::MeshL2RoutingProtocol. |
37 |
* |
|
38 |
* Our model supports stations with multiple network devices handled by a single |
|
39 |
* MAC-layer routing protocol. So, ns3::MeshPointDevice serves as an umbrella to multiple |
|
40 |
* network devices ("interfaces") working under the same MAC-layer routing protocol. |
|
41 |
* |
|
42 |
* Network devices may be of different types, each with a specific medium access method. |
|
43 |
* So ns3::MeshL2RoutingProtocol consists of two parts: the one independent from the network device type, |
|
5173 | 44 |
* which we refer to as a routing protocol, and the other one depended on the network device type which |
5172 | 45 |
* we refer to as a plug-in to the routing protocol. |
5167 | 46 |
* |
5173 | 47 |
* One can imagine a MAC-layer routing as a two-tier model. ns3::MeshL2RoutingProtocol and ns3::MeshPointDevice |
5172 | 48 |
* belong to the upper tier. The task of ns3::MeshPointDevice is to send, receive, and forward frames, |
49 |
* while the task of ns3::MeshL2RoutingProtocol is to resolve routes and keep frames waiting for route resolution. |
|
5173 | 50 |
* This functionality is independent from the types of underlying network devices ("interfaces"). |
5172 | 51 |
* |
52 |
* The lower tier implements the part of MAC-layer routing, specific for underlying network devices |
|
53 |
* and their medium access control methods. For example, HWMP routing protocol in IEEE802.11s |
|
54 |
* uses its own specific management frames. |
|
5167 | 55 |
* |
5172 | 56 |
* At present, two routing protocols are implemented in this module: |
57 |
* - HWMP (default routing protocol for IEEE802.11s standard) + Peer management protocol |
|
58 |
* (also described in 802.11s standard draft) which is required by HWMP to manage peer links |
|
5173 | 59 |
* (it works like association mechanism in IEEE802.11). |
5167 | 60 |
* - FLAME (Forwarding LAyer for MEshing). |
5172 | 61 |
|
62 |
* While HWMP only works with 802.11-MAC, FLAME works with all types of network devices, which support |
|
5170
21bcd2217830
Some doxygen fixes (spelling, etc).
Andrey Mazo <mazo@iitp.ru>
parents:
5167
diff
changeset
|
63 |
* 48-bit MAC-addressing scheme. |
5172 | 64 |
* |
5170
21bcd2217830
Some doxygen fixes (spelling, etc).
Andrey Mazo <mazo@iitp.ru>
parents:
5167
diff
changeset
|
65 |
* \subsection Architecture Architecture of MAC-layer routing stack |
5172 | 66 |
* As already mentioned, MAC-layer routing consists of two tiers. |
67 |
* An ns3::MeshPointDevice which forwards frames by using an attached ns3::MeshL2RoutingProtocol forms |
|
68 |
* the upper tier. The interface between ns3::MeshPointDevice and the upper-layer protocols is inherited |
|
69 |
* from ns3::NetDevice class. The ns3::MeshPointDevice interacts with ns3::MeshL2RoutingProtocol as follows: |
|
70 |
* ns3::MeshPointDevice gives to ns3::MeshL2RoutingProtocol a frame with the source and destination addresses, |
|
71 |
* the network device index which the frame is received from, and a callback to be executed when the route is found. |
|
72 |
* The callback is needed because all routing queues are implemented inside ns3::MeshL2RoutingProtocol. |
|
73 |
* When the route is resolved, ns3::MeshL2RoutingProtocol returns the frame back to ns3::MeshPointDevice with the |
|
74 |
* network device index which the packet shall be sent to. All additional routing information is stored inside |
|
75 |
* the frame by means of tags. In the end, when all these routines are done, the frame goes to the lower tier. |
|
76 |
||
77 |
* The lower tier is responsible for filling MAC-specific headers. At present, we have only implemented the |
|
78 |
* lower tier which is specific for ns3::WifiNetDevice. This tier is implemented as two base classes: |
|
79 |
* ns3::MeshWifiInterfaceMac and ns3::MeshWifiInterfaceMacPlugin. The former is a new kind of WifiMac. If beacon |
|
80 |
* generation is enabled or disabled, it implements IEEE802.11s mesh functionality or a simple ad hoc functionality |
|
81 |
* of the MAC-high part of the WiFi model, respectively. The latter is a plug-in to L2Routing protocol. |
|
82 |
* It handles all outgoing and incoming frames, fills headers and make decisions to drop a frame or not. Also, it |
|
5173 | 83 |
* adds information elements to beacons specific to given L2Routing protocol, if needed. |
5172 | 84 |
* \image html MeshArchitecture.png "Overview of the Mesh MAC-layer routing system" |
85 |
* |
|
5170
21bcd2217830
Some doxygen fixes (spelling, etc).
Andrey Mazo <mazo@iitp.ru>
parents:
5167
diff
changeset
|
86 |
* \subsection NewProtocol Adding a new protocol |
5173 | 87 |
* This module requires all the network devices operate with ns3::Mac48Address addressing scheme. |
5172 | 88 |
* |
89 |
* To add a new L2Routing protocol, one needs to define the following: |
|
90 |
* - Write an upper part of the protocol inherited from ns3::MeshL2Routing. |
|
91 |
* - If the protocol works only with 802.11 MAC -- write a plug-in inherited from ns3::MeshWifiInterfaceMacPlugin |
|
92 |
* - If the protocol works with other types of network devices -- write your own plug-in (interface for |
|
93 |
* communication with other types of network devices is not implemented). |
|
5167 | 94 |
* |
5172 | 95 |
* When you implement a L2Routing protocol, remember that when you are at L2Routing tier, |
96 |
* you work with a frame without an LLC header, and when you are at plug-in tier using |
|
97 |
* ns3::MeshWifiInterfaceMacPlugin, an LLC header is already attached (by WifiNetDevice) |
|
98 |
* |
|
99 |
* \attention Note, when you use ns3::MeshWifiInterfaceMac, multiple plug-ins may be installed. |
|
100 |
* |
|
5167 | 101 |
* \subsection Statistics |
5172 | 102 |
* Each L2Routing protocol has a structure to capture statistics, Report and ResetStats methods. |
103 |
* This gives an opportunity to collect statistic to an *.xml file periodically. |
|
4852
123dc54d734e
Coding style changes: indentation (some fixes), spaces in operators, function
Andrey Mazo <mazo@iitp.ru>
parents:
4812
diff
changeset
|
104 |
*/ |