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

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關(guān)于我們
? 蟲蟲下載站

?? tcp_input.c

?? vxwork源代碼
?? C
?? 第 1 頁 / 共 5 頁
字號:
	 * Make ACK acceptable to originator of segment.	 * Don't bother to respond if destination was broadcast/multicast.	 */	if ((tiflags & TH_RST) || m->m_flags & (M_BCAST|M_MCAST) ||	    IN_MULTICAST(ntohl(ti->ti_dst.s_addr)))		goto drop;	if (tiflags & TH_ACK)		tcp_respond(tp, ti, m, (tcp_seq)0, ti->ti_ack, TH_RST);	else {		if (tiflags & TH_SYN)			ti->ti_len++;		tcp_respond(tp, ti, m, ti->ti_seq+ti->ti_len, (tcp_seq)0,		    TH_RST|TH_ACK);	}        /* MIB-II Count # of Resets Sent */#ifdef VIRTUAL_STACK         /*           * (Former) tcpOutRsts global renamed for virtual stacks to prevent          * name conflict with existing structure element in m2TcpLib.c file.          */         tcpOutResets++;#else         tcpOutRsts++;#endif	/* destroy temporarily created socket */	if (dropsocket)		(void) soabort(so);	return;drop:	/*	 * Drop space held by incoming segment and return.	 */	if (tp && (tp->t_inpcb->inp_socket->so_options & SO_DEBUG))		(*tcpTraceRtn)(TA_DROP, ostate, tp, &tcp_saveti, 0);	m_freem(m);	/* destroy temporarily created socket */	if (dropsocket)		(void) soabort(so);	return;}voidtcp_dooptions(tp, cp, cnt, ti, ts_present, ts_val, ts_ecr)	struct tcpcb *tp;	u_char *cp;	int cnt;	struct tcpiphdr *ti;	int *ts_present;	u_long *ts_val, *ts_ecr;{	u_short mss = 0;	int opt, optlen;	for (; cnt > 0; cnt -= optlen, cp += optlen) {		opt = cp[0];		if (opt == TCPOPT_EOL)			break;		if (opt == TCPOPT_NOP)			optlen = 1;		else {			optlen = cp[1];			if (optlen <= 0)				break;		}		switch (opt) {		default:			continue;		case TCPOPT_MAXSEG:			if (optlen != TCPOLEN_MAXSEG)				continue;			if (!(ti->ti_flags & TH_SYN))				continue;			bcopy((char *) cp + 2, (char *) &mss, sizeof(mss));			NTOHS(mss);			(void) tcp_mss(tp, mss);	/* sets t_maxseg */			break;		case TCPOPT_WINDOW:			if (optlen != TCPOLEN_WINDOW)				continue;			if (!(ti->ti_flags & TH_SYN))				continue;			tp->t_flags |= TF_RCVD_SCALE;			tp->requested_s_scale = min(cp[2], TCP_MAX_WINSHIFT);			break;		case TCPOPT_TIMESTAMP:			if (optlen != TCPOLEN_TIMESTAMP)				continue;			*ts_present = 1;			bcopy((char *)cp + 2, (char *) ts_val, sizeof(*ts_val));			NTOHL(*ts_val);			bcopy((char *)cp + 6, (char *) ts_ecr, sizeof(*ts_ecr));			NTOHL(*ts_ecr);			/* 			 * A timestamp received in a SYN makes			 * it ok to send timestamp requests and replies.			 */			if (ti->ti_flags & TH_SYN) {				tp->t_flags |= TF_RCVD_TSTMP;				tp->ts_recent = *ts_val;				tp->ts_recent_age = tcp_now;			}			break;		}	}        /*         * Set peer's MSS to default if option not included. The path MTU         * discovery processing for TCP uses this value as a ceiling to         * avoid sending larger segments than a peer can handle.         */        if ( (ti->ti_flags & TH_SYN) && !mss)            {            if (tp->t_inpcb->inp_route.ro_rt)                (tp->t_inpcb->inp_route.ro_rt)->rt_rmx.rmx_mss = tcp_mssdflt;            }}/* * Pull out of band byte out of a segment so * it doesn't appear in the user's data queue. * It is still reflected in the segment length for * sequencing purposes. */voidtcp_pulloutofband(so, ti, m)	struct socket *so;	struct tcpiphdr *ti;	register struct mbuf *m;{	int cnt = ti->ti_urp - 1;		while (cnt >= 0) {		if (m->m_len > cnt) {			char *cp = mtod(m, caddr_t) + cnt;			struct tcpcb *tp = sototcpcb(so);			tp->t_iobc = *cp;			tp->t_oobflags |= TCPOOB_HAVEDATA;			bcopy(cp+1, cp, (unsigned)(m->m_len - cnt - 1));			m->m_len--;			return;		}		cnt -= m->m_len;		m = m->m_next;		if (m == 0)			break;	}#ifdef WV_INSTRUMENTATION#ifdef INCLUDE_WVNET    /* WV_NET_EMERGENCY event */        WV_NET_PORTIN_EVENT_1 (NET_CORE_EVENT, WV_NET_EMERGENCY, 27, 1,                               ti->ti_sport, ti->ti_dport,                               WV_NETEVENT_TCPOOB_PANIC, WV_NET_RECV,                               so->so_fd)#endif  /* INCLUDE_WVNET */#endif	panic("tcp_pulloutofband");}/* * Collect new round-trip time estimate * and update averages and current timeout. */voidtcp_xmit_timer(tp, rtt)	register struct tcpcb *tp;	short rtt;{	register short delta;	tcpstat.tcps_rttupdated++;	if (tp->t_srtt != 0) {		/*		 * srtt is stored as fixed point with 3 bits after the		 * binary point (i.e., scaled by 8).  The following magic		 * is equivalent to the smoothing algorithm in rfc793 with		 * an alpha of .875 (srtt = rtt/8 + srtt*7/8 in fixed		 * point).  Adjust rtt to origin 0.		 */		delta = rtt - 1 - (tp->t_srtt >> TCP_RTT_SHIFT);		if ((tp->t_srtt += delta) <= 0)			tp->t_srtt = 1;		/*		 * We accumulate a smoothed rtt variance (actually, a		 * smoothed mean difference), then set the retransmit		 * timer to smoothed rtt + 4 times the smoothed variance.		 * rttvar is stored as fixed point with 2 bits after the		 * binary point (scaled by 4).  The following is		 * equivalent to rfc793 smoothing with an alpha of .75		 * (rttvar = rttvar*3/4 + |delta| / 4).  This replaces		 * rfc793's wired-in beta.		 */		if (delta < 0)			delta = -delta;		delta -= (tp->t_rttvar >> TCP_RTTVAR_SHIFT);		if ((tp->t_rttvar += delta) <= 0)			tp->t_rttvar = 1;	} else {		/* 		 * No rtt measurement yet - use the unsmoothed rtt.		 * Set the variance to half the rtt (so our first		 * retransmit happens at 3*rtt).		 */		tp->t_srtt = rtt << TCP_RTT_SHIFT;		tp->t_rttvar = rtt << (TCP_RTTVAR_SHIFT - 1);	}	tp->t_rtt = 0;	tp->t_rxtshift = 0;	/*	 * the retransmit should happen at rtt + 4 * rttvar.	 * Because of the way we do the smoothing, srtt and rttvar	 * will each average +1/2 tick of bias.  When we compute	 * the retransmit timer, we want 1/2 tick of rounding and	 * 1 extra tick because of +-1/2 tick uncertainty in the	 * firing of the timer.  The bias will give us exactly the	 * 1.5 tick we need.  But, because the bias is	 * statistical, we have to test that we don't drop below	 * the minimum feasible timer (which is 2 ticks).	 */	TCPT_RANGESET(tp->t_rxtcur, TCP_REXMTVAL(tp),	    tp->t_rttmin, TCPTV_REXMTMAX);		/*	 * We received an ack for a packet that wasn't retransmitted;	 * it is probably safe to discard any error indications we've	 * received recently.  This isn't quite right, but close enough	 * for now (a route might have failed after we sent a segment,	 * and the return path might not be symmetrical).	 */	tp->t_softerror = 0;}/* * Determine a reasonable value for maxseg size. * If the route is known, check route for mtu. * If none, use an mss that can be handled on the outgoing * interface without forcing IP to fragment; * If no route is found, route has no mtu, * or the destination isn't local, use a default, hopefully conservative * size (usually 512 or the default IP max size, but no more than the mtu * of the interface), as we can't discover anything about intervening * gateways or networks.  We also initialize the congestion/slow start * window to be a single segment if the destination isn't local. * While looking at the routing entry, we also initialize other path-dependent * parameters from pre-set or cached values in the routing entry. */inttcp_mss(tp, offer)	register struct tcpcb *tp;	u_int offer;{	struct route *ro;	register struct rtentry *rt;	struct ifnet *ifp;	register int rtt, mss;	u_long bufsize;	struct inpcb *inp;	struct socket *so;	inp = tp->t_inpcb;	ro = &inp->inp_route;	if ((rt = ro->ro_rt) == (struct rtentry *)0) {		/* No route yet, so try to acquire one */		if (inp->inp_faddr.s_addr != INADDR_ANY) {			ro->ro_dst.sa_family = AF_INET;			ro->ro_dst.sa_len = sizeof(ro->ro_dst);			((struct sockaddr_in *) &ro->ro_dst)->sin_addr =				inp->inp_faddr;			TOS_SET (&ro->ro_dst, inp->inp_ip.ip_tos);			rtalloc(ro);		}		if ((rt = ro->ro_rt) == (struct rtentry *)0)			return (tcp_mssdflt);	}	ifp = rt->rt_ifp;	so = inp->inp_socket;	/*	 * While we're here, check if there's an initial rtt	 * or rttvar.  Convert from the route-table units	 * to scaled multiples of the slow timeout timer.	 */	if (tp->t_srtt == 0 && (rtt = rt->rt_rmx.rmx_rtt)) {		/*		 * XXX the lock bit for MTU indicates that the value		 * is also a minimum value; this is subject to time.		 */		if (rt->rt_rmx.rmx_locks & RTV_RTT)			tp->t_rttmin = rtt / (RTM_RTTUNIT / PR_SLOWHZ);		tp->t_srtt = rtt / (RTM_RTTUNIT / (PR_SLOWHZ * TCP_RTT_SCALE));		if (rt->rt_rmx.rmx_rttvar)			tp->t_rttvar = rt->rt_rmx.rmx_rttvar /			    (RTM_RTTUNIT / (PR_SLOWHZ * TCP_RTTVAR_SCALE));		else			/* default variation is +- 1 rtt */			tp->t_rttvar =			    tp->t_srtt * TCP_RTTVAR_SCALE / TCP_RTT_SCALE;		TCPT_RANGESET(tp->t_rxtcur,		    ((tp->t_srtt >> 2) + tp->t_rttvar) >> 1,		    tp->t_rttmin, TCPTV_REXMTMAX);	}	/*	 * if there's an mtu associated with the route, use it	 */	if (rt->rt_rmx.rmx_mtu)		mss = rt->rt_rmx.rmx_mtu - sizeof(struct tcpiphdr);	else	{		mss = ifp->if_mtu - sizeof(struct tcpiphdr);		if (!in_localaddr(inp->inp_faddr))			mss = min(mss, tcp_mssdflt);	}	/*	 * The current mss, t_maxseg, is initialized to the default value.	 * If we compute a smaller value, reduce the current mss.	 * If we compute a larger value, return it for use in sending	 * a max seg size option, but don't store it for use	 * unless we received an offer at least that large from peer.	 * However, do not accept offers under 32 bytes.	 */	if (offer)            {            rt->rt_rmx.rmx_mss = offer;    /* Save peer's MSS for path MTU. */		mss = min(mss, offer);            }	mss = max(mss, 32);		/* sanity */        /*         * Save the maximum allowable segment size (based on mss and mtu         * values only) when processing MSS option from peer.         */        if (offer)            tp->t_maxsize = mss;	if (mss < tp->t_maxseg || offer != 0) {		/*		 * If there's a pipesize, change the socket buffer		 * to that size.  Make the socket buffers an integral		 * number of mss units; if the mss is larger than		 * the socket buffer, decrease the mss.		 */		if ((bufsize = rt->rt_rmx.rmx_sendpipe) == 0)			bufsize = so->so_snd.sb_hiwat;		if (bufsize < mss)			mss = bufsize;                /*                 * Record maximum segment size after adjusting                 * for the send buffer size.                 */		tp->t_maxseg = mss;		if ((bufsize = rt->rt_rmx.rmx_recvpipe) == 0)			bufsize = so->so_rcv.sb_hiwat;	}	tp->snd_cwnd = mss;	if (rt->rt_rmx.rmx_ssthresh) {		/*		 * There's some sort of gateway or interface		 * buffer limit on the path.  Use this to set		 * the slow start threshhold, but set the		 * threshold to no less than 2*mss.		 */		tp->snd_ssthresh = max(2 * mss, rt->rt_rmx.rmx_ssthresh);	}	return (mss);}#ifdef TCP_DEBUG /* XXX just for debugging */void tcbShow    (    FAST struct inpcb *pinPcb		/* pointer to the pcb control block */    )    {    struct tcpcb *	pTcpCb;	/* pointer to tcp Control block */    pTcpCb = (struct tcpcb *) pinPcb->inp_ppcb;    printf ("send unacknowledged: %8u\n", pTcpCb->snd_una);     printf ("send next: %8u\n", pTcpCb->snd_nxt);     printf ("send window update seg seqnumber: %8u\n", pTcpCb->snd_wl1);    printf ("send window updata seg ack number: %8u\n", pTcpCb->snd_wl2);     printf ("send window: %8u\n", pTcpCb->snd_wnd);     printf ("recv window: %8u\n", pTcpCb->rcv_wnd);    printf ("recv next: %8u\n", pTcpCb->rcv_nxt);    printf ("recv advertised window by other end: %8u\n", pTcpCb->rcv_adv);    printf ("send highest sequence number sent: %8u\n", pTcpCb->snd_max);    printf ("congestion controlled window: %8u\n", pTcpCb->snd_cwnd);    printf ("congestion threshold: %8u\n", pTcpCb->snd_ssthresh);    printf ("largest window peer has offered: %8u\n", pTcpCb->max_sndwnd);    printf ("send scale %8u\n", pTcpCb->snd_scale) ;    printf ("recv scale %8u\n", pTcpCb->rcv_scale) ;    printf ("send pending window scale %8u\n", pTcpCb->request_r_scale) ;    printf ("recv pending window scale %8u\n", pTcpCb->requested_s_scale) ;        }#endif /* XXX just for debugging */

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
久久97超碰国产精品超碰| 亚洲aⅴ怡春院| 国产91色综合久久免费分享| 日韩视频一区二区在线观看| 亚洲电影第三页| 欧美丝袜丝交足nylons| 一区二区久久久久久| 欧美亚洲一区二区在线| 一区二区三区中文字幕在线观看| 99视频精品在线| 亚洲欧美自拍偷拍| 成人av资源在线观看| 中文字幕在线不卡视频| 94-欧美-setu| 一区二区三区欧美久久| 欧美性生活久久| 亚洲mv大片欧洲mv大片精品| 制服.丝袜.亚洲.另类.中文| 男人的天堂久久精品| 日韩三级免费观看| 精品一区二区日韩| 久久久精品综合| 成人免费观看av| 亚洲免费观看高清完整版在线观看 | 国产一区二区三区香蕉| 久久精品一区二区三区不卡 | 欧美精品日韩精品| 蜜臀av性久久久久蜜臀av麻豆| 日韩一区二区三区视频| 国产在线看一区| 久久久久久一二三区| 成人av资源网站| 亚洲一区在线播放| 91精品国产乱| 国产一区二区在线影院| 国产精品久久久久影院老司 | 国产99一区视频免费| 国产精品久久久久久久第一福利| 国产色综合久久| 成人h动漫精品一区二区 | 欧美激情中文字幕| 99久久er热在这里只有精品66| 一区二区三区在线免费观看| 欧美日韩mp4| 国产一二精品视频| 亚洲欧美影音先锋| 欧美午夜片在线观看| 免费观看一级欧美片| 国产人久久人人人人爽| 色综合久久综合网97色综合| 天堂影院一区二区| 欧美成人欧美edvon| 成人亚洲一区二区一| 亚洲国产欧美另类丝袜| 久久久久9999亚洲精品| 91久久线看在观草草青青| 日本不卡一区二区| 国产欧美日韩不卡免费| 欧美视频中文字幕| 黄一区二区三区| 亚洲男人的天堂av| 精品人在线二区三区| 91网址在线看| 精品一区二区免费| 亚洲乱码一区二区三区在线观看| 欧美日本国产视频| 国产69精品久久久久毛片| 一级日本不卡的影视| 精品处破学生在线二十三| 一本大道综合伊人精品热热| 久久99精品一区二区三区三区| 亚洲欧洲精品成人久久奇米网| 欧美一区二区三区啪啪| 91亚洲精品久久久蜜桃| 久久99最新地址| 亚洲精品老司机| 久久精品亚洲一区二区三区浴池| 欧美午夜精品理论片a级按摩| 国产精品一品二品| 日韩精品电影在线观看| 国产精品久久久久7777按摩| 日韩欧美一二三| 91福利国产精品| 国产成人a级片| 日本成人在线不卡视频| 亚洲精品ww久久久久久p站| 久久综合色天天久久综合图片| 欧美色网站导航| 97国产一区二区| 国内精品久久久久影院一蜜桃| 亚洲国产视频一区| |精品福利一区二区三区| www国产精品av| 91精品视频网| 欧美在线免费播放| 成人av电影在线网| 国产在线看一区| 麻豆91小视频| 午夜精品福利一区二区蜜股av | 国产一区二区调教| 视频一区视频二区在线观看| 亚洲精品视频在线观看网站| 中国av一区二区三区| 精品第一国产综合精品aⅴ| 91精品国产入口| 欧美日韩一区成人| 色综合久久久久久久久| 成人黄色软件下载| 国产精品综合一区二区三区| 老司机精品视频在线| 图片区小说区区亚洲影院| 亚洲精品国产一区二区精华液| 国产精品久久久久久久裸模 | 日韩精品中午字幕| 7777精品伊人久久久大香线蕉| 在线观看免费成人| 91国偷自产一区二区三区观看| eeuss鲁片一区二区三区| 国产高清不卡一区| 国产美女视频91| 韩国成人在线视频| 经典三级在线一区| 九一九一国产精品| 精品影视av免费| 韩国成人精品a∨在线观看| 韩国女主播成人在线观看| 国产一区二区三区最好精华液| 激情综合色播激情啊| 韩国毛片一区二区三区| 国产精品一区在线观看你懂的| 国产在线精品一区二区三区不卡| 久久97超碰色| 国产精品 欧美精品| 夫妻av一区二区| 成人激情动漫在线观看| www.成人网.com| 91麻豆精品秘密| 欧美性大战久久久久久久蜜臀| 亚洲日本一区二区| 中文字幕一区二区三区在线不卡| 成人免费一区二区三区在线观看| 国产精品免费久久久久| 欧美经典三级视频一区二区三区| 国产精品你懂的在线欣赏| 综合网在线视频| 亚洲尤物视频在线| 天堂va蜜桃一区二区三区漫画版 | 亚洲不卡在线观看| 日韩二区三区四区| 久久99蜜桃精品| 国产夫妻精品视频| av欧美精品.com| 91福利视频久久久久| 欧美日韩国产综合视频在线观看| 日韩一卡二卡三卡四卡| 26uuu欧美| 国产精品久99| 亚洲国产视频一区| 久久91精品国产91久久小草| 国产成人精品一区二区三区四区 | 欧美男女性生活在线直播观看| 日韩一区二区三区视频在线| 久久久综合激的五月天| 国产精品白丝在线| 亚洲成在线观看| 久久99国产乱子伦精品免费| 成人高清视频在线| 欧美日韩一区在线观看| 欧美xxxxxxxx| 日韩一区欧美一区| 日韩主播视频在线| 国产精品一卡二卡| 91久久精品一区二区三区| 欧美一区二区三区思思人| 国产欧美一区二区三区沐欲| 亚洲乱码中文字幕综合| 久久成人免费网| 99久久国产综合色|国产精品| 欧美日韩激情一区二区| 国产无人区一区二区三区| 一区二区三区免费在线观看| 韩国女主播成人在线观看| 色婷婷综合久久久久中文一区二区| 欧美精品色综合| 中文字幕免费不卡| 午夜国产不卡在线观看视频| 国产黄色精品网站| 欧美日韩亚州综合| 国产香蕉久久精品综合网| 亚洲午夜电影网| 成人免费av资源| 欧美一二三四区在线| 国产精品传媒入口麻豆| 毛片不卡一区二区| 一本到三区不卡视频| 2023国产精品自拍| 亚洲高清不卡在线观看| 成人综合在线网站| 欧美一区二区观看视频| 中文字幕一区二区三区不卡|