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

(-)a/src/internet/model/nsc-tcp-socket-impl.cc (-1 / +1 lines)
 Lines 633-639    Link Here 
633
  SocketAddressTag tag;
633
  SocketAddressTag tag;
634
634
635
  tag.SetAddress (m_peerAddress);
635
  tag.SetAddress (m_peerAddress);
636
  p->AddPacketTag (tag);
636
  p->ReplacePacketTag (tag);
637
  m_deliveryQueue.push (p);
637
  m_deliveryQueue.push (p);
638
  m_rxAvailable += p->GetSize ();
638
  m_rxAvailable += p->GetSize ();
639
639
(-)a/src/internet/model/tcp-socket-base.cc (-1 / +1 lines)
 Lines 874-880    Link Here 
874
        {
874
        {
875
          tag.SetAddress (Inet6SocketAddress (m_endPoint6->GetPeerAddress (), m_endPoint6->GetPeerPort ()));
875
          tag.SetAddress (Inet6SocketAddress (m_endPoint6->GetPeerAddress (), m_endPoint6->GetPeerPort ()));
876
        }
876
        }
877
      outPacket->AddPacketTag (tag);
877
      outPacket->ReplacePacketTag (tag);
878
    }
878
    }
879
  return outPacket;
879
  return outPacket;
880
}
880
}
(-)a/src/internet/model/tcp-socket.h (+9 lines)
 Lines 42-47    Link Here 
42
 *
42
 *
43
 * This class exists solely for hosting TcpSocket attributes that can
43
 * This class exists solely for hosting TcpSocket attributes that can
44
 * be reused across different implementations.
44
 * be reused across different implementations.
45
 *  
46
 * Socket data that is read from this socket using the methods returing
47
 * an ns3::Packet object (i.e., Recv (), RecvMsg (), RecvFrom ()) will
48
 * return Packet objects with a SocketAddressTag attached as a packet tag.
49
 * The address, of underlying type InetSocketAddress, contains the address
50
 * and port of the sender.  Applications may safely remove this tag from 
51
 * the Packet.
52
 *
53
 * \see class SocketAddresssTag
45
 */
54
 */
46
class TcpSocket : public Socket
55
class TcpSocket : public Socket
47
{
56
{
(-)a/src/internet/model/udp-socket-impl.cc (-2 / +2 lines)
 Lines 1036-1042    Link Here 
1036
      Address address = InetSocketAddress (header.GetSource (), port);
1036
      Address address = InetSocketAddress (header.GetSource (), port);
1037
      SocketAddressTag tag;
1037
      SocketAddressTag tag;
1038
      tag.SetAddress (address);
1038
      tag.SetAddress (address);
1039
      packet->AddPacketTag (tag);
1039
      packet->ReplacePacketTag (tag);
1040
      m_deliveryQueue.push (packet);
1040
      m_deliveryQueue.push (packet);
1041
      m_rxAvailable += packet->GetSize ();
1041
      m_rxAvailable += packet->GetSize ();
1042
      NotifyDataRecv ();
1042
      NotifyDataRecv ();
 Lines 1092-1098    Link Here 
1092
      Address address = Inet6SocketAddress (header.GetSourceAddress (), port);
1092
      Address address = Inet6SocketAddress (header.GetSourceAddress (), port);
1093
      SocketAddressTag tag;
1093
      SocketAddressTag tag;
1094
      tag.SetAddress (address);
1094
      tag.SetAddress (address);
1095
      packet->AddPacketTag (tag);
1095
      packet->ReplacePacketTag (tag);
1096
      m_deliveryQueue.push (packet);
1096
      m_deliveryQueue.push (packet);
1097
      m_rxAvailable += packet->GetSize ();
1097
      m_rxAvailable += packet->GetSize ();
1098
      NotifyDataRecv ();
1098
      NotifyDataRecv ();
(-)a/src/internet/model/udp-socket.h (+9 lines)
 Lines 42-47    Link Here 
42
 * This class exists solely for hosting UdpSocket attributes that can
42
 * This class exists solely for hosting UdpSocket attributes that can
43
 * be reused across different implementations, and for declaring
43
 * be reused across different implementations, and for declaring
44
 * UDP-specific multicast API.
44
 * UDP-specific multicast API.
45
 *
46
 * Socket data that is read from this socket using the methods returing
47
 * an ns3::Packet object (i.e., Recv (), RecvMsg (), RecvFrom ()) will
48
 * return Packet objects with a SocketAddressTag attached as a packet tag.
49
 * The address, of underlying type InetSocketAddress, contains the address
50
 * and port of the sender.  Applications may safely remove this tag from 
51
 * the Packet.
52
 *
53
 * \see class SocketAddresssTag
45
 */
54
 */
46
class UdpSocket : public Socket
55
class UdpSocket : public Socket
47
{
56
{
(-)a/src/network/utils/packet-socket.h (+18 lines)
 Lines 74-79    Link Here 
74
 * - Accept: not allowed
74
 * - Accept: not allowed
75
 *
75
 *
76
 * - Listen: returns -1 (OPNOTSUPP)
76
 * - Listen: returns -1 (OPNOTSUPP)
77
 *
78
 * Socket data that is read from this socket using the methods returing
79
 * an ns3::Packet object (i.e., Recv (), RecvMsg (), RecvFrom ()) will
80
 * return Packet objects with three PacketTag objects attached.
81
 * Applications may wish to read the extra out-of-band data provided in
82
 * these tags, and may safely remove the tags from the Packet.
83
 *
84
 * - PacketSocketTag: contains destination address (type PacketSocketAddress)
85
 *   and packet type of the received packet
86
 *
87
 * - SocketAddressTag:  contains source address (type PacketSocketAddress)
88
 *   of the received packet
89
 *   
90
 * - DeviceNameTag:  contains the TypeId string of the relevant NetDevice
91
 *
92
 * \see class PacketSocketTag
93
 * \see class SocketAddresssTag
94
 * \see class DeviceNameTag
77
 */
95
 */
78
class PacketSocket : public Socket
96
class PacketSocket : public Socket
79
{
97
{

Return to bug 231