mcproxy/mcproxy/include/proxy/check_source.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 CHECK_SOURCE_H 00028 #define CHECK_SOURCE_H 00029 00030 #include "include/utils/mc_tables.hpp" 00031 00036 class check_source{ 00037 private: 00038 int m_addr_family; 00039 00040 mc_tables m_check_src_a; 00041 mc_tables m_check_src_b; 00042 mc_tables* m_current_check; 00043 public: 00044 00050 bool init(int addr_family); 00051 00056 bool check(); 00057 00064 bool is_src_unused(int vif, addr_storage src_addr, addr_storage g_addr); 00065 00066 }; 00067 00068 #endif // CHECK_IF_H 00069