00001 /********************************************************************\ 00002 * This program is free software; you can redistribute it and/or * 00003 * modify it under the terms of the GNU General Public License as * 00004 * published by the Free Software Foundation; either version 2 of * 00005 * the License, or (at your option) any later version. * 00006 * * 00007 * This program is distributed in the hope that it will be useful, * 00008 * but WITHOUT ANY WARRANTY; without even the implied warranty of * 00009 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * 00010 * GNU General Public License for more details. * 00011 * * 00012 * You should have received a copy of the GNU General Public License* 00013 * along with this program; if not, contact: * 00014 * * 00015 * Free Software Foundation Voice: +1-617-542-5942 * 00016 * 59 Temple Place - Suite 330 Fax: +1-617-542-2652 * 00017 * Boston, MA 02111-1307, USA gnu@gnu.org * 00018 * * 00019 \********************************************************************/ 00020 00021 /* $Id: firewall.h 1241 2007-06-24 04:13:13Z benoitg $ */ 00027 #ifndef _FIREWALL_H_ 00028 #define _FIREWALL_H_ 00029 00030 int icmp_fd; 00031 00033 typedef enum _t_fw_marks { 00034 FW_MARK_PROBATION = 1, 00036 FW_MARK_KNOWN = 2, 00037 FW_MARK_LOCKED = 254 00038 } t_fw_marks; 00039 00041 int fw_init(void); 00042 00044 void fw_clear_authservers(void); 00045 00047 void fw_set_authservers(void); 00048 00050 int fw_destroy(void); 00051 00053 int fw_allow(char *ip, char *mac, int profile); 00054 00056 int fw_deny(char *ip, char *mac, int profile); 00057 00059 void fw_sync_with_authserver(void); 00060 00062 char *arp_get(char *req_ip); 00063 00065 void icmp_ping(char *host); 00066 00068 unsigned short rand16(void); 00069 00070 #endif /* _FIREWALL_H_ */