mcproxy/mcproxy/include/proxy/sender.hpp
Go to the documentation of this file.00001 /* 00002 * This file is part of mcproxy. 00003 * 00004 * mcproxy is free software; you can redistribute it and/or modify 00005 * it under the terms of the GNU Lesser General Public License as published by 00006 * the Free Software Foundation; either version 3 of the License, or (at your 00007 * option) any later version. 00008 * 00009 * mcproxy is distributed in the hope that it will be useful, but 00010 * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY 00011 * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public 00012 * License for more details. 00013 * 00014 * You should have received a copy of the GNU Lesser General Public License 00015 * along with mcproxy; see the file COPYING.LESSER. 00016 * 00017 * written by Sebastian Woelke, in cooperation with: 00018 * INET group, Hamburg University of Applied Sciences, 00019 * Website: http://mcproxy.realmv6.org/ 00020 */ 00021 00028 #ifndef SENDER_HPP 00029 #define SENDER_HPP 00030 00031 #include "include/utils/mroute_socket.hpp" 00032 #include "include/utils/addr_storage.hpp" 00033 #include "include/utils/if_prop.hpp" 00034 00038 class sender{ 00039 private: 00040 protected: 00044 int m_addr_family; //AF_INET or AF_INET6 00045 00049 int m_version; //for AF_INET (1,2,3) to use IGMPv1/2/3, for AF_INET6 (1,2) to use MLDv1/2 00050 00054 mroute_socket m_sock; 00055 00059 if_prop m_if_prop; //return interface properties 00060 00064 bool init_if_prop(); 00065 public: 00066 00070 sender(); 00071 00078 virtual bool init(int addr_family, int version); 00079 00085 virtual bool send_general_query(int if_index)=0; 00086 00093 virtual bool send_group_specific_query(int if_index, const addr_storage& g_addr)=0; 00094 00101 virtual bool send_report(int if_index, const addr_storage& g_addr)=0; 00102 00109 virtual bool send_leave(int if_index, const addr_storage& g_addr)=0; 00110 00111 }; 00112 00113 00114 #endif // SENDER_HPP 00115