Annotation of embedaddon/miniupnpd/ipfw/testipfwrdr.c, revision 1.1.1.1
1.1 misho 1: /*
2: * MiniUPnP project
3: * http://miniupnp.free.fr/ or http://miniupnp.tuxfamily.org/
4: * (c) 2009 Jardel Weyrich
5: * This software is subject to the conditions detailed
6: * in the LICENCE file provided within the distribution
7: */
8:
9: #include <stdio.h>
10: #include <syslog.h>
11: #include <netinet/in.h>
12: #include "ipfwrdr.h"
13:
14: // test program for ipfwrdr.c
15:
16: int main(int argc, char * * argv) {
17: openlog("testipfwrdrd", LOG_CONS | LOG_PERROR, LOG_USER);
18: init_redirect();
19: delete_redirect_rule("lo", 2222, IPPROTO_TCP);
20: add_redirect_rule2("lo", 2222, "10.1.1.16", 4444, IPPROTO_TCP, "miniupnpd");
21: get_redirect_rule("lo", 2222, IPPROTO_TCP, NULL, 0, NULL, NULL, 0, NULL, NULL);
22: shutdown_redirect();
23: return 0;
24: }
25:
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>