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 Georgia Tech Research Corporation | 3 * Copyright (c) 2007 Georgia Tech Research Corporation |
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 593 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
604 { | 604 { |
605 NS_LOG_LOGIC ("TcpL4Protocol " << this | 605 NS_LOG_LOGIC ("TcpL4Protocol " << this |
606 << " sending seq " << outgoing.GetSequenceNumbe
r () | 606 << " sending seq " << outgoing.GetSequenceNumbe
r () |
607 << " ack " << outgoing.GetAckNumber () | 607 << " ack " << outgoing.GetAckNumber () |
608 << " flags " << std::hex << (int)outgoing.GetFl
ags () << std::dec | 608 << " flags " << std::hex << (int)outgoing.GetFl
ags () << std::dec |
609 << " data size " << packet->GetSize ()); | 609 << " data size " << packet->GetSize ()); |
610 NS_LOG_FUNCTION (this << packet << saddr << daddr << oif); | 610 NS_LOG_FUNCTION (this << packet << saddr << daddr << oif); |
611 // XXX outgoingHeader cannot be logged | 611 // XXX outgoingHeader cannot be logged |
612 | 612 |
613 TcpHeader outgoingHeader = outgoing; | 613 TcpHeader outgoingHeader = outgoing; |
614 outgoingHeader.SetLength (5); //header length in units of 32bit words | 614 |
615 /** \todo UrgentPointer */ | 615 /** \todo UrgentPointer */ |
616 /* outgoingHeader.SetUrgentPointer (0); */ | 616 /* outgoingHeader.SetUrgentPointer (0); */ |
617 if(Node::ChecksumEnabled ()) | 617 if(Node::ChecksumEnabled ()) |
618 { | 618 { |
619 outgoingHeader.EnableChecksums (); | 619 outgoingHeader.EnableChecksums (); |
620 } | 620 } |
621 outgoingHeader.InitializeChecksum (saddr, daddr, PROT_NUMBER); | 621 outgoingHeader.InitializeChecksum (saddr, daddr, PROT_NUMBER); |
622 | 622 |
623 packet->AddHeader (outgoingHeader); | 623 packet->AddHeader (outgoingHeader); |
624 | 624 |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
656 << " flags " << std::hex << (int)outgoing.GetFl
ags () << std::dec | 656 << " flags " << std::hex << (int)outgoing.GetFl
ags () << std::dec |
657 << " data size " << packet->GetSize ()); | 657 << " data size " << packet->GetSize ()); |
658 NS_LOG_FUNCTION (this << packet << saddr << daddr << oif); | 658 NS_LOG_FUNCTION (this << packet << saddr << daddr << oif); |
659 // XXX outgoingHeader cannot be logged | 659 // XXX outgoingHeader cannot be logged |
660 | 660 |
661 if (daddr.IsIpv4MappedAddress ()) | 661 if (daddr.IsIpv4MappedAddress ()) |
662 { | 662 { |
663 return (SendPacket (packet, outgoing, saddr.GetIpv4MappedAddress(), daddr.
GetIpv4MappedAddress(), oif)); | 663 return (SendPacket (packet, outgoing, saddr.GetIpv4MappedAddress(), daddr.
GetIpv4MappedAddress(), oif)); |
664 } | 664 } |
665 TcpHeader outgoingHeader = outgoing; | 665 TcpHeader outgoingHeader = outgoing; |
666 outgoingHeader.SetLength (5); //header length in units of 32bit words | 666 //outgoingHeader.SetLength (5); //header length in units of 32bit words |
667 /** \todo UrgentPointer */ | 667 /** \todo UrgentPointer */ |
668 /* outgoingHeader.SetUrgentPointer (0); */ | 668 /* outgoingHeader.SetUrgentPointer (0); */ |
669 if(Node::ChecksumEnabled ()) | 669 if(Node::ChecksumEnabled ()) |
670 { | 670 { |
671 outgoingHeader.EnableChecksums (); | 671 outgoingHeader.EnableChecksums (); |
672 } | 672 } |
673 outgoingHeader.InitializeChecksum (saddr, daddr, PROT_NUMBER); | 673 outgoingHeader.InitializeChecksum (saddr, daddr, PROT_NUMBER); |
674 | 674 |
675 packet->AddHeader (outgoingHeader); | 675 packet->AddHeader (outgoingHeader); |
676 | 676 |
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
717 } | 717 } |
718 | 718 |
719 IpL4Protocol::DownTargetCallback6 | 719 IpL4Protocol::DownTargetCallback6 |
720 TcpL4Protocol::GetDownTarget6 (void) const | 720 TcpL4Protocol::GetDownTarget6 (void) const |
721 { | 721 { |
722 return m_downTarget6; | 722 return m_downTarget6; |
723 } | 723 } |
724 | 724 |
725 } // namespace ns3 | 725 } // namespace ns3 |
726 | 726 |
OLD | NEW |