Bug 278 - Ipv4Header does not print the protocol number
Ipv4Header does not print the protocol number
Status: RESOLVED FIXED
Product: ns-3
Classification: Unclassified
Component: network
pre-release
All All
: P3 normal
Assigned To: Kunal Kerkar
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2008-08-09 13:26 EDT by Mathieu Lacage
Modified: 2008-10-20 07:33 EDT (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Mathieu Lacage 2008-08-09 13:26:05 EDT
Printing the protocol number is going to change the output of all regression traces but it would be useful.
Comment 1 Mathieu Lacage 2008-08-09 13:27:02 EDT
A patch would look roughly like that. Is anyone against that ?


diff -r fc07f91a5da1 src/node/ipv4-header.cc
--- a/src/node/ipv4-header.cc   Fri Aug 08 22:15:25 2008 -0700
+++ b/src/node/ipv4-header.cc   Sat Aug 09 10:37:07 2008 -0700
@@ -221,6 +221,7 @@ Ipv4Header::Print (std::ostream &os) con
   os << "tos 0x" << std::hex << m_tos << std::dec << " "
      << "ttl " << m_ttl << " "
      << "id " << m_identification << " "
+     << "protocol " << m_protocol << " "
      << "offset " << m_fragmentOffset << " "
      << "flags [" << flags << "] "
      << "length: " << (m_payloadSize + 5 * 4)
Comment 2 Tom Henderson 2008-08-10 13:25:28 EDT
+1
Comment 3 Craig Dowell 2008-08-10 13:36:07 EDT
+1
Comment 4 Mathieu Lacage 2008-10-20 07:33:30 EDT
changeset a0946f209866