00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00027 #ifndef MLD_SENDER_HPP
00028 #define MLD_SENDER_HPP
00029
00030 #include "include/proxy/sender.hpp"
00031
00035 #define MC_MASSAGES_AUTO_FILL 0
00036
00040 #define MC_MASSAGES_IPV6_ROUTER_ALERT_OPT_SIZE 0 //RFC 2711
00041
00045 typedef u_int16_t pad2 ;
00046
00050 class mld_sender: public sender{
00051 private:
00052 enum msg_type {
00053 GENERAL_QUERY, MC_ADDR_SPECIFIC_QUERY
00054 };
00055
00056 bool choose_if(int if_index);
00057 int get_msg_min_size();
00058 bool add_hbh_opt_header();
00059 bool create_mc_query(msg_type type, unsigned char* buf,const addr_storage* g_addr=NULL);
00060
00061 public:
00065 mld_sender();
00066
00067 bool init(int addr_family, int version);
00068
00069 bool send_general_query(int if_index);
00070 bool send_group_specific_query(int if_index, const addr_storage& g_addr);
00071 bool send_report(int if_index, const addr_storage& g_addr);
00072 bool send_leave(int if_index, const addr_storage& g_addr);
00073 };
00074
00075 #endif // MLD_SENDER_HPP
00076