src/mesh/doc/mesh.h
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--
Moves csma.h and mesh.h to respective doc/ folders
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
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
87395e44ce29 Documenation fixes
Kirill Andreev <andreev@iitp.ru>
parents: 5171
diff changeset
    18
 * Authors:     Kirill Andreev <andreev@itp.ru>      
87395e44ce29 Documenation fixes
Kirill Andreev <andreev@iitp.ru>
parents: 5171
diff changeset
    19
 *              Aleksander Safonov <safa@iitp.ru>
87395e44ce29 Documenation fixes
Kirill Andreev <andreev@iitp.ru>
parents: 5171
diff changeset
    20
 *              Pavel Boyko <boyko@iitp.ru>
4812
adcb26652e1d Coding style changes: indentation, spaces.
Andrey Mazo <mazo@iitp.ru>
parents: 4804
diff changeset
    21
 *
5172
87395e44ce29 Documenation fixes
Kirill Andreev <andreev@iitp.ru>
parents: 5171
diff changeset
    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
a3ede758b713 Doxygen: fixed warnings
Kirill Andreev <andreev@iitp.ru>
parents: 4960
diff changeset
    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
87395e44ce29 Documenation fixes
Kirill Andreev <andreev@iitp.ru>
parents: 5171
diff changeset
    31
 * 
5173
21140a6e1389 doc fixes
Kirill Andreev <andreev@iitp.ru>
parents: 5172
diff changeset
    32
 * The main goal of this module is to provide MAC-layer routing functionality.
5172
87395e44ce29 Documenation fixes
Kirill Andreev <andreev@iitp.ru>
parents: 5171
diff changeset
    33
 
5173
21140a6e1389 doc fixes
Kirill Andreev <andreev@iitp.ru>
parents: 5172
diff changeset
    34
 * The main part of MAC-layer routing model is specific type of a network device -- 
21140a6e1389 doc fixes
Kirill Andreev <andreev@iitp.ru>
parents: 5172
diff changeset
    35
 * ns3::MeshPointDevice. Being an interface to upper-layer protocols, it provides routing functionality
5172
87395e44ce29 Documenation fixes
Kirill Andreev <andreev@iitp.ru>
parents: 5171
diff changeset
    36
 * hidden from upper-layer protocols, by means of ns3::MeshL2RoutingProtocol. 
87395e44ce29 Documenation fixes
Kirill Andreev <andreev@iitp.ru>
parents: 5171
diff changeset
    37
 * 
87395e44ce29 Documenation fixes
Kirill Andreev <andreev@iitp.ru>
parents: 5171
diff changeset
    38
 * Our model supports stations with multiple network devices handled by a single
87395e44ce29 Documenation fixes
Kirill Andreev <andreev@iitp.ru>
parents: 5171
diff changeset
    39
 * MAC-layer routing protocol. So, ns3::MeshPointDevice serves as an umbrella to multiple 
87395e44ce29 Documenation fixes
Kirill Andreev <andreev@iitp.ru>
parents: 5171
diff changeset
    40
 * network devices ("interfaces")  working under the same MAC-layer routing protocol.
87395e44ce29 Documenation fixes
Kirill Andreev <andreev@iitp.ru>
parents: 5171
diff changeset
    41
 * 
87395e44ce29 Documenation fixes
Kirill Andreev <andreev@iitp.ru>
parents: 5171
diff changeset
    42
 * Network devices may be of different types, each with a specific medium access method.
87395e44ce29 Documenation fixes
Kirill Andreev <andreev@iitp.ru>
parents: 5171
diff changeset
    43
 * So ns3::MeshL2RoutingProtocol consists of two parts: the one independent from the network device type, 
5173
21140a6e1389 doc fixes
Kirill Andreev <andreev@iitp.ru>
parents: 5172
diff changeset
    44
 * which we refer to as a routing protocol, and the other one depended on the network device type which
5172
87395e44ce29 Documenation fixes
Kirill Andreev <andreev@iitp.ru>
parents: 5171
diff changeset
    45
 * we refer to as a plug-in to the routing protocol.
5167
a3ede758b713 Doxygen: fixed warnings
Kirill Andreev <andreev@iitp.ru>
parents: 4960
diff changeset
    46
 * 
5173
21140a6e1389 doc fixes
Kirill Andreev <andreev@iitp.ru>
parents: 5172
diff changeset
    47
 * One can imagine a MAC-layer routing as a two-tier model. ns3::MeshL2RoutingProtocol and ns3::MeshPointDevice 
5172
87395e44ce29 Documenation fixes
Kirill Andreev <andreev@iitp.ru>
parents: 5171
diff changeset
    48
 * belong to the upper tier. The task of ns3::MeshPointDevice is to send, receive, and forward frames, 
87395e44ce29 Documenation fixes
Kirill Andreev <andreev@iitp.ru>
parents: 5171
diff changeset
    49
 * while the task of ns3::MeshL2RoutingProtocol is to resolve routes and keep frames waiting for route resolution. 
5173
21140a6e1389 doc fixes
Kirill Andreev <andreev@iitp.ru>
parents: 5172
diff changeset
    50
 * This functionality is independent from the types of underlying network devices ("interfaces").
5172
87395e44ce29 Documenation fixes
Kirill Andreev <andreev@iitp.ru>
parents: 5171
diff changeset
    51
 * 
87395e44ce29 Documenation fixes
Kirill Andreev <andreev@iitp.ru>
parents: 5171
diff changeset
    52
 * The lower tier implements the part of MAC-layer routing, specific for underlying network devices
87395e44ce29 Documenation fixes
Kirill Andreev <andreev@iitp.ru>
parents: 5171
diff changeset
    53
 * and their medium access control methods. For example, HWMP routing protocol in IEEE802.11s
87395e44ce29 Documenation fixes
Kirill Andreev <andreev@iitp.ru>
parents: 5171
diff changeset
    54
 * uses its own specific management frames.
5167
a3ede758b713 Doxygen: fixed warnings
Kirill Andreev <andreev@iitp.ru>
parents: 4960
diff changeset
    55
 * 
5172
87395e44ce29 Documenation fixes
Kirill Andreev <andreev@iitp.ru>
parents: 5171
diff changeset
    56
 * At present, two routing protocols are implemented in this module:
87395e44ce29 Documenation fixes
Kirill Andreev <andreev@iitp.ru>
parents: 5171
diff changeset
    57
 *      - HWMP (default routing protocol for IEEE802.11s standard) + Peer management protocol 
87395e44ce29 Documenation fixes
Kirill Andreev <andreev@iitp.ru>
parents: 5171
diff changeset
    58
 *      (also described in 802.11s standard draft) which is required by HWMP to manage peer links 
5173
21140a6e1389 doc fixes
Kirill Andreev <andreev@iitp.ru>
parents: 5172
diff changeset
    59
 *      (it works like association mechanism in IEEE802.11).
5167
a3ede758b713 Doxygen: fixed warnings
Kirill Andreev <andreev@iitp.ru>
parents: 4960
diff changeset
    60
 *      - FLAME (Forwarding LAyer for MEshing).
5172
87395e44ce29 Documenation fixes
Kirill Andreev <andreev@iitp.ru>
parents: 5171
diff changeset
    61
 
87395e44ce29 Documenation fixes
Kirill Andreev <andreev@iitp.ru>
parents: 5171
diff changeset
    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
87395e44ce29 Documenation fixes
Kirill Andreev <andreev@iitp.ru>
parents: 5171
diff changeset
    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
87395e44ce29 Documenation fixes
Kirill Andreev <andreev@iitp.ru>
parents: 5171
diff changeset
    66
 * As already mentioned, MAC-layer routing consists of two tiers.
87395e44ce29 Documenation fixes
Kirill Andreev <andreev@iitp.ru>
parents: 5171
diff changeset
    67
 * An ns3::MeshPointDevice which forwards frames by using an attached ns3::MeshL2RoutingProtocol forms 
87395e44ce29 Documenation fixes
Kirill Andreev <andreev@iitp.ru>
parents: 5171
diff changeset
    68
 * the upper tier. The interface between ns3::MeshPointDevice and the upper-layer protocols is inherited 
87395e44ce29 Documenation fixes
Kirill Andreev <andreev@iitp.ru>
parents: 5171
diff changeset
    69
 * from ns3::NetDevice class. The ns3::MeshPointDevice interacts with ns3::MeshL2RoutingProtocol as follows:
87395e44ce29 Documenation fixes
Kirill Andreev <andreev@iitp.ru>
parents: 5171
diff changeset
    70
 * ns3::MeshPointDevice gives to ns3::MeshL2RoutingProtocol a frame with the source and destination addresses,
87395e44ce29 Documenation fixes
Kirill Andreev <andreev@iitp.ru>
parents: 5171
diff changeset
    71
 * the network device index which the frame is received from, and a callback to be executed when the route is found.
87395e44ce29 Documenation fixes
Kirill Andreev <andreev@iitp.ru>
parents: 5171
diff changeset
    72
 * The callback is needed because all routing queues are implemented inside ns3::MeshL2RoutingProtocol. 
87395e44ce29 Documenation fixes
Kirill Andreev <andreev@iitp.ru>
parents: 5171
diff changeset
    73
 * When the route is resolved, ns3::MeshL2RoutingProtocol returns the frame back to ns3::MeshPointDevice with the 
87395e44ce29 Documenation fixes
Kirill Andreev <andreev@iitp.ru>
parents: 5171
diff changeset
    74
 * network device index which the packet shall be sent to. All additional routing information is stored inside 
87395e44ce29 Documenation fixes
Kirill Andreev <andreev@iitp.ru>
parents: 5171
diff changeset
    75
 * the frame by means of tags. In the end, when all these routines are done, the frame goes to the lower tier.
87395e44ce29 Documenation fixes
Kirill Andreev <andreev@iitp.ru>
parents: 5171
diff changeset
    76
 
87395e44ce29 Documenation fixes
Kirill Andreev <andreev@iitp.ru>
parents: 5171
diff changeset
    77
 * The lower tier is responsible for filling MAC-specific headers. At present, we have only implemented the
87395e44ce29 Documenation fixes
Kirill Andreev <andreev@iitp.ru>
parents: 5171
diff changeset
    78
 * lower tier which is specific for ns3::WifiNetDevice. This tier is implemented as two base classes: 
87395e44ce29 Documenation fixes
Kirill Andreev <andreev@iitp.ru>
parents: 5171
diff changeset
    79
 * ns3::MeshWifiInterfaceMac and ns3::MeshWifiInterfaceMacPlugin. The former is a new kind of WifiMac. If beacon 
87395e44ce29 Documenation fixes
Kirill Andreev <andreev@iitp.ru>
parents: 5171
diff changeset
    80
 * generation is enabled or disabled, it implements IEEE802.11s mesh functionality or a simple ad hoc functionality 
87395e44ce29 Documenation fixes
Kirill Andreev <andreev@iitp.ru>
parents: 5171
diff changeset
    81
 * of the MAC-high part of the WiFi model, respectively. The latter is a plug-in to L2Routing protocol. 
87395e44ce29 Documenation fixes
Kirill Andreev <andreev@iitp.ru>
parents: 5171
diff changeset
    82
 * It handles all outgoing and incoming frames, fills headers and make decisions to drop a frame or not. Also, it 
5173
21140a6e1389 doc fixes
Kirill Andreev <andreev@iitp.ru>
parents: 5172
diff changeset
    83
 * adds information elements to beacons specific to given L2Routing protocol, if needed.
5172
87395e44ce29 Documenation fixes
Kirill Andreev <andreev@iitp.ru>
parents: 5171
diff changeset
    84
 * \image html MeshArchitecture.png "Overview of the Mesh MAC-layer routing system"
87395e44ce29 Documenation fixes
Kirill Andreev <andreev@iitp.ru>
parents: 5171
diff changeset
    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
21140a6e1389 doc fixes
Kirill Andreev <andreev@iitp.ru>
parents: 5172
diff changeset
    87
 * This module requires all the network devices operate with ns3::Mac48Address addressing scheme.
5172
87395e44ce29 Documenation fixes
Kirill Andreev <andreev@iitp.ru>
parents: 5171
diff changeset
    88
 * 
87395e44ce29 Documenation fixes
Kirill Andreev <andreev@iitp.ru>
parents: 5171
diff changeset
    89
 * To add a new L2Routing protocol, one needs to define the following:
87395e44ce29 Documenation fixes
Kirill Andreev <andreev@iitp.ru>
parents: 5171
diff changeset
    90
 *      - Write an upper part of the protocol inherited from ns3::MeshL2Routing.
87395e44ce29 Documenation fixes
Kirill Andreev <andreev@iitp.ru>
parents: 5171
diff changeset
    91
 *      - If the protocol works only with 802.11 MAC -- write a plug-in inherited from ns3::MeshWifiInterfaceMacPlugin
87395e44ce29 Documenation fixes
Kirill Andreev <andreev@iitp.ru>
parents: 5171
diff changeset
    92
 *      - If the protocol works with other types of network devices -- write your own plug-in (interface for
87395e44ce29 Documenation fixes
Kirill Andreev <andreev@iitp.ru>
parents: 5171
diff changeset
    93
 *      communication with other types of network devices is not implemented).
5167
a3ede758b713 Doxygen: fixed warnings
Kirill Andreev <andreev@iitp.ru>
parents: 4960
diff changeset
    94
 * 
5172
87395e44ce29 Documenation fixes
Kirill Andreev <andreev@iitp.ru>
parents: 5171
diff changeset
    95
 * When you implement a L2Routing protocol, remember that when you are at L2Routing tier, 
87395e44ce29 Documenation fixes
Kirill Andreev <andreev@iitp.ru>
parents: 5171
diff changeset
    96
 * you work with a frame without an LLC header, and when you are at plug-in tier using 
87395e44ce29 Documenation fixes
Kirill Andreev <andreev@iitp.ru>
parents: 5171
diff changeset
    97
 * ns3::MeshWifiInterfaceMacPlugin, an LLC header is already attached (by WifiNetDevice)
87395e44ce29 Documenation fixes
Kirill Andreev <andreev@iitp.ru>
parents: 5171
diff changeset
    98
 * 
87395e44ce29 Documenation fixes
Kirill Andreev <andreev@iitp.ru>
parents: 5171
diff changeset
    99
 * \attention Note, when you use ns3::MeshWifiInterfaceMac, multiple plug-ins may be installed. 
87395e44ce29 Documenation fixes
Kirill Andreev <andreev@iitp.ru>
parents: 5171
diff changeset
   100
 * 
5167
a3ede758b713 Doxygen: fixed warnings
Kirill Andreev <andreev@iitp.ru>
parents: 4960
diff changeset
   101
 * \subsection Statistics
5172
87395e44ce29 Documenation fixes
Kirill Andreev <andreev@iitp.ru>
parents: 5171
diff changeset
   102
 * Each L2Routing protocol has a structure to capture statistics, Report and ResetStats methods.
87395e44ce29 Documenation fixes
Kirill Andreev <andreev@iitp.ru>
parents: 5171
diff changeset
   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
 */