TransportAddress.cc File Reference

#include <omnetpp.h>
#include "TransportAddress.h"
#include <oversim_mapset.h>
#include <IPvXAddress.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:
os the ostream
n the TransportAddress
Returns:
the output stream

Definition at line 33 of file TransportAddress.cc.

00034 {
00035     if (n.isUnspecified()) {
00036         os << "<addr unspec>";
00037     } else {
00038         os << n.ip << ":" << n.port;
00039     }
00040 
00041     if (n.getSourceRouteSize() > 0) {
00042         os << "(SR:";
00043         for (size_t i = 0; i < n.getSourceRouteSize(); i++) {
00044             os << " " << n.getSourceRoute()[i].ip << ":"
00045                << n.getSourceRoute()[i].port;
00046         }
00047         os << ")";
00048     }
00049 
00050     return os;
00051 };

Generated on Wed May 26 16:21:15 2010 for OverSim by  doxygen 1.6.3