108 * at the specified interval; the output format is routing protocol-specific. |
108 * at the specified interval; the output format is routing protocol-specific. |
109 */ |
109 */ |
110 void PrintRoutingTableEvery (Time printInterval, Ptr<Node> node, Ptr<OutputStreamWrapper> stream) const; |
110 void PrintRoutingTableEvery (Time printInterval, Ptr<Node> node, Ptr<OutputStreamWrapper> stream) const; |
111 |
111 |
112 /** |
112 /** |
113 * \brief Request a specified routing protocol <T> from Ipv4RoutingProtocol protocol |
113 * \brief Request a specified routing protocol <T> from Ipv4RoutingProtocol protocol |
114 * |
114 * |
115 * If protocol is Ipv4ListRouting, then protocol will be searched in the list, |
115 * If protocol is Ipv4ListRouting, then protocol will be searched in the list, |
116 * otherwise a simple DynamicCast will be performed |
116 * otherwise a simple DynamicCast will be performed |
117 * |
117 * |
118 * \param protocol Smart pointer to Ipv4RoutingProtocol object |
118 * \param protocol Smart pointer to Ipv4RoutingProtocol object |
120 */ |
120 */ |
121 template<class T> |
121 template<class T> |
122 static Ptr<T> GetRouting (Ptr<Ipv4RoutingProtocol> protocol); |
122 static Ptr<T> GetRouting (Ptr<Ipv4RoutingProtocol> protocol); |
123 |
123 |
124 private: |
124 private: |
|
125 /** |
|
126 * \internal |
|
127 * |
|
128 * \brief prints the routing tables of a node. |
|
129 * \param node The node ptr for which we need the routing table to be printed |
|
130 * \param stream The output stream object to use |
|
131 * |
|
132 * This method calls the PrintRoutingTable() method of the |
|
133 * Ipv6RoutingProtocol stored in the Ipv6 object; |
|
134 * the output format is routing protocol-specific. |
|
135 */ |
125 void Print (Ptr<Node> node, Ptr<OutputStreamWrapper> stream) const; |
136 void Print (Ptr<Node> node, Ptr<OutputStreamWrapper> stream) const; |
|
137 |
|
138 /** |
|
139 * \internal |
|
140 * |
|
141 * \brief prints the routing tables of a node at regular intervals specified by user. |
|
142 * \param printInterval the time interval for which the routing table is supposed to be printed. |
|
143 * \param node The node ptr for which we need the routing table to be printed |
|
144 * \param stream The output stream object to use |
|
145 * |
|
146 * This method calls the PrintRoutingTable() method of the |
|
147 * Ipv6RoutingProtocol stored in the Ipv6 object, for the selected node |
|
148 * at the specified interval; the output format is routing protocol-specific. |
|
149 */ |
126 void PrintEvery (Time printInterval, Ptr<Node> node, Ptr<OutputStreamWrapper> stream) const; |
150 void PrintEvery (Time printInterval, Ptr<Node> node, Ptr<OutputStreamWrapper> stream) const; |
127 }; |
151 }; |
128 |
152 |
129 |
153 |
|
154 /** |
|
155 * \brief Request a specified routing protocol <T> from Ipv4RoutingProtocol protocol |
|
156 * |
|
157 * If protocol is Ipv4ListRouting, then protocol will be searched in the list, |
|
158 * otherwise a simple DynamicCast will be performed |
|
159 * |
|
160 * \param protocol Smart pointer to Ipv4RoutingProtocol object |
|
161 * \return a Smart Pointer to the requested protocol (zero if the protocol can't be found) |
|
162 */ |
130 template<class T> |
163 template<class T> |
131 Ptr<T> Ipv4RoutingHelper::GetRouting (Ptr<Ipv4RoutingProtocol> protocol) |
164 Ptr<T> Ipv4RoutingHelper::GetRouting (Ptr<Ipv4RoutingProtocol> protocol) |
132 { |
165 { |
133 Ptr<T> ret = DynamicCast<T> (protocol); |
166 Ptr<T> ret = DynamicCast<T> (protocol); |
134 if (ret == 0) |
167 if (ret == 0) |