mirror of
https://github.com/status-im/miniupnp.git
synced 2025-01-10 06:06:03 +00:00
f934bf5d17
Also update tests in miniupnpd/pf/
37 lines
843 B
C
37 lines
843 B
C
/* $Id: testpfpinhole.c,v 1.1 2012/04/18 20:45:33 nanard Exp $ */
|
|
/* MiniUPnP project
|
|
* http://miniupnp.free.fr/ or http://miniupnp.tuxfamily.org/
|
|
* (c) 2006-2012 Thomas Bernard
|
|
* This software is subject to the conditions detailed
|
|
* in the LICENCE file provided within the distribution */
|
|
|
|
#include <stdio.h>
|
|
#include <stdlib.h>
|
|
#include <sys/types.h>
|
|
#include <netinet/in.h>
|
|
#include <syslog.h>
|
|
|
|
#include "obsdrdr.h"
|
|
#include "pfpinhole.h"
|
|
|
|
int runtime_flags = 0;
|
|
const char * tag = NULL;
|
|
|
|
const char * anchor_name = "miniupnpd";
|
|
const char * queue = NULL;
|
|
|
|
int main(int argc, char * *argv)
|
|
{
|
|
int ret;
|
|
|
|
openlog("testpfpinhole", LOG_PERROR, LOG_USER);
|
|
if(init_redirect() < 0) {
|
|
fprintf(stderr, "init_redirect() failed\n");
|
|
return 1;
|
|
}
|
|
|
|
ret = add_pinhole("ep0", "2001::1:2:3", 12345, "123::ff", 54321, IPPROTO_UDP);
|
|
return 0;
|
|
}
|
|
|