|
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 |
|