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

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關(guān)于我們
? 蟲蟲下載站

?? ipt_recent.c

?? 優(yōu)龍2410linux2.6.8內(nèi)核源代碼
?? C
?? 第 1 頁 / 共 3 頁
字號:
#endif	if (matchsize != IPT_ALIGN(sizeof(struct ipt_recent_info))) return 0;	/* seconds and hit_count only valid for CHECK/UPDATE */	if(info->check_set & IPT_RECENT_SET) { flag++; if(info->seconds || info->hit_count) return 0; }	if(info->check_set & IPT_RECENT_REMOVE) { flag++; if(info->seconds || info->hit_count) return 0; }	if(info->check_set & IPT_RECENT_CHECK) flag++;	if(info->check_set & IPT_RECENT_UPDATE) flag++;	/* One and only one of these should ever be set */	if(flag != 1) return 0;	/* Name must be set to something */	if(!info->name || !info->name[0]) return 0;	/* Things look good, create a list for this if it does not exist */	/* Lock the linked list while we play with it */	spin_lock_bh(&recent_lock);	/* Look for an entry with this name already created */	/* Finds the end of the list and the entry before the end if current name does not exist */	find_table = r_tables;	while( (last_table = find_table) && strncmp(info->name,find_table->name,IPT_RECENT_NAME_LEN) && (find_table = find_table->next) );	/* If a table already exists just increment the count on that table and return */	if(find_table) { #ifdef DEBUG		if(debug) printk(KERN_INFO RECENT_NAME ": checkentry: table found (%s), incrementing count.\n",info->name);#endif		find_table->count++;		spin_unlock_bh(&recent_lock);		return 1;	}	spin_unlock_bh(&recent_lock);	/* Table with this name not found */	/* Allocate memory for new linked list item */#ifdef DEBUG	if(debug) {		printk(KERN_INFO RECENT_NAME ": checkentry: no table found (%s)\n",info->name);		printk(KERN_INFO RECENT_NAME ": checkentry: Allocationg %d for link-list entry.\n",sizeof(struct recent_ip_tables));	}#endif	curr_table = vmalloc(sizeof(struct recent_ip_tables));	if(curr_table == NULL) return -ENOMEM;	curr_table->list_lock = SPIN_LOCK_UNLOCKED;	curr_table->next = NULL;	curr_table->count = 1;	curr_table->time_pos = 0;	strncpy(curr_table->name,info->name,IPT_RECENT_NAME_LEN);	curr_table->name[IPT_RECENT_NAME_LEN-1] = '\0';	/* Allocate memory for this table and the list of packets in each entry. */#ifdef DEBUG	if(debug) printk(KERN_INFO RECENT_NAME ": checkentry: Allocating %d for table (%s).\n",			sizeof(struct recent_ip_list)*ip_list_tot,			info->name);#endif	curr_table->table = vmalloc(sizeof(struct recent_ip_list)*ip_list_tot);	if(curr_table->table == NULL) { vfree(curr_table); return -ENOMEM; }	memset(curr_table->table,0,sizeof(struct recent_ip_list)*ip_list_tot);#ifdef DEBUG	if(debug) printk(KERN_INFO RECENT_NAME ": checkentry: Allocating %d for pkt_list.\n",			sizeof(u_int32_t)*ip_pkt_list_tot*ip_list_tot);#endif	hold = vmalloc(sizeof(u_int32_t)*ip_pkt_list_tot*ip_list_tot);#ifdef DEBUG	if(debug) printk(KERN_INFO RECENT_NAME ": checkentry: After pkt_list allocation.\n");#endif	if(hold == NULL) { 		printk(KERN_INFO RECENT_NAME ": checkentry: unable to allocate for pkt_list.\n");		vfree(curr_table->table); 		vfree(curr_table);		return -ENOMEM;	}	for(c = 0; c < ip_list_tot; c++) {		curr_table->table[c].last_pkts = hold + c*ip_pkt_list_tot;	}	/* Allocate memory for the hash table */#ifdef DEBUG	if(debug) printk(KERN_INFO RECENT_NAME ": checkentry: Allocating %d for hash_table.\n",			sizeof(int)*ip_list_hash_size);#endif	curr_table->hash_table = vmalloc(sizeof(int)*ip_list_hash_size);	if(!curr_table->hash_table) {		printk(KERN_INFO RECENT_NAME ": checkentry: unable to allocate for hash_table.\n");		vfree(hold);		vfree(curr_table->table); 		vfree(curr_table);		return -ENOMEM;	}	for(c = 0; c < ip_list_hash_size; c++) {		curr_table->hash_table[c] = -1;	}	/* Allocate memory for the time info */#ifdef DEBUG	if(debug) printk(KERN_INFO RECENT_NAME ": checkentry: Allocating %d for time_info.\n",			sizeof(struct time_info_list)*ip_list_tot);#endif	curr_table->time_info = vmalloc(sizeof(struct time_info_list)*ip_list_tot);	if(!curr_table->time_info) {		printk(KERN_INFO RECENT_NAME ": checkentry: unable to allocate for time_info.\n");		vfree(curr_table->hash_table);		vfree(hold);		vfree(curr_table->table); 		vfree(curr_table);		return -ENOMEM;	}	for(c = 0; c < ip_list_tot; c++) {		curr_table->time_info[c].position = c;		curr_table->time_info[c].time = 0;	}	/* Put the new table in place */	spin_lock_bh(&recent_lock);	find_table = r_tables;	while( (last_table = find_table) && strncmp(info->name,find_table->name,IPT_RECENT_NAME_LEN) && (find_table = find_table->next) );	/* If a table already exists just increment the count on that table and return */	if(find_table) { 		find_table->count++;			spin_unlock_bh(&recent_lock);#ifdef DEBUG		if(debug) printk(KERN_INFO RECENT_NAME ": checkentry: table found (%s), created by other process.\n",info->name);#endif		vfree(curr_table->time_info);		vfree(curr_table->hash_table);		vfree(hold);		vfree(curr_table->table);		vfree(curr_table);		return 1;	}	if(!last_table) r_tables = curr_table; else last_table->next = curr_table;	spin_unlock_bh(&recent_lock);#ifdef CONFIG_PROC_FS	/* Create our proc 'status' entry. */	curr_table->status_proc = create_proc_entry(curr_table->name, ip_list_perms, proc_net_ipt_recent);	if (!curr_table->status_proc) {		printk(KERN_INFO RECENT_NAME ": checkentry: unable to allocate for /proc entry.\n");		/* Destroy the created table */		spin_lock_bh(&recent_lock);		last_table = NULL;		curr_table = r_tables;		if(!curr_table) {#ifdef DEBUG			if(debug) printk(KERN_INFO RECENT_NAME ": checkentry() create_proc failed, no tables.\n");#endif			spin_unlock_bh(&recent_lock);			return -ENOMEM;		}		while( strncmp(info->name,curr_table->name,IPT_RECENT_NAME_LEN) && (last_table = curr_table) && (curr_table = curr_table->next) );		if(!curr_table) {#ifdef DEBUG			if(debug) printk(KERN_INFO RECENT_NAME ": checkentry() create_proc failed, table already destroyed.\n");#endif			spin_unlock_bh(&recent_lock);			return -ENOMEM;		}		if(last_table) last_table->next = curr_table->next; else r_tables = curr_table->next;		spin_unlock_bh(&recent_lock);		vfree(curr_table->time_info);		vfree(curr_table->hash_table);		vfree(hold);		vfree(curr_table->table);		vfree(curr_table);		return -ENOMEM;	}		curr_table->status_proc->owner = THIS_MODULE;	curr_table->status_proc->data = curr_table;	wmb();	curr_table->status_proc->read_proc = ip_recent_get_info;	curr_table->status_proc->write_proc = ip_recent_ctrl;#endif /* CONFIG_PROC_FS */#ifdef DEBUG	if(debug) printk(KERN_INFO RECENT_NAME ": checkentry() left.\n");#endif	return 1;}/* This function is called in the event that a rule matching this module is * removed. * When this happens we need to check if there are no other rules matching * the table given.  If that is the case then we remove the table and clean * up its memory. */static voiddestroy(void *matchinfo, unsigned int matchsize){	const struct ipt_recent_info *info = matchinfo;	struct recent_ip_tables *curr_table, *last_table;#ifdef DEBUG	if(debug) printk(KERN_INFO RECENT_NAME ": destroy() entered.\n");#endif	if(matchsize != IPT_ALIGN(sizeof(struct ipt_recent_info))) return;	/* Lock the linked list while we play with it */	spin_lock_bh(&recent_lock);	/* Look for an entry with this name already created */	/* Finds the end of the list and the entry before the end if current name does not exist */	last_table = NULL;	curr_table = r_tables;	if(!curr_table) { #ifdef DEBUG		if(debug) printk(KERN_INFO RECENT_NAME ": destroy() No tables found, leaving.\n");#endif		spin_unlock_bh(&recent_lock);		return;	}	while( strncmp(info->name,curr_table->name,IPT_RECENT_NAME_LEN) && (last_table = curr_table) && (curr_table = curr_table->next) );	/* If a table does not exist then do nothing and return */	if(!curr_table) { #ifdef DEBUG		if(debug) printk(KERN_INFO RECENT_NAME ": destroy() table not found, leaving.\n");#endif		spin_unlock_bh(&recent_lock);		return;	}	curr_table->count--;	/* If count is still non-zero then there are still rules referenceing it so we do nothing */	if(curr_table->count) { #ifdef DEBUG		if(debug) printk(KERN_INFO RECENT_NAME ": destroy() table found, non-zero count, leaving.\n");#endif		spin_unlock_bh(&recent_lock);		return;	}#ifdef DEBUG	if(debug) printk(KERN_INFO RECENT_NAME ": destroy() table found, zero count, removing.\n");#endif	/* Count must be zero so we remove this table from the list */	if(last_table) last_table->next = curr_table->next; else r_tables = curr_table->next;	spin_unlock_bh(&recent_lock);	/* lock to make sure any late-runners still using this after we removed it from	 * the list finish up then remove everything */	spin_lock_bh(&curr_table->list_lock);	spin_unlock_bh(&curr_table->list_lock);#ifdef CONFIG_PROC_FS	if(curr_table->status_proc) remove_proc_entry(curr_table->name,proc_net_ipt_recent);#endif /* CONFIG_PROC_FS */	vfree(curr_table->table[0].last_pkts);	vfree(curr_table->table);	vfree(curr_table->hash_table);	vfree(curr_table->time_info);	vfree(curr_table);#ifdef DEBUG	if(debug) printk(KERN_INFO RECENT_NAME ": destroy() left.\n");#endif	return;}/* This is the structure we pass to ipt_register to register our * module with iptables. */static struct ipt_match recent_match = {   .name = "recent",   .match = &match,   .checkentry = &checkentry,   .destroy = &destroy,   .me = THIS_MODULE};/* Kernel module initialization. */static int __init init(void){	int count;	printk(version);#ifdef CONFIG_PROC_FS	proc_net_ipt_recent = proc_mkdir("ipt_recent",proc_net);	if(!proc_net_ipt_recent) return -ENOMEM;#endif	if(ip_list_hash_size && ip_list_hash_size <= ip_list_tot) {	  printk(KERN_WARNING RECENT_NAME ": ip_list_hash_size too small, resetting to default.\n");	  ip_list_hash_size = 0;	}	if(!ip_list_hash_size) {		ip_list_hash_size = ip_list_tot*3;		count = 2*2;		while(ip_list_hash_size > count) count = count*2;		ip_list_hash_size = count;	}#ifdef DEBUG	if(debug) printk(KERN_INFO RECENT_NAME ": ip_list_hash_size: %d\n",ip_list_hash_size);#endif	return ipt_register_match(&recent_match);}/* Kernel module destruction. */static void __exit fini(void){	ipt_unregister_match(&recent_match);	remove_proc_entry("ipt_recent",proc_net);}/* Register our module with the kernel. */module_init(init);module_exit(fini);

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
一区二区三区四区在线免费观看| 国产在线播放一区三区四| 欧美日韩不卡视频| 日本成人在线网站| 久久综合五月天婷婷伊人| 成人黄页毛片网站| 亚洲在线视频免费观看| 91精品婷婷国产综合久久竹菊| 喷水一区二区三区| 久久影院电视剧免费观看| 99久久精品费精品国产一区二区| 亚洲精品国久久99热| 91黄视频在线观看| 日本成人中文字幕在线视频| 久久久久久久久久久99999| 丁香六月综合激情| 一区二区在线电影| 91精品国产入口在线| 国产精品白丝av| 一区二区三区在线视频播放| 7777精品伊人久久久大香线蕉超级流畅 | 一区二区三区.www| 欧美精品乱码久久久久久| 国内不卡的二区三区中文字幕| 国产精品家庭影院| 9191精品国产综合久久久久久| 国产一区二区女| 一区二区欧美视频| 欧美电视剧在线看免费| 99久久久国产精品免费蜜臀| 日韩电影在线看| 中文字幕一区二区三中文字幕| 欧美女孩性生活视频| 国产91在线|亚洲| 午夜伊人狠狠久久| 国产精品视频免费看| 在线成人小视频| 成人av在线播放网站| 日本麻豆一区二区三区视频| 1区2区3区欧美| 午夜不卡av在线| 久久精品免视看| 欧美日韩国产123区| 国产成人免费9x9x人网站视频| 亚洲电影一区二区| 国产欧美日韩综合| 欧美一区二区免费视频| 白白色 亚洲乱淫| 免费黄网站欧美| 亚洲另类一区二区| 久久久久久久久久电影| 欧美日韩国产欧美日美国产精品| 国产69精品久久久久毛片| 日韩av一级片| 一区二区三区四区视频精品免费 | xnxx国产精品| 欧美日韩国产高清一区| 成人av免费在线播放| 麻豆极品一区二区三区| 亚洲国产wwwccc36天堂| 中文字幕在线不卡一区二区三区| 欧美mv和日韩mv的网站| 欧美日韩久久不卡| 91在线视频在线| 国产高清精品网站| 美女任你摸久久| 午夜久久久久久久久久一区二区| 亚洲同性同志一二三专区| 国产亚洲1区2区3区| 日韩一区二区三区免费看| 欧美手机在线视频| 91色视频在线| av中文字幕在线不卡| 国产成人精品免费| 久久99深爱久久99精品| 日韩激情一区二区| 亚洲综合在线第一页| 亚洲桃色在线一区| 中文在线免费一区三区高中清不卡| 日韩欧美亚洲另类制服综合在线| 欧美年轻男男videosbes| 在线观看日产精品| 色婷婷国产精品| 99久久99久久精品免费观看| 成人一级视频在线观看| 国产一区二区三区免费在线观看| 蜜桃久久av一区| 热久久一区二区| 日韩福利电影在线观看| 午夜成人在线视频| 国产精品一区在线观看你懂的| 91麻豆精品国产无毒不卡在线观看| 国产精品亚洲综合一区在线观看| 亚洲欧美一区二区三区孕妇| 国产精品三级av| 亚洲国产精品成人综合色在线婷婷| 激情综合色播五月| 性做久久久久久免费观看 | 久久久久久毛片| 欧美成人一区二区三区片免费| 91精品国模一区二区三区| 欧美人xxxx| 3d成人动漫网站| 日韩一区二区三区免费看| 欧美一区二区精品| 日韩精品一区二区三区中文不卡 | 欧美日韩一区二区在线视频| 色欧美日韩亚洲| 在线免费不卡电影| 欧美中文字幕一区| 欧洲在线/亚洲| 欧美三级视频在线观看| 欧美日韩一级黄| 91麻豆精品国产自产在线观看一区 | 国产不卡视频一区二区三区| 懂色av一区二区在线播放| 成人性生交大片免费看中文网站| 成人免费看片app下载| 99视频热这里只有精品免费| 色av成人天堂桃色av| 欧美中文字幕一区| 欧美精品成人一区二区三区四区| 91麻豆精品国产| 久久久噜噜噜久噜久久综合| 国产精品欧美一区喷水| 亚洲视频综合在线| 夜色激情一区二区| 三级久久三级久久久| 久久国产精品免费| 国产a久久麻豆| 色综合中文字幕国产 | 亚洲综合激情网| 午夜激情综合网| 久久66热偷产精品| 成人精品免费网站| 在线一区二区视频| 91精品在线麻豆| 国产日韩亚洲欧美综合| 亚洲久草在线视频| 天天综合色天天综合| 国精产品一区一区三区mba视频| 国产乱人伦偷精品视频不卡| 99久久精品费精品国产一区二区| 欧美调教femdomvk| 欧美精品一区二区三区在线播放 | 成人午夜精品在线| 一本到三区不卡视频| 欧美顶级少妇做爰| 久久久久久久综合| 亚洲精品v日韩精品| 美女视频黄a大片欧美| 成人高清免费观看| 欧美日韩一区二区三区高清| wwwwxxxxx欧美| 亚洲精品免费在线观看| 免费高清视频精品| av电影在线观看不卡| 在线成人免费视频| 亚洲国产精品成人综合色在线婷婷 | 懂色av一区二区三区蜜臀| 日本韩国精品在线| 26uuuu精品一区二区| 一区二区三区免费| 国产在线视频精品一区| 91国偷自产一区二区开放时间| 精品区一区二区| 一区二区视频免费在线观看| 久久99精品一区二区三区三区| 99精品国产一区二区三区不卡| 欧美精品日韩一本| 国产精品久久久久久亚洲毛片| 日本亚洲天堂网| 色综合久久99| www久久精品| 视频一区二区不卡| av在线综合网| 337p日本欧洲亚洲大胆色噜噜| 亚洲综合在线五月| 国产福利精品一区二区| 欧美久久久久久久久中文字幕| 欧美国产亚洲另类动漫| 偷拍日韩校园综合在线| 99久久777色| 久久久久久久精| 天天综合天天综合色| 91网站最新网址| 久久久99久久| 免费av网站大全久久| 色妞www精品视频| 国产乱人伦偷精品视频免下载 | 综合激情网...| 国产伦精品一区二区三区免费 | 日韩欧美一区二区久久婷婷| 一区二区三区在线观看欧美| 国产成人精品免费在线| 欧美刺激脚交jootjob| 亚洲h动漫在线| 在线视频你懂得一区二区三区| 欧美激情在线一区二区| 久久99精品国产麻豆婷婷 |