miniupnp/miniupnpd/pf/testpfpinhole.c
Thomas Bernard f934bf5d17 Start to code IPv6 "pinhole" for pf
Also update tests in miniupnpd/pf/
2012-04-18 22:53:51 +02:00

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;
}