add support for attribtues to bug 34

This commit is contained in:
Mathieu Lacage committed 2008-06-05 15:56:23 -07:00
1 parent 4f674b463a
commit b7bb06a35c
4 files changed
+24 -8

No files matched your search

+3 -4
View File
@@ -29,10 +29,9 @@ namespace ns3 {
NS_OBJECT_ENSURE_REGISTERED (Ipv4Header);
bool Ipv4Header::m_calcChecksum = false;
Ipv4Header::Ipv4Header ()
: m_payloadSize (0),
: m_calcChecksum (false),
m_payloadSize (0),
m_identification (0),
m_tos (0),
m_ttl (0),
@@ -43,7 +42,7 @@ Ipv4Header::Ipv4Header ()
{}
void
Ipv4Header::EnableChecksums (void)
Ipv4Header::EnableChecksum (void)
{
m_calcChecksum = true;
}
+4 -4
View File
@@ -36,9 +36,9 @@ public:
*/
Ipv4Header ();
/**
* \brief Enable checksum calculation for IP (XXX currently has no effect)
* \brief Enable checksum calculation for this header.
*/
static void EnableChecksums (void);
void EnableChecksum (void);
/**
* \param size the size of the payload in bytes
*/
@@ -134,7 +134,7 @@ public:
* \returns true if the ipv4 checksum is correct, false otherwise.
*
* If Ipv4Header::EnableChecksums has not been called prior to
* creating this packet, this method will always return true.
* deserializing this header, this method will always return true.
*/
bool IsChecksumOk (void) const;
@@ -152,7 +152,7 @@ private:
MORE_FRAGMENTS = (1<<1)
};
static bool m_calcChecksum;
bool m_calcChecksum;
uint16_t m_payloadSize;
uint16_t m_identification;