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

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

?? tcp_input.c

?? vxworks的完整的源代碼
?? 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 */

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
亚洲日本中文字幕区| 日韩精品影音先锋| 成人免费黄色在线| 国产成人日日夜夜| 波多野结衣中文字幕一区二区三区| 久99久精品视频免费观看| 日韩精品1区2区3区| 日韩电影在线一区二区| 蜜臀久久久久久久| 韩国精品一区二区| 成人激情av网| 色香蕉成人二区免费| 欧美日韩一区二区三区高清| 制服.丝袜.亚洲.另类.中文| 精品乱码亚洲一区二区不卡| 国产亚洲欧美色| 自拍偷自拍亚洲精品播放| 亚洲精品ww久久久久久p站| 性做久久久久久久免费看| 丝袜a∨在线一区二区三区不卡| 日本特黄久久久高潮| 国产一区二区在线视频| 国产成人精品午夜视频免费 | 日韩av中文字幕一区二区三区| 五月天久久比比资源色| 国产一区二区三区黄视频| av亚洲产国偷v产偷v自拍| 欧美日韩一区二区三区高清| 欧美电视剧在线看免费| ㊣最新国产の精品bt伙计久久| 亚洲综合图片区| 精品综合免费视频观看| 99久久精品99国产精品| 欧美精品久久久久久久多人混战| 久久久91精品国产一区二区精品 | 亚洲成人一区二区在线观看| 九九精品视频在线看| 一本高清dvd不卡在线观看 | 国产精品2024| 在线影院国内精品| 久久五月婷婷丁香社区| 亚洲精品一卡二卡| 国产精品中文字幕一区二区三区| 91美女视频网站| 2022国产精品视频| 亚洲一二三区在线观看| 亚洲福利国产精品| av亚洲精华国产精华精华 | 一本久道久久综合中文字幕| 精品999久久久| 日韩avvvv在线播放| 一本色道久久综合精品竹菊| 国产午夜精品一区二区三区嫩草 | 亚洲午夜成aⅴ人片| 成人免费看视频| 337p日本欧洲亚洲大胆色噜噜| 午夜私人影院久久久久| 91蜜桃免费观看视频| 国产亚洲人成网站| 国产一区二区三区精品欧美日韩一区二区三区 | 国产精品国产a| 国产一区二区三区电影在线观看| 欧美高清www午色夜在线视频| 中文字幕一区二区三| 国产激情一区二区三区桃花岛亚洲| 91精品国产91久久久久久最新毛片 | 国产精品成人免费在线| 六月婷婷色综合| 欧美一级夜夜爽| 日韩国产欧美视频| 91精品欧美综合在线观看最新| 亚洲一区在线观看免费观看电影高清| 成人美女视频在线观看| 国产日产欧美一区二区三区| 国产伦理精品不卡| 国产欧美日韩激情| 成人免费视频播放| 亚洲欧洲另类国产综合| 91原创在线视频| 伊人一区二区三区| 欧美影院精品一区| 日本午夜一本久久久综合| 91精品欧美久久久久久动漫 | 国产精品久久久一本精品 | 久久精子c满五个校花| 国产一区二区三区久久久| 国产日产欧美一区二区三区| 成人毛片在线观看| 一区二区三区.www| 欧美一二三四区在线| 国产激情一区二区三区桃花岛亚洲 | 91.com视频| 国产一区二区视频在线播放| 日本一区二区三区电影| 色婷婷香蕉在线一区二区| 亚洲超碰精品一区二区| 精品动漫一区二区三区在线观看| 国产麻豆成人精品| 亚洲你懂的在线视频| 欧美一区永久视频免费观看| 国产呦精品一区二区三区网站| 国产精品私人影院| 欧美日韩一级视频| 国产伦精品一区二区三区免费| 中文字幕色av一区二区三区| 欧美视频一区二区在线观看| 久久激情五月婷婷| 成人免费在线视频| 日韩欧美亚洲一区二区| 91色乱码一区二区三区| 伦理电影国产精品| 亚洲精品ww久久久久久p站| 日韩午夜中文字幕| 91国产福利在线| 国产成a人亚洲精| 日本系列欧美系列| 亚洲免费在线观看| 久久久精品免费观看| 欧美日韩一区二区三区不卡| 高清成人在线观看| 蜜桃av一区二区在线观看| 亚洲视频小说图片| 久久久99精品免费观看| 日韩欧美一区二区免费| 日本韩国精品在线| 成人亚洲精品久久久久软件| 日本午夜一区二区| 午夜一区二区三区在线观看| 中文字幕综合网| 久久精品这里都是精品| 日韩欧美你懂的| 欧美日韩一区二区三区视频| 91浏览器打开| yourporn久久国产精品| 国产麻豆一精品一av一免费| 日韩福利视频网| 天堂蜜桃一区二区三区| 亚洲精品成人在线| 综合色中文字幕| 国产精品国产精品国产专区不蜜| 久久这里只有精品6| 日韩一区二区在线观看| 欧美精品在线观看一区二区| 91国产成人在线| 日本道在线观看一区二区| 色综合久久久久综合体| 91麻豆国产福利在线观看| 成人三级在线视频| 成人综合在线网站| 成人毛片老司机大片| 成人精品国产一区二区4080| 国产不卡视频在线观看| 国产成人在线观看| 成人午夜短视频| 99re热这里只有精品免费视频| 成人丝袜高跟foot| 成人午夜在线视频| 97超碰欧美中文字幕| 色综合久久天天综合网| 欧美日韩一区二区三区四区| 8v天堂国产在线一区二区| 欧美一区二区美女| 26uuu国产一区二区三区| 久久久久久久网| 国产精品美女一区二区三区| 亚洲少妇最新在线视频| 亚洲与欧洲av电影| 日韩福利电影在线| 国产91精品入口| 91美女在线看| 91精品国产高清一区二区三区蜜臀| 欧美v日韩v国产v| 中文字幕成人在线观看| 一区二区免费在线| 男人的j进女人的j一区| 国产精品自拍网站| 一本色道久久综合精品竹菊| 欧美一区二区三区在线电影| 日本一区二区成人在线| 一区二区在线观看免费视频播放 | 日韩亚洲欧美综合| 亚洲国产精品t66y| 夜夜精品浪潮av一区二区三区| 丝袜亚洲另类欧美| 成人美女视频在线观看18| 在线不卡中文字幕| 国产精品午夜在线| 蜜桃视频一区二区三区| 成人一区二区三区| 91精品久久久久久久91蜜桃| 国产日韩综合av| 五月天精品一区二区三区| 成人免费视频网站在线观看| 欧美日韩免费电影| 国产精品素人视频| 国内精品在线播放| 欧美男生操女生| 亚洲人成网站精品片在线观看| 久草在线在线精品观看| 欧美日韩一区二区在线观看视频|