mcproxy/mcproxy/include/proxy/igmp_receiver.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 00027 #ifndef IGMP_RECEIVER_HPP 00028 #define IGMP_RECEIVER_HPP 00029 00030 #include "include/proxy/receiver.hpp" 00031 00035 #define IGMP_RECEIVER_IPV4_ROUTER_ALERT_OPT_SIZE 4 //RFC 2711 00036 00040 #define IGMP_RECEIVER_KERNEL_MSG 0 00041 00045 class igmp_receiver : public receiver { 00046 private: 00047 00048 int get_ctrl_min_size(); 00049 int get_iov_min_size(); 00050 void analyse_packet(struct msghdr* msg, int info_size); 00051 00052 //return the interface index to addr, on error return 0 00053 int map_ip2if_index(const addr_storage& src_addr); 00054 public: 00058 igmp_receiver(); 00059 }; 00060 00061 #endif // IGMP_RECEIVER_HPP 00062