OLD | NEW |
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) 2009 IITP RAS | 3 * Copyright (c) 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 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
71 currentStream += aodv->AssignStreams (currentStream); | 71 currentStream += aodv->AssignStreams (currentStream); |
72 continue; | 72 continue; |
73 } | 73 } |
74 // Aodv may also be in a list | 74 // Aodv may also be in a list |
75 Ptr<Ipv4ListRouting> list = DynamicCast<Ipv4ListRouting> (proto); | 75 Ptr<Ipv4ListRouting> list = DynamicCast<Ipv4ListRouting> (proto); |
76 if (list) | 76 if (list) |
77 { | 77 { |
78 int16_t priority; | 78 int16_t priority; |
79 Ptr<Ipv4RoutingProtocol> listProto; | 79 Ptr<Ipv4RoutingProtocol> listProto; |
80 Ptr<aodv::RoutingProtocol> listAodv; | 80 Ptr<aodv::RoutingProtocol> listAodv; |
81 for (uint32_t i = 0; i < list->GetNRoutingProtocols (); i++) | 81 for (uint32_t j = 0; j < list->GetNRoutingProtocols (); j++) |
82 { | 82 { |
83 listProto = list->GetRoutingProtocol (i, priority); | 83 listProto = list->GetRoutingProtocol (j, priority); |
84 listAodv = DynamicCast<aodv::RoutingProtocol> (listProto); | 84 listAodv = DynamicCast<aodv::RoutingProtocol> (listProto); |
85 if (listAodv) | 85 if (listAodv) |
86 { | 86 { |
87 currentStream += listAodv->AssignStreams (currentStream); | 87 currentStream += listAodv->AssignStreams (currentStream); |
88 break; | 88 break; |
89 } | 89 } |
90 } | 90 } |
91 } | 91 } |
92 } | 92 } |
93 return (currentStream - stream); | 93 return (currentStream - stream); |
94 } | 94 } |
95 | 95 |
96 } | 96 } |
OLD | NEW |