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

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

?? if.c

?? 一個Windows下的Linux專用虛擬機
?? C
字號:
/* * Copyright (c) 1995 Danny Gasparovski. * * Please read the file COPYRIGHT for the * terms and conditions of the copyright. */#include "slirp.h"int if_mtu, if_mru;int if_comp;int if_maxlinkhdr;int     if_queued = 0;                  /* Number of packets queued so far */int     if_thresh = 10;                 /* Number of packets queued before we start sending					 * (to prevent allocing too many mbufs) */struct  mbuf if_fastq;                  /* fast queue (for interactive data) */struct  mbuf if_batchq;                 /* queue for non-interactive data */struct	mbuf *next_m;			/* Pointer to next mbuf to output */#define ifs_init(ifm) ((ifm)->ifs_next = (ifm)->ifs_prev = (ifm))voidifs_insque(ifm, ifmhead)	struct mbuf *ifm, *ifmhead;{	ifm->ifs_next = ifmhead->ifs_next;	ifmhead->ifs_next = ifm;	ifm->ifs_prev = ifmhead;	ifm->ifs_next->ifs_prev = ifm;}voidifs_remque(ifm)	struct mbuf *ifm;{	ifm->ifs_prev->ifs_next = ifm->ifs_next;	ifm->ifs_next->ifs_prev = ifm->ifs_prev;}voidif_init(){#if 0	/*	 * Set if_maxlinkhdr to 48 because it's 40 bytes for TCP/IP,	 * and 8 bytes for PPP, but need to have it on an 8byte boundary	 */#ifdef USE_PPP	if_maxlinkhdr = 48;#else	if_maxlinkhdr = 40;#endif#else        /* 2 for alignment, 14 for ethernet, 40 for TCP/IP */        if_maxlinkhdr = 2 + 14 + 40;#endif	if_mtu = 1500;	if_mru = 1500;	if_comp = IF_AUTOCOMP;	if_fastq.ifq_next = if_fastq.ifq_prev = &if_fastq;	if_batchq.ifq_next = if_batchq.ifq_prev = &if_batchq;        //	sl_compress_init(&comp_s);	next_m = &if_batchq;}#if 0/* * This shouldn't be needed since the modem is blocking and * we don't expect any signals, but what the hell.. */inline intwriten(fd, bptr, n)	int fd;	char *bptr;	int n;{	int ret;	int total;		/* This should succeed most of the time */	ret = send(fd, bptr, n,0);	if (ret == n || ret <= 0)	   return ret;		/* Didn't write everything, go into the loop */	total = ret;	while (n > total) {		ret = send(fd, bptr+total, n-total,0);		if (ret <= 0)		   return ret;		total += ret;	}	return total;}/* * if_input - read() the tty, do "top level" processing (ie: check for any escapes), * and pass onto (*ttyp->if_input) *  * XXXXX Any zeros arriving by themselves are NOT placed into the arriving packet. */#define INBUFF_SIZE 2048 /* XXX */voidif_input(ttyp)	struct ttys *ttyp;{	u_char if_inbuff[INBUFF_SIZE];	int if_n;		DEBUG_CALL("if_input");	DEBUG_ARG("ttyp = %lx", (long)ttyp);		if_n = recv(ttyp->fd, (char *)if_inbuff, INBUFF_SIZE,0);		DEBUG_MISC((dfd, " read %d bytes\n", if_n));		if (if_n <= 0) {		if (if_n == 0 || (errno != EINTR && errno != EAGAIN)) {			if (ttyp->up)			   link_up--;			tty_detached(ttyp, 0);		}		return;	}	if (if_n == 1) {		if (*if_inbuff == '0') {			ttyp->ones = 0;			if (++ttyp->zeros >= 5)			   slirp_exit(0);			return;		}		if (*if_inbuff == '1') {			ttyp->zeros = 0;			if (++ttyp->ones >= 5)			   tty_detached(ttyp, 0);			return;		}	}	ttyp->ones = ttyp->zeros = 0;		(*ttyp->if_input)(ttyp, if_inbuff, if_n);}#endif		/* * if_output: Queue packet into an output queue. * There are 2 output queue's, if_fastq and if_batchq.  * Each output queue is a doubly linked list of double linked lists * of mbufs, each list belonging to one "session" (socket).  This * way, we can output packets fairly by sending one packet from each * session, instead of all the packets from one session, then all packets * from the next session, etc.  Packets on the if_fastq get absolute  * priority, but if one session hogs the link, it gets "downgraded" * to the batchq until it runs out of packets, then it'll return * to the fastq (eg. if the user does an ls -alR in a telnet session, * it'll temporarily get downgraded to the batchq) */voidif_output(so, ifm)	struct socket *so;	struct mbuf *ifm;{	struct mbuf *ifq;	int on_fastq = 1;		DEBUG_CALL("if_output");	DEBUG_ARG("so = %lx", (long)so);	DEBUG_ARG("ifm = %lx", (long)ifm);		/*	 * First remove the mbuf from m_usedlist,	 * since we're gonna use m_next and m_prev ourselves	 * XXX Shouldn't need this, gotta change dtom() etc.	 */	if (ifm->m_flags & M_USEDLIST) {		remque(ifm);		ifm->m_flags &= ~M_USEDLIST;	}		/*	 * See if there's already a batchq list for this session.  	 * This can include an interactive session, which should go on fastq,	 * but gets too greedy... hence it'll be downgraded from fastq to batchq.	 * We mustn't put this packet back on the fastq (or we'll send it out of order)	 * XXX add cache here?	 */	for (ifq = if_batchq.ifq_prev; ifq != &if_batchq; ifq = ifq->ifq_prev) {		if (so == ifq->ifq_so) {			/* A match! */			ifm->ifq_so = so;			ifs_insque(ifm, ifq->ifs_prev);			goto diddit;		}	}		/* No match, check which queue to put it on */	if (so && (so->so_iptos & IPTOS_LOWDELAY)) {		ifq = if_fastq.ifq_prev;		on_fastq = 1;		/*		 * Check if this packet is a part of the last		 * packet's session		 */		if (ifq->ifq_so == so) {			ifm->ifq_so = so;			ifs_insque(ifm, ifq->ifs_prev);			goto diddit;		}	} else		ifq = if_batchq.ifq_prev;		/* Create a new doubly linked list for this session */	ifm->ifq_so = so;	ifs_init(ifm);	insque(ifm, ifq);	diddit:	++if_queued;		if (so) {		/* Update *_queued */		so->so_queued++;		so->so_nqueued++;		/*		 * Check if the interactive session should be downgraded to		 * the batchq.  A session is downgraded if it has queued 6		 * packets without pausing, and at least 3 of those packets		 * have been sent over the link		 * (XXX These are arbitrary numbers, probably not optimal..)		 */		if (on_fastq && ((so->so_nqueued >= 6) && 				 (so->so_nqueued - so->so_queued) >= 3)) {						/* Remove from current queue... */			remque(ifm->ifs_next);						/* ...And insert in the new.  That'll teach ya! */			insque(ifm->ifs_next, &if_batchq);		}	}#ifndef FULL_BOLT	/*	 * This prevents us from malloc()ing too many mbufs	 */	if (link_up) {		/* if_start will check towrite */		if_start();	}#endif}/* * Send a packet * We choose a packet based on it's position in the output queues; * If there are packets on the fastq, they are sent FIFO, before * everything else.  Otherwise we choose the first packet from the * batchq and send it.  the next packet chosen will be from the session * after this one, then the session after that one, and so on..  So, * for example, if there are 3 ftp session's fighting for bandwidth, * one packet will be sent from the first session, then one packet * from the second session, then one packet from the third, then back * to the first, etc. etc. */voidif_start(void){	struct mbuf *ifm, *ifqt;		DEBUG_CALL("if_start");		if (if_queued == 0)	   return; /* Nothing to do */	 again:        /* check if we can really output */        if (!slirp_can_output())            return;	/*	 * See which queue to get next packet from	 * If there's something in the fastq, select it immediately	 */	if (if_fastq.ifq_next != &if_fastq) {		ifm = if_fastq.ifq_next;	} else {		/* Nothing on fastq, see if next_m is valid */		if (next_m != &if_batchq)		   ifm = next_m;		else		   ifm = if_batchq.ifq_next;				/* Set which packet to send on next iteration */		next_m = ifm->ifq_next;	}	/* Remove it from the queue */	ifqt = ifm->ifq_prev;	remque(ifm);	--if_queued;		/* If there are more packets for this session, re-queue them */	if (ifm->ifs_next != /* ifm->ifs_prev != */ ifm) {		insque(ifm->ifs_next, ifqt);		ifs_remque(ifm);	}		/* Update so_queued */	if (ifm->ifq_so) {		if (--ifm->ifq_so->so_queued == 0)		   /* If there's no more queued, reset nqueued */		   ifm->ifq_so->so_nqueued = 0;	}		/* Encapsulate the packet for sending */        if_encap((const uint8_t *)ifm->m_data, ifm->m_len);        m_free(ifm);	if (if_queued)	   goto again;}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
日韩成人免费在线| 亚洲激情在线激情| 日韩片之四级片| 91精品国产综合久久香蕉的特点| 欧洲精品一区二区三区在线观看| 一本一本久久a久久精品综合麻豆 一本一道波多野结衣一区二区 | 国产精品欧美久久久久无广告| 国产欧美在线观看一区| 久久九九99视频| 亚洲国产精品t66y| 亚洲手机成人高清视频| 一区二区国产视频| 亚洲电影你懂得| 精品一区二区三区欧美| 国产麻豆精品在线观看| 国产精品白丝av| 99久久伊人精品| 色噜噜狠狠一区二区三区果冻| 欧美丝袜丝交足nylons图片| 日韩美一区二区三区| 久久久久国产免费免费| 中文字幕亚洲电影| 亚洲国产精品久久一线不卡| 精品系列免费在线观看| 成人国产精品免费| 欧美视频中文一区二区三区在线观看| 在线播放中文一区| 国产日韩视频一区二区三区| 亚洲免费在线视频| 青青草国产成人av片免费| 国产精品亚洲第一区在线暖暖韩国 | 337p日本欧洲亚洲大胆精品| 成人免费一区二区三区视频| 丝袜美腿一区二区三区| 国产精品66部| 欧美一区二区日韩| 亚洲欧洲无码一区二区三区| 日本伊人色综合网| 不卡视频在线看| 欧美成人a视频| 亚洲自拍偷拍图区| 夫妻av一区二区| 日韩欧美国产一区二区在线播放| 亚洲精品自拍动漫在线| 国产在线不卡一区| 欧美男男青年gay1069videost| 中文天堂在线一区| 奇米影视7777精品一区二区| 色狠狠av一区二区三区| 国产欧美在线观看一区| 免费av成人在线| 欧美日韩久久不卡| 亚洲欧洲国产日本综合| 国产传媒一区在线| 日韩三级免费观看| 亚洲成人自拍一区| 在线亚洲一区二区| 国产精品三级av| 国产精品中文字幕一区二区三区| 日韩精品在线网站| 丝袜美腿亚洲一区| 欧美日韩亚州综合| 亚洲午夜精品一区二区三区他趣| aaa欧美色吧激情视频| 亚洲国产精品激情在线观看| 国产成人午夜电影网| 亚洲精品一区二区精华| 久久国产夜色精品鲁鲁99| 91精品国产综合久久久久久| 石原莉奈在线亚洲二区| 欧美日韩在线不卡| 亚洲国产视频一区| 欧美性受xxxx黑人xyx| 亚洲综合在线五月| 色综合天天做天天爱| 亚洲丝袜制服诱惑| 91黄色小视频| 亚洲午夜电影在线观看| 欧美视频中文一区二区三区在线观看 | 国产喷白浆一区二区三区| 国产一区二区三区黄视频 | 精品久久久久久综合日本欧美| 日本va欧美va瓶| kk眼镜猥琐国模调教系列一区二区| 中文字幕乱码久久午夜不卡| 韩国成人在线视频| 日韩免费观看高清完整版在线观看| 日本亚洲天堂网| 日韩一区二区麻豆国产| 久久91精品国产91久久小草| 久久久久久久久99精品| 高潮精品一区videoshd| 一区二区三区不卡在线观看| 欧美精品久久久久久久多人混战| 欧美aaa在线| 国产性色一区二区| 91欧美激情一区二区三区成人| 亚洲欧美日韩一区二区 | 91色porny| 日韩理论片一区二区| 在线观看av一区二区| 五月激情六月综合| 久久久精品一品道一区| 欧美久久久久久久久| 国内外成人在线| 亚洲欧美经典视频| 日韩欧美一级特黄在线播放| av亚洲精华国产精华| 亚洲成年人网站在线观看| 欧美mv日韩mv国产| 91免费版在线看| 久久精品国产77777蜜臀| 最新国产成人在线观看| 91精品国产综合久久久久久漫画| 盗摄精品av一区二区三区| 亚洲国产成人高清精品| 欧美国产成人在线| 91精品蜜臀在线一区尤物| 9色porny自拍视频一区二区| 美女在线视频一区| 亚洲欧洲成人精品av97| 欧美变态tickling挠脚心| 91久久奴性调教| 精品在线视频一区| 国产精品一区二区久激情瑜伽| 最近日韩中文字幕| 精品久久久久99| 欧美视频一区在线| www.性欧美| 国产精品1区2区| 捆绑紧缚一区二区三区视频| 亚洲黄色性网站| 日本一区二区三区久久久久久久久不 | 婷婷丁香激情综合| 国产精品国产自产拍高清av王其 | 高清久久久久久| 精品中文字幕一区二区小辣椒| 天堂午夜影视日韩欧美一区二区| 亚洲三级免费观看| 国产精品国产精品国产专区不片| 337p粉嫩大胆噜噜噜噜噜91av | 精品久久久久一区| 91女神在线视频| 国产精品自拍毛片| 国产米奇在线777精品观看| 欧美aⅴ一区二区三区视频| 亚洲成av人影院在线观看网| 亚洲欧美激情在线| 亚洲男女一区二区三区| 亚洲另类中文字| 亚洲欧美aⅴ...| 一卡二卡欧美日韩| 亚洲第一狼人社区| 日日欢夜夜爽一区| 日本在线不卡视频一二三区| 婷婷久久综合九色国产成人 | 一区二区三区美女| 亚洲伦理在线精品| 亚洲不卡av一区二区三区| 五月婷婷综合激情| 亚洲欧美影音先锋| 中文字幕亚洲一区二区va在线| 久久综合九色欧美综合狠狠| 久久久www免费人成精品| 精品奇米国产一区二区三区| 久久久久97国产精华液好用吗| 国产视频一区在线观看 | 国产精品一区二区三区99| 国产九色sp调教91| 99视频一区二区| 欧美嫩在线观看| 久久日韩精品一区二区五区| 日本一区二区高清| 夜夜嗨av一区二区三区四季av| 天天操天天色综合| 国产成人h网站| 欧美性大战久久| xnxx国产精品| 一区二区成人在线视频| 裸体健美xxxx欧美裸体表演| 精品国产一区二区亚洲人成毛片 | 欧美一区二区黄| 91精品国产一区二区三区香蕉| 精品国产一二三| 亚洲猫色日本管| 久久99久久99精品免视看婷婷| 成人av网站在线观看免费| 欧美色涩在线第一页| 久久奇米777| 午夜视频一区在线观看| 国产精品一级片在线观看| 91在线视频播放地址| 91精品国产91久久久久久最新毛片| 国产日韩影视精品| 日韩av电影天堂| 色爱区综合激月婷婷| 欧美xfplay| 同产精品九九九| 色94色欧美sute亚洲13| 久久久久久久久久久黄色|