2012-05-02 00:47:42 +02:00
|
|
|
/* $Id: pfpinhole.h,v 1.9 2012/05/01 22:37:53 nanard Exp $ */
|
2012-04-18 22:53:51 +02:00
|
|
|
/* MiniUPnP project
|
|
|
|
* http://miniupnp.free.fr/ or http://miniupnp.tuxfamily.org/
|
2016-01-18 22:46:30 +01:00
|
|
|
* (c) 2012-2016 Thomas Bernard
|
2012-04-18 22:53:51 +02:00
|
|
|
* This software is subject to the conditions detailed
|
|
|
|
* in the LICENCE file provided within the distribution */
|
|
|
|
|
2012-09-20 17:52:51 -03:00
|
|
|
#ifndef PFPINHOLE_H_INCLUDED
|
|
|
|
#define PFPINHOLE_H_INCLUDED
|
2012-04-18 22:53:51 +02:00
|
|
|
|
2014-05-10 13:09:48 +02:00
|
|
|
#ifdef ENABLE_UPNPPINHOLE
|
|
|
|
|
2016-01-18 22:46:30 +01:00
|
|
|
int find_pinhole(const char * ifname,
|
|
|
|
const char * rem_host, unsigned short rem_port,
|
|
|
|
const char * int_client, unsigned short int_port,
|
|
|
|
int proto,
|
|
|
|
char *desc, int desc_len, unsigned int * timestamp);
|
|
|
|
|
2012-04-20 16:49:04 +02:00
|
|
|
int add_pinhole(const char * ifname,
|
|
|
|
const char * rem_host, unsigned short rem_port,
|
|
|
|
const char * int_client, unsigned short int_port,
|
2014-05-10 13:09:48 +02:00
|
|
|
int proto, const char * desc, unsigned int timestamp);
|
2012-04-18 22:53:51 +02:00
|
|
|
|
2012-04-20 16:49:04 +02:00
|
|
|
int delete_pinhole(unsigned short uid);
|
2012-04-20 00:07:13 +02:00
|
|
|
|
2012-05-02 00:47:42 +02:00
|
|
|
int
|
|
|
|
get_pinhole_info(unsigned short uid,
|
|
|
|
char * rem_host, int rem_hostlen, unsigned short * rem_port,
|
|
|
|
char * int_client, int int_clientlen, unsigned short * int_port,
|
2014-05-10 13:09:48 +02:00
|
|
|
int * proto, char * desc, int desclen,
|
|
|
|
unsigned int * timestamp,
|
2012-05-02 00:47:42 +02:00
|
|
|
u_int64_t * packets, u_int64_t * bytes);
|
2012-04-21 00:08:06 +02:00
|
|
|
|
2012-04-24 00:45:45 +02:00
|
|
|
int update_pinhole(unsigned short uid, unsigned int timestamp);
|
|
|
|
|
2012-04-22 02:58:27 +02:00
|
|
|
int clean_pinhole_list(unsigned int * next_timestamp);
|
2012-04-22 02:03:35 +02:00
|
|
|
|
2014-05-10 13:09:48 +02:00
|
|
|
#endif /* ENABLE_UPNPPINHOLE */
|
2012-04-18 22:53:51 +02:00
|
|
|
|
2012-04-24 00:45:45 +02:00
|
|
|
#endif
|
|
|
|
|