OLD | NEW |
(Empty) | |
| 1 /* -*- Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil; -*- */ |
| 2 /* |
| 3 * Copyright (c) 2009 University of Washington |
| 4 * |
| 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 |
| 7 * published by the Free Software Foundation; |
| 8 * |
| 9 * This program is distributed in the hope that it will be useful, |
| 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 12 * GNU General Public License for more details. |
| 13 * |
| 14 * You should have received a copy of the GNU General Public License |
| 15 * along with this program; if not, write to the Free Software |
| 16 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
| 17 * |
| 18 */ |
| 19 |
| 20 #ifndef IPV4_LIST_ROUTING_IMPL_H |
| 21 #define IPV4_LIST_ROUTING_IMPL_H |
| 22 |
| 23 #include <list> |
| 24 #include "ns3/ipv4-list-routing.h" |
| 25 |
| 26 namespace ns3 { |
| 27 |
| 28 class Ipv4StaticRouting; |
| 29 |
| 30 class Ipv4ListRoutingImpl : public Ipv4ListRouting |
| 31 { |
| 32 public: |
| 33 static TypeId GetTypeId (void); |
| 34 |
| 35 Ipv4ListRoutingImpl (); |
| 36 ~Ipv4ListRoutingImpl (); |
| 37 |
| 38 virtual Ptr<Ipv4Route> RouteOutput (const Ipv4Header &header, uint32_t oif, So
cket::SocketErrno &errno); |
| 39 virtual bool RouteInput (Ptr<const Packet> p, const Ipv4Header &header, Ptr<co
nst NetDevice> idev,· |
| 40 UnicastForwardCallback ucb, MulticastForwardCallback
mcb,· |
| 41 LocalDeliverCallback lcb, ErrorCallback ecb); |
| 42 |
| 43 virtual void AddRoutingProtocol (Ptr<Ipv4RoutingProtocol> routingProtocol, int
16_t priority); |
| 44 |
| 45 virtual uint32_t GetNRoutingProtocols (void) const; |
| 46 |
| 47 virtual Ptr<Ipv4RoutingProtocol> GetRoutingProtocol (uint32_t index, int16_t&
priority) const; |
| 48 virtual Ptr<Ipv4StaticRouting> GetStaticRouting (void) const; |
| 49 |
| 50 |
| 51 void SetNode (Ptr<Node> node); |
| 52 Ptr<Node> GetNode (void) const; |
| 53 |
| 54 protected: |
| 55 void DoDispose (void); |
| 56 private: |
| 57 typedef std::list< std::pair< int, Ptr<Ipv4RoutingProtocol> > > Ipv4RoutingPro
tocolList; |
| 58 Ipv4RoutingProtocolList m_routingProtocols; |
| 59 Ptr<Node> m_node; |
| 60 |
| 61 }; |
| 62 |
| 63 } // Namespace ns3 |
| 64 |
| 65 #endif /* IPV4_LIST_ROUTING_IMPL_H */ |
OLD | NEW |