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