View | Details | Raw Unified | Return to bug 2545
Collapse All | Expand All

(-)a/src/flow-monitor/model/ipv4-flow-classifier.cc (-7 / +10 lines)
 Lines 185-202   Ipv4FlowClassifier::FindFlow (FlowId flowId) const Link Here 
185
  return retval;
185
  return retval;
186
}
186
}
187
187
188
inline static void
189
INDENT (std::ostream &os, uint32_t level)
190
{
191
  for (uint32_t __xpto = 0; __xpto < level; __xpto++) os << ' ';
192
}
193
188
void
194
void
189
Ipv4FlowClassifier::SerializeToXmlStream (std::ostream &os, int indent) const
195
Ipv4FlowClassifier::SerializeToXmlStream (std::ostream &os, int indent) const
190
{
196
{
191
#define INDENT(level) for (int __xpto = 0; __xpto < level; __xpto++) os << ' ';
197
  NS_ASSERT (indent > 0);
192
198
  INDENT (os, indent); os << "<Ipv4FlowClassifier>\n";
193
  INDENT (indent); os << "<Ipv4FlowClassifier>\n";
194
199
195
  indent += 2;
200
  indent += 2;
196
  for (std::map<FiveTuple, FlowId>::const_iterator
201
  for (std::map<FiveTuple, FlowId>::const_iterator
197
       iter = m_flowMap.begin (); iter != m_flowMap.end (); iter++)
202
       iter = m_flowMap.begin (); iter != m_flowMap.end (); iter++)
198
    {
203
    {
199
      INDENT (indent);
204
      INDENT (os, indent);
200
      os << "<Flow flowId=\"" << iter->second << "\""
205
      os << "<Flow flowId=\"" << iter->second << "\""
201
         << " sourceAddress=\"" << iter->first.sourceAddress << "\""
206
         << " sourceAddress=\"" << iter->first.sourceAddress << "\""
202
         << " destinationAddress=\"" << iter->first.destinationAddress << "\""
207
         << " destinationAddress=\"" << iter->first.destinationAddress << "\""
 Lines 207-215   Ipv4FlowClassifier::SerializeToXmlStream (std::ostream &os, int indent) const Link Here 
207
    }
212
    }
208
213
209
  indent -= 2;
214
  indent -= 2;
210
  INDENT (indent); os << "</Ipv4FlowClassifier>\n";
215
  INDENT (os, indent); os << "</Ipv4FlowClassifier>\n";
211
212
#undef INDENT
213
}
216
}
214
217
215
218
(-)a/src/flow-monitor/model/ipv6-flow-classifier.cc (-7 / +10 lines)
 Lines 186-203   Ipv6FlowClassifier::FindFlow (FlowId flowId) const Link Here 
186
  return retval;
186
  return retval;
187
}
187
}
188
188
189
inline static void
190
INDENT (std::ostream &os, uint32_t level)
191
{
192
  for (uint32_t __xpto = 0; __xpto < level; __xpto++) os << ' ';
193
}
194
189
void
195
void
190
Ipv6FlowClassifier::SerializeToXmlStream (std::ostream &os, int indent) const
196
Ipv6FlowClassifier::SerializeToXmlStream (std::ostream &os, int indent) const
191
{
197
{
192
#define INDENT(level) for (int __xpto = 0; __xpto < level; __xpto++) os << ' ';
198
  NS_ASSERT (indent > 0);
193
199
  INDENT (os, indent); os << "<Ipv6FlowClassifier>\n";
194
  INDENT (indent); os << "<Ipv6FlowClassifier>\n";
195
200
196
  indent += 2;
201
  indent += 2;
197
  for (std::map<FiveTuple, FlowId>::const_iterator
202
  for (std::map<FiveTuple, FlowId>::const_iterator
198
       iter = m_flowMap.begin (); iter != m_flowMap.end (); iter++)
203
       iter = m_flowMap.begin (); iter != m_flowMap.end (); iter++)
199
    {
204
    {
200
      INDENT (indent);
205
      INDENT (os, indent);
201
      os << "<Flow flowId=\"" << iter->second << "\""
206
      os << "<Flow flowId=\"" << iter->second << "\""
202
         << " sourceAddress=\"" << iter->first.sourceAddress << "\""
207
         << " sourceAddress=\"" << iter->first.sourceAddress << "\""
203
         << " destinationAddress=\"" << iter->first.destinationAddress << "\""
208
         << " destinationAddress=\"" << iter->first.destinationAddress << "\""
 Lines 208-216   Ipv6FlowClassifier::SerializeToXmlStream (std::ostream &os, int indent) const Link Here 
208
    }
213
    }
209
214
210
  indent -= 2;
215
  indent -= 2;
211
  INDENT (indent); os << "</Ipv6FlowClassifier>\n";
216
  INDENT (os, indent); os << "</Ipv6FlowClassifier>\n";
212
213
#undef INDENT
214
}
217
}
215
218
216
219

Return to bug 2545