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

(-)a/src/internet/model/tcp-header.cc (-3 / +3 lines)
 Lines 460-466   TcpHeader::CalculateHeaderLength () const Link Here 
460
}
460
}
461
461
462
bool
462
bool
463
TcpHeader::AppendOption (Ptr<TcpOption> option)
463
TcpHeader::AppendOption (Ptr<const TcpOption> option)
464
{
464
{
465
  if (m_optionsLen + option->GetSerializedSize () <= m_maxOptionsLen)
465
  if (m_optionsLen + option->GetSerializedSize () <= m_maxOptionsLen)
466
    {
466
    {
 Lines 491-498   TcpHeader::GetOptionList () const Link Here 
491
  return m_options;
491
  return m_options;
492
}
492
}
493
493
494
Ptr<TcpOption>
494
Ptr<const TcpOption>
495
TcpHeader::GetOption (uint8_t kind) const
495
TcpHeader::GetOption(uint8_t kind) const
496
{
496
{
497
  TcpOptionList::const_iterator i;
497
  TcpOptionList::const_iterator i;
498
498
(-)a/src/internet/model/tcp-header.h (-3 / +3 lines)
 Lines 47-53   public: Link Here 
47
  TcpHeader ();
47
  TcpHeader ();
48
  virtual ~TcpHeader ();
48
  virtual ~TcpHeader ();
49
49
50
  typedef std::list< Ptr<TcpOption> > TcpOptionList; //!< List of TcpOption
50
  typedef std::list< Ptr<const TcpOption> > TcpOptionList; //!< List of TcpOption
51
51
52
  /**
52
  /**
53
   * \brief Print a TCP header into an output stream
53
   * \brief Print a TCP header into an output stream
 Lines 185-191   public: Link Here 
185
   * \param kind the option to retrieve
185
   * \param kind the option to retrieve
186
   * \return Whether the header contains a specific kind of option, or 0
186
   * \return Whether the header contains a specific kind of option, or 0
187
   */
187
   */
188
  Ptr<TcpOption> GetOption (uint8_t kind) const;
188
  Ptr<const TcpOption> GetOption (uint8_t kind) const;
189
189
190
  /**
190
  /**
191
   * \brief Get the list of option in this header
191
   * \brief Get the list of option in this header
 Lines 217-223   public: Link Here 
217
   * \param option The option to append
217
   * \param option The option to append
218
   * \return true if option has been appended, false otherwise
218
   * \return true if option has been appended, false otherwise
219
   */
219
   */
220
  bool AppendOption (Ptr<TcpOption> option);
220
  bool AppendOption (Ptr<const TcpOption> option);
221
221
222
  /**
222
  /**
223
   * \brief Initialize the TCP checksum.
223
   * \brief Initialize the TCP checksum.
(-)a/src/internet/model/tcp-socket-base.cc (-4 / +3 lines)
 Lines 1448-1454   TcpSocketBase::ReadOptions (const TcpHeader &tcpHeader) Link Here 
1448
1448
1449
  for (it = options.begin (); it != options.end (); ++it)
1449
  for (it = options.begin (); it != options.end (); ++it)
1450
    {
1450
    {
1451
      const Ptr<TcpOption> option = (*it);
1451
      const Ptr<const TcpOption> option = (*it);
1452
      // Placeholder for a switch statement
1452
      // Placeholder for a switch statement
1453
    }
1453
    }
1454
}
1454
}
 Lines 2858-2865   TcpSocketBase::EstimateRtt (const TcpHeader& tcpHeader) Link Here 
2858
        { // Ok to use this sample
2858
        { // Ok to use this sample
2859
          if (m_timestampEnabled && tcpHeader.HasOption (TcpOption::TS))
2859
          if (m_timestampEnabled && tcpHeader.HasOption (TcpOption::TS))
2860
            {
2860
            {
2861
              Ptr<TcpOptionTS> ts;
2861
              Ptr<const TcpOptionTS> ts;
2862
              ts = DynamicCast<TcpOptionTS> (tcpHeader.GetOption (TcpOption::TS));
2862
              ts = DynamicCast<const TcpOptionTS> (tcpHeader.GetOption (TcpOption::TS));
2863
              m = TcpOptionTS::ElapsedTimeFromTsValue (ts->GetEcho ());
2863
              m = TcpOptionTS::ElapsedTimeFromTsValue (ts->GetEcho ());
2864
            }
2864
            }
2865
          else
2865
          else
2866
- 

Return to bug 2263