View | Details | Raw Unified | Return to bug 1817
Collapse All | Expand All

(-)a/src/internet/model/ipv4-l3-protocol.cc (-7 / +8 lines)
 Lines 91-98    Link Here 
91
}
91
}
92
92
93
Ipv4L3Protocol::Ipv4L3Protocol()
93
Ipv4L3Protocol::Ipv4L3Protocol()
94
  : m_identification (0)
95
96
{
94
{
97
  NS_LOG_FUNCTION (this);
95
  NS_LOG_FUNCTION (this);
98
}
96
}
 Lines 712-726    Link Here 
712
  if (mayFragment == true)
710
  if (mayFragment == true)
713
    {
711
    {
714
      ipHeader.SetMayFragment ();
712
      ipHeader.SetMayFragment ();
715
      ipHeader.SetIdentification (m_identification);
713
      ipHeader.SetIdentification (m_identification[protocol]);
716
      m_identification++;
714
      m_identification[protocol]++;
717
    }
715
    }
718
  else
716
  else
719
    {
717
    {
720
      ipHeader.SetDontFragment ();
718
      ipHeader.SetDontFragment ();
721
      // TBD:  set to zero here; will cause traces to change
719
      // RFC 6864 does not state anything about atomic datagrams
722
      ipHeader.SetIdentification (m_identification);
720
      // identification requirement:
723
      m_identification++;
721
      // >> Originating sources MAY set the IPv4 ID field of atomic datagrams
722
      //    to any value.
723
      ipHeader.SetIdentification (m_identification[protocol]);
724
      m_identification[protocol]++;
724
    }
725
    }
725
  if (Node::ChecksumEnabled ())
726
  if (Node::ChecksumEnabled ())
726
    {
727
    {
(-)a/src/internet/model/ipv4-l3-protocol.h (-1 / +1 lines)
 Lines 396-402    Link Here 
396
  Ipv4InterfaceList m_interfaces; //!< List of IPv4 interfaces.
396
  Ipv4InterfaceList m_interfaces; //!< List of IPv4 interfaces.
397
  uint8_t m_defaultTos;  //!< Default TOS
397
  uint8_t m_defaultTos;  //!< Default TOS
398
  uint8_t m_defaultTtl;  //!< Default TTL
398
  uint8_t m_defaultTtl;  //!< Default TTL
399
  uint16_t m_identification; //!< Identification
399
  std::map<uint8_t, uint16_t> m_identification; //!< Identification (for each protocol)
400
  Ptr<Node> m_node; //!< Node attached to stack.
400
  Ptr<Node> m_node; //!< Node attached to stack.
401
401
402
  /// Trace of sent packets
402
  /// Trace of sent packets

Return to bug 1817