Electroneum
iptpinhole.h
Go to the documentation of this file.
1 /* $Id: iptpinhole.h,v 1.5 2012/05/08 20:41:45 nanard Exp $ */
2 /* MiniUPnP project
3  * http://miniupnp.free.fr/ or http://miniupnp.tuxfamily.org/
4  * (c) 2012-2016 Thomas Bernard
5  * This software is subject to the conditions detailed
6  * in the LICENCE file provided within the distribution */
7 #ifndef IPTPINHOLE_H_INCLUDED
8 #define IPTPINHOLE_H_INCLUDED
9 
10 #ifdef ENABLE_UPNPPINHOLE
11 #include <sys/types.h>
12 
13 int find_pinhole(const char * ifname,
14  const char * rem_host, unsigned short rem_port,
15  const char * int_client, unsigned short int_port,
16  int proto,
17  char *desc, int desc_len, unsigned int * timestamp);
18 
19 int add_pinhole(const char * ifname,
20  const char * rem_host, unsigned short rem_port,
21  const char * int_client, unsigned short int_port,
22  int proto, const char *desc, unsigned int timestamp);
23 
24 int update_pinhole(unsigned short uid, unsigned int timestamp);
25 
26 int delete_pinhole(unsigned short uid);
27 
28 int
29 get_pinhole_info(unsigned short uid,
30  char * rem_host, int rem_hostlen, unsigned short * rem_port,
31  char * int_client, int int_clientlen,
32  unsigned short * int_port,
33  int * proto, char * desc, int desclen,
34  unsigned int * timestamp,
35  u_int64_t * packets, u_int64_t * bytes);
36 
37 int get_pinhole_uid_by_index(int index);
38 
39 int clean_pinhole_list(unsigned int * next_timestamp);
40 
41 #endif /* ENABLE_UPNPPINHOLE */
42 
43 #endif