亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? ipvsadm.c

?? 實現了集群的實現 完成了資源負載平衡等問題
?? C
?? 第 1 頁 / 共 4 頁
字號:
	ce.dest.weight = 1;	/* Set direct routing as default forwarding method */	ce.dest.conn_flags = IP_VS_CONN_F_DROUTE;	/* Set the default persistent granularity to /32 mask */	ce.svc.netmask = ((u_int32_t) 0xffffffff);	if (parse_options(argc, argv, &ce, &options, &format))		return -1;	generic_opt_check(ce.cmd, options);	if (ce.cmd == CMD_ADD || ce.cmd == CMD_EDIT) {		/* Make sure that port zero service is persistent */		if (!ce.svc.fwmark && !ce.svc.port &&		    (ce.svc.flags != IP_VS_SVC_F_PERSISTENT))			fail(2, "Zero port specified "			     "for non-persistent service");		/* Set the default scheduling algorithm if not specified */		if (strlen(ce.svc.sched_name) == 0)			strcpy(ce.svc.sched_name, DEF_SCHED);	}	if (ce.cmd == CMD_STARTDAEMON && strlen(ce.daemon.mcast_ifn) == 0)		strcpy(ce.daemon.mcast_ifn, DEF_MCAST_IFN);	if (ce.cmd == CMD_ADDDEST || ce.cmd == CMD_EDITDEST) {		/*		 * The destination port must be equal to the service port		 * if the IP_VS_CONN_F_TUNNEL or IP_VS_CONN_F_DROUTE is set.		 * Don't worry about this if fwmark is used.		 */		if (!ce.svc.fwmark &&		    (ce.dest.conn_flags == IP_VS_CONN_F_TUNNEL		     || ce.dest.conn_flags == IP_VS_CONN_F_DROUTE))			ce.dest.port = ce.svc.port;	}	switch (ce.cmd) {	case CMD_LIST:		if ((options & OPT_CONNECTION ||		     options & OPT_TIMEOUT || options & OPT_DAEMON) &&		    (options & OPT_STATS ||		     options & OPT_PERSISTENTCONN ||		     options & OPT_RATE || options & OPT_THRESHOLDS))			fail(2, "options conflicts in the list command");		if (options & OPT_CONNECTION)			list_conn(format);		else if (options & OPT_SERVICE)			list_service(&ce.svc, format);		else if (options & OPT_TIMEOUT)			list_timeout();		else if (options & OPT_DAEMON)			list_daemon();		else			list_all(format);		return 0;	case CMD_RESTORE:		return restore_table(argc, argv, reading_stdin);	case CMD_SAVE:		format |= FMT_RULE;		list_all(format);		return 0;	case CMD_FLUSH:		result = ipvs_flush();		break;	case CMD_ADD:		result = ipvs_add_service(&ce.svc);		break;	case CMD_EDIT:		result = ipvs_update_service(&ce.svc);		break;	case CMD_DEL:		result = ipvs_del_service(&ce.svc);		break;	case CMD_ZERO:		result = ipvs_zero_service(&ce.svc);		break;	case CMD_ADDDEST:		result = ipvs_add_dest(&ce.svc, &ce.dest);		break;	case CMD_EDITDEST:		result = ipvs_update_dest(&ce.svc, &ce.dest);		break;	case CMD_DELDEST:		result = ipvs_del_dest(&ce.svc, &ce.dest);		break;	case CMD_TIMEOUT:		result = ipvs_set_timeout(&ce.timeout);		break;	case CMD_STARTDAEMON:		result = ipvs_start_daemon(&ce.daemon);		break;	case CMD_STOPDAEMON:		result = ipvs_stop_daemon(&ce.daemon);	}	if (result)		fprintf(stderr, "%s\n", ipvs_strerror(errno));	return result;}static int string_to_number(const char *s, int min, int max){	long number;	char *end;	errno = 0;	number = strtol(s, &end, 10);	if (*end == '\0' && end != s) {		/* We parsed a number, let's see if we want this. */		if (errno != ERANGE && min <= number && number <= max)			return number;	}	return -1;}/* * Parse the timeout value. */static int parse_timeout(char *buf, int min, int max){	int i;	/* it is just for parsing timeout of persistent service */	if (buf == NULL)		return IPVS_SVC_PERSISTENT_TIMEOUT;	if ((i=string_to_number(buf, min, max)) == -1)		fail(2, "invalid timeout value `%s' specified", buf);	return i;}/* * Parse IP fwmark from the argument. */static unsigned int parse_fwmark(char *buf){	unsigned long l;	char *end;	errno = 0;	l = strtol(buf, &end, 10);	if (*end != '\0' || end == buf ||	    errno == ERANGE || l <= 0 || l > UINT_MAX)		fail(2, "invalid fwmark value `%s' specified", buf);	return l;}/* * Get netmask. * Return 0 if failed, *	  1 if addr read */static int parse_netmask(char *buf, u_int32_t *addr){	struct in_addr inaddr;	if(buf == NULL)		return 0;	if (inet_aton(buf, &inaddr) != 0)		*addr = inaddr.s_addr;	else if (host_to_addr(buf, &inaddr) != -1)		*addr = inaddr.s_addr;	else		return 0;	return 1;}/* * Get IP address and port from the argument. * Result is a logical or of * SERVICE_NONE:   no service elements set/error * SERVICE_ADDR:   addr set * SERVICE_PORT:   port set */static intparse_service(char *buf, u_int16_t proto, u_int32_t *addr, u_int16_t *port){	char *portp;	long portn;	int result=SERVICE_NONE;	struct in_addr inaddr;	if(buf==NULL || str_is_digit(buf))		return SERVICE_NONE;	portp = strchr(buf, ':');	if (portp != NULL)		*portp = '\0';	if (inet_aton(buf, &inaddr) != 0)		*addr = inaddr.s_addr;	else if (host_to_addr(buf, &inaddr) != -1)		*addr = inaddr.s_addr;	else		return SERVICE_NONE;	result |= SERVICE_ADDR;	if (portp != NULL){		result |= SERVICE_PORT;		if ((portn=string_to_number(portp+1, 0, 65535)) != -1)			*port = htons(portn);		else if ((portn=service_to_port(portp+1, proto)) != -1)			*port = htons(portn);		else			return SERVICE_NONE;	}	return result;}static voidgeneric_opt_check(int command, int options){	int i, j;	int last = 0, count = 0;	/* Check that commands are valid with options. */	i = command - CMD_NONE -1;	for (j = 0; j < NUMBER_OF_OPT; j++) {		if (!(options & (1<<j))) {			if (commands_v_options[i][j] == '+')				fail(2, "You need to supply the '%s' "				     "option for the '%s' command",				     optnames[j], cmdnames[i]);		} else {			if (commands_v_options[i][j] == 'x')				fail(2, "Illegal '%s' option with "				     "the '%s' command",				     optnames[j], cmdnames[i]);			if (commands_v_options[i][j] == '1') {				count++;				if (count == 1) {					last = j;					continue;				}				fail(2, "The option '%s' conflicts with the "				     "'%s' option in the '%s' command",				     optnames[j], optnames[last], cmdnames[i]);			}		}	}}static inline const char *opt2name(int option){	const char **ptr;	for (ptr = optnames; option > 1; option >>= 1, ptr++);	return *ptr;}static voidset_command(int *cmd, const int newcmd){	if (*cmd != CMD_NONE)		fail(2, "multiple commands specified");	*cmd = newcmd;}static voidset_option(unsigned int *options, unsigned int option){	if (*options & option)		fail(2, "multiple '%s' options specified", opt2name(option));	*options |= option;}static void tryhelp_exit(const char *program, const int exit_status){	fprintf(stderr, "Try `%s -h' or '%s --help' for more information.\n",		program, program);	exit(exit_status);}static void usage_exit(const char *program, const int exit_status){	FILE *stream;	if (exit_status != 0)		stream = stderr;	else		stream = stdout;	version(stream);	fprintf(stream,		"Usage:\n"		"  %s -A|E -t|u|f service-address [-s scheduler] [-p [timeout]] [-M netmask]\n"		"  %s -D -t|u|f service-address\n"		"  %s -C\n"		"  %s -R\n"		"  %s -S [-n]\n"		"  %s -a|e -t|u|f service-address -r server-address [options]\n"		"  %s -d -t|u|f service-address -r server-address\n"		"  %s -L|l [options]\n"		"  %s -Z [-t|u|f service-address]\n"		"  %s --set tcp tcpfin udp\n"		"  %s --start-daemon state [--mcast-interface interface] [--syncid sid]\n"		"  %s --stop-daemon state\n"		"  %s -h\n\n",		program, program, program,		program, program, program, program, program,		program, program, program, program, program);	fprintf(stream,		"Commands:\n"		"Either long or short options are allowed.\n"		"  --add-service     -A        add virtual service with options\n"		"  --edit-service    -E        edit virtual service with options\n"		"  --delete-service  -D        delete virtual service\n"		"  --clear           -C        clear the whole table\n"		"  --restore         -R        restore rules from stdin\n"		"  --save            -S        save rules to stdout\n"		"  --add-server      -a        add real server with options\n"		"  --edit-server     -e        edit real server with options\n"		"  --delete-server   -d        delete real server\n"		"  --list            -L|-l     list the table\n"		"  --zero            -Z        zero counters in a service or all services\n"		"  --set tcp tcpfin udp        set connection timeout values\n"		"  --start-daemon              start connection sync daemon\n"		"  --stop-daemon               stop connection sync daemon\n"		"  --help            -h        display this help message\n\n"		);	fprintf(stream,		"Options:\n"		"  --tcp-service  -t service-address   service-address is host[:port]\n"		"  --udp-service  -u service-address   service-address is host[:port]\n"		"  --fwmark-service  -f fwmark         fwmark is an integer greater than zero\n"		"  --scheduler    -s scheduler         one of " SCHEDULERS ",\n"		"                                      the default scheduler is %s.\n"		"  --persistent   -p [timeout]         persistent service\n"		"  --netmask      -M netmask           persistent granularity mask\n"		"  --real-server  -r server-address    server-address is host (and port)\n"		"  --gatewaying   -g                   gatewaying (direct routing) (default)\n"		"  --ipip         -i                   ipip encapsulation (tunneling)\n"		"  --masquerading -m                   masquerading (NAT)\n"		"  --weight       -w weight            capacity of real server\n"		"  --u-threshold  -x uthreshold        upper threshold of connections\n"		"  --l-threshold  -y lthreshold        lower threshold of connections\n"		"  --mcast-interface interface         multicast interface for connection sync\n"		"  --syncid sid                        syncid for connection sync (default=255)\n"		"  --connection   -c                   output of current IPVS connections\n"		"  --timeout                           output of timeout (tcp tcpfin udp)\n"		"  --daemon                            output of daemon information\n"		"  --stats                             output of statistics information\n"		"  --rate                              output of rate information\n"		"  --exact                             expand numbers (display exact values)\n"		"  --thresholds                        output of thresholds information\n"		"  --persistent-conn                   output of persistent connection info\n"		"  --sort                              sorting output of service/server entries\n"		"  --numeric      -n                   numeric output of addresses and ports\n",		DEF_SCHED);	exit(exit_status);}static void version_exit(const int exit_status){	FILE *stream;	if (exit_status != 0)		stream = stderr;	else		stream = stdout;	version(stream);	exit(exit_status);}static void version(FILE *stream){	fprintf(stream,		"ipvsadm " IPVSADM_VERSION " (compiled with "		IPVS_OPTION_PROCESSING " and IPVS v%d.%d.%d)\n",		NVERSION(IP_VS_VERSION_CODE));}static void fail(int err, char *msg, ...){	va_list args;	va_start(args, msg);	vfprintf(stderr, msg, args);	va_end(args);	fprintf(stderr, "\n");	exit(err);}static int modprobe_ipvs(void){	char *argv[] = { "/sbin/modprobe", "--", "ip_vs", NULL };	int child;	int status;	int rc;	if (!(child = fork())) {		execv(argv[0], argv);		exit(1);	}	rc = waitpid(child, &status, 0);	if (!WIFEXITED(status) || WEXITSTATUS(status)) {		return 1;	}	return 0;}static void check_ipvs_version(void){	/* verify the IPVS version */	if (ipvs_info.version <	    IPVS_VERSION(MINIMUM_IPVS_VERSION_MAJOR,			 MINIMUM_IPVS_VERSION_MINOR,			 MINIMUM_IPVS_VERSION_PATCH)) {		fprintf(stderr,			"Warning: IPVS version mismatch: \n"			"  Kernel compiled with IPVS version %d.%d.%d\n"			"  ipvsadm " IPVSADM_VERSION_NO			"  requires minimum IPVS version %d.%d.%d\n\n",			NVERSION(ipvs_info.version),			MINIMUM_IPVS_VERSION_MAJOR,			MINIMUM_IPVS_VERSION_MINOR,			MINIMUM_IPVS_VERSION_PATCH);	}}static void print_conn(char *buf, unsigned int format){	char            protocol[8];	unsigned short  proto;	struct in_addr  caddr;	unsigned short  cport;	struct in_addr  vaddr;	unsigned short  vport;	struct in_addr  daddr;	unsigned short  dport;	char            state[16];	unsigned int    expires;

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
国产精品夜夜嗨| 欧美成人精品1314www| 91麻豆精品91久久久久久清纯| 精品国产免费一区二区三区四区| 亚洲黄色免费网站| 国产aⅴ综合色| 91精品国产欧美日韩| 亚洲欧美日韩国产另类专区| 国产制服丝袜一区| 欧美精品粉嫩高潮一区二区| 亚洲柠檬福利资源导航| 国产精品1区2区| 精品免费日韩av| 青青草国产精品亚洲专区无| 欧美色区777第一页| 亚洲欧美激情插| 99国产精品久| 国产精品网站在线| 国产精品羞羞答答xxdd| 欧美精品一区视频| 久久国产成人午夜av影院| 在线欧美日韩精品| 亚洲乱码一区二区三区在线观看| 成人做爰69片免费看网站| 精品久久久影院| 老鸭窝一区二区久久精品| 91精品国产综合久久精品性色| 一区二区三区免费| 欧美亚洲图片小说| 亚洲国产一区二区三区青草影视 | 7777女厕盗摄久久久| 亚洲日本va午夜在线影院| 99久久婷婷国产综合精品| 亚洲欧洲精品一区二区三区不卡| 成人动漫一区二区| 中文字幕一区二区视频| av男人天堂一区| 亚洲视频电影在线| 在线国产电影不卡| 午夜av区久久| 精品99一区二区| 国产91富婆露脸刺激对白| 国产精品毛片a∨一区二区三区| 成人中文字幕电影| 亚洲天堂a在线| 在线观看日韩高清av| 亚洲成av人片一区二区梦乃| 欧美夫妻性生活| 极品尤物av久久免费看| 国产女人18毛片水真多成人如厕 | 精品国产自在久精品国产| 日本亚洲一区二区| 久久精品人人爽人人爽| 成人不卡免费av| 亚洲午夜精品17c| 日韩欧美国产综合| hitomi一区二区三区精品| 亚洲日本在线观看| 91精品国产色综合久久| 国产高清不卡二三区| 自拍偷拍国产精品| 欧美巨大另类极品videosbest| 国产一区二区三区美女| 国产精品高潮呻吟| 欧美伦理影视网| 成人免费电影视频| 日本中文在线一区| 国产精品妹子av| 69堂精品视频| 91麻豆福利精品推荐| 日韩不卡一区二区三区 | 国产一区二区三区四| 中文字幕在线一区二区三区| 欧美在线观看视频一区二区| 捆绑调教美女网站视频一区| 亚洲人123区| 精品国产伦一区二区三区观看体验| av资源站一区| 精品一区二区成人精品| 一区二区在线观看不卡| 精品成人在线观看| 欧美亚洲综合另类| 成人综合在线视频| 久国产精品韩国三级视频| 亚洲美女屁股眼交| 久久久噜噜噜久噜久久综合| 91麻豆精品国产91久久久久久| 成人免费毛片app| 狠狠色狠狠色综合系列| 午夜久久久久久久久久一区二区| 亚洲欧洲一区二区三区| ww亚洲ww在线观看国产| 制服丝袜激情欧洲亚洲| 91亚洲永久精品| 国产成人精品一区二| 青椒成人免费视频| 天堂久久一区二区三区| 亚洲美女在线国产| 国产精品女主播av| 久久看人人爽人人| 精品国一区二区三区| 日韩欧美亚洲一区二区| 欧美日韩国产天堂| 欧美亚日韩国产aⅴ精品中极品| 成人免费av网站| 国产成人精品亚洲777人妖| 国产一区二区在线免费观看| 六月丁香婷婷久久| 麻豆精品国产传媒mv男同| 日韩精品免费视频人成| 香蕉av福利精品导航| 一区二区三区国产豹纹内裤在线| 亚洲私人黄色宅男| 亚洲欧美另类久久久精品| 国产精品乱码人人做人人爱| 国产精品久久久久久久久动漫 | 色综合久久99| 色综合天天综合网国产成人综合天| 99re6这里只有精品视频在线观看| 国产成人精品亚洲777人妖| 国产福利视频一区二区三区| 国产成人在线看| 不卡的av网站| 91成人免费在线| 欧美女孩性生活视频| 日韩一区二区三区免费看 | 69堂国产成人免费视频| 日韩欧美123| 国产日韩av一区二区| 国产精品国产三级国产三级人妇 | 欧美日韩国产综合视频在线观看| 欧美丰满少妇xxxbbb| 欧美成人女星排行榜| 国产欧美日韩在线观看| 亚洲美女在线国产| 日本在线不卡视频一二三区| 国产九九视频一区二区三区| 大胆亚洲人体视频| 欧美午夜影院一区| 日韩美女视频在线| 中文字幕av免费专区久久| 一区二区久久久久久| 日本美女一区二区三区视频| 国产精品影视在线观看| 色综合视频在线观看| 777午夜精品免费视频| 国产欧美一区二区精品仙草咪| 亚洲精品免费在线播放| 日韩激情一区二区| 成人免费看片app下载| 欧美日韩亚洲综合一区二区三区 | 国产乱子伦视频一区二区三区| av不卡一区二区三区| 欧美日韩精品欧美日韩精品一 | 国产视频一区不卡| 亚洲福利一区二区三区| 国产激情视频一区二区在线观看| 色嗨嗨av一区二区三区| 26uuu亚洲综合色欧美| 亚洲品质自拍视频| 国模冰冰炮一区二区| 欧美中文字幕不卡| 国产欧美日韩在线观看| 日韩激情av在线| 91片黄在线观看| 久久日韩精品一区二区五区| 一级中文字幕一区二区| 岛国一区二区在线观看| 日韩一级视频免费观看在线| 亚洲美女淫视频| 成人在线综合网站| 日韩精品一区二区三区视频播放| 亚洲精品乱码久久久久久黑人| 国产91高潮流白浆在线麻豆| 日韩一区二区精品在线观看| 一区二区三区精品视频| 成人高清av在线| 久久久精品中文字幕麻豆发布| 天天综合天天综合色| 日本高清不卡一区| 中文字幕一区av| 国产福利一区二区三区视频在线 | 欧美日韩日日骚| 亚洲精品伦理在线| 成人高清在线视频| 国产欧美日韩在线观看| 激情综合色播激情啊| 欧美一卡2卡3卡4卡| 天天av天天翘天天综合网| 欧美性色黄大片| 亚洲制服丝袜av| 欧美亚洲国产一区二区三区va | 欧美美女视频在线观看| 亚洲va天堂va国产va久| 欧美综合一区二区三区| 亚洲视频1区2区| 91麻豆自制传媒国产之光| 亚洲天堂精品视频| 91理论电影在线观看| 亚洲欧美日韩一区二区三区在线观看|