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

(-)a/src/internet/model/tcp-header.cc (+6 lines)
 Lines 485-490   TcpHeader::AppendOption (Ptr<TcpOption> option) Link Here 
485
  return false;
485
  return false;
486
}
486
}
487
487
488
const TcpHeader::TcpOptionList&
489
TcpHeader::GetOptionList () const
490
{
491
  return m_options;
492
}
493
488
Ptr<TcpOption>
494
Ptr<TcpOption>
489
TcpHeader::GetOption (uint8_t kind) const
495
TcpHeader::GetOption (uint8_t kind) const
490
{
496
{
(-)a/src/internet/model/tcp-header.h (-1 / +8 lines)
 Lines 47-52   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
51
50
  /**
52
  /**
51
   * \brief Print a TCP header into an output stream
53
   * \brief Print a TCP header into an output stream
52
   *
54
   *
 Lines 186-191   public: Link Here 
186
  Ptr<TcpOption> GetOption (uint8_t kind) const;
188
  Ptr<TcpOption> GetOption (uint8_t kind) const;
187
189
188
  /**
190
  /**
191
   * \brief Get the list of option in this header
192
   * \return a const reference to the option list
193
   */
194
  const TcpOptionList& GetOptionList (void) const;
195
196
  /**
189
   * \brief Get the total length of appended options
197
   * \brief Get the total length of appended options
190
   * \return the total length of options appended to this TcpHeader
198
   * \return the total length of options appended to this TcpHeader
191
   */
199
   */
 Lines 341-347   private: Link Here 
341
  bool m_goodChecksum;    //!< Flag to indicate that checksum is correct
349
  bool m_goodChecksum;    //!< Flag to indicate that checksum is correct
342
350
343
  static const uint8_t m_maxOptionsLen = 40;         //!< Maximum options length
351
  static const uint8_t m_maxOptionsLen = 40;         //!< Maximum options length
344
  typedef std::list< Ptr<TcpOption> > TcpOptionList; //!< List of TcpOption
345
  TcpOptionList m_options;     //!< TcpOption present in the header
352
  TcpOptionList m_options;     //!< TcpOption present in the header
346
  uint8_t m_optionsLen;        //!< Tcp options length.
353
  uint8_t m_optionsLen;        //!< Tcp options length.
347
};
354
};
(-)a/src/internet/model/tcp-socket-base.cc (+16 lines)
 Lines 1440-1445   TcpSocketBase::ProcessEstablished (Ptr<Packet> packet, const TcpHeader& tcpHeade Link Here 
1440
}
1440
}
1441
1441
1442
void
1442
void
1443
TcpSocketBase::ReadOptions (const TcpHeader &tcpHeader)
1444
{
1445
  NS_LOG_FUNCTION (this << tcpHeader);
1446
  TcpHeader::TcpOptionList::const_iterator it;
1447
  const TcpHeader::TcpOptionList options = tcpHeader.GetOptionList ();
1448
1449
  for (it = options.begin (); it != options.end (); ++it)
1450
    {
1451
      const Ptr<TcpOption> option = (*it);
1452
      // Placeholder for a switch statement
1453
    }
1454
}
1455
1456
void
1443
TcpSocketBase::LimitedTransmit ()
1457
TcpSocketBase::LimitedTransmit ()
1444
{
1458
{
1445
  NS_LOG_FUNCTION (this);
1459
  NS_LOG_FUNCTION (this);
 Lines 1525-1530   TcpSocketBase::ReceivedAck (Ptr<Packet> packet, const TcpHeader& tcpHeader) Link Here 
1525
  NS_ASSERT (0 != (tcpHeader.GetFlags () & TcpHeader::ACK));
1539
  NS_ASSERT (0 != (tcpHeader.GetFlags () & TcpHeader::ACK));
1526
  NS_ASSERT (m_tcb->m_segmentSize > 0);
1540
  NS_ASSERT (m_tcb->m_segmentSize > 0);
1527
1541
1542
  ReadOptions (tcpHeader);
1543
1528
  SequenceNumber32 ackNumber = tcpHeader.GetAckNumber ();
1544
  SequenceNumber32 ackNumber = tcpHeader.GetAckNumber ();
1529
1545
1530
  NS_LOG_DEBUG ("ACK of " << ackNumber <<
1546
  NS_LOG_DEBUG ("ACK of " << ackNumber <<
(-)a/src/internet/model/tcp-socket-base.h (-2 / +10 lines)
 Lines 911-917   protected: Link Here 
911
   *
911
   *
912
   * \param tcpHeader TcpHeader to add options to
912
   * \param tcpHeader TcpHeader to add options to
913
   */
913
   */
914
  virtual void AddOptions (TcpHeader& tcpHeader);
914
  void AddOptions (TcpHeader& tcpHeader);
915
916
  /**
917
   * \brief Read TCP options begore Ack processing
918
   *
919
   * Timestamp and Window scale are managed in other pieces of code.
920
   *
921
   * \param tcpHeader Header of the segment
922
   */
923
  void ReadOptions (const TcpHeader &tcpHeader);
915
924
916
  /**
925
  /**
917
   * \brief Read and parse the Window scale option
926
   * \brief Read and parse the Window scale option
918
- 

Return to bug 2263