00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00027 #ifndef IGMP_SENDER_HPP
00028 #define IGMP_SENDER_HPP
00029
00030 #include "include/proxy/sender.hpp"
00031
00035 class igmp_sender : public sender{
00036 private:
00037 enum msg_type {
00038 GENERAL_QUERY, GROUP_SPECIFIC_QUERY
00039 };
00040
00041 bool create_mc_query(msg_type type, unsigned char* buf,const addr_storage* g_addr=NULL);
00042 int get_msg_min_size();
00043 bool choose_if(int if_index);
00044 public:
00048 igmp_sender();
00049
00050 bool init(int addr_family, int version);
00051
00052 bool send_general_query(int if_index);
00053 bool send_group_specific_query(int if_index, const addr_storage& g_addr);
00054 bool send_report(int if_index, const addr_storage& g_addr);
00055 bool send_leave(int if_index, const addr_storage& g_addr);
00056 };
00057
00058 #endif // IGMP_SENDER_HPP
00059