src/node/ipv6-routing-protocol.h
changeset 5891 09a575cdf8db
parent 5856 7fd20c798a7d
equal deleted inserted replaced
5890:9c48446a0946 5891:09a575cdf8db
    57 
    57 
    58   typedef Callback<void, Ptr<Ipv6Route>, Ptr<const Packet>, const Ipv6Header &> UnicastForwardCallback;
    58   typedef Callback<void, Ptr<Ipv6Route>, Ptr<const Packet>, const Ipv6Header &> UnicastForwardCallback;
    59   typedef Callback<void, Ptr<Ipv6MulticastRoute>, Ptr<const Packet>, const Ipv6Header &> MulticastForwardCallback;
    59   typedef Callback<void, Ptr<Ipv6MulticastRoute>, Ptr<const Packet>, const Ipv6Header &> MulticastForwardCallback;
    60   typedef Callback<void, Ptr<const Packet>, const Ipv6Header &, uint32_t > LocalDeliverCallback;
    60   typedef Callback<void, Ptr<const Packet>, const Ipv6Header &, uint32_t > LocalDeliverCallback;
    61   typedef Callback<void, Ptr<const Packet>, const Ipv6Header &, Socket::SocketErrno > ErrorCallback;
    61   typedef Callback<void, Ptr<const Packet>, const Ipv6Header &, Socket::SocketErrno > ErrorCallback;
    62   
    62 
    63   /**
    63   /**
    64    * \brief Query routing cache for an existing route, for an outbound packet
    64    * \brief Query routing cache for an existing route, for an outbound packet
    65    *
    65    *
    66    * This lookup is used by transport protocols.  It does not cause any
    66    * This lookup is used by transport protocols.  It does not cause any
    67    * packet to be forwarded, and is synchronous.  Can be used for
    67    * packet to be forwarded, and is synchronous.  Can be used for
    75    * \param sockerr Output parameter; socket errno 
    75    * \param sockerr Output parameter; socket errno 
    76    *
    76    *
    77    * \returns a code that indicates what happened in the lookup
    77    * \returns a code that indicates what happened in the lookup
    78    */
    78    */
    79   virtual Ptr<Ipv6Route> RouteOutput (Ptr<Packet> p, const Ipv6Header &header, Ptr<NetDevice> oif, Socket::SocketErrno &sockerr) = 0;
    79   virtual Ptr<Ipv6Route> RouteOutput (Ptr<Packet> p, const Ipv6Header &header, Ptr<NetDevice> oif, Socket::SocketErrno &sockerr) = 0;
    80   
    80 
    81   /**
    81   /**
    82    * \brief Route an input packet (to be forwarded or locally delivered)
    82    * \brief Route an input packet (to be forwarded or locally delivered)
    83    *
    83    *
    84    * This lookup is used in the forwarding process.  The packet is
    84    * This lookup is used in the forwarding process.  The packet is
    85    * handed over to the Ipv6RoutingProtocol, and will get forwarded onward
    85    * handed over to the Ipv6RoutingProtocol, and will get forwarded onward
    98    * \param ecb Callback to call if there is an error in forwarding
    98    * \param ecb Callback to call if there is an error in forwarding
    99    * \returns true if the Ipv6RoutingProtocol takes responsibility for 
    99    * \returns true if the Ipv6RoutingProtocol takes responsibility for 
   100    *          forwarding or delivering the packet, false otherwise
   100    *          forwarding or delivering the packet, false otherwise
   101    */ 
   101    */ 
   102   virtual bool RouteInput  (Ptr<const Packet> p, const Ipv6Header &header, Ptr<const NetDevice> idev, 
   102   virtual bool RouteInput  (Ptr<const Packet> p, const Ipv6Header &header, Ptr<const NetDevice> idev, 
   103                              UnicastForwardCallback ucb, MulticastForwardCallback mcb, 
   103                             UnicastForwardCallback ucb, MulticastForwardCallback mcb, 
   104                              LocalDeliverCallback lcb, ErrorCallback ecb) = 0;
   104                             LocalDeliverCallback lcb, ErrorCallback ecb) = 0;
   105 
   105 
   106   /**
   106   /**
   107    * \brief Notify when specified interface goes UP.
   107    * \brief Notify when specified interface goes UP.
   108    *
   108    *
   109    * Protocols are expected to implement this method to be notified of the state change of
   109    * Protocols are expected to implement this method to be notified of the state change of
   110    * an interface in a node.
   110    * an interface in a node.
   111    * \param interface the index of the interface we are being notified about
   111    * \param interface the index of the interface we are being notified about
   112    */
   112    */
   113   virtual void NotifyInterfaceUp (uint32_t interface) = 0;
   113   virtual void NotifyInterfaceUp (uint32_t interface) = 0;
   114   
   114 
   115   /**
   115   /**
   116    * \brief Notify when specified interface goes DOWN.
   116    * \brief Notify when specified interface goes DOWN.
   117    *
   117    *
   118    * Protocols are expected to implement this method to be notified of the state change of
   118    * Protocols are expected to implement this method to be notified of the state change of
   119    * an interface in a node.
   119    * an interface in a node.