testipfrdr.c

来自「很小的linux下的upnp服务器端代码适合嵌入式系统」· C语言 代码 · 共 26 行

C
26
字号
/* $Id: testipfrdr.c,v 1.3 2007/10/01 16:21:23 nanard Exp $ */#include <stdio.h>#include <syslog.h>#include <netinet/in.h>#include "ipfrdr.h"extern voidtest_list_nat_rules();/* test program for ipfrdr.c */intmain(int argc, char * * argv){	openlog("testipfrdrd", LOG_CONS|LOG_PERROR, LOG_USER);	printf("List nat rules :\n");	test_list_nat_rules();	printf("Add redirection !\n");	add_redirect_rule2("ep0", 12345, "1.2.3.4", 54321, IPPROTO_UDP,	                   "redirection description");	printf("List nat rules :\n");	test_list_nat_rules();	return 0;}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?