root/trunk/wifidog/src/firewall.h @ 32

Revision 32, 2.1 KB (checked in by alexcv, 9 years ago)

Added code to handle updates and fixed the missing Makefile.am file.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
Line 
1/********************************************************************\
2 * This program is free software; you can redistribute it and/or    *
3 * modify it under the terms of the GNU General Public License as   *
4 * published by the Free Software Foundation; either version 2 of   *
5 * the License, or (at your option) any later version.              *
6 *                                                                  *
7 * This program is distributed in the hope that it will be useful,  *
8 * but WITHOUT ANY WARRANTY; without even the implied warranty of   *
9 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the    *
10 * GNU General Public License for more details.                     *
11 *                                                                  *
12 * You should have received a copy of the GNU General Public License*
13 * along with this program; if not, contact:                        *
14 *                                                                  *
15 * Free Software Foundation           Voice:  +1-617-542-5942       *
16 * 59 Temple Place - Suite 330        Fax:    +1-617-542-2652       *
17 * Boston, MA  02111-1307,  USA       gnu@gnu.org                   *
18 *                                                                  *
19\********************************************************************/
20
21/* $Header$ */
22/** @file firewall.h
23    @brief Firewall update functions
24    @author Copyright (C) 2004 Philippe April <papril777@yahoo.com>
25*/
26
27#ifndef _FIREWALL_H_
28#define _FIREWALL_H_
29
30typedef struct {
31    void *next;
32    char ip[16];
33    char mac[18];
34    char token[33];
35    int active; /* boolean */
36    long int counter;
37} t_node;
38
39int fw_init(void);
40int fw_destroy(void);
41int fw_allow(char *ip, char *mac, int profile);
42int fw_deny(char *ip, char *mac, int profile);
43void fw_counter(void);
44int execute(char **argv);
45char *arp_get(char *req_ip);
46
47void node_init(void);
48t_node *node_add(char *ip, char *mac, char *token, long int counter,
49                 int active);
50t_node *node_find_by_ip(char *ip);
51t_node *node_find_by_token(char *token);
52void node_delete(t_node *node);
53void free_node(t_node *node);
54
55#endif /* _FIREWALL_H_ */
Note: See TracBrowser for help on using the browser.