OverSim
TransportAddress.cc File Reference
#include <omnetpp.h>
#include "TransportAddress.h"

Go to the source code of this file.

Functions

std::ostream & operator<< (std::ostream &os, const TransportAddress &n)

Detailed Description

Author
Markus Mauch
Sebastian Mies

Definition in file TransportAddress.cc.

Function Documentation

std::ostream& operator<< ( std::ostream &  os,
const TransportAddress n 
)
Parameters
osthe ostream
nthe TransportAddress
Returns
the output stream

Definition at line 33 of file TransportAddress.cc.

{
if (n.isUnspecified()) {
os << "<addr unspec>";
} else {
os << n.ip << ":" << n.port;
}
if (n.getSourceRouteSize() > 0) {
os << "(SR:";
for (size_t i = 0; i < n.getSourceRouteSize(); i++) {
os << " " << n.getSourceRoute()[i].ip << ":"
<< n.getSourceRoute()[i].port;
}
os << ")";
}
return os;
};