2010-01-07 03:45:19 +00:00
|
|
|
/* -*- mode: c++; c-basic-offset: 4; tab-width: 4; indent-tabs-mode: t -*-
|
|
|
|
* vim: ts=4 sw=4 noet ai cindent syntax=cpp
|
2009-07-28 21:44:22 +00:00
|
|
|
*
|
|
|
|
* tcp-portmon.h - libtcp-portmon hooks protoypes
|
2008-12-09 13:44:14 +00:00
|
|
|
*
|
|
|
|
* Copyright (C) 2008 Phil Sutter <Phil@nwl.cc>
|
|
|
|
*
|
|
|
|
* This program is free software: you can redistribute it and/or modify
|
|
|
|
* it under the terms of the GNU General Public License as published by
|
|
|
|
* the Free Software Foundation, either version 3 of the License, or
|
|
|
|
* (at your option) any later version.
|
|
|
|
*
|
|
|
|
* This program is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
* GNU General Public License for more details.
|
|
|
|
* You should have received a copy of the GNU General Public License
|
|
|
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
#ifndef _TCP_PORTMON_H
|
|
|
|
#define _TCP_PORTMON_H
|
|
|
|
|
|
|
|
#include "libtcp-portmon.h"
|
|
|
|
|
|
|
|
struct tcp_port_monitor_data {
|
|
|
|
/* starting port to monitor */
|
|
|
|
in_port_t port_range_begin;
|
|
|
|
/* ending port to monitor */
|
|
|
|
in_port_t port_range_end;
|
|
|
|
/* enum from libtcp-portmon.h, e.g. COUNT, etc. */
|
|
|
|
int item;
|
|
|
|
/* 0 to n-1 connections. */
|
|
|
|
int connection_index;
|
|
|
|
};
|
|
|
|
|
2009-10-04 15:22:25 +00:00
|
|
|
/* forward declare to make gcc happy */
|
|
|
|
struct text_object;
|
|
|
|
|
|
|
|
int tcp_portmon_init(struct text_object *, const char *);
|
2009-11-08 15:41:42 +00:00
|
|
|
void tcp_portmon_action(struct text_object *, char *, int);
|
2009-10-04 15:08:08 +00:00
|
|
|
void tcp_portmon_update(void);
|
2008-12-09 13:44:14 +00:00
|
|
|
int tcp_portmon_clear(void);
|
|
|
|
int tcp_portmon_set_max_connections(int);
|
2009-10-04 15:22:25 +00:00
|
|
|
void tcp_portmon_free(struct text_object *);
|
2008-12-09 13:44:14 +00:00
|
|
|
|
|
|
|
#endif /* _TCP_PORTMON_H */
|