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

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

?? dev.c

?? 這是一個SIGMA方案的PMP播放器的UCLINUX程序,可播放DVD,VCD,CD MP3...有很好的參考價值.
?? C
?? 第 1 頁 / 共 5 頁
字號:
/* * 	NET3	Protocol independent device support routines. * *		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. * *	Derived from the non IP parts of dev.c 1.0.19 * 		Authors:	Ross Biro, <bir7@leland.Stanford.Edu> *				Fred N. van Kempen, <waltje@uWalt.NL.Mugnet.ORG> *				Mark Evans, <evansmp@uhura.aston.ac.uk> * *	Additional Authors: *		Florian la Roche <rzsfl@rz.uni-sb.de> *		Alan Cox <gw4pts@gw4pts.ampr.org> *		David Hinds <dhinds@allegro.stanford.edu> *		Alexey Kuznetsov <kuznet@ms2.inr.ac.ru> *		Adam Sulmicki <adam@cfar.umd.edu> *              Pekka Riikonen <priikone@poesidon.pspt.fi> * *	Changes: *              D.J. Barrow     :       Fixed bug where dev->refcnt gets set to 2 *                                      if register_netdev gets called before *                                      net_dev_init & also removed a few lines *                                      of code in the process. *		Alan Cox	:	device private ioctl copies fields back. *		Alan Cox	:	Transmit queue code does relevant stunts to *					keep the queue safe. *		Alan Cox	:	Fixed double lock. *		Alan Cox	:	Fixed promisc NULL pointer trap *		????????	:	Support the full private ioctl range *		Alan Cox	:	Moved ioctl permission check into drivers *		Tim Kordas	:	SIOCADDMULTI/SIOCDELMULTI *		Alan Cox	:	100 backlog just doesn't cut it when *					you start doing multicast video 8) *		Alan Cox	:	Rewrote net_bh and list manager. *		Alan Cox	: 	Fix ETH_P_ALL echoback lengths. *		Alan Cox	:	Took out transmit every packet pass *					Saved a few bytes in the ioctl handler *		Alan Cox	:	Network driver sets packet type before calling netif_rx. Saves *					a function call a packet. *		Alan Cox	:	Hashed net_bh() *		Richard Kooijman:	Timestamp fixes. *		Alan Cox	:	Wrong field in SIOCGIFDSTADDR *		Alan Cox	:	Device lock protection. *		Alan Cox	: 	Fixed nasty side effect of device close changes. *		Rudi Cilibrasi	:	Pass the right thing to set_mac_address() *		Dave Miller	:	32bit quantity for the device lock to make it work out *					on a Sparc. *		Bjorn Ekwall	:	Added KERNELD hack. *		Alan Cox	:	Cleaned up the backlog initialise. *		Craig Metz	:	SIOCGIFCONF fix if space for under *					1 device. *	    Thomas Bogendoerfer :	Return ENODEV for dev_open, if there *					is no device open function. *		Andi Kleen	:	Fix error reporting for SIOCGIFCONF *	    Michael Chastain	:	Fix signed/unsigned for SIOCGIFCONF *		Cyrus Durgin	:	Cleaned for KMOD *		Adam Sulmicki   :	Bug Fix : Network Device Unload *					A network device unload needs to purge *					the backlog queue. *	Paul Rusty Russell	:	SIOCSIFNAME *              Pekka Riikonen  :	Netdev boot-time settings code *              Andrew Morton   :       Make unregister_netdevice wait indefinitely on dev->refcnt * 		J Hadi Salim	:	- Backlog queue sampling *				        - netif_rx() feedback	 */#include <asm/uaccess.h>#include <asm/system.h>#include <asm/bitops.h>#include <linux/config.h>#include <linux/types.h>#include <linux/kernel.h>#include <linux/sched.h>#include <linux/string.h>#include <linux/mm.h>#include <linux/socket.h>#include <linux/sockios.h>#include <linux/errno.h>#include <linux/interrupt.h>#include <linux/if_ether.h>#include <linux/netdevice.h>#include <linux/etherdevice.h>#include <linux/notifier.h>#include <linux/skbuff.h>#include <linux/brlock.h>#include <net/sock.h>#include <linux/rtnetlink.h>#include <linux/proc_fs.h>#include <linux/stat.h>#include <linux/if_bridge.h>#include <linux/divert.h>#include <net/dst.h>#include <net/pkt_sched.h>#include <net/profile.h>#include <net/checksum.h>#include <linux/highmem.h>#include <linux/init.h>#include <linux/kmod.h>#include <linux/module.h>#if defined(CONFIG_NET_RADIO) || defined(CONFIG_NET_PCMCIA_RADIO)#include <linux/wireless.h>		/* Note : will define WIRELESS_EXT */#endif	/* CONFIG_NET_RADIO || CONFIG_NET_PCMCIA_RADIO */#ifdef CONFIG_PLIPextern int plip_init(void);#endif/* This define, if set, will randomly drop a packet when congestion * is more than moderate.  It helps fairness in the multi-interface * case when one of them is a hog, but it kills performance for the * single interface case so it is off now by default. */#undef RAND_LIE/* Setting this will sample the queue lengths and thus congestion * via a timer instead of as each packet is received. */#undef OFFLINE_SAMPLENET_PROFILE_DEFINE(dev_queue_xmit)NET_PROFILE_DEFINE(softnet_process)const char *if_port_text[] = {  "unknown",  "BNC",  "10baseT",  "AUI",  "100baseT",  "100baseTX",  "100baseFX"};/* *	The list of packet types we will receive (as opposed to discard) *	and the routines to invoke. * *	Why 16. Because with 16 the only overlap we get on a hash of the *	low nibble of the protocol value is RARP/SNAP/X.25. * *      NOTE:  That is no longer true with the addition of VLAN tags.  Not *             sure which should go first, but I bet it won't make much *             difference if we are running VLANs.  The good news is that *             this protocol won't be in the list unless compiled in, so *             the average user (w/out VLANs) will not be adversly affected. *             --BLG * *		0800	IP *		8100    802.1Q VLAN *		0001	802.3 *		0002	AX.25 *		0004	802.2 *		8035	RARP *		0005	SNAP *		0805	X.25 *		0806	ARP *		8137	IPX *		0009	Localtalk *		86DD	IPv6 */static struct packet_type *ptype_base[16];		/* 16 way hashed list */static struct packet_type *ptype_all = NULL;		/* Taps */#ifdef OFFLINE_SAMPLEstatic void sample_queue(unsigned long dummy);static struct timer_list samp_timer = { function: sample_queue };#endif#ifdef CONFIG_HOTPLUGstatic int net_run_sbin_hotplug(struct net_device *dev, char *action);#else#define net_run_sbin_hotplug(dev, action) ({ 0; })#endif/* *	Our notifier list */ static struct notifier_block *netdev_chain=NULL;/* *	Device drivers call our routines to queue packets here. We empty the *	queue in the local softnet handler. */struct softnet_data softnet_data[NR_CPUS] __cacheline_aligned;#ifdef CONFIG_NET_FASTROUTEint netdev_fastroute;int netdev_fastroute_obstacles;#endif#ifdef CONFIG_SD_NETRXIDLE#define IDLEFREE_MAXNUM			128static int s_skbfree_from = 0, s_skbfree_to = 0;static struct sk_buff *s_skbfree_list[IDLEFREE_MAXNUM];static int s_devfree_from = 0, s_devfree_to = 0;static struct net_device *s_devfree_list[IDLEFREE_MAXNUM];#endif/******************************************************************************************		Protocol management and registration routines*******************************************************************************************//* *	For efficiency */int netdev_nit=0;/* *	Add a protocol ID to the list. Now that the input handler is *	smarter we can dispense with all the messy stuff that used to be *	here. * *	BEWARE!!! Protocol handlers, mangling input packets, *	MUST BE last in hash buckets and checking protocol handlers *	MUST start from promiscous ptype_all chain in net_bh. *	It is true now, do not change it. *	Explantion follows: if protocol handler, mangling packet, will *	be the first on list, it is not able to sense, that packet *	is cloned and should be copied-on-write, so that it will *	change it and subsequent readers will get broken packet. *							--ANK (980803) *//** *	dev_add_pack - add packet handler *	@pt: packet type declaration *  *	Add a protocol handler to the networking stack. The passed &packet_type *	is linked into kernel lists and may not be freed until it has been *	removed from the kernel lists. */ void dev_add_pack(struct packet_type *pt){	int hash;	br_write_lock_bh(BR_NETPROTO_LOCK);#ifdef CONFIG_NET_FASTROUTE	/* Hack to detect packet socket */	if (pt->data) {		netdev_fastroute_obstacles++;		dev_clear_fastroute(pt->dev);	}#endif	if (pt->type == htons(ETH_P_ALL)) {		netdev_nit++;		pt->next=ptype_all;		ptype_all=pt;	} else {		hash=ntohs(pt->type)&15;		pt->next = ptype_base[hash];		ptype_base[hash] = pt;	}	br_write_unlock_bh(BR_NETPROTO_LOCK);}/** *	dev_remove_pack	 - remove packet handler *	@pt: packet type declaration *  *	Remove a protocol handler that was previously added to the kernel *	protocol handlers by dev_add_pack(). The passed &packet_type is removed *	from the kernel lists and can be freed or reused once this function *	returns. */ void dev_remove_pack(struct packet_type *pt){	struct packet_type **pt1;	br_write_lock_bh(BR_NETPROTO_LOCK);	if (pt->type == htons(ETH_P_ALL)) {		netdev_nit--;		pt1=&ptype_all;	} else {		pt1=&ptype_base[ntohs(pt->type)&15];	}	for (; (*pt1) != NULL; pt1 = &((*pt1)->next)) {		if (pt == (*pt1)) {			*pt1 = pt->next;#ifdef CONFIG_NET_FASTROUTE			if (pt->data)				netdev_fastroute_obstacles--;#endif			br_write_unlock_bh(BR_NETPROTO_LOCK);			return;		}	}	br_write_unlock_bh(BR_NETPROTO_LOCK);	printk(KERN_WARNING "dev_remove_pack: %p not found.\n", pt);}/******************************************************************************		      Device Boot-time Settings Routines*******************************************************************************//* Boot time configuration table */static struct netdev_boot_setup dev_boot_setup[NETDEV_BOOT_SETUP_MAX];/** *	netdev_boot_setup_add	- add new setup entry *	@name: name of the device *	@map: configured settings for the device * *	Adds new setup entry to the dev_boot_setup list.  The function *	returns 0 on error and 1 on success.  This is a generic routine to *	all netdevices. */int netdev_boot_setup_add(char *name, struct ifmap *map){	struct netdev_boot_setup *s;	int i;	s = dev_boot_setup;	for (i = 0; i < NETDEV_BOOT_SETUP_MAX; i++) {		if (s[i].name[0] == '\0' || s[i].name[0] == ' ') {			memset(s[i].name, 0, sizeof(s[i].name));			strcpy(s[i].name, name);			memcpy(&s[i].map, map, sizeof(s[i].map));			break;		}	}	if (i >= NETDEV_BOOT_SETUP_MAX)		return 0;	return 1;}/** *	netdev_boot_setup_check	- check boot time settings *	@dev: the netdevice * * 	Check boot time settings for the device. *	The found settings are set for the device to be used *	later in the device probing. *	Returns 0 if no settings found, 1 if they are. */int netdev_boot_setup_check(struct net_device *dev){	struct netdev_boot_setup *s;	int i;	s = dev_boot_setup;	for (i = 0; i < NETDEV_BOOT_SETUP_MAX; i++) {		if (s[i].name[0] != '\0' && s[i].name[0] != ' ' &&		    !strncmp(dev->name, s[i].name, strlen(s[i].name))) {			dev->irq 	= s[i].map.irq;			dev->base_addr 	= s[i].map.base_addr;			dev->mem_start 	= s[i].map.mem_start;			dev->mem_end 	= s[i].map.mem_end;			return 1;		}	}	return 0;}/* * Saves at boot time configured settings for any netdevice. */int __init netdev_boot_setup(char *str){	int ints[5];	struct ifmap map;	str = get_options(str, ARRAY_SIZE(ints), ints);	if (!str || !*str)		return 0;	/* Save settings */	memset(&map, 0, sizeof(map));	if (ints[0] > 0)		map.irq = ints[1];	if (ints[0] > 1)		map.base_addr = ints[2];	if (ints[0] > 2)		map.mem_start = ints[3];	if (ints[0] > 3)		map.mem_end = ints[4];	/* Add new entry to the list */		return netdev_boot_setup_add(str, &map);}__setup("netdev=", netdev_boot_setup);/*****************************************************************************************			    Device Interface Subroutines******************************************************************************************//** *	__dev_get_by_name	- find a device by its name  *	@name: name to find * *	Find an interface by name. Must be called under RTNL semaphore *	or @dev_base_lock. If the name is found a pointer to the device *	is returned. If the name is not found then %NULL is returned. The *	reference counters are not incremented so the caller must be *	careful with locks. */ struct net_device *__dev_get_by_name(const char *name){	struct net_device *dev;	for (dev = dev_base; dev != NULL; dev = dev->next) {		if (strncmp(dev->name, name, IFNAMSIZ) == 0)			return dev;	}	return NULL;}/** *	dev_get_by_name		- find a device by its name *	@name: name to find * *	Find an interface by name. This can be called from any  *	context and does its own locking. The returned handle has *	the usage count incremented and the caller must use dev_put() to *	release it when it is no longer needed. %NULL is returned if no *	matching device is found. */struct net_device *dev_get_by_name(const char *name){	struct net_device *dev;	read_lock(&dev_base_lock);	dev = __dev_get_by_name(name);	if (dev)		dev_hold(dev);	read_unlock(&dev_base_lock);	return dev;}/*    Return value is changed to int to prevent illegal usage in future.   It is still legal to use to check for device existance.   User should understand, that the result returned by this function   is meaningless, if it was not issued under rtnl semaphore. *//** *	dev_get	-	test if a device exists *	@name:	name to test for * *	Test if a name exists. Returns true if the name is found. In order *	to be sure the name is not allocated or removed during the test the *	caller must hold the rtnl semaphore. * *	This function primarily exists for back compatibility with older *	drivers.  */ int dev_get(const char *name){	struct net_device *dev;	read_lock(&dev_base_lock);	dev = __dev_get_by_name(name);	read_unlock(&dev_base_lock);	return dev != NULL;}/** *	__dev_get_by_index - find a device by its ifindex *	@ifindex: index of device * *	Search for an interface by index. Returns %NULL if the device *	is not found or a pointer to the device. The device has not *	had its reference counter increased so the caller must be careful *	about locking. The caller must hold either the RTNL semaphore *	or @dev_base_lock. */struct net_device * __dev_get_by_index(int ifindex){	struct net_device *dev;	for (dev = dev_base; dev != NULL; dev = dev->next) {		if (dev->ifindex == ifindex)			return dev;	}	return NULL;}/** *	dev_get_by_index - find a device by its ifindex *	@ifindex: index of device * *	Search for an interface by index. Returns NULL if the device *	is not found or a pointer to the device. The device returned has  *	had a reference added and the pointer is safe until the user calls *	dev_put to indicate they have finished with it. */struct net_device * dev_get_by_index(int ifindex){	struct net_device *dev;	read_lock(&dev_base_lock);	dev = __dev_get_by_index(ifindex);	if (dev)		dev_hold(dev);	read_unlock(&dev_base_lock);	return dev;}/** *	dev_getbyhwaddr - find a device by its hardware address *	@type: media type of device *	@ha: hardware address *

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
成人亚洲一区二区一| jizz一区二区| 欧美mv日韩mv| 精品无人区卡一卡二卡三乱码免费卡| 欧美日韩国产欧美日美国产精品| 一区二区成人在线观看| 欧美亚洲一区三区| 夜夜嗨av一区二区三区四季av| 欧美伊人久久大香线蕉综合69| 丝袜亚洲另类丝袜在线| 日韩视频在线你懂得| 国产一区二区三区国产| 中日韩免费视频中文字幕| 91色|porny| 五月激情综合网| 亚洲精品在线电影| 色综合天天视频在线观看| 亚洲成人免费电影| 精品动漫一区二区三区在线观看| 国产精品亚洲专一区二区三区 | 国产精品乱人伦一区二区| 99久久99久久久精品齐齐 | 视频一区在线播放| 久久免费精品国产久精品久久久久 | 91精品国产欧美日韩| 国产99久久久国产精品潘金| 亚洲精品高清在线| 久久久三级国产网站| 色欧美片视频在线观看| 久久99精品久久久久久| 亚洲精品视频在线观看免费| 精品国产污污免费网站入口| 91捆绑美女网站| 国产在线精品一区二区不卡了| 成人免费小视频| 日韩久久精品一区| 欧洲激情一区二区| 成人污视频在线观看| 午夜精品久久久久久久99樱桃 | 成人av电影在线播放| 日本视频中文字幕一区二区三区| 国产精品污污网站在线观看| 日韩一区二区在线免费观看| 9人人澡人人爽人人精品| 免费人成黄页网站在线一区二区| 国产精品盗摄一区二区三区| 欧美电影免费观看完整版| 欧美在线观看视频在线| 丁香五精品蜜臀久久久久99网站| 日韩av午夜在线观看| 亚洲在线观看免费| 国产精品久久久久aaaa樱花| 欧美不卡在线视频| 91精品在线免费| 欧美性一二三区| youjizz国产精品| 国产精华液一区二区三区| 日韩av一区二区在线影视| 欧美日韩国产综合一区二区三区| 91小视频免费观看| 成人91在线观看| 国产盗摄一区二区| 国产视频在线观看一区二区三区 | 91福利国产成人精品照片| 成人影视亚洲图片在线| 久久国产福利国产秒拍| 日韩精品电影在线观看| 亚洲综合小说图片| 一区二区在线免费| 亚洲黄色性网站| 亚洲黄色小说网站| 亚洲午夜私人影院| 亚洲一区二区在线免费观看视频| 亚洲欧美日韩久久| 亚洲欧美国产三级| 伊人婷婷欧美激情| 亚洲成人免费观看| 日韩电影免费在线看| 欧美成人精品二区三区99精品| 欧美一区二区三区视频在线观看| 在线观看免费一区| 欧美亚洲一区二区三区四区| 欧美日韩亚州综合| 日韩三级视频中文字幕| 欧美成人a∨高清免费观看| 26uuuu精品一区二区| 久久九九久久九九| 国产精品美女久久久久久| 国产精品素人一区二区| 色88888久久久久久影院野外| 色视频一区二区| 91麻豆精品国产自产在线| 日韩欧美久久一区| 国产欧美久久久精品影院| 国产精品传媒视频| 亚洲国产综合91精品麻豆| 亚洲成人动漫在线观看| 看电影不卡的网站| 国产91精品一区二区麻豆网站| thepron国产精品| 欧美日韩精品综合在线| 国产精品综合视频| 91农村精品一区二区在线| 欧美影院一区二区三区| 日韩精品一区二区三区视频在线观看| 久久奇米777| 亚洲最大成人网4388xx| 久久精品久久精品| k8久久久一区二区三区| 欧美一级生活片| 国产精品情趣视频| 日韩精品午夜视频| 国产黄色91视频| 青青草成人在线观看| 粉嫩高潮美女一区二区三区| 色综合久久久久| 欧美xxxxx裸体时装秀| 国产精品第13页| 美女国产一区二区三区| 成人少妇影院yyyy| 日韩午夜激情视频| 国产精品不卡一区| 久久精品国产成人一区二区三区 | 亚洲高清免费视频| 国产曰批免费观看久久久| 欧美做爰猛烈大尺度电影无法无天| 日韩一区二区精品| 一区二区在线免费| 成人自拍视频在线观看| 69堂亚洲精品首页| 亚洲精品日韩一| 国产高清精品久久久久| 欧美日韩不卡一区二区| 欧美性色黄大片手机版| 中文字幕国产一区| 麻豆成人免费电影| 欧美日韩亚州综合| 亚洲另类春色校园小说| 国产一区啦啦啦在线观看| 欧美日韩成人综合天天影院| 中文字幕五月欧美| 国产丶欧美丶日本不卡视频| 日韩一区二区三区在线| 亚洲va韩国va欧美va| 91在线国产观看| 中文字幕精品—区二区四季| 日本一区二区三区久久久久久久久不 | 欧美日韩一二区| 亚洲国产成人va在线观看天堂| 成人18精品视频| 国产精品欧美久久久久一区二区 | 琪琪一区二区三区| 精品视频在线免费| 亚洲品质自拍视频网站| av高清久久久| 中文字幕一区二区在线观看 | 国产精品污www在线观看| 国产一区二区精品久久91| 欧美成人伊人久久综合网| 久久机这里只有精品| 日韩三级高清在线| 麻豆视频观看网址久久| 精品欧美乱码久久久久久 | 狠狠色丁香久久婷婷综合_中 | 久久精品一二三| 国产精品亚洲综合一区在线观看| 欧美精品一区二区三区蜜臀| 久久国产综合精品| 久久在线免费观看| 国产传媒日韩欧美成人| 中文字幕国产精品一区二区| 成人精品国产一区二区4080| 中文字幕中文乱码欧美一区二区| av中文字幕在线不卡| 亚洲码国产岛国毛片在线| 色婷婷狠狠综合| 亚洲大片在线观看| 91精品久久久久久久91蜜桃| 奇米色一区二区| 精品国产欧美一区二区| 国产成人免费视频一区| 中文字幕+乱码+中文字幕一区| 成人性色生活片免费看爆迷你毛片| 中文字幕av免费专区久久| 日韩在线卡一卡二| 日韩一区二区三区免费看 | 综合久久久久综合| 欧亚洲嫩模精品一区三区| 久久综合久久鬼色| 国产成人免费视频一区| 亚洲另类一区二区| 欧美另类videos死尸| 韩国精品主播一区二区在线观看 | 日韩欧美国产三级电影视频| 国内一区二区在线| 亚洲欧美日韩久久精品| 欧美一级欧美一级在线播放| 精品91自产拍在线观看一区| 北条麻妃一区二区三区| 五月天视频一区|