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 /* forward declare to make gcc happy */
41 int tcp_portmon_init(struct text_object *, const char *);
42 int tcp_portmon_action(struct text_object *, char *, int);
43 int tcp_portmon_update(void);
44 int tcp_portmon_clear(void);
45 int tcp_portmon_set_max_connections(int);
46 void tcp_portmon_free(struct text_object *);
48 #endif /* _TCP_PORTMON_H */