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

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

?? comx-proto-ppp.c

?? 上傳linux-jx2410的源代碼
?? C
字號:
/* * Synchronous PPP / Cisco-HDLC driver for the COMX boards * * Author: Gergely Madarasz <gorgo@itc.hu> * * based on skeleton code by Tivadar Szemethy <tiv@itc.hu> * * Copyright (C) 1999 ITConsult-Pro Co. <info@itc.hu> * * 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. * * * Version 0.10 (99/06/10): *		- written the first code :) * * Version 0.20 (99/06/16): *		- added hdlc protocol  *		- protocol up is IFF_RUNNING * * Version 0.21 (99/07/15): *		- some small fixes with the line status * * Version 0.22 (99/08/05): *		- don't test IFF_RUNNING but the pp_link_state of the sppp *  * Version 0.23 (99/12/02): *		- tbusy fixes * */#define VERSION "0.23"#include <linux/module.h>#include <linux/version.h>#include <linux/types.h>#include <linux/sched.h>#include <linux/netdevice.h>#include <linux/proc_fs.h>#include <linux/if_arp.h>#include <linux/inetdevice.h>#include <asm/uaccess.h>#include <linux/init.h>#include <net/syncppp.h>#include	"comx.h"MODULE_AUTHOR("Author: Gergely Madarasz <gorgo@itc.hu>");MODULE_DESCRIPTION("Cisco-HDLC / Synchronous PPP driver for the COMX sync serial boards");MODULE_LICENSE("GPL");static struct comx_protocol syncppp_protocol;static struct comx_protocol hdlc_protocol;struct syncppp_data {	struct timer_list status_timer;};static void syncppp_status_timerfun(unsigned long d) {	struct net_device *dev=(struct net_device *)d;	struct comx_channel *ch=dev->priv;	struct syncppp_data *spch=ch->LINE_privdata;	struct sppp *sp = (struct sppp *)sppp_of(dev);        	if(!(ch->line_status & PROTO_UP) && 	    (sp->pp_link_state==SPPP_LINK_UP)) {    		comx_status(dev, ch->line_status | PROTO_UP);	}	if((ch->line_status & PROTO_UP) &&	    (sp->pp_link_state==SPPP_LINK_DOWN)) {	    	comx_status(dev, ch->line_status & ~PROTO_UP);	}	mod_timer(&spch->status_timer,jiffies + HZ*3);}static int syncppp_tx(struct net_device *dev) {	struct comx_channel *ch=dev->priv;		if(ch->line_status & LINE_UP) {		netif_wake_queue(dev);	}	return 0;}static void syncppp_status(struct net_device *dev, unsigned short status){	status &= ~(PROTO_UP | PROTO_LOOP);	if(status & LINE_UP) {		netif_wake_queue(dev);		sppp_open(dev);	} else 	{		/* Line went down */		netif_stop_queue(dev);		sppp_close(dev);	}	comx_status(dev, status);}static int syncppp_open(struct net_device *dev){	struct comx_channel *ch = dev->priv;	struct syncppp_data *spch = ch->LINE_privdata;	if (!(ch->init_status & HW_OPEN)) return -ENODEV;	ch->init_status |= LINE_OPEN;	ch->line_status &= ~(PROTO_UP | PROTO_LOOP);	if(ch->line_status & LINE_UP) {		sppp_open(dev);	}	init_timer(&spch->status_timer);	spch->status_timer.function=syncppp_status_timerfun;	spch->status_timer.data=(unsigned long)dev;	spch->status_timer.expires=jiffies + HZ*3;	add_timer(&spch->status_timer);		return 0;}static int syncppp_close(struct net_device *dev){	struct comx_channel *ch = dev->priv;	struct syncppp_data *spch = ch->LINE_privdata;	if (!(ch->init_status & HW_OPEN)) return -ENODEV;	del_timer(&spch->status_timer);		sppp_close(dev);	ch->init_status &= ~LINE_OPEN;	ch->line_status &= ~(PROTO_UP | PROTO_LOOP);	return 0;}static int syncppp_xmit(struct sk_buff *skb, struct net_device *dev){	struct comx_channel *ch = dev->priv;	netif_stop_queue(dev);	switch(ch->HW_send_packet(dev, skb)) {		case FRAME_QUEUED:			netif_wake_queue(dev);			break;		case FRAME_ACCEPTED:		case FRAME_DROPPED:			break;		case FRAME_ERROR:			printk(KERN_ERR "%s: Transmit frame error (len %d)\n", 				dev->name, skb->len);		break;	}	return 0;}static int syncppp_statistics(struct net_device *dev, char *page) {	int len = 0;	len += sprintf(page + len, " ");	return len;}static int syncppp_exit(struct net_device *dev) {	struct comx_channel *ch = dev->priv;	sppp_detach(dev);	dev->flags = 0;	dev->type = 0;	dev->mtu = 0;	ch->LINE_rx = NULL;	ch->LINE_tx = NULL;	ch->LINE_status = NULL;	ch->LINE_open = NULL;	ch->LINE_close = NULL;	ch->LINE_xmit = NULL;	ch->LINE_header	= NULL;	ch->LINE_rebuild_header	= NULL;	ch->LINE_statistics = NULL;	kfree(ch->LINE_privdata);	ch->LINE_privdata = NULL;	MOD_DEC_USE_COUNT;	return 0;}static int syncppp_init(struct net_device *dev){	struct comx_channel *ch = dev->priv;	struct ppp_device *pppdev = (struct ppp_device *)ch->if_ptr;	ch->LINE_privdata = kmalloc(sizeof(struct syncppp_data), GFP_KERNEL);	if (!ch->LINE_privdata)		return -ENOMEM;	pppdev->dev = dev;	sppp_attach(pppdev);	if(ch->protocol == &hdlc_protocol) {		pppdev->sppp.pp_flags |= PP_CISCO;		dev->type = ARPHRD_HDLC;	} else {		pppdev->sppp.pp_flags &= ~PP_CISCO;		dev->type = ARPHRD_PPP;	}	ch->LINE_rx = sppp_input;	ch->LINE_tx = syncppp_tx;	ch->LINE_status = syncppp_status;	ch->LINE_open = syncppp_open;	ch->LINE_close = syncppp_close;	ch->LINE_xmit = syncppp_xmit;	ch->LINE_header	= NULL;	ch->LINE_statistics = syncppp_statistics;	MOD_INC_USE_COUNT;	return 0;}static struct comx_protocol syncppp_protocol = {	"ppp", 	VERSION,	ARPHRD_PPP, 	syncppp_init, 	syncppp_exit, 	NULL };static struct comx_protocol hdlc_protocol = {	"hdlc", 	VERSION,	ARPHRD_PPP, 	syncppp_init, 	syncppp_exit, 	NULL };#ifdef MODULE#define comx_proto_ppp_init init_module#endifint __init comx_proto_ppp_init(void){	int ret;	if(0!=(ret=comx_register_protocol(&hdlc_protocol))) {		return ret;	}	return comx_register_protocol(&syncppp_protocol);}#ifdef MODULEvoid cleanup_module(void){	comx_unregister_protocol(syncppp_protocol.name);	comx_unregister_protocol(hdlc_protocol.name);}#endif /* MODULE */

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
亚洲欧洲精品天堂一级| 激情五月婷婷综合网| 极品少妇xxxx偷拍精品少妇| 91麻豆自制传媒国产之光| 精品久久久三级丝袜| 亚洲国产成人av网| 色综合亚洲欧洲| 中文在线一区二区| 国产在线精品视频| 欧美一级久久久| 午夜精品久久久久久久久久久| 国产成人小视频| 久久久噜噜噜久久中文字幕色伊伊| 亚洲第一搞黄网站| 色视频欧美一区二区三区| 国产欧美日韩综合精品一区二区| 精品一区二区三区视频在线观看| 欧美日韩一区二区三区不卡 | 亚洲成人av在线电影| 国产成人免费在线视频| 久久婷婷国产综合国色天香| 美女视频免费一区| 欧美成人三级电影在线| 喷白浆一区二区| 3d动漫精品啪啪1区2区免费| 天堂在线亚洲视频| 91精品国产综合久久久久久漫画| 亚洲成国产人片在线观看| 欧美日本一区二区三区| 亚洲成av人片一区二区| 欧美高清www午色夜在线视频| 亚洲成人动漫一区| 欧美一区二区性放荡片| 日本aⅴ免费视频一区二区三区 | 在线视频一区二区三区| 一区二区免费视频| 欧美日韩电影一区| 日本色综合中文字幕| 精品国产91洋老外米糕| 国产一区二区毛片| 一区二区中文视频| 在线国产亚洲欧美| 蜜臀av亚洲一区中文字幕| 日韩精品一区二区三区四区| 国产成人一区在线| 综合在线观看色| 欧美久久久久久久久中文字幕| 奇米亚洲午夜久久精品| 久久精品夜色噜噜亚洲aⅴ| 不卡的电影网站| 亚洲午夜激情网页| 精品成a人在线观看| jlzzjlzz欧美大全| 视频一区中文字幕| 久久久久久电影| 一本色道**综合亚洲精品蜜桃冫| 日本aⅴ亚洲精品中文乱码| 国产亚洲短视频| 在线日韩一区二区| 久久精品国产99久久6| 国产精品婷婷午夜在线观看| 欧美在线一二三| 国产久卡久卡久卡久卡视频精品| 亚洲素人一区二区| 日韩欧美高清dvd碟片| 成人av动漫网站| 日本欧美在线观看| 自拍偷在线精品自拍偷无码专区| 欧美一级xxx| 日本丶国产丶欧美色综合| 免费精品视频在线| 亚洲女人****多毛耸耸8| 日韩一区二区三区高清免费看看| 成人激情图片网| 蜜桃av一区二区三区电影| 亚洲三级电影全部在线观看高清| 欧美一级片在线观看| 色诱亚洲精品久久久久久| 经典三级在线一区| 五月天精品一区二区三区| 国产精品午夜免费| 欧美tickling网站挠脚心| 在线一区二区三区| 不卡一区中文字幕| 国产一区二区免费在线| 日本欧美在线看| 亚洲mv在线观看| 亚洲三级免费观看| 国产精品久久久久久久久快鸭| 777a∨成人精品桃花网| 色婷婷av一区二区三区gif| 成人黄色在线视频| 精品一区二区三区的国产在线播放| 一级做a爱片久久| 中文字幕亚洲精品在线观看| 久久蜜桃一区二区| 精品国产一区二区三区四区四 | 亚洲欧洲精品成人久久奇米网| 精品人在线二区三区| 欧美一级国产精品| 91精品国产手机| 91精品国产一区二区三区香蕉| 日本韩国欧美在线| 日本久久一区二区三区| 色婷婷综合久久久久中文| 99精品视频在线观看免费| 成人免费av在线| 成人白浆超碰人人人人| av在线一区二区| 成人av在线网| 色综合久久88色综合天天6| 99精品热视频| 欧美午夜免费电影| 欧美精品日韩一本| 欧美一区二区女人| 日韩精品中文字幕一区二区三区 | 成人精品国产一区二区4080| 丁香天五香天堂综合| 国产精品一区二区果冻传媒| 国产经典欧美精品| 成人精品电影在线观看| 色综合激情久久| 91精品国产综合久久香蕉的特点 | 久久91精品国产91久久小草| 久草精品在线观看| 国产成人精品影视| 色综合激情久久| 制服丝袜日韩国产| 久久免费视频一区| 国产精品久久久久久久裸模| 亚洲综合在线观看视频| 天天影视色香欲综合网老头| 久久国产福利国产秒拍| 风间由美一区二区av101| 成人国产在线观看| 欧美日韩综合一区| 久久综合九色综合欧美98| 亚洲欧洲精品一区二区精品久久久 | 亚洲国产一区二区在线播放| 免费在线观看日韩欧美| 成人一区二区三区| 欧美嫩在线观看| 国产视频一区二区三区在线观看 | 欧美精品第1页| 久久综合色鬼综合色| 亚洲精品一二三区| 麻豆极品一区二区三区| 成人美女视频在线观看18| 欧美无乱码久久久免费午夜一区| 日韩欧美国产一区二区在线播放 | 在线播放日韩导航| 久久久亚洲高清| 亚洲永久免费视频| 国产精品一区在线观看乱码| 91福利资源站| 国产午夜亚洲精品理论片色戒| 亚洲v日本v欧美v久久精品| 国产成人夜色高潮福利影视| 欧美乱妇23p| 亚洲图片欧美激情| 激情偷乱视频一区二区三区| 欧美在线免费播放| 中文字幕成人网| 麻豆极品一区二区三区| 欧美三级电影一区| 综合电影一区二区三区 | 国产精品第五页| 日韩av不卡在线观看| 91久久国产最好的精华液| 久久―日本道色综合久久| 午夜精品一区二区三区免费视频| 不卡视频一二三四| 国产日韩欧美制服另类| 日本不卡123| 欧美日韩亚洲高清一区二区| 综合电影一区二区三区| 成人午夜在线播放| 久久综合久久久久88| 麻豆成人91精品二区三区| 欧美色网一区二区| 亚洲久草在线视频| 成人性色生活片| 国产婷婷一区二区| 极品少妇一区二区三区精品视频| 欧美精品久久一区| 亚洲图片自拍偷拍| 欧美午夜影院一区| 亚洲一区二区三区四区在线| 91影视在线播放| 1024精品合集| 成人av片在线观看| 日韩一区在线播放| 日本韩国精品在线| 亚洲成在人线在线播放| 欧美日本一区二区在线观看| 日韩成人精品视频| 精品少妇一区二区| 国产成人精品亚洲777人妖 | 91在线精品一区二区| 亚洲日本一区二区|