1 /* $Id: testnftpinhole.c,v 1.2 2019/06/30 19:49:18 nanard Exp $ */
2 /* MiniUPnP project
3  * http://miniupnp.free.fr/ or http://miniupnp.tuxfamily.org/
4  * (c) 2012-2020 Thomas Bernard
5  * This software is subject to the conditions detailed
6  * in the LICENCE file provided within the distribution */
7 
8 #include <stdio.h>
9 #include <stdlib.h>
10 #include <netinet/in.h>
11 #include <syslog.h>
12 
13 #include "config.h"
14 #include "../miniupnpdtypes.h"
15 #include "nftpinhole.h"
16 #include "../commonrdr.h"
17 #include "../upnputils.h"
18 
19 struct lan_addr_list lan_addrs;
20 time_t startup_time = 0;
21 
main(int argc,char ** argv)22 int main(int argc, char * * argv)
23 {
24 	int uid;
25 
26 	openlog("testnftpinhole", LOG_PERROR|LOG_CONS, LOG_LOCAL0);
27 
28 	uid = add_pinhole("eth0", NULL, 0, "ff::123", 54321, IPPROTO_TCP,
29 	                  "dummy description", upnp_time() + 60 /* timestamp */);
30 	syslog(LOG_INFO, "uid=%d", uid);
31 	return 0;
32 }
33 
34