network: Socket::IsManualIpTos can be replaced by Socket::GetIpTos

This commit is contained in:
Stefano Avallone
2016-07-14 15:59:55 +02:00
parent 83ed5e7bb6
commit a000561495
3 changed files with 2 additions and 18 deletions

View File

@@ -1028,7 +1028,7 @@ TcpSocketSmallAcks::SendEmptyPacket (uint8_t flags)
* if both options are set. Once the packet got to layer three, only
* the corresponding tags will be read.
*/
if (IsManualIpTos ())
if (GetIpTos ())
{
SocketIpTosTag ipTosTag;
ipTosTag.SetTos (GetIpTos ());

View File

@@ -43,8 +43,7 @@ Socket::GetTypeId (void)
}
Socket::Socket (void)
: m_manualIpTos (false),
m_manualIpTtl (false),
: m_manualIpTtl (false),
m_ipRecvTos (false),
m_ipRecvTtl (false),
m_manualIpv6Tclass (false),
@@ -368,12 +367,6 @@ bool Socket::IsRecvPktInfo () const
return m_recvPktInfo;
}
bool
Socket::IsManualIpTos (void) const
{
return m_manualIpTos;
}
bool
Socket::IsManualIpv6Tclass (void) const
{
@@ -451,7 +444,6 @@ Socket::SetIpTos (uint8_t tos)
{
Address address;
GetSockName (address);
m_manualIpTos = true;
if (GetSocketType () == NS3_SOCK_STREAM)
{
// preserve the least two significant bits of the current TOS

View File

@@ -1049,13 +1049,6 @@ protected:
// inherited function, no doc necessary
virtual void DoDispose (void);
/**
* \brief Checks if the socket has a specific IPv4 ToS set
*
* \returns true if the socket has a IPv4 ToS set, false otherwise.
*/
bool IsManualIpTos (void) const;
/**
* \brief Checks if the socket has a specific IPv6 Tclass set
*
@@ -1095,7 +1088,6 @@ private:
uint8_t m_priority; //!< the socket priority
//IPv4 options
bool m_manualIpTos; //!< socket has IPv4 TOS set
bool m_manualIpTtl; //!< socket has IPv4 TTL set
bool m_ipRecvTos; //!< socket forwards IPv4 TOS tag to L4
bool m_ipRecvTtl; //!< socket forwards IPv4 TTL tag to L4