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

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

?? xt_time.c

?? linux 內核源代碼
?? C
字號:
/* *	xt_time *	Copyright ? CC Computer Consultants GmbH, 2007 *	Contact: <jengelh@computergmbh.de> * *	based on ipt_time by Fabrice MARIE <fabrice@netfilter.org> *	This is a module which is used for time matching *	It is using some modified code from dietlibc (localtime() function) *	that you can find at http://www.fefe.de/dietlibc/ *	This file is distributed under the terms of the GNU General Public *	License (GPL). Copies of the GPL can be obtained from gnu.org/gpl. */#include <linux/ktime.h>#include <linux/module.h>#include <linux/skbuff.h>#include <linux/types.h>#include <linux/netfilter/x_tables.h>#include <linux/netfilter/xt_time.h>struct xtm {	u_int8_t month;    /* (1-12) */	u_int8_t monthday; /* (1-31) */	u_int8_t weekday;  /* (1-7) */	u_int8_t hour;     /* (0-23) */	u_int8_t minute;   /* (0-59) */	u_int8_t second;   /* (0-59) */	unsigned int dse;};extern struct timezone sys_tz; /* ouch */static const u_int16_t days_since_year[] = {	0, 31, 59, 90, 120, 151, 181, 212, 243, 273, 304, 334,};static const u_int16_t days_since_leapyear[] = {	0, 31, 60, 91, 121, 152, 182, 213, 244, 274, 305, 335,};/* * Since time progresses forward, it is best to organize this array in reverse, * to minimize lookup time. */enum {	DSE_FIRST = 2039,};static const u_int16_t days_since_epoch[] = {	/* 2039 - 2030 */	25202, 24837, 24472, 24106, 23741, 23376, 23011, 22645, 22280, 21915,	/* 2029 - 2020 */	21550, 21184, 20819, 20454, 20089, 19723, 19358, 18993, 18628, 18262,	/* 2019 - 2010 */	17897, 17532, 17167, 16801, 16436, 16071, 15706, 15340, 14975, 14610,	/* 2009 - 2000 */	14245, 13879, 13514, 13149, 12784, 12418, 12053, 11688, 11323, 10957,	/* 1999 - 1990 */	10592, 10227, 9862, 9496, 9131, 8766, 8401, 8035, 7670, 7305,	/* 1989 - 1980 */	6940, 6574, 6209, 5844, 5479, 5113, 4748, 4383, 4018, 3652,	/* 1979 - 1970 */	3287, 2922, 2557, 2191, 1826, 1461, 1096, 730, 365, 0,};static inline bool is_leap(unsigned int y){	return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0);}/* * Each network packet has a (nano)seconds-since-the-epoch (SSTE) timestamp. * Since we match against days and daytime, the SSTE value needs to be * computed back into human-readable dates. * * This is done in three separate functions so that the most expensive * calculations are done last, in case a "simple match" can be found earlier. */static inline unsigned int localtime_1(struct xtm *r, time_t time){	unsigned int v, w;	/* Each day has 86400s, so finding the hour/minute is actually easy. */	v         = time % 86400;	r->second = v % 60;	w         = v / 60;	r->minute = w % 60;	r->hour   = w / 60;	return v;}static inline void localtime_2(struct xtm *r, time_t time){	/*	 * Here comes the rest (weekday, monthday). First, divide the SSTE	 * by seconds-per-day to get the number of _days_ since the epoch.	 */	r->dse = time / 86400;	/* 1970-01-01 (w=0) was a Thursday (4). */	r->weekday = (4 + r->dse) % 7;}static void localtime_3(struct xtm *r, time_t time){	unsigned int year, i, w = r->dse;	/*	 * In each year, a certain number of days-since-the-epoch have passed.	 * Find the year that is closest to said days.	 *	 * Consider, for example, w=21612 (2029-03-04). Loop will abort on	 * dse[i] <= w, which happens when dse[i] == 21550. This implies	 * year == 2009. w will then be 62.	 */	for (i = 0, year = DSE_FIRST; days_since_epoch[i] > w;	    ++i, --year)		/* just loop */;	w -= days_since_epoch[i];	/*	 * By now we have the current year, and the day of the year.	 * r->yearday = w;	 *	 * On to finding the month (like above). In each month, a certain	 * number of days-since-New Year have passed, and find the closest	 * one.	 *	 * Consider w=62 (in a non-leap year). Loop will abort on	 * dsy[i] < w, which happens when dsy[i] == 31+28 (i == 2).	 * Concludes i == 2, i.e. 3rd month => March.	 *	 * (A different approach to use would be to subtract a monthlength	 * from w repeatedly while counting.)	 */	if (is_leap(year)) {		for (i = ARRAY_SIZE(days_since_leapyear) - 1;		    i > 0 && days_since_year[i] > w; --i)			/* just loop */;	} else {		for (i = ARRAY_SIZE(days_since_year) - 1;		    i > 0 && days_since_year[i] > w; --i)			/* just loop */;	}	r->month    = i + 1;	r->monthday = w - days_since_year[i] + 1;	return;}static bool xt_time_match(const struct sk_buff *skb,                          const struct net_device *in,                          const struct net_device *out,                          const struct xt_match *match, const void *matchinfo,                          int offset, unsigned int protoff, bool *hotdrop){	const struct xt_time_info *info = matchinfo;	unsigned int packet_time;	struct xtm current_time;	s64 stamp;	/*	 * We cannot use get_seconds() instead of __net_timestamp() here.	 * Suppose you have two rules:	 * 	1. match before 13:00	 * 	2. match after 13:00	 * If you match against processing time (get_seconds) it	 * may happen that the same packet matches both rules if	 * it arrived at the right moment before 13:00.	 */	if (skb->tstamp.tv64 == 0)		__net_timestamp((struct sk_buff *)skb);	stamp = ktime_to_ns(skb->tstamp);	do_div(stamp, NSEC_PER_SEC);	if (info->flags & XT_TIME_LOCAL_TZ)		/* Adjust for local timezone */		stamp -= 60 * sys_tz.tz_minuteswest;	/*	 * xt_time will match when _all_ of the following hold:	 *   - 'now' is in the global time range date_start..date_end	 *   - 'now' is in the monthday mask	 *   - 'now' is in the weekday mask	 *   - 'now' is in the daytime range time_start..time_end	 * (and by default, libxt_time will set these so as to match)	 */	if (stamp < info->date_start || stamp > info->date_stop)		return false;	packet_time = localtime_1(&current_time, stamp);	if (info->daytime_start < info->daytime_stop) {		if (packet_time < info->daytime_start ||		    packet_time > info->daytime_stop)			return false;	} else {		if (packet_time < info->daytime_start &&		    packet_time > info->daytime_stop)			return false;	}	localtime_2(&current_time, stamp);	if (!(info->weekdays_match & (1 << current_time.weekday)))		return false;	/* Do not spend time computing monthday if all days match anyway */	if (info->monthdays_match != XT_TIME_ALL_MONTHDAYS) {		localtime_3(&current_time, stamp);		if (!(info->monthdays_match & (1 << current_time.monthday)))			return false;	}	return true;}static bool xt_time_check(const char *tablename, const void *ip,                          const struct xt_match *match, void *matchinfo,                          unsigned int hook_mask){	struct xt_time_info *info = matchinfo;	if (info->daytime_start > XT_TIME_MAX_DAYTIME ||	    info->daytime_stop > XT_TIME_MAX_DAYTIME) {		printk(KERN_WARNING "xt_time: invalid argument - start or "		       "stop time greater than 23:59:59\n");		return false;	}	return true;}static struct xt_match xt_time_reg[] __read_mostly = {	{		.name       = "time",		.family     = AF_INET,		.match      = xt_time_match,		.matchsize  = sizeof(struct xt_time_info),		.checkentry = xt_time_check,		.me         = THIS_MODULE,	},	{		.name       = "time",		.family     = AF_INET6,		.match      = xt_time_match,		.matchsize  = sizeof(struct xt_time_info),		.checkentry = xt_time_check,		.me         = THIS_MODULE,	},};static int __init xt_time_init(void){	return xt_register_matches(xt_time_reg, ARRAY_SIZE(xt_time_reg));}static void __exit xt_time_exit(void){	xt_unregister_matches(xt_time_reg, ARRAY_SIZE(xt_time_reg));}module_init(xt_time_init);module_exit(xt_time_exit);MODULE_AUTHOR("Jan Engelhardt <jengelh@computergmbh.de>");MODULE_DESCRIPTION("netfilter time match");MODULE_LICENSE("GPL");MODULE_ALIAS("ipt_time");MODULE_ALIAS("ip6t_time");

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
亚洲综合在线五月| 丝袜a∨在线一区二区三区不卡| 色呦呦日韩精品| 日本欧美肥老太交大片| 中文av字幕一区| 欧美一区二区在线看| 成人av手机在线观看| 蜜桃视频第一区免费观看| 中文字幕永久在线不卡| 精品久久国产老人久久综合| 91国产福利在线| 国产九九视频一区二区三区| 亚洲成人av电影在线| 国产精品久久久久国产精品日日| 欧美一区二区三区小说| 色综合网色综合| 国产成人综合亚洲网站| 日本亚洲三级在线| 亚洲国产一二三| 国产精品成人午夜| 26uuu精品一区二区三区四区在线| 欧美性欧美巨大黑白大战| 成+人+亚洲+综合天堂| 久久99国产精品久久| 婷婷一区二区三区| 亚洲激情图片小说视频| 国产精品久久久久久久久动漫| 亚洲精品一区二区三区福利| 欧美一区二区三区日韩视频| 欧美性色综合网| 日本福利一区二区| 99久久99久久综合| 成人国产免费视频| 国产成人aaa| 国产成人av一区二区三区在线 | 亚洲精品五月天| 欧美激情一区在线| 国产日产欧美一区| 国产欧美日韩亚州综合| 国产亚洲欧美中文| 久久久精品日韩欧美| 久久亚洲欧美国产精品乐播 | 91精品国产高清一区二区三区 | 日韩欧美在线不卡| 欧美片网站yy| 欧美日韩一区二区三区不卡| 欧美系列亚洲系列| 欧美日韩在线亚洲一区蜜芽| 欧美天堂亚洲电影院在线播放| 色94色欧美sute亚洲线路一ni| 91免费视频观看| 91福利视频在线| 欧美亚洲动漫精品| 欧美日本乱大交xxxxx| 制服丝袜日韩国产| 欧美变态tickling挠脚心| 亚洲精品一区二区三区99| 久久久国产精品不卡| 国产精品区一区二区三| 最好看的中文字幕久久| 夜色激情一区二区| 日本vs亚洲vs韩国一区三区二区| 美国十次了思思久久精品导航| 伦理电影国产精品| 国产不卡视频在线播放| 99久久精品免费看国产 | 欧美成人高清电影在线| 精品少妇一区二区三区免费观看| 精品av久久707| 日本一区二区高清| 菠萝蜜视频在线观看一区| 91视频在线观看免费| 欧美日韩一区二区欧美激情| 欧美va在线播放| 久久久久久影视| 亚洲精品免费在线观看| 欧美aa在线视频| 成人性生交大片免费看视频在线| 一本在线高清不卡dvd| 欧美一三区三区四区免费在线看| 久久久久亚洲综合| 亚洲精品国产高清久久伦理二区| 天天操天天干天天综合网| 国产精品自拍av| 色噜噜久久综合| 欧美一激情一区二区三区| 中文字幕免费不卡在线| 亚洲成人自拍网| 国产成人综合亚洲网站| 欧美丝袜丝交足nylons| 久久青草欧美一区二区三区| 亚洲精品国产无套在线观| 蜜桃av噜噜一区二区三区小说| 成人午夜av在线| 欧美浪妇xxxx高跟鞋交| 欧美韩国日本一区| 日韩国产精品91| 91免费版pro下载短视频| 欧美岛国在线观看| 一区二区理论电影在线观看| 黑人巨大精品欧美一区| 欧美熟乱第一页| 国产精品沙发午睡系列990531| 日韩福利电影在线观看| 99re6这里只有精品视频在线观看| 91精品久久久久久久久99蜜臂| 国产精品你懂的在线欣赏| 欧美亚洲国产bt| 中国av一区二区三区| 麻豆精品视频在线| 欧美日韩一区中文字幕| 中文字幕电影一区| 精品一区二区三区免费| 欧美视频精品在线观看| 中文字幕亚洲欧美在线不卡| 久久99热国产| 欧美一区二区三区四区视频| 一区二区三区中文字幕在线观看| 国产精品正在播放| 欧美成人a∨高清免费观看| 亚洲一区二区三区视频在线播放| 成人成人成人在线视频| 精品国免费一区二区三区| 婷婷激情综合网| 91久久精品一区二区三区| 国产精品狼人久久影院观看方式| 九九久久精品视频| 欧美一区二区三区思思人| 五月综合激情网| 欧美色视频在线| 亚洲伊人色欲综合网| 99r国产精品| 国产精品久久久久久久久动漫| 国产成人综合亚洲91猫咪| 久久综合99re88久久爱| 久久精品国产久精国产爱| 91精品国产综合久久久蜜臀粉嫩 | 色综合天天综合网国产成人综合天 | 视频一区在线视频| 欧美日韩一区二区三区视频| 亚洲国产美国国产综合一区二区| 亚洲欧洲精品一区二区精品久久久 | 亚洲啪啪综合av一区二区三区| 丁香婷婷深情五月亚洲| 国产性做久久久久久| 国产精品1区二区.| 欧美国产日韩一二三区| 不卡电影免费在线播放一区| 国产精品高潮呻吟| 91美女视频网站| 亚洲国产日韩a在线播放性色| 在线免费观看一区| 亚洲成av人片一区二区梦乃| 欧美精品在欧美一区二区少妇| 亚瑟在线精品视频| 日韩欧美精品三级| 国产一区二三区| 中文在线资源观看网站视频免费不卡| 国产91丝袜在线播放| 亚洲欧美日韩在线| 欧美日本一区二区| 国产制服丝袜一区| 国产精品亲子乱子伦xxxx裸| 91日韩在线专区| 亚洲五码中文字幕| 日韩欧美国产成人一区二区| 国产精品1区2区3区| 亚洲人成亚洲人成在线观看图片| 国产精品入口麻豆九色| 一本色道综合亚洲| 日韩精品一二三四| 久久亚洲一区二区三区明星换脸 | 日本一区二区不卡视频| 91麻豆免费视频| 日韩av电影免费观看高清完整版在线观看 | 成人激情av网| 亚洲午夜精品在线| 精品国产欧美一区二区| www.亚洲在线| 肉丝袜脚交视频一区二区| 久久久一区二区| 在线观看视频一区二区| 韩国午夜理伦三级不卡影院| 亚洲欧美一区二区在线观看| 欧美巨大另类极品videosbest| 韩国中文字幕2020精品| 亚洲精品午夜久久久| 久久一区二区三区四区| 日本道在线观看一区二区| 精品综合免费视频观看| 18欧美亚洲精品| 精品裸体舞一区二区三区| 91丨porny丨在线| 极品少妇一区二区| 依依成人综合视频| 久久精品日产第一区二区三区高清版| 色狠狠色噜噜噜综合网| 韩国在线一区二区| 偷拍日韩校园综合在线| 亚洲欧洲性图库|