LEFT | RIGHT |
(no file at all) | |
1 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */ | 1 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */ |
2 /* | 2 /* |
3 * Copyright (c) 2008,2009 IITP RAS | 3 * Copyright (c) 2008,2009 IITP RAS |
4 * | 4 * |
5 * This program is free software; you can redistribute it and/or modify | 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 | 6 * it under the terms of the GNU General Public License version 2 as |
7 * published by the Free Software Foundation; | 7 * published by the Free Software Foundation; |
8 * | 8 * |
9 * This program is distributed in the hope that it will be useful, | 9 * This program is distributed in the hope that it will be useful, |
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of | 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of |
(...skipping 26 matching lines...) Expand all Loading... |
37 * \brief Interface for L2 mesh routing protocol and mesh point communication. | 37 * \brief Interface for L2 mesh routing protocol and mesh point communication. |
38 * | 38 * |
39 * Every mesh routing protocol must implement this interface. Each mesh point (M
eshPointDevice) is supposed | 39 * Every mesh routing protocol must implement this interface. Each mesh point (M
eshPointDevice) is supposed |
40 * to know single L2RoutingProtocol to work with, see MeshPointDevice::SetRoutin
gProtocol (). | 40 * to know single L2RoutingProtocol to work with, see MeshPointDevice::SetRoutin
gProtocol (). |
41 * | 41 * |
42 * This interface is similar to ipv4 routing protocol base class. | 42 * This interface is similar to ipv4 routing protocol base class. |
43 */ | 43 */ |
44 class MeshL2RoutingProtocol : public Object | 44 class MeshL2RoutingProtocol : public Object |
45 { | 45 { |
46 public: | 46 public: |
47 /// Never forget to support NS3 object model | 47 /** |
| 48 * \brief Get the type ID. |
| 49 * \return the object TypeId |
| 50 */ |
48 static TypeId GetTypeId (); | 51 static TypeId GetTypeId (); |
49 /// virtual D-tor for subclasses | 52 /// virtual D-tor for subclasses |
50 virtual ~MeshL2RoutingProtocol (); | 53 virtual ~MeshL2RoutingProtocol (); |
51 /** | 54 /** |
52 * Callback to be invoked when route discovery procedure is completed. | 55 * Callback to be invoked when route discovery procedure is completed. |
53 * | 56 * |
54 * \param flag indicating whether a route was actually found and all ne
eded information is | 57 * \param flag indicating whether a route was actually found and all ne
eded information is |
55 * added to the packet successfully | 58 * added to the packet successfully |
56 * | 59 * |
57 * \param packet for which the route was resolved. All routing informatio
n for MAC layer | 60 * \param packet for which the route was resolved. All routing informatio
n for MAC layer |
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
105 * \param fromIface the incoming interface of the packet | 108 * \param fromIface the incoming interface of the packet |
106 * \param source source address | 109 * \param source source address |
107 * \param destination destination address | 110 * \param destination destination address |
108 * \param packet the packet to be handled | 111 * \param packet the packet to be handled |
109 * \param protocolType protocol ID, needed to form a proper MAC-layer header | 112 * \param protocolType protocol ID, needed to form a proper MAC-layer header |
110 * \attention protocol type is passed by reference, because may be | 113 * \attention protocol type is passed by reference, because may be |
111 * changed | 114 * changed |
112 */ | 115 */ |
113 virtual bool RemoveRoutingStuff (uint32_t fromIface, const Mac48Address source
, const Mac48Address destination, Ptr< | 116 virtual bool RemoveRoutingStuff (uint32_t fromIface, const Mac48Address source
, const Mac48Address destination, Ptr< |
114 Packet> packet, uint16_t & protocolType) =
0; | 117 Packet> packet, uint16_t & protocolType) =
0; |
115 /// Set host mesh point, analog of SetNode (...) methods for upper layer proto
cols. | 118 /** |
| 119 * Set host mesh point, analog of SetNode (...) methods for upper layer protoc
ols. |
| 120 * |
| 121 * \param mp the mesh point device |
| 122 */ |
116 void | 123 void |
117 SetMeshPoint (Ptr<MeshPointDevice> mp); | 124 SetMeshPoint (Ptr<MeshPointDevice> mp); |
118 /// Each mesh protocol must be installed on the mesh point to work. | 125 /** |
| 126 * Each mesh protocol must be installed on the mesh point to work. |
| 127 * |
| 128 * \returns the mesh point device |
| 129 */ |
119 Ptr<MeshPointDevice> | 130 Ptr<MeshPointDevice> |
120 GetMeshPoint () const; | 131 GetMeshPoint () const; |
121 protected: | 132 protected: |
122 /// Host mesh point | 133 /// Host mesh point |
123 Ptr<MeshPointDevice> m_mp; | 134 Ptr<MeshPointDevice> m_mp; |
124 }; | 135 }; |
125 } // namespace ns3 | 136 } // namespace ns3 |
126 #endif | 137 #endif |
LEFT | RIGHT |