LEFT | RIGHT |
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) 2006 Georgia Tech Research Corporation | 3 // Copyright (c) 2006 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 791 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
802 | 802 |
803 m_localDeliverTrace (ip, packet, iif); | 803 m_localDeliverTrace (ip, packet, iif); |
804 | 804 |
805 Ptr<Ipv4L4Protocol> protocol = GetProtocol (ip.GetProtocol ()); | 805 Ptr<Ipv4L4Protocol> protocol = GetProtocol (ip.GetProtocol ()); |
806 if (protocol != 0) | 806 if (protocol != 0) |
807 { | 807 { |
808 // we need to make a copy in the unlikely event we hit the | 808 // we need to make a copy in the unlikely event we hit the |
809 // RX_ENDPOINT_UNREACH codepath | 809 // RX_ENDPOINT_UNREACH codepath |
810 Ptr<Packet> copy = p->Copy (); | 810 Ptr<Packet> copy = p->Copy (); |
811 enum Ipv4L4Protocol::RxStatus status =· | 811 enum Ipv4L4Protocol::RxStatus status =· |
812 protocol->Receive (p, ip.GetSource (), ip.GetDestination (), ip, GetInte
rface (iif)); | 812 protocol->Receive (p, ip, GetInterface (iif)); |
813 switch (status) { | 813 switch (status) { |
814 case Ipv4L4Protocol::RX_OK: | 814 case Ipv4L4Protocol::RX_OK: |
815 // fall through | 815 // fall through |
816 case Ipv4L4Protocol::RX_ENDPOINT_CLOSED: | 816 case Ipv4L4Protocol::RX_ENDPOINT_CLOSED: |
817 // fall through | 817 // fall through |
818 case Ipv4L4Protocol::RX_CSUM_FAILED: | 818 case Ipv4L4Protocol::RX_CSUM_FAILED: |
819 break; | 819 break; |
820 case Ipv4L4Protocol::RX_ENDPOINT_UNREACH: | 820 case Ipv4L4Protocol::RX_ENDPOINT_UNREACH: |
821 if (ip.GetDestination ().IsBroadcast () == true ||· | 821 if (ip.GetDestination ().IsBroadcast () == true ||· |
822 ip.GetDestination ().IsMulticast () == true) | 822 ip.GetDestination ().IsMulticast () == true) |
(...skipping 231 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1054 | 1054 |
1055 void | 1055 void |
1056 Ipv4L3Protocol::RouteInputError (Ptr<const Packet> p, const Ipv4Header & ipHeade
r, Socket::SocketErrno sockErrno) | 1056 Ipv4L3Protocol::RouteInputError (Ptr<const Packet> p, const Ipv4Header & ipHeade
r, Socket::SocketErrno sockErrno) |
1057 { | 1057 { |
1058 NS_LOG_FUNCTION (this << p << ipHeader << sockErrno); | 1058 NS_LOG_FUNCTION (this << p << ipHeader << sockErrno); |
1059 NS_LOG_LOGIC ("Route input failure-- dropping packet to " << ipHeader << " wit
h errno " << sockErrno);· | 1059 NS_LOG_LOGIC ("Route input failure-- dropping packet to " << ipHeader << " wit
h errno " << sockErrno);· |
1060 m_dropTrace (ipHeader, p, DROP_ROUTE_ERROR, m_node->GetObject<Ipv4> (), 0); | 1060 m_dropTrace (ipHeader, p, DROP_ROUTE_ERROR, m_node->GetObject<Ipv4> (), 0); |
1061 } | 1061 } |
1062 | 1062 |
1063 }//namespace ns3 | 1063 }//namespace ns3 |
LEFT | RIGHT |