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

? 歡迎來(lái)到蟲(chóng)蟲(chóng)下載站! | ?? 資源下載 ?? 資源專(zhuān)輯 ?? 關(guān)于我們
? 蟲(chóng)蟲(chóng)下載站

?? tcp_timer.c

?? vxwork源代碼
?? C
字號(hào):
/* tcp_timer.c - TCP timer routines *//* Copyright 1984 - 2001 Wind River Systems, Inc. */#include "copyright_wrs.h"/* * Copyright (c) 1982, 1986, 1988, 1990, 1993, 1995 *	The Regents of the University of California.  All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright *    notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright *    notice, this list of conditions and the following disclaimer in the *    documentation and/or other materials provided with the distribution. * 3. All advertising materials mentioning features or use of this software *    must display the following acknowledgement: *	This product includes software developed by the University of *	California, Berkeley and its contributors. * 4. Neither the name of the University nor the names of its contributors *    may be used to endorse or promote products derived from this software *    without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * *	@(#)tcp_timer.c	8.2 (Berkeley) 5/24/95 *//*modification history--------------------01d,12oct01,rae  merge from truestack ver 01g, base 01f (cleanup, rand hook ...)01c,08mar97,vin  added changes to accomodate changes in pcb structure.01b,30oct96,vin  changed calls to tcp_respond, mtod(tp->t_template ...).01a,03mar96,vin  created from BSD4.4 stuff,integrated with 02j.*//*DESCRIPTION*/#include "vxWorks.h"#include "net/systm.h"#include "net/mbuf.h"#include "sys/socket.h"#include "net/socketvar.h"#include "net/protosw.h"#include "errno.h"#include "net/if.h"#include "net/route.h"#include "netinet/in.h"#include "netinet/in_pcb.h"#include "netinet/in_systm.h"#include "netinet/ip.h"#include "netinet/ip_var.h"#include "netinet/tcp.h"#include "netinet/tcp_fsm.h"#include "netinet/tcp_seq.h"#include "netinet/tcp_timer.h"#include "netinet/tcp_debug.h"#include "netinet/tcp_var.h"#include "netinet/tcpip.h"#ifdef WV_INSTRUMENTATION#ifdef INCLUDE_WVNET#include "wvNetLib.h"#endif#endif#ifdef VIRTUAL_STACK#include "netinet/vsLib.h"#else/* globals */int     tcp_keepidle = TCPTV_KEEP_IDLE;int     tcp_keepintvl = TCPTV_KEEPINTVL;int	tcp_keepcnt = TCPTV_KEEPCNT;int	tcp_keepinit = TCPTV_KEEP_INIT;int	tcp_maxpersistidle = TCPTV_KEEP_IDLE;   /* max idle time in persist */int     tcp_maxidle;#endif /* VIRTUAL_STACK */IMPORT unsigned long (*pTcpRandHook)(void);#ifdef WV_INSTRUMENTATION#ifdef INCLUDE_WVNET    /* Set common fields of event identifiers for this module. */LOCAL UCHAR wvNetModuleId = WV_NET_TCPTIMER_MODULE; /* Value for tcp_timer.c */LOCAL UCHAR wvNetLocalFilter = WV_NET_NONE;     /* Available event filter */LOCAL ULONG wvNetEventId;       /* Event identifier: see wvNetLib.h */#endif    /* INCLUDE_WVNET */#endif/* * Fast timeout routine for processing delayed acks */voidtcp_fasttimo(){	register struct inpcb *inp;	register struct tcpcb *tp;	int s;#ifdef WV_INSTRUMENTATION#ifdef INCLUDE_WVNET    /* WV_NET_INFO event */    WV_NET_MARKER_0 (NET_AUX_EVENT, WV_NET_INFO, 44, 1,                     WV_NETEVENT_TCPFASTTIMER_START)#endif  /* INCLUDE_WVNET */#endif        s = splnet();        for (inp = tcb.lh_first; inp != NULL; inp = inp->inp_list.le_next) {		if ((tp = (struct tcpcb *)inp->inp_ppcb) &&		    (tp->t_flags & TF_DELACK)) {			tp->t_flags &= ~TF_DELACK;			tp->t_flags |= TF_ACKNOW;			tcpstat.tcps_delack++;			(void) tcp_output(tp);		}        }	splx(s);}/* * Tcp protocol timeout routine called every 500 ms. * Updates the timers in all active tcb's and * causes finite state machine actions if timers expire. */voidtcp_slowtimo(){	register struct inpcb *ip, *ipnxt;	register struct tcpcb *tp;	int s = splnet();#ifdef BSDDEBUG        int ostate;#endif	register int i;#ifdef WV_INSTRUMENTATION#ifdef INCLUDE_WVNET    /* WV_NET_INFO event */    WV_NET_MARKER_0 (NET_AUX_EVENT, WV_NET_INFO, 45, 2,                     WV_NETEVENT_TCPSLOWTIMER_START)#endif  /* INCLUDE_WVNET */#endif	tcp_maxidle = tcp_keepcnt * tcp_keepintvl;	/*	 * Search through tcb's and update active timers.	 */	ip = tcb.lh_first;	if (ip == 0) {		splx(s);		return;	}	for (; ip != NULL; ip = ipnxt) {		ipnxt = ip->inp_list.le_next;		tp = intotcpcb(ip);		if (tp == 0 || tp->t_state == TCPS_LISTEN)			continue;		for (i = 0; i < TCPT_NTIMERS; i++) {			if (tp->t_timer[i] && --tp->t_timer[i] == 0) {#ifdef BSDDEBUG                                ostate = tp->t_state;#endif                                tp = tcp_timers(tp, i);                                if (tp == NULL)                                        goto tpgone;#ifdef BSDDEBUG                                if (tp->t_inpcb->inp_socket->so_options                                    & SO_DEBUG)                                    (*tcpTraceRtn)(TA_USER, ostate, tp,                                                   (struct tcpiphdr *)0,                                                   PRU_SLOWTIMO);#endif			}		}		tp->t_idle++;		if (tp->t_rtt)			tp->t_rtt++;tpgone:		;	}	tcp_iss += TCP_ISSINCR/PR_SLOWHZ +	           ((0x0000ffff) & (pTcpRandHook() >> 16));#ifdef TCP_COMPAT_42	if ((int)tcp_iss < 0)		tcp_iss = TCP_ISSINCR;			/* XXX */#endif	tcp_now++;					/* for timestamps */	splx(s);}/* * Cancel all timers for TCP tp. */voidtcp_canceltimers(tp)	struct tcpcb *tp;{	register int i;	for (i = 0; i < TCPT_NTIMERS; i++)		tp->t_timer[i] = 0;}int	tcp_backoff[TCP_MAXRXTSHIFT + 1] =    { 1, 2, 4, 8, 16, 32, 64, 64, 64, 64, 64, 64, 64 };int tcp_totbackoff = 511;	/* sum of tcp_backoff[] *//* * TCP timer processing. */struct tcpcb *tcp_timers(tp, timer)	register struct tcpcb *tp;	int timer;{	register int rexmt;#ifdef WV_INSTRUMENTATION#ifdef INCLUDE_WVNET    /* WV_NET_VERBOSE event */    WV_NET_MARKER_2 (NET_AUX_EVENT, WV_NET_VERBOSE, 40, 3,                     WV_NETEVENT_TCPTIMER_START,                     tp->t_inpcb->inp_socket->so_fd, timer)#endif  /* INCLUDE_WVNET */#endif	switch (timer) {	/*	 * 2 MSL timeout in shutdown went off.  If we're closed but	 * still waiting for peer to close and connection has been idle	 * too long, or if 2MSL time is up from TIME_WAIT, delete connection	 * control block.  Otherwise, check again in a bit.	 */	case TCPT_2MSL:		if (tp->t_state != TCPS_TIME_WAIT &&		    tp->t_idle <= tcp_maxidle)			tp->t_timer[TCPT_2MSL] = tcp_keepintvl;		else			tp = tcp_close(tp);		break;	/*	 * Retransmission timer went off.  Message has not	 * been acked within retransmit interval.  Back off	 * to a longer retransmit interval and retransmit one segment.	 */	case TCPT_REXMT:		if (++tp->t_rxtshift > TCP_MAXRXTSHIFT) {			tp->t_rxtshift = TCP_MAXRXTSHIFT;			tcpstat.tcps_timeoutdrop++;			tp = tcp_drop(tp, tp->t_softerror ?			    tp->t_softerror : ETIMEDOUT);			break;		}		tcpstat.tcps_rexmttimeo++;		rexmt = TCP_REXMTVAL(tp) * tcp_backoff[tp->t_rxtshift];		TCPT_RANGESET(tp->t_rxtcur, rexmt,		    tp->t_rttmin, TCPTV_REXMTMAX);		tp->t_timer[TCPT_REXMT] = tp->t_rxtcur;		/*		 * If losing, let the lower level know and try for		 * a better route.  Also, if we backed off this far,		 * our srtt estimate is probably bogus.  Clobber it		 * so we'll take the next rtt measurement as our srtt;		 * move the current srtt into rttvar to keep the current		 * retransmit times until then.		 */		if (tp->t_rxtshift > TCP_MAXRXTSHIFT / 4) {			in_losing(tp->t_inpcb);			tp->t_rttvar += (tp->t_srtt >> TCP_RTT_SHIFT);			tp->t_srtt = 0;		}		tp->snd_nxt = tp->snd_una;		/*		 * If timing a segment in this window, stop the timer.		 */		tp->t_rtt = 0;		/*		 * Close the congestion window down to one segment		 * (we'll open it by one segment for each ack we get).		 * Since we probably have a window's worth of unacked		 * data accumulated, this "slow start" keeps us from		 * dumping all that data as back-to-back packets (which		 * might overwhelm an intermediate gateway).		 *		 * There are two phases to the opening: Initially we		 * open by one mss on each ack.  This makes the window		 * size increase exponentially with time.  If the		 * window is larger than the path can handle, this		 * exponential growth results in dropped packet(s)		 * almost immediately.  To get more time between 		 * drops but still "push" the network to take advantage		 * of improving conditions, we switch from exponential		 * to linear window opening at some threshhold size.		 * For a threshhold, we use half the current window		 * size, truncated to a multiple of the mss.		 *		 * (the minimum cwnd that will give us exponential		 * growth is 2 mss.  We don't allow the threshhold		 * to go below this.)		 */		{		u_int win = min(tp->snd_wnd, tp->snd_cwnd) / 2 / tp->t_maxseg;		if (win < 2)			win = 2;		tp->snd_cwnd = tp->t_maxseg;		tp->snd_ssthresh = win * tp->t_maxseg;		tp->t_dupacks = 0;		}		(void) tcp_output(tp);		break;	/*	 * Persistance timer into zero window.	 * Force a byte to be output, if possible.	 */	case TCPT_PERSIST:		tcpstat.tcps_persisttimeo++;		/*		 * Hack: if the peer is dead/unreachable, we do not		 * time out if the window is closed.  After a full		 * backoff, drop the connection if the idle time		 * (no responses to probes) reaches the maximum		 * backoff that we would use if retransmitting.		 */		if (tp->t_rxtshift == TCP_MAXRXTSHIFT &&		    (tp->t_idle >= tcp_maxpersistidle ||		    tp->t_idle >= TCP_REXMTVAL(tp) * tcp_totbackoff)) {			tcpstat.tcps_persistdrop++;			tp = tcp_drop(tp, ETIMEDOUT);			break;		}		tcp_setpersist(tp);		tp->t_force = 1;		(void) tcp_output(tp);		tp->t_force = 0;		break;	/*	 * Keep-alive timer went off; send something	 * or drop connection if idle for too long.	 */	case TCPT_KEEP:		tcpstat.tcps_keeptimeo++;		if (tp->t_state < TCPS_ESTABLISHED)			goto dropit;		if (tp->t_inpcb->inp_socket->so_options & SO_KEEPALIVE &&		    tp->t_state <= TCPS_CLOSE_WAIT) {		    	if (tp->t_idle >= tcp_keepidle + tcp_maxidle)				goto dropit;			/*			 * Send a packet designed to force a response			 * if the peer is up and reachable:			 * either an ACK if the connection is still alive,			 * or an RST if the peer has closed the connection			 * due to timeout or reboot.			 * Using sequence number tp->snd_una-1			 * causes the transmitted zero-length segment			 * to lie outside the receive window;			 * by the protocol spec, this requires the			 * correspondent TCP to respond.			 */			tcpstat.tcps_keepprobe++;#ifdef TCP_COMPAT_42			/*			 * The keepalive packet must have nonzero length			 * to get a 4.2 host to respond.			 */			tcp_respond(tp, 				    mtod(tp->t_template, struct tcpiphdr *),				    (struct mbuf *)NULL,				    tp->rcv_nxt - 1, tp->snd_una - 1, 0);#else			tcp_respond(tp, 				    mtod(tp->t_template, struct tcpiphdr *),				    (struct mbuf *)NULL,				    tp->rcv_nxt, tp->snd_una - 1, 0);#endif			tp->t_timer[TCPT_KEEP] = tcp_keepintvl;		} else			tp->t_timer[TCPT_KEEP] = tcp_keepidle;		break;	dropit:		tcpstat.tcps_keepdrops++;		tp = tcp_drop(tp, ETIMEDOUT);		break;	}	return (tp);}

?? 快捷鍵說(shuō)明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號(hào) Ctrl + =
減小字號(hào) Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
欧美一区二区三区日韩视频| 不卡一区二区三区四区| 欧美日韩中字一区| 午夜电影一区二区| 正在播放亚洲一区| 国产酒店精品激情| 国产亚洲精品资源在线26u| 成人性视频免费网站| 亚洲啪啪综合av一区二区三区| 日本二三区不卡| 日本不卡一区二区| 国产日韩欧美电影| av成人动漫在线观看| 亚洲国产精品久久久久秋霞影院| ww亚洲ww在线观看国产| 韩国v欧美v日本v亚洲v| 亚洲色图制服诱惑| 91精品国产综合久久精品图片 | 亚洲精品午夜久久久| 欧美日韩卡一卡二| 国产一区91精品张津瑜| 中文字幕在线不卡| 91麻豆精品91久久久久同性| 激情小说欧美图片| 亚洲日本va在线观看| 欧美视频在线观看一区| 美腿丝袜一区二区三区| 国产精品免费免费| 3d成人h动漫网站入口| 成人污污视频在线观看| 亚洲成人av免费| 国产日韩欧美精品综合| 欧美日韩三级一区二区| 国产永久精品大片wwwapp| 一区二区三区国产精华| 精品国产乱码久久久久久久 | 欧美人与禽zozo性伦| 国产激情91久久精品导航 | 亚洲视频网在线直播| 91精品国产综合久久精品| 99麻豆久久久国产精品免费优播| 亚洲国产裸拍裸体视频在线观看乱了 | 成人一区二区在线观看| 婷婷成人激情在线网| 国产精品乱人伦中文| 日韩免费观看高清完整版| 91老师国产黑色丝袜在线| 激情深爱一区二区| 首页国产欧美日韩丝袜| 亚洲va天堂va国产va久| 亚洲国产成人在线| 欧美一区二区三区的| 在线视频你懂得一区二区三区| 国内成人自拍视频| 日本欧美一区二区| 亚洲主播在线播放| 国产精品国产a级| 国产午夜精品一区二区| 日韩视频一区二区三区| 欧美日韩一二三| 91性感美女视频| 福利电影一区二区| 国产一区二区三区在线看麻豆| 偷拍与自拍一区| 亚洲一区在线视频观看| 综合久久久久久| 国产精品亲子乱子伦xxxx裸| 久久综合色鬼综合色| 欧美一区二区三区播放老司机| 色综合天天综合| 91浏览器入口在线观看| 91啪九色porn原创视频在线观看| 国产精品一级片| 国产精品一区二区在线观看网站 | 激情综合亚洲精品| 美女一区二区视频| 免费成人av在线播放| 日本vs亚洲vs韩国一区三区二区 | 亚洲福利视频一区二区| 亚洲激情图片一区| 亚洲免费资源在线播放| 亚洲精品一二三区| 亚洲一区二区三区四区的| 亚洲综合在线第一页| 一区二区三区在线免费播放| 一区二区视频免费在线观看| 亚洲免费大片在线观看| 亚洲成人免费av| 日本特黄久久久高潮| 久久电影网站中文字幕| 国产在线视频精品一区| 国产成人福利片| www.综合网.com| 欧美一区二区三区不卡| 欧美精品一区二区三区在线播放| 久久久久青草大香线综合精品| 久久久久国产精品厨房| 中文字幕在线不卡一区二区三区| 亚洲日本乱码在线观看| 午夜精品成人在线视频| 极品少妇xxxx精品少妇偷拍| 成人黄色在线看| 色欧美片视频在线观看| 91精品麻豆日日躁夜夜躁| 久久亚洲一级片| 亚洲欧美另类久久久精品| 婷婷综合五月天| 国产一区二区主播在线| 91视频一区二区| 欧美一区二区大片| 国产日韩视频一区二区三区| 一区二区三区四区在线播放| 午夜精品久久久久久久久久久 | 久久免费看少妇高潮| 最新热久久免费视频| 石原莉奈一区二区三区在线观看 | 国产精品久久三区| 亚洲18色成人| 成人小视频免费在线观看| 91亚洲国产成人精品一区二三| 欧美一区二区三区免费视频 | 亚洲黄一区二区三区| 久久精品国产一区二区三区免费看| 成人午夜电影网站| 欧美丰满少妇xxxbbb| 国产精品午夜久久| 丝袜亚洲精品中文字幕一区| 国产不卡免费视频| 欧美人伦禁忌dvd放荡欲情| 国产精品无圣光一区二区| 天堂在线亚洲视频| 成人sese在线| 精品粉嫩超白一线天av| 亚洲精品国产无套在线观| 国产麻豆精品在线| 欧美年轻男男videosbes| 亚洲三级在线观看| 国产精品主播直播| 欧美一区二区视频在线观看2020 | av一二三不卡影片| 精品三级在线观看| 久久综合综合久久综合| 日本高清不卡视频| 国产精品久久久久影院色老大| 久久9热精品视频| 欧美日韩成人一区二区| 亚洲欧洲一区二区在线播放| 国产麻豆一精品一av一免费 | 一区二区欧美国产| 福利视频网站一区二区三区| 欧美成人高清电影在线| 亚洲午夜精品17c| 色诱亚洲精品久久久久久| 中文字幕国产一区| 国产伦精品一区二区三区免费| 91精品国产福利| 亚洲成人在线网站| 欧美图区在线视频| 一区二区三区国产| 91免费观看国产| 亚洲天天做日日做天天谢日日欢| 成人精品免费看| 国产亚洲成年网址在线观看| 日本vs亚洲vs韩国一区三区| 欧美久久婷婷综合色| 亚洲成a人片在线不卡一二三区 | 奇米亚洲午夜久久精品| 欧美福利一区二区| 污片在线观看一区二区| 日韩一卡二卡三卡| 国内久久精品视频| 久久久久久电影| 成人精品免费网站| 亚洲欧洲色图综合| 欧美在线观看一区二区| 亚洲国产中文字幕在线视频综合 | 麻豆精品精品国产自在97香蕉| 欧美一区二区三区四区高清| 蜜桃视频在线一区| 精品乱人伦一区二区三区| 精品一区二区综合| 国产欧美一区二区在线观看| 高清不卡一区二区在线| 国产精品不卡视频| av亚洲精华国产精华| 亚洲另类在线制服丝袜| 欧美吻胸吃奶大尺度电影| 日本伊人色综合网| 久久久一区二区三区| 成人高清免费观看| 亚洲国产视频a| 日韩免费视频一区二区| 成人激情电影免费在线观看| 一区二区三区在线观看视频| 制服丝袜亚洲色图| 国产激情视频一区二区在线观看| 综合中文字幕亚洲| 欧美精品v国产精品v日韩精品 | 久久99精品一区二区三区| 中文字幕精品一区二区三区精品|