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

(-)a/src/internet/model/ipv4-l3-protocol.cc (-7 / +8 lines)
 Lines 90-97    Link Here 
90
}
90
}
91
91
92
Ipv4L3Protocol::Ipv4L3Protocol()
92
Ipv4L3Protocol::Ipv4L3Protocol()
93
  : m_identification (0)
94
95
{
93
{
96
  NS_LOG_FUNCTION (this);
94
  NS_LOG_FUNCTION (this);
97
}
95
}
 Lines 740-754    Link Here 
740
  if (mayFragment == true)
738
  if (mayFragment == true)
741
    {
739
    {
742
      ipHeader.SetMayFragment ();
740
      ipHeader.SetMayFragment ();
743
      ipHeader.SetIdentification (m_identification);
741
      ipHeader.SetIdentification (m_identification[protocol]);
744
      m_identification++;
742
      m_identification[protocol]++;
745
    }
743
    }
746
  else
744
  else
747
    {
745
    {
748
      ipHeader.SetDontFragment ();
746
      ipHeader.SetDontFragment ();
749
      // TBD:  set to zero here; will cause traces to change
747
      // RFC 6864 does not state anything about atomic datagrams
750
      ipHeader.SetIdentification (m_identification);
748
      // identification requirement:
751
      m_identification++;
749
      // >> Originating sources MAY set the IPv4 ID field of atomic datagrams
750
      //    to any value.
751
      ipHeader.SetIdentification (m_identification[protocol]);
752
      m_identification[protocol]++;
752
    }
753
    }
753
  if (Node::ChecksumEnabled ())
754
  if (Node::ChecksumEnabled ())
754
    {
755
    {
(-)a/src/internet/model/ipv4-l3-protocol.h (-1 / +1 lines)
 Lines 408-414    Link Here 
408
  Ipv4InterfaceList m_interfaces; //!< List of IPv4 interfaces.
408
  Ipv4InterfaceList m_interfaces; //!< List of IPv4 interfaces.
409
  uint8_t m_defaultTos;  //!< Default TOS
409
  uint8_t m_defaultTos;  //!< Default TOS
410
  uint8_t m_defaultTtl;  //!< Default TTL
410
  uint8_t m_defaultTtl;  //!< Default TTL
411
  uint16_t m_identification; //!< Identification
411
  std::map<uint8_t, uint16_t> m_identification; //!< Identification (for each protocol)
412
  Ptr<Node> m_node; //!< Node attached to stack.
412
  Ptr<Node> m_node; //!< Node attached to stack.
413
413
414
  /// Trace of sent packets
414
  /// Trace of sent packets

Return to bug 1817