src/internet/model/ipv4-routing-table-entry.h
changeset 10440 1e48ff9185f1
parent 7386 2310ed220a61
equal deleted inserted replaced
10439:73bc9e55f9bd 10440:1e48ff9185f1
   133    */
   133    */
   134   static Ipv4RoutingTableEntry CreateDefaultRoute (Ipv4Address nextHop, 
   134   static Ipv4RoutingTableEntry CreateDefaultRoute (Ipv4Address nextHop, 
   135                                                    uint32_t interface);
   135                                                    uint32_t interface);
   136 
   136 
   137 private:
   137 private:
       
   138   /**
       
   139    * \brief Constructor.
       
   140    * \param network network address
       
   141    * \param mask network mask
       
   142    * \param gateway the gateway
       
   143    * \param interface the interface index
       
   144    */
   138   Ipv4RoutingTableEntry (Ipv4Address network,
   145   Ipv4RoutingTableEntry (Ipv4Address network,
   139                          Ipv4Mask mask,
   146                          Ipv4Mask mask,
   140                          Ipv4Address gateway,
   147                          Ipv4Address gateway,
   141                          uint32_t interface);
   148                          uint32_t interface);
       
   149   /**
       
   150    * \brief Constructor.
       
   151    * \param dest destination address
       
   152    * \param mask network mask
       
   153    * \param interface the interface index
       
   154    */
   142   Ipv4RoutingTableEntry (Ipv4Address dest,
   155   Ipv4RoutingTableEntry (Ipv4Address dest,
   143                          Ipv4Mask mask,
   156                          Ipv4Mask mask,
   144                          uint32_t interface);
   157                          uint32_t interface);
       
   158   /**
       
   159    * \brief Constructor.
       
   160    * \param dest destination address
       
   161    * \param gateway the gateway
       
   162    * \param interface the interface index
       
   163    */
   145   Ipv4RoutingTableEntry (Ipv4Address dest,
   164   Ipv4RoutingTableEntry (Ipv4Address dest,
   146                          Ipv4Address gateway,
   165                          Ipv4Address gateway,
   147                          uint32_t interface);
   166                          uint32_t interface);
       
   167   /**
       
   168    * \brief Constructor.
       
   169    * \param dest destination address
       
   170    * \param interface the interface index
       
   171    */
   148   Ipv4RoutingTableEntry (Ipv4Address dest,
   172   Ipv4RoutingTableEntry (Ipv4Address dest,
   149                          uint32_t interface);
   173                          uint32_t interface);
   150 
   174 
   151   Ipv4Address m_dest;
   175   Ipv4Address m_dest;         //!< destination address
   152   Ipv4Mask m_destNetworkMask;
   176   Ipv4Mask m_destNetworkMask; //!< destination network mask
   153   Ipv4Address m_gateway;
   177   Ipv4Address m_gateway;      //!< gateway
   154   uint32_t m_interface;
   178   uint32_t m_interface;       //!< output interface
   155 };
   179 };
   156 
   180 
       
   181 /**
       
   182  * \brief Stream insertion operator.
       
   183  *
       
   184  * \param os the reference to the output stream
       
   185  * \param route the Ipv4 routing table entry
       
   186  * \returns the reference to the output stream
       
   187  */
   157 std::ostream& operator<< (std::ostream& os, Ipv4RoutingTableEntry const& route);
   188 std::ostream& operator<< (std::ostream& os, Ipv4RoutingTableEntry const& route);
   158 
   189 
   159 /**
   190 /**
   160  * \ingroup internet
   191  * \ingroup internet
   161  *
   192  *
   213   static Ipv4MulticastRoutingTableEntry CreateMulticastRoute (Ipv4Address origin, 
   244   static Ipv4MulticastRoutingTableEntry CreateMulticastRoute (Ipv4Address origin, 
   214                                                               Ipv4Address group, uint32_t inputInterface,
   245                                                               Ipv4Address group, uint32_t inputInterface,
   215                                                               std::vector<uint32_t> outputInterfaces);
   246                                                               std::vector<uint32_t> outputInterfaces);
   216 
   247 
   217 private:
   248 private:
       
   249   /**
       
   250    * \brief Constructor.
       
   251    * \param origin source address
       
   252    * \param group destination address
       
   253    * \param inputInterface input interface
       
   254    * \param outputInterfaces output interfaces
       
   255    */
   218   Ipv4MulticastRoutingTableEntry (Ipv4Address origin, Ipv4Address group, 
   256   Ipv4MulticastRoutingTableEntry (Ipv4Address origin, Ipv4Address group, 
   219                                   uint32_t inputInterface, std::vector<uint32_t> outputInterfaces);
   257                                   uint32_t inputInterface, std::vector<uint32_t> outputInterfaces);
   220 
   258 
   221   Ipv4Address m_origin;
   259   Ipv4Address m_origin;   //!< source address
   222   Ipv4Address m_group;
   260   Ipv4Address m_group;    //!< destination address
   223   uint32_t m_inputInterface;
   261   uint32_t m_inputInterface;    //!< input interface
   224   std::vector<uint32_t> m_outputInterfaces;
   262   std::vector<uint32_t> m_outputInterfaces;   //!< output interfaces
   225 };
   263 };
   226 
   264 
       
   265 /**
       
   266  * \brief Stream insertion operator.
       
   267  *
       
   268  * \param os the reference to the output stream
       
   269  * \param route the Ipv4 multicast routing table entry
       
   270  * \returns the reference to the output stream
       
   271  */
   227 std::ostream& operator<< (std::ostream& os, Ipv4MulticastRoutingTableEntry const& route);
   272 std::ostream& operator<< (std::ostream& os, Ipv4MulticastRoutingTableEntry const& route);
   228 
   273 
   229 } // namespace ns3
   274 } // namespace ns3
   230 
   275 
   231 #endif /* IPV4_ROUTING_TABLE_ENTRY_H */
   276 #endif /* IPV4_ROUTING_TABLE_ENTRY_H */