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

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

?? ebtables.c

?? 優龍2410linux2.6.8內核源代碼
?? C
?? 第 1 頁 / 共 2 頁
字號:
/* *  ebtables * *  Author: *  Bart De Schuymer		<bdschuym@pandora.be> * *  ebtables.c,v 2.0, July, 2002 * *  This code is stongly inspired on the iptables code which is *  Copyright (C) 1999 Paul `Rusty' Russell & Michael J. Neuling * *  This program is free software; you can redistribute it and/or *  modify it under the terms of the GNU General Public License *  as published by the Free Software Foundation; either version *  2 of the License, or (at your option) any later version. *//* used for print_string */#include <linux/sched.h>#include <linux/tty.h>#include <linux/kmod.h>#include <linux/module.h>#include <linux/vmalloc.h>#include <linux/netfilter_bridge/ebtables.h>#include <linux/spinlock.h>#include <asm/uaccess.h>#include <linux/smp.h>#include <net/sock.h>/* needed for logical [in,out]-dev filtering */#include "../br_private.h"/* list_named_find */#define ASSERT_READ_LOCK(x)#define ASSERT_WRITE_LOCK(x)#include <linux/netfilter_ipv4/listhelp.h>#if 0/* use this for remote debugging * Copyright (C) 1998 by Ori Pomerantz * Print the string to the appropriate tty, the one * the current task uses */static void print_string(char *str){	struct tty_struct *my_tty;	/* The tty for the current task */	my_tty = current->signal->tty;	if (my_tty != NULL) {		my_tty->driver->write(my_tty, 0, str, strlen(str));		my_tty->driver->write(my_tty, 0, "\015\012", 2);	}}#define BUGPRINT(args) print_string(args);#else#define BUGPRINT(format, args...) printk("kernel msg: ebtables bug: please "\                                         "report to author: "format, ## args)/* #define BUGPRINT(format, args...) */#endif#define MEMPRINT(format, args...) printk("kernel msg: ebtables "\                                         ": out of memory: "format, ## args)/* #define MEMPRINT(format, args...) *//* * Each cpu has its own set of counters, so there is no need for write_lock in * the softirq * For reading or updating the counters, the user context needs to * get a write_lock *//* The size of each set of counters is altered to get cache alignment */#define SMP_ALIGN(x) (((x) + SMP_CACHE_BYTES-1) & ~(SMP_CACHE_BYTES-1))#define COUNTER_OFFSET(n) (SMP_ALIGN(n * sizeof(struct ebt_counter)))#define COUNTER_BASE(c, n, cpu) ((struct ebt_counter *)(((char *)c) + \   COUNTER_OFFSET(n) * cpu))static DECLARE_MUTEX(ebt_mutex);static LIST_HEAD(ebt_tables);static LIST_HEAD(ebt_targets);static LIST_HEAD(ebt_matches);static LIST_HEAD(ebt_watchers);static struct ebt_target ebt_standard_target ={ {NULL, NULL}, EBT_STANDARD_TARGET, NULL, NULL, NULL, NULL};static inline int ebt_do_watcher (struct ebt_entry_watcher *w,   const struct sk_buff *skb, const struct net_device *in,   const struct net_device *out){	w->u.watcher->watcher(skb, in, out, w->data,	   w->watcher_size);	/* watchers don't give a verdict */	return 0;}static inline int ebt_do_match (struct ebt_entry_match *m,   const struct sk_buff *skb, const struct net_device *in,   const struct net_device *out){	return m->u.match->match(skb, in, out, m->data,	   m->match_size);}static inline int ebt_dev_check(char *entry, const struct net_device *device){	if (*entry == '\0')		return 0;	if (!device)		return 1;	return !!strcmp(entry, device->name);}#define FWINV2(bool,invflg) ((bool) ^ !!(e->invflags & invflg))/* process standard matches */static inline int ebt_basic_match(struct ebt_entry *e, struct ethhdr *h,   const struct net_device *in, const struct net_device *out){	int verdict, i;	if (e->bitmask & EBT_802_3) {		if (FWINV2(ntohs(h->h_proto) >= 1536, EBT_IPROTO))			return 1;	} else if (!(e->bitmask & EBT_NOPROTO) &&	   FWINV2(e->ethproto != h->h_proto, EBT_IPROTO))		return 1;	if (FWINV2(ebt_dev_check(e->in, in), EBT_IIN))		return 1;	if (FWINV2(ebt_dev_check(e->out, out), EBT_IOUT))		return 1;	if ((!in || !in->br_port) ? 0 : FWINV2(ebt_dev_check(	   e->logical_in, in->br_port->br->dev), EBT_ILOGICALIN))		return 1;	if ((!out || !out->br_port) ? 0 : FWINV2(ebt_dev_check(	   e->logical_out, out->br_port->br->dev), EBT_ILOGICALOUT))		return 1;	if (e->bitmask & EBT_SOURCEMAC) {		verdict = 0;		for (i = 0; i < 6; i++)			verdict |= (h->h_source[i] ^ e->sourcemac[i]) &			   e->sourcemsk[i];		if (FWINV2(verdict != 0, EBT_ISOURCE) )			return 1;	}	if (e->bitmask & EBT_DESTMAC) {		verdict = 0;		for (i = 0; i < 6; i++)			verdict |= (h->h_dest[i] ^ e->destmac[i]) &			   e->destmsk[i];		if (FWINV2(verdict != 0, EBT_IDEST) )			return 1;	}	return 0;}/* Do some firewalling */unsigned int ebt_do_table (unsigned int hook, struct sk_buff **pskb,   const struct net_device *in, const struct net_device *out,   struct ebt_table *table){	int i, nentries;	struct ebt_entry *point;	struct ebt_counter *counter_base, *cb_base;	struct ebt_entry_target *t;	int verdict, sp = 0;	struct ebt_chainstack *cs;	struct ebt_entries *chaininfo;	char *base;	struct ebt_table_info *private = table->private;	read_lock_bh(&table->lock);	cb_base = COUNTER_BASE(private->counters, private->nentries,	   smp_processor_id());	if (private->chainstack)		cs = private->chainstack[smp_processor_id()];	else		cs = NULL;	chaininfo = private->hook_entry[hook];	nentries = private->hook_entry[hook]->nentries;	point = (struct ebt_entry *)(private->hook_entry[hook]->data);	counter_base = cb_base + private->hook_entry[hook]->counter_offset;	/* base for chain jumps */	base = private->entries;	i = 0;	while (i < nentries) {		if (ebt_basic_match(point, (**pskb).mac.ethernet, in, out))			goto letscontinue;		if (EBT_MATCH_ITERATE(point, ebt_do_match, *pskb, in, out) != 0)			goto letscontinue;		/* increase counter */		(*(counter_base + i)).pcnt++;		(*(counter_base + i)).bcnt+=(**pskb).len;		/* these should only watch: not modify, nor tell us		   what to do with the packet */		EBT_WATCHER_ITERATE(point, ebt_do_watcher, *pskb, in,		   out);		t = (struct ebt_entry_target *)		   (((char *)point) + point->target_offset);		/* standard target */		if (!t->u.target->target)			verdict = ((struct ebt_standard_target *)t)->verdict;		else			verdict = t->u.target->target(pskb, hook,			   in, out, t->data, t->target_size);		if (verdict == EBT_ACCEPT) {			read_unlock_bh(&table->lock);			return NF_ACCEPT;		}		if (verdict == EBT_DROP) {			read_unlock_bh(&table->lock);			return NF_DROP;		}		if (verdict == EBT_RETURN) {letsreturn:#ifdef CONFIG_NETFILTER_DEBUG			if (sp == 0) {				BUGPRINT("RETURN on base chain");				/* act like this is EBT_CONTINUE */				goto letscontinue;			}#endif			sp--;			/* put all the local variables right */			i = cs[sp].n;			chaininfo = cs[sp].chaininfo;			nentries = chaininfo->nentries;			point = cs[sp].e;			counter_base = cb_base +			   chaininfo->counter_offset;			continue;		}		if (verdict == EBT_CONTINUE)			goto letscontinue;#ifdef CONFIG_NETFILTER_DEBUG		if (verdict < 0) {			BUGPRINT("bogus standard verdict\n");			read_unlock_bh(&table->lock);			return NF_DROP;		}#endif		/* jump to a udc */		cs[sp].n = i + 1;		cs[sp].chaininfo = chaininfo;		cs[sp].e = (struct ebt_entry *)		   (((char *)point) + point->next_offset);		i = 0;		chaininfo = (struct ebt_entries *) (base + verdict);#ifdef CONFIG_NETFILTER_DEBUG		if (chaininfo->distinguisher) {			BUGPRINT("jump to non-chain\n");			read_unlock_bh(&table->lock);			return NF_DROP;		}#endif		nentries = chaininfo->nentries;		point = (struct ebt_entry *)chaininfo->data;		counter_base = cb_base + chaininfo->counter_offset;		sp++;		continue;letscontinue:		point = (struct ebt_entry *)		   (((char *)point) + point->next_offset);		i++;	}	/* I actually like this :) */	if (chaininfo->policy == EBT_RETURN)		goto letsreturn;	if (chaininfo->policy == EBT_ACCEPT) {		read_unlock_bh(&table->lock);		return NF_ACCEPT;	}	read_unlock_bh(&table->lock);	return NF_DROP;}/* If it succeeds, returns element and locks mutex */static inline void *find_inlist_lock_noload(struct list_head *head, const char *name, int *error,   struct semaphore *mutex){	void *ret;	*error = down_interruptible(mutex);	if (*error != 0)		return NULL;	ret = list_named_find(head, name);	if (!ret) {		*error = -ENOENT;		up(mutex);	}	return ret;}#ifndef CONFIG_KMOD#define find_inlist_lock(h,n,p,e,m) find_inlist_lock_noload((h),(n),(e),(m))#elsestatic void *find_inlist_lock(struct list_head *head, const char *name, const char *prefix,   int *error, struct semaphore *mutex){	void *ret;	ret = find_inlist_lock_noload(head, name, error, mutex);	if (!ret) {		request_module("%s%s", prefix, name);		ret = find_inlist_lock_noload(head, name, error, mutex);	}	return ret;}#endifstatic inline struct ebt_table *find_table_lock(const char *name, int *error, struct semaphore *mutex){	return find_inlist_lock(&ebt_tables, name, "ebtable_", error, mutex);}static inline struct ebt_match *find_match_lock(const char *name, int *error, struct semaphore *mutex){	return find_inlist_lock(&ebt_matches, name, "ebt_", error, mutex);}static inline struct ebt_watcher *find_watcher_lock(const char *name, int *error, struct semaphore *mutex){	return find_inlist_lock(&ebt_watchers, name, "ebt_", error, mutex);}static inline struct ebt_target *find_target_lock(const char *name, int *error, struct semaphore *mutex){	return find_inlist_lock(&ebt_targets, name, "ebt_", error, mutex);}static inline intebt_check_match(struct ebt_entry_match *m, struct ebt_entry *e,   const char *name, unsigned int hookmask, unsigned int *cnt){	struct ebt_match *match;	int ret;	if (((char *)m) + m->match_size + sizeof(struct ebt_entry_match) >	   ((char *)e) + e->watchers_offset)		return -EINVAL;	match = find_match_lock(m->u.name, &ret, &ebt_mutex);	if (!match)		return ret;	m->u.match = match;	if (!try_module_get(match->me)) {		up(&ebt_mutex);		return -ENOENT;	}	up(&ebt_mutex);	if (match->check &&	   match->check(name, hookmask, e, m->data, m->match_size) != 0) {		BUGPRINT("match->check failed\n");		module_put(match->me);		return -EINVAL;	}	(*cnt)++;	return 0;}static inline intebt_check_watcher(struct ebt_entry_watcher *w, struct ebt_entry *e,   const char *name, unsigned int hookmask, unsigned int *cnt){	struct ebt_watcher *watcher;	int ret;	if (((char *)w) + w->watcher_size + sizeof(struct ebt_entry_watcher) >	   ((char *)e) + e->target_offset)		return -EINVAL;	watcher = find_watcher_lock(w->u.name, &ret, &ebt_mutex);	if (!watcher)		return ret;	w->u.watcher = watcher;	if (!try_module_get(watcher->me)) {		up(&ebt_mutex);		return -ENOENT;	}	up(&ebt_mutex);	if (watcher->check &&	   watcher->check(name, hookmask, e, w->data, w->watcher_size) != 0) {		BUGPRINT("watcher->check failed\n");		module_put(watcher->me);		return -EINVAL;	}	(*cnt)++;	return 0;}/* * this one is very careful, as it is the first function * to parse the userspace data */static inline intebt_check_entry_size_and_hooks(struct ebt_entry *e,   struct ebt_table_info *newinfo, char *base, char *limit,   struct ebt_entries **hook_entries, unsigned int *n, unsigned int *cnt,   unsigned int *totalcnt, unsigned int *udc_cnt, unsigned int valid_hooks){	int i;	for (i = 0; i < NF_BR_NUMHOOKS; i++) {		if ((valid_hooks & (1 << i)) == 0)			continue;		if ( (char *)hook_entries[i] - base ==		   (char *)e - newinfo->entries)			break;	}	/* beginning of a new chain	   if i == NF_BR_NUMHOOKS it must be a user defined chain */	if (i != NF_BR_NUMHOOKS || !(e->bitmask & EBT_ENTRY_OR_ENTRIES)) {		if ((e->bitmask & EBT_ENTRY_OR_ENTRIES) != 0) {			/* we make userspace set this right,

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
欧美嫩在线观看| 亚洲18影院在线观看| 国产精品久久网站| 9191精品国产综合久久久久久| 中文字幕一区二区三| 国产精品色呦呦| 国产欧美日韩亚州综合| 亚洲免费av网站| 亚洲精品国产精华液| 日韩国产精品久久| 91在线云播放| 国产色产综合产在线视频| 成人免费视频caoporn| 国产麻豆精品一区二区| 久久看人人爽人人| 欧美色倩网站大全免费| 天天色图综合网| 国产欧美日韩在线观看| 91一区一区三区| 精品中文字幕一区二区| 国产精品日韩成人| 欧美熟乱第一页| 国产在线一区二区综合免费视频| 亚洲国产高清在线观看视频| 91久久国产综合久久| 国产夫妻精品视频| 美美哒免费高清在线观看视频一区二区| 91精品黄色片免费大全| 5月丁香婷婷综合| 91在线观看地址| 欧美日韩国产首页| 91高清在线观看| 欧美另类久久久品| 久久久久成人黄色影片| 99国产欧美另类久久久精品| 樱花草国产18久久久久| 色欧美片视频在线观看在线视频| 久久国产人妖系列| 亚洲主播在线播放| 成人国产精品视频| 国产精品素人一区二区| 国产精品三级av| 亚洲欧美另类久久久精品2019| 91国偷自产一区二区三区成为亚洲经典| 日本一区二区动态图| 国产白丝网站精品污在线入口| 国产视频一区二区在线观看| 国产精品99久久久久| 中国av一区二区三区| 日本视频免费一区| 免费美女久久99| 精品午夜久久福利影院| 国产一区91精品张津瑜| 日韩和欧美一区二区三区| 午夜在线电影亚洲一区| 久久99精品国产麻豆婷婷 | 日韩精品久久久久久| 欧美三区在线视频| 成人理论电影网| 国产在线视频一区二区三区| 国产日韩精品视频一区| 99久久婷婷国产| 婷婷中文字幕综合| 精品嫩草影院久久| 97精品久久久久中文字幕| 午夜激情一区二区| 久久久久青草大香线综合精品| 福利91精品一区二区三区| 亚洲精品伦理在线| 日韩一级二级三级| gogogo免费视频观看亚洲一| 亚洲国产精品嫩草影院| wwww国产精品欧美| 色婷婷久久久综合中文字幕| 麻豆成人av在线| 国产精品福利av| 欧美性淫爽ww久久久久无| 另类成人小视频在线| 亚洲女人小视频在线观看| 日韩视频在线观看一区二区| 91视频在线看| 国产精品香蕉一区二区三区| 一区二区三区免费在线观看| 2022国产精品视频| 欧美午夜影院一区| 国产成人在线视频免费播放| 亚洲一区成人在线| 国产精品无圣光一区二区| 欧美一区二区性放荡片| 91香蕉视频污在线| 国产99精品国产| 蜜芽一区二区三区| 亚洲曰韩产成在线| ㊣最新国产の精品bt伙计久久| 欧美日韩免费观看一区三区| 91小视频免费观看| 正在播放亚洲一区| 亚洲第一福利一区| 在线观看一区日韩| 日日摸夜夜添夜夜添亚洲女人| 国产一区二区三区观看| 久久蜜桃av一区精品变态类天堂| 激情深爱一区二区| 国产日韩欧美在线一区| 成人av免费网站| 狠狠色丁香久久婷婷综合_中| 91精品啪在线观看国产60岁| 欧美另类z0zxhd电影| 日韩在线a电影| 国产亚洲综合av| 欧美日韩久久久久久| 极品美女销魂一区二区三区免费| 免费观看在线综合色| 日韩欧美久久久| 9人人澡人人爽人人精品| 亚洲a一区二区| 国产视频一区在线观看| 色成年激情久久综合| 韩国女主播一区二区三区| 国产精品黄色在线观看| 欧美一区二区三区不卡| jlzzjlzz欧美大全| 成人h动漫精品| 久久国产精品无码网站| 17c精品麻豆一区二区免费| 亚洲国产精品ⅴa在线观看| 日韩一二三区不卡| 日韩精品一区二区三区三区免费 | 美女脱光内衣内裤视频久久网站 | 国产精品一级在线| 欧美美女一区二区在线观看| 中文字幕在线不卡视频| 日韩欧美视频在线| 精品国产乱码久久久久久老虎| 最新热久久免费视频| 《视频一区视频二区| 一区二区免费看| 天堂蜜桃一区二区三区| 韩日av一区二区| 成人黄色电影在线 | 91丨国产丨九色丨pron| 91毛片在线观看| www.色综合.com| 欧美午夜免费电影| 欧美丰满嫩嫩电影| 日韩美女视频一区二区在线观看| 欧美高清精品3d| www久久精品| 1区2区3区国产精品| 亚洲国产一区二区三区青草影视 | 亚洲精品国久久99热| 国产福利一区在线| 亚洲成人动漫一区| 国产美女一区二区| 在线观看视频91| 欧美成人三级电影在线| 亚洲人午夜精品天堂一二香蕉| 亚洲国产aⅴ天堂久久| 国产一区二区在线观看视频| 色悠久久久久综合欧美99| 91精品国产综合久久久久久漫画| 久久奇米777| 亚洲一区二区三区在线播放| 国产乱码精品一品二品| 欧洲一区在线电影| 欧美激情一区三区| 日韩电影在线观看一区| 97成人超碰视| 26uuu色噜噜精品一区| 亚洲成人精品影院| 成人av免费在线播放| 欧美va亚洲va香蕉在线| 亚洲尤物视频在线| a在线欧美一区| 精品嫩草影院久久| 舔着乳尖日韩一区| 色噜噜狠狠成人网p站| 中文字幕第一区| 韩国一区二区三区| 日韩亚洲欧美高清| 亚洲丶国产丶欧美一区二区三区| 粉嫩一区二区三区在线看| 日韩一区二区在线播放| 亚洲电影第三页| 91国内精品野花午夜精品 | 欧美日韩国产高清一区二区| 国产精品久久久久7777按摩| 国产一区免费电影| 日韩一区二区三区视频| 性做久久久久久免费观看欧美| 日本乱人伦一区| 亚洲天天做日日做天天谢日日欢 | 精品亚洲国产成人av制服丝袜| 欧美日本在线播放| 午夜欧美一区二区三区在线播放| 在线看一区二区| 亚洲男女毛片无遮挡| 精品日韩在线一区| 裸体一区二区三区| 欧美一级爆毛片|