tcp: SackBlock can be printed with NS_LOG macro
This commit is contained in:
@@ -156,4 +156,13 @@ TcpOptionSack::GetSackList (void) const
|
||||
return m_sackList;
|
||||
}
|
||||
|
||||
std::ostream &
|
||||
operator<< (std::ostream & os, TcpOptionSack::SackBlock const & sackBlock)
|
||||
{
|
||||
std::stringstream ss;
|
||||
ss << "[" << sackBlock.first << ";" << sackBlock.second << "]";
|
||||
os << ss.str ();
|
||||
return os;
|
||||
}
|
||||
|
||||
} // namespace ns3
|
||||
|
||||
@@ -96,6 +96,15 @@ protected:
|
||||
SackList m_sackList; //!< the list of SACK blocks
|
||||
};
|
||||
|
||||
/**
|
||||
* \brief Output operator.
|
||||
* \param os The output stream.
|
||||
* \param sackBlock the block to print.
|
||||
* \returns The output stream.
|
||||
*/
|
||||
std::ostream & operator<< (std::ostream & os,
|
||||
TcpOptionSack::SackBlock const & sackBlock);
|
||||
|
||||
} // namespace ns3
|
||||
|
||||
#endif /* TCP_OPTION_SACK */
|
||||
|
||||
Reference in New Issue
Block a user