⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 mld6igmp_node.hh

📁 MLDv2 support igmpv3 lite
💻 HH
📖 第 1 页 / 共 3 页
字号:
     * @param payload the payload, everything after the IP header and options.     * @param error_msg the error message (if error).     * @return XORP_OK on success, otherwise XORP_ERROR.     */    int		proto_recv(const string& if_name,			   const string& vif_name,			   const IPvX& src_address,			   const IPvX& dst_address,			   uint8_t ip_protocol,			   int32_t ip_ttl,			   int32_t ip_tos,			   bool ip_router_alert,			   bool ip_internet_control,			   const vector<uint8_t>& payload,			   string& error_msg);        /**     * Send a protocol packet.     *     * @param if_name the interface to send the packet on. It is essential for     * multicast. In the unicast case this field may be empty.     * @param vif_name the vif to send the packet on. It is essential for     * multicast. In the unicast case this field may be empty.     * @param src_address the IP source address.     * @param dst_address the IP destination address.     * @param ip_protocol the IP protocol number. It must be between 1 and     * 255.     * @param ip_ttl the IP TTL (hop-limit). If it has a negative value, the     * TTL will be set internally before transmission.     * @param ip_tos the Type Of Service (Diffserv/ECN bits for IPv4). If it     * has a negative value, the TOS will be set internally before     * transmission.     * @param ip_router_alert if true, then add the IP Router Alert option to     * the IP packet.     * @param ip_internet_control if true, then this is IP control traffic.     * @param buffer the data buffer with the packet to send.     * @param error_msg the error message (if error).     * @return XORP_OK on success, otherwise XORP_ERROR.     */    int		mld6igmp_send(const string& if_name,			      const string& vif_name,			      const IPvX& src_address,			      const IPvX& dst_address,			      uint8_t ip_protocol,			      int32_t ip_ttl,			      int32_t ip_tos,			      bool ip_router_alert,			      bool ip_internet_control,			      buffer_t *buffer,			      string& error_msg);        /**     * Receive signal message: not used by MLD/IGMP.     */    int	signal_message_recv(const string&	, // src_module_instance_name,			    int			, // message_type,			    uint32_t		, // vif_index,			    const IPvX&		, // src,			    const IPvX&		, // dst,			    const uint8_t *	, // rcvbuf,			    size_t		  // rcvlen	) { XLOG_UNREACHABLE(); return (XORP_ERROR); }        /**     * Send signal message: not used by MLD/IGMP.     */    int	signal_message_send(const string&	, // dst_module_instance_name,			    int			, // message_type,			    uint32_t		, // vif_index,			    const IPvX&		, // src,			    const IPvX&		, // dst,			    const uint8_t *	, // sndbuf,			    size_t		  // sndlen	) { XLOG_UNREACHABLE(); return (XORP_ERROR); }        /**     * Register as a receiver to receive packets.     *      * This is a pure virtual function, and it must be implemented     * by the communication-wrapper class that inherits this base class.     *      * @param if_name the interface through which packets should be accepted.     * @param vif_name the vif through which packets should be accepted.     * @param ip_protocol the IP protocol number that the receiver is     * interested in. It must be between 0 and 255. A protocol number of 0 is     * used to specify all protocols.     * @param enable_multicast_loopback if true then enable delivering     * of multicast datagrams back to this host (assuming the host is     * a member of the same multicast group).     * @return XORP_OK on success, otherwise XORP_ERROR.     */    virtual int register_receiver(const string& if_name,				  const string& vif_name,				  uint8_t ip_protocol,				  bool enable_multicast_loopback) = 0;    /**     * Unregister as a receiver to receive packets.     *      * This is a pure virtual function, and it must be implemented     * by the communication-wrapper class that inherits this base class.     *      * @param if_name the interface through which packets should not be     * accepted.     * @param vif_name the vif through which packets should not be accepted.     * @param ip_protocol the IP Protocol number that the receiver is     * not interested in anymore. It must be between 0 and 255. A protocol     * number of 0 is used to specify all protocols.     * @return XORP_OK on success, otherwise XORP_ERROR.     */    virtual int unregister_receiver(const string& if_name,				    const string& vif_name,				    uint8_t ip_protocol) = 0;    /**     * Join a multicast group on an interface.     *      * This is a pure virtual function, and it must be implemented     * by the communication-wrapper class that inherits this base class.     *      * TODO: add a source address as well!!     *      * @param if_name the interface name to join.     * @param vif_name the vif name to join.     * @param ip_protocol the IP protocol number that the receiver is     * interested in.     * @param group_address the multicast group address to join.     * @return XORP_OK on success, otherwise XORP_ERROR.     */    virtual int join_multicast_group(const string& if_name,				     const string& vif_name,				     uint8_t ip_protocol,				     const IPvX& group_address) = 0;    /**     * Leave a multicast group on an interface.     *      * This is a pure virtual function, and it must be implemented     * by the communication-wrapper class that inherits this base class.     *      * TODO: add a source address as well!!     *      * @param if_name the interface name to leave.     * @param vif_name the vif name to leave.     * @param ip_protocol the IP protocol number that the receiver is     * not interested in anymore.     * @param group_address the multicast group address to leave.     * @return XORP_OK on success, otherwise XORP_ERROR.     */    virtual int leave_multicast_group(const string& if_name,				      const string& vif_name,				      uint8_t ip_protocol,				      const IPvX& group_address) = 0;    /**     * Add a protocol that needs to be notified about multicast membership     * changes.     *      * Add a protocol to the list of entries that would be notified     * if there is membership change on a particular interface.     *      * @param module_instance_name the module instance name of the     * protocol to add.     * @param module_id the module ID (@ref xorp_module_id) of the     * protocol to add.     * @param vif_index the vif index of the interface to add the protocol to.     * @return XORP_OK on success, otherwise XORP_ERROR.     */    int add_protocol(const string& module_instance_name,		     xorp_module_id module_id,		     uint32_t vif_index);        /**     * Delete a protocol that needs to be notified about multicast membership     * changes.     *      * Delete a protocol from the list of entries that would be notified     * if there is membership change on a particular interface.     *      * @param module_instance_name the module instance name of the     * protocol to delete.     * @param module_id the module ID (@ref xorp_module_id) of the     * protocol to delete.     * @param vif_index the vif index of the interface to delete the     * protocol from.     * @return XORP_OK on success, otherwise XORP_ERROR.     */    int delete_protocol(const string& module_instance_name,			xorp_module_id module_id,			uint32_t vif_index);        /**     * Send "add membership" to a protocol that needs to be notified     * about multicast membership changes.     *      * This is a pure virtual function, and it must be implemented     * by the communication-wrapper class that inherits this base class.     *      * @param dst_module_instance_name the module instance name of the     * protocol to notify.     * @param dst_module_id the module ID (@ref xorp_module_id) of the     * protocol to notify.     * @param vif_index the vif index of the interface with membership change.     * @param source the source address of the (S,G) or (*,G) entry that has     * changed membership. In case of Any-Source Multicast, it is IPvX::ZERO().     * @param group the group address.     * @return XORP_OK on success, otherwise XORP_ERROR.     */    virtual int send_add_membership(const string& dst_module_instance_name,				    xorp_module_id dst_module_id,				    uint32_t vif_index,				    const IPvX& source,				    const IPvX& group) = 0;    /**     * Send "delete membership" to a protocol that needs to be notified     * about multicast membership changes.     *      * This is a pure virtual function, and it must be implemented     * by the communication-wrapper class that inherits this base class.     *      * @param dst_module_instance_name the module instance name of the     * protocol to notify.     * @param dst_module_id the module ID (@ref xorp_module_id) of the     * protocol to notify.     * @param vif_index the vif index of the interface with membership change.     * @param source the source address of the (S,G) or (*,G) entry that has     * changed membership. In case of Any-Source Multicast, it is IPvX::ZERO().     * @param group the group address of the (S,G) or (*,G) entry that has     * changed.     * @return XORP_OK on success, otherwise XORP_ERROR.     */    virtual int send_delete_membership(const string& dst_module_instance_name,				       xorp_module_id dst_module_id,				       uint32_t vif_index,				       const IPvX& source,				       const IPvX& group) = 0;        /**     * Notify a protocol about multicast membership change.     *      * @param module_instance_name the module instance name of the     * protocol to notify.     * @param module_id the module ID (@ref xorp_module_id) of the     * protocol to notify.     * @param vif_index the vif index of the interface with membership change.     * @param source the source address of the (S,G) or (*,G) entry that has     * changed. In case of group-specific multicast, it is IPvX::ZERO().     * @param group the group address of the (S,G) or (*,G) entry that has     * changed.     * @param action_jp the membership change type (@ref action_jp_t):     * either ACTION_JOIN or ACTION_PRUNE.     * @return XORP_OK on success, otherwise XORP_ERROR.     */    int join_prune_notify_routing(const string& module_instance_name,				  xorp_module_id module_id,				  uint32_t vif_index,				  const IPvX& source,				  const IPvX& group,				  action_jp_t action_jp);    /**     * Test if an address is directly connected to a specified virtual     * interface.     *      * Note that the virtual interface the address is directly connected to     * must be UP.     *      * @param mld6igmp_vif the virtual interface to test against.     * @param ipaddr_test the address to test.     * @return true if @ref ipaddr_test is directly connected to @ref vif,     * otherwise false.     */    bool is_directly_connected(const Mld6igmpVif& mld6igmp_vif,			       const IPvX& ipaddr_test) const;    //    // Configuration methods    //    /**     * Complete the set of vif configuration changes.     *      * @param error_msg the error message (if error).     * @return XORP_OK on success, otherwise XORP_ERROR.     */    int		set_config_all_vifs_done(string& error_msg);    /**     * Get the protocol version on an interface.     *      * @param vif_name the name of the vif to get the protocol version of.     * @param proto_version the return-by-reference protocol version.     * @param error_msg the error message (if error).     * @return XORP_OK on success, otherwise XORP_ERROR.     */    int		get_vif_proto_version(const string& vif_name,				      int& proto_version,				      string& error_msg);        /**     * Set the protocol version on an interface.     *      * @param vif_name the name of the vif to set the protocol version of.     * @param proto_version the new protocol version.     * @param error_msg the error message (if error).     * @return XORP_OK on success, otherwise XORP_ERROR.     */    int		set_vif_proto_version(const string& vif_name,				      int proto_version,				      string& error_msg);    

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -