diff --git a/src/internet-node/tcp-header.cc b/src/internet-node/tcp-header.cc index f721082ca..f5c485999 100644 --- a/src/internet-node/tcp-header.cc +++ b/src/internet-node/tcp-header.cc @@ -150,11 +150,41 @@ TcpHeader::GetInstanceTypeId (void) const } void TcpHeader::Print (std::ostream &os) const { - //XXX + os << m_sourcePort << " > " << m_destinationPort; + if(m_flags!=0) + { + os<<" ["; + if((m_flags & FIN) != 0) + { + os<<" FIN "; + } + if((m_flags & SYN) != 0) + { + os<<" SYN "; + } + if((m_flags & RST) != 0) + { + os<<" RST "; + } + if((m_flags & PSH) != 0) + { + os<<" PSH "; + } + if((m_flags & ACK) != 0) + { + os<<" ACK "; + } + if((m_flags & URG) != 0) + { + os<<" URG "; + } + os<<"]"; + } + os<<" Seq="<