File:  [ELWIX - Embedded LightWeight unIX -] / embedaddon / miniupnpd / ipfw / testipfwrdr.c
Revision 1.1.1.1 (vendor branch): download - view: text, annotated - select for diffs - revision graph
Tue Feb 21 23:16:02 2012 UTC (12 years, 4 months ago) by misho
Branches: miniupnpd, elwix, MAIN
CVS tags: v1_5, HEAD
miniupnpd

/*
 * MiniUPnP project
 * http://miniupnp.free.fr/ or http://miniupnp.tuxfamily.org/
 * (c) 2009 Jardel Weyrich
 * This software is subject to the conditions detailed
 * in the LICENCE file provided within the distribution
 */

#include <stdio.h>
#include <syslog.h>
#include <netinet/in.h>
#include "ipfwrdr.h"

// test program for ipfwrdr.c

int main(int argc, char * * argv) {
	openlog("testipfwrdrd", LOG_CONS | LOG_PERROR, LOG_USER);
	init_redirect();
	delete_redirect_rule("lo", 2222, IPPROTO_TCP);
	add_redirect_rule2("lo", 2222, "10.1.1.16", 4444, IPPROTO_TCP, "miniupnpd");
	get_redirect_rule("lo", 2222, IPPROTO_TCP, NULL, 0, NULL, NULL, 0, NULL, NULL);
	shutdown_redirect();
	return 0;
}


FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>