1 /* tcp-portmon.h - libtcp-portmon hooks protoypes
3 * Copyright (C) 2008 Phil Sutter <Phil@nwl.cc>
5 * This program is free software: you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation, either version 3 of the License, or
8 * (at your option) any later version.
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
14 * You should have received a copy of the GNU General Public License
15 * along with this program. If not, see <http://www.gnu.org/licenses/>.
20 #ifndef _TCP_PORTMON_H
21 #define _TCP_PORTMON_H
23 #include "libtcp-portmon.h"
25 struct tcp_port_monitor_data {
26 /* starting port to monitor */
27 in_port_t port_range_begin;
28 /* ending port to monitor */
29 in_port_t port_range_end;
30 /* enum from libtcp-portmon.h, e.g. COUNT, etc. */
32 /* 0 to n-1 connections. */
36 int tcp_portmon_init(const char *, struct tcp_port_monitor_data *);
37 int tcp_portmon_action(char *, int, struct tcp_port_monitor_data *);
38 int tcp_portmon_update(void);
39 int tcp_portmon_clear(void);
40 int tcp_portmon_set_max_connections(int);
42 #endif /* _TCP_PORTMON_H */