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

(-)a/src/network/model/socket.cc (-8 / +2 lines)
 Lines 388-401   Socket::IsManualIpv6HopLimit (void) const Link Here 
388
void
388
void
389
Socket::SetPriority (uint8_t priority)
389
Socket::SetPriority (uint8_t priority)
390
{
390
{
391
  if (priority <= 7)
391
  NS_LOG_FUNCTION (this << priority);
392
    {
392
  m_priority = priority;
393
      m_priority = priority;
394
    }
395
  else
396
    {
397
      NS_LOG_ERROR ("Cannot set a priority higher than 6");
398
    }
399
}
393
}
400
394
401
uint8_t
395
uint8_t
(-)a/src/network/model/socket.h (-3 / +6 lines)
 Lines 681-689   public: Link Here 
681
   * \brief Manually set the socket priority
681
   * \brief Manually set the socket priority
682
   *
682
   *
683
   * This method corresponds to using setsockopt () SO_PRIORITY of
683
   * This method corresponds to using setsockopt () SO_PRIORITY of
684
   * real network or BSD sockets.
684
   * real network or BSD sockets. On Linux, the socket priority can be
685
   * set to a value in the range [0..6], unless the user process has the
686
   * CAP_NET_ADMIN capability (see the man page for socket). ns-3 allows
687
   * users to set the socket priority to any 8-bit non-negative value,
688
   * which is equivalent to assuming that the CAP_NET_ADMIN capability is set.
685
   *
689
   *
686
   * \param priority The socket priority (in the range 0..6)
690
   * \param priority The socket priority
687
   */
691
   */
688
  void SetPriority (uint8_t priority);
692
  void SetPriority (uint8_t priority);
689
693
690
- 

Return to bug 2948