improve pretty-printing output.
This commit is contained in:
@@ -786,11 +786,10 @@ WifiMacHeader::GetInstanceTypeId (void) const
|
||||
void
|
||||
WifiMacHeader::PrintFrameControl (std::ostream &os) const
|
||||
{
|
||||
os << "("
|
||||
<< "ToDS=" << m_ctrlToDs << ", FromDS=" << m_ctrlFromDs
|
||||
os << "ToDS=" << m_ctrlToDs << ", FromDS=" << m_ctrlFromDs
|
||||
<< ", MoreFrag=" << m_ctrlMoreFrag << ", Retry=" << m_ctrlRetry
|
||||
<< ", MoreData=" << m_ctrlMoreData
|
||||
<< ")";
|
||||
;
|
||||
}
|
||||
|
||||
void
|
||||
|
||||
@@ -102,24 +102,20 @@ ArpHeader::Print (std::ostream &os) const
|
||||
{
|
||||
if (IsRequest ())
|
||||
{
|
||||
os << "("
|
||||
<< "request "
|
||||
os << "request "
|
||||
<< "source mac: " << m_macSource << " "
|
||||
<< "source ipv4: " << m_ipv4Source << " "
|
||||
<< "dest ipv4: " << m_ipv4Dest
|
||||
<< ")"
|
||||
;
|
||||
}
|
||||
else
|
||||
{
|
||||
NS_ASSERT (IsReply ());
|
||||
os << "("
|
||||
<< "reply "
|
||||
os << "reply "
|
||||
<< "source mac: " << m_macSource << " "
|
||||
<< "source ipv4: " << m_ipv4Source << " "
|
||||
<< "dest mac: " << m_macDest << " "
|
||||
<< "dest ipv4: " <<m_ipv4Dest
|
||||
<< ")"
|
||||
;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -220,14 +220,13 @@ Ipv4Header::Print (std::ostream &os) const
|
||||
{
|
||||
flags = "XX";
|
||||
}
|
||||
os << "("
|
||||
<< "tos 0x" << std::hex << m_tos << std::dec << " "
|
||||
os << "tos 0x" << std::hex << m_tos << std::dec << " "
|
||||
<< "ttl " << m_ttl << " "
|
||||
<< "id " << m_identification << " "
|
||||
<< "offset " << m_fragmentOffset << " "
|
||||
<< "flags [" << flags << "] "
|
||||
<< "length: " << (m_payloadSize + 5 * 4)
|
||||
<< ") "
|
||||
<< " "
|
||||
<< m_source << " > " << m_destination
|
||||
;
|
||||
}
|
||||
|
||||
@@ -110,9 +110,8 @@ UdpHeader::GetInstanceTypeId (void) const
|
||||
void
|
||||
UdpHeader::Print (std::ostream &os) const
|
||||
{
|
||||
os << "("
|
||||
<< "length: " << m_payloadSize + GetSerializedSize ()
|
||||
<< ") "
|
||||
os << "length: " << m_payloadSize + GetSerializedSize ()
|
||||
<< " "
|
||||
<< m_sourcePort << " > " << m_destinationPort
|
||||
;
|
||||
}
|
||||
|
||||
@@ -120,7 +120,7 @@ EthernetHeader::Print (std::ostream &os) const
|
||||
// ethernet, right ?
|
||||
if (m_enPreambleSfd)
|
||||
{
|
||||
os << " preamble/sfd=" << m_preambleSfd << ",";
|
||||
os << "preamble/sfd=" << m_preambleSfd << ",";
|
||||
}
|
||||
|
||||
os << " length/type=0x" << std::hex << m_lengthType << std::dec
|
||||
|
||||
@@ -103,7 +103,7 @@ EthernetTrailer::GetInstanceTypeId (void) const
|
||||
void
|
||||
EthernetTrailer::Print (std::ostream &os) const
|
||||
{
|
||||
os << " fcs=" << m_fcs;
|
||||
os << "fcs=" << m_fcs;
|
||||
}
|
||||
uint32_t
|
||||
EthernetTrailer::GetSerializedSize (void) const
|
||||
|
||||
@@ -64,11 +64,10 @@ LlcSnapHeader::GetInstanceTypeId (void) const
|
||||
void
|
||||
LlcSnapHeader::Print (std::ostream &os) const
|
||||
{
|
||||
os << "(type 0x";
|
||||
os << "type 0x";
|
||||
os.setf (std::ios::hex, std::ios::basefield);
|
||||
os << m_etherType;
|
||||
os.setf (std::ios::dec, std::ios::basefield);
|
||||
os << ")";
|
||||
}
|
||||
|
||||
void
|
||||
|
||||
Reference in New Issue
Block a user