2012-05-08 20:51:23 +00:00
|
|
|
/* $Id: iptpinhole.h,v 1.5 2012/05/08 20:41:45 nanard Exp $ */
|
2012-04-26 14:08:39 +00:00
|
|
|
/* MiniUPnP project
|
|
|
|
* http://miniupnp.free.fr/ or http://miniupnp.tuxfamily.org/
|
2016-01-18 19:16:06 +00:00
|
|
|
* (c) 2012-2016 Thomas Bernard
|
2012-04-26 14:08:39 +00:00
|
|
|
* This software is subject to the conditions detailed
|
|
|
|
* in the LICENCE file provided within the distribution */
|
2012-09-20 20:52:51 +00:00
|
|
|
#ifndef IPTPINHOLE_H_INCLUDED
|
|
|
|
#define IPTPINHOLE_H_INCLUDED
|
2012-04-26 14:08:39 +00:00
|
|
|
|
2014-05-10 11:09:48 +00:00
|
|
|
#ifdef ENABLE_UPNPPINHOLE
|
2014-10-21 08:58:49 +00:00
|
|
|
#include <sys/types.h>
|
2014-05-10 11:09:48 +00:00
|
|
|
|
2016-01-18 19:16:06 +00: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-26 14:08:39 +00: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 11:09:48 +00:00
|
|
|
int proto, const char *desc, unsigned int timestamp);
|
2012-05-01 22:47:42 +00:00
|
|
|
|
|
|
|
int update_pinhole(unsigned short uid, unsigned int timestamp);
|
|
|
|
|
|
|
|
int delete_pinhole(unsigned short uid);
|
|
|
|
|
|
|
|
int
|
|
|
|
get_pinhole_info(unsigned short uid,
|
|
|
|
char * rem_host, int rem_hostlen, unsigned short * rem_port,
|
2014-05-10 11:09:48 +00:00
|
|
|
char * int_client, int int_clientlen,
|
|
|
|
unsigned short * int_port,
|
|
|
|
int * proto, char * desc, int desclen,
|
|
|
|
unsigned int * timestamp,
|
2012-05-01 22:47:42 +00:00
|
|
|
u_int64_t * packets, u_int64_t * bytes);
|
|
|
|
|
2014-05-10 13:27:03 +00:00
|
|
|
int get_pinhole_uid_by_index(int index);
|
|
|
|
|
2012-05-08 20:51:23 +00:00
|
|
|
int clean_pinhole_list(unsigned int * next_timestamp);
|
|
|
|
|
2014-05-10 11:09:48 +00:00
|
|
|
#endif /* ENABLE_UPNPPINHOLE */
|
2012-04-26 14:08:39 +00:00
|
|
|
|
|
|
|
#endif
|