OLD | NEW |
1 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */ | 1 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */ |
2 /* | 2 /* |
3 * Copyright (c) 2007 INRIA | 3 * Copyright (c) 2007 INRIA |
4 * | 4 * |
5 * This program is free software; you can redistribute it and/or modify | 5 * This program is free software; you can redistribute it and/or modify |
6 * it under the terms of the GNU General Public License version 2 as | 6 * it under the terms of the GNU General Public License version 2 as |
7 * published by the Free Software Foundation; | 7 * published by the Free Software Foundation; |
8 * | 8 * |
9 * This program is distributed in the hope that it will be useful, | 9 * This program is distributed in the hope that it will be useful, |
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of | 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of |
(...skipping 854 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
865 Ptr<Ipv4Interface> incomingInterface) | 865 Ptr<Ipv4Interface> incomingInterface) |
866 { | 866 { |
867 NS_LOG_FUNCTION (this << packet << header << port); | 867 NS_LOG_FUNCTION (this << packet << header << port); |
868 | 868 |
869 if (m_shutdownRecv) | 869 if (m_shutdownRecv) |
870 { | 870 { |
871 return; | 871 return; |
872 } | 872 } |
873 | 873 |
874 // Should check via getsockopt ().. | 874 // Should check via getsockopt ().. |
875 if (this->m_recvpktinfo) | 875 if (IsRecvPktInfo ()) |
876 { | 876 { |
877 Ipv4PacketInfoTag tag; | 877 Ipv4PacketInfoTag tag; |
878 packet->RemovePacketTag (tag); | 878 packet->RemovePacketTag (tag); |
879 tag.SetRecvIf (incomingInterface->GetDevice ()->GetIfIndex ()); | 879 tag.SetRecvIf (incomingInterface->GetDevice ()->GetIfIndex ()); |
880 packet->AddPacketTag (tag); | 880 packet->AddPacketTag (tag); |
881 } | 881 } |
882 | 882 |
883 if ((m_rxAvailable + packet->GetSize ()) <= m_rcvBufSize) | 883 if ((m_rxAvailable + packet->GetSize ()) <= m_rcvBufSize) |
884 { | 884 { |
885 Address address = InetSocketAddress (header.GetSource (), port); | 885 Address address = InetSocketAddress (header.GetSource (), port); |
(...skipping 154 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1040 } | 1040 } |
1041 | 1041 |
1042 bool | 1042 bool |
1043 UdpSocketImpl::GetAllowBroadcast () const | 1043 UdpSocketImpl::GetAllowBroadcast () const |
1044 { | 1044 { |
1045 return m_allowBroadcast; | 1045 return m_allowBroadcast; |
1046 } | 1046 } |
1047 | 1047 |
1048 | 1048 |
1049 } // namespace ns3 | 1049 } // namespace ns3 |
OLD | NEW |