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

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

?? tcp_output.c

?? vxworks的完整的源代碼
?? C
?? 第 1 頁 / 共 2 頁
字號:
	/*	 * Grab a header mbuf, attaching a copy of data to	 * be transmitted, and initialize the header from	 * the template for sends on this connection.	 */	if (len) {		if (tp->t_force && len == 1)			tcpstat.tcps_sndprobe++;		else if (SEQ_LT(tp->snd_nxt, tp->snd_max)) {			tcpstat.tcps_sndrexmitpack++;			tcpstat.tcps_sndrexmitbyte += len;		} else {			tcpstat.tcps_sndpack++;			tcpstat.tcps_sndbyte += len;		}#ifdef notyet		if ((m = m_copypack(so->so_snd.sb_mb, off,		    (int)len, max_linkhdr + hdrlen)) == 0) {			error = ENOBUFS;			goto out;		}		/*		 * m_copypack left space for our hdr; use it.		 */		m->m_len += hdrlen;		m->m_data -= hdrlen;#else		/* allocates a small enough cluster for the header */		m = mHdrClGet(M_DONTWAIT, MT_HEADER, (max_linkhdr + hdrlen),			      TRUE);		if (m == NULL) {			error = ENOBUFS;			goto out;		}		m->m_data += max_linkhdr;		m->m_len  = hdrlen;		m->m_next = m_copy(so->so_snd.sb_mb, off, (int) len);		if (m->m_next == 0) {			(void) m_free(m);			error = ENOBUFS;			goto out;		}#endif		/*		 * If we're sending everything we've got, set PUSH.		 * (This will keep happy those implementations which only		 * give data to the user when a buffer fills or		 * a PUSH comes in.)		 */		if (off + len == so->so_snd.sb_cc)			flags |= TH_PUSH;	} else {		if (tp->t_flags & TF_ACKNOW)			tcpstat.tcps_sndacks++;		else if (flags & (TH_SYN|TH_FIN|TH_RST))			tcpstat.tcps_sndctrl++;		else if (SEQ_GT(tp->snd_up, tp->snd_una))			tcpstat.tcps_sndurg++;		else			tcpstat.tcps_sndwinup++;		/* allocates a small enough cluster for the header */		m = mHdrClGet(M_DONTWAIT, MT_HEADER, (max_linkhdr + hdrlen),			      TRUE);		if (m == NULL) {			error = ENOBUFS;			goto out;		}		m->m_data += max_linkhdr;		m->m_len = hdrlen;	}	m->m_pkthdr.rcvif = (struct ifnet *)0;	ti = mtod(m, struct tcpiphdr *);	if (tp->t_template == 0)            {#ifdef WV_INSTRUMENTATION#ifdef INCLUDE_WVNET    /* WV_NET_EMERGENCY event */        WV_NET_PORTOUT_EVENT_1 (NET_CORE_EVENT, WV_NET_EMERGENCY, 29, 2,                                tp->t_inpcb->inp_lport, tp->t_inpcb->inp_fport,                                WV_NETEVENT_TCPOUT_PANIC, WV_NET_SEND,                                so->so_fd)#endif  /* INCLUDE_WVNET */#endif            panic("tcp_output");            }	bcopy((caddr_t)mtod(tp->t_template, struct tcpiphdr *), (caddr_t)ti, 	      sizeof (struct tcpiphdr));	/*	 * Fill in fields, remembering maximum advertised	 * window for use in delaying messages about window sizes.	 * If resending a FIN, be sure not to use a new sequence number.	 */	if (flags & TH_FIN && tp->t_flags & TF_SENTFIN && 	    tp->snd_nxt == tp->snd_max)		tp->snd_nxt--;	/*	 * If we are doing retransmissions, then snd_nxt will	 * not reflect the first unsent octet.  For ACK only	 * packets, we do not want the sequence number of the	 * retransmitted packet, we want the sequence number	 * of the next unsent octet.  So, if there is no data	 * (and no SYN or FIN), use snd_max instead of snd_nxt	 * when filling in ti_seq.  But if we are in persist	 * state, snd_max might reflect one byte beyond the	 * right edge of the window, so use snd_nxt in that	 * case, since we know we aren't doing a retransmission.	 * (retransmit and persist are mutually exclusive...)	 */	if (len || (flags & (TH_SYN|TH_FIN)) || tp->t_timer[TCPT_PERSIST])		ti->ti_seq = htonl(tp->snd_nxt);	else		ti->ti_seq = htonl(tp->snd_max);	ti->ti_ack = htonl(tp->rcv_nxt);	if (optlen) {		bcopy((caddr_t)opt, (caddr_t)(ti + 1), optlen);		ti->ti_off = (sizeof (struct tcphdr) + optlen) >> 2;	}	ti->ti_flags = flags;	/*	 * Calculate receive window.  Don't shrink window,	 * but avoid silly window syndrome.	 */	if (win < (long)(so->so_rcv.sb_hiwat / 4) && win < (long)tp->t_maxseg)		win = 0;	if (win > (long)TCP_MAXWIN << tp->rcv_scale)		win = (long)TCP_MAXWIN << tp->rcv_scale;	if (win < (long)(tp->rcv_adv - tp->rcv_nxt))		win = (long)(tp->rcv_adv - tp->rcv_nxt);	ti->ti_win = htons((u_short) (win>>tp->rcv_scale));	if (SEQ_GT(tp->snd_up, tp->snd_nxt)) {		ti->ti_urp = htons((u_short)(tp->snd_up - tp->snd_nxt));		ti->ti_flags |= TH_URG;	} else		/*		 * If no urgent pointer to send, then we pull		 * the urgent pointer to the left edge of the send window		 * so that it doesn't drift into the send window on sequence		 * number wraparound.		 */		tp->snd_up = tp->snd_una;		/* drag it along */	/*	 * Put TCP length in extended header, and then	 * checksum extended header and data.	 */	if (len + optlen)		ti->ti_len = htons((u_short)(sizeof (struct tcphdr) +		    optlen + len));	ti->ti_sum = in_cksum(m, (int)(hdrlen + len));	/*	 * In transmit state, time the transmission and arrange for	 * the retransmit.  In persist state, just set snd_max.	 */	if (tp->t_force == 0 || tp->t_timer[TCPT_PERSIST] == 0) {		tcp_seq startseq = tp->snd_nxt;		/*		 * Advance snd_nxt over sequence space of this segment.		 */		if (flags & (TH_SYN|TH_FIN)) {			if (flags & TH_SYN)				tp->snd_nxt++;			if (flags & TH_FIN) {				tp->snd_nxt++;				tp->t_flags |= TF_SENTFIN;			}		}		tp->snd_nxt += len;		if (SEQ_GT(tp->snd_nxt, tp->snd_max)) {			tp->snd_max = tp->snd_nxt;			/*			 * Time this transmission if not a retransmission and			 * not currently timing anything.			 */			if (tp->t_rtt == 0) {				tp->t_rtt = 1;				tp->t_rtseq = startseq;				tcpstat.tcps_segstimed++;			}		}		/*		 * Set retransmit timer if not currently set,		 * and not doing an ack or a keep-alive probe.		 * Initial value for retransmit timer is smoothed		 * round-trip time + 2 * round-trip time variance.		 * Initialize shift counter which is used for backoff		 * of retransmit time.		 */		if (tp->t_timer[TCPT_REXMT] == 0 &&		    tp->snd_nxt != tp->snd_una) {			tp->t_timer[TCPT_REXMT] = tp->t_rxtcur;			if (tp->t_timer[TCPT_PERSIST]) {				tp->t_timer[TCPT_PERSIST] = 0;				tp->t_rxtshift = 0;			}		}	} else		if (SEQ_GT(tp->snd_nxt + len, tp->snd_max))			tp->snd_max = tp->snd_nxt + len;	/*	 * Trace.	 */#ifdef	BSDDEBUG	if (so->so_options & SO_DEBUG)		(*tcpTraceRtn)(TA_OUTPUT, tp->t_state, tp, ti, 0);#endif	/* BSDDEBUG */	/*	 * Fill in IP length and desired time to live and	 * send to IP level.  There should be a better way	 * to handle ttl and tos; we could keep them in	 * the template, but need a way to checksum without them.	 */	m->m_pkthdr.len = hdrlen + len;	((struct ip *)ti)->ip_len = m->m_pkthdr.len;	((struct ip *)ti)->ip_ttl = tp->t_inpcb->inp_ip.ip_ttl;	/* XXX */	((struct ip *)ti)->ip_tos = tp->t_inpcb->inp_ip.ip_tos;	/* XXX */        /*         * Prevent fragmentation to continue (or trigger) path MTU discovery         * if the required route and path MTU estimate are available and path         * MTU discovery is enabled for this socket. (TCP sockets enable MTU         * discovery by default).         */        rt = tp->t_inpcb->inp_route.ro_rt;        if (rt && (rt->rt_flags & RTF_UP) && !(rt->rt_rmx.rmx_locks & RTV_MTU))            {            if (tp->t_inpcb->inp_socket->so_options & SO_USEPATHMTU)                ( (struct ip *)ti)->ip_off |= IP_DF;            }#if BSD >= 43	error = ip_output(m, tp->t_inpcb->inp_options, &tp->t_inpcb->inp_route,	    so->so_options & SO_DONTROUTE, 0);#else	error = ip_output(m, (struct mbuf *)0, &tp->t_inpcb->inp_route, 	    so->so_options & SO_DONTROUTE);#endif	pktSent = TRUE;#ifdef WV_INSTRUMENTATION#ifdef INCLUDE_WVNET    /* WV_NET_NOTICE event */    WV_NET_PORTOUT_EVENT_2 (NET_CORE_EVENT, WV_NET_NOTICE, 19, 3,                            tp->t_inpcb->inp_lport, tp->t_inpcb->inp_fport,                            WV_NETEVENT_TCPOUT_FINISH, WV_NET_SEND,                            so->so_fd, error)#endif  /* INCLUDE_WVNET */#endif	if (error) 	    {out:	    /* 	     * State machine needs to be updated even if packet was not sent 	     * due to errors.	     */	    if (! pktSent)		{		if (! SEQ_GT(tp->snd_up, tp->snd_nxt)) 		    {		    /*		     * If no urgent pointer to send, then we pull		     * the urgent pointer to the left edge of the send window		     * so that it doesn't drift into the send window on 		     * sequence number wraparound.		     */		    tp->snd_up = tp->snd_una;		/* drag it along */		    }		/*		 * In transmit state, time the transmission and arrange for		 * the retransmit.  In persist state, just set snd_max.		 */		if (tp->t_force == 0 || tp->t_timer[TCPT_PERSIST] == 0) 		    {		    tcp_seq startseq = tp->snd_nxt;		    		    /*		     * Advance snd_nxt over sequence space of this segment.		     */		    if (flags & (TH_SYN|TH_FIN)) 			{			if (flags & TH_SYN)			    tp->snd_nxt++;			if (flags & TH_FIN) 			    {			    tp->snd_nxt++;			    tp->t_flags |= TF_SENTFIN;			    }			}		    tp->snd_nxt += len;		    if (SEQ_GT(tp->snd_nxt, tp->snd_max)) 			{			tp->snd_max = tp->snd_nxt;			/*			 * Time this transmission if not a retransmission and			 * not currently timing anything.			 */			if (tp->t_rtt == 0) 			    {			    tp->t_rtt = 1;			    tp->t_rtseq = startseq;			    tcpstat.tcps_segstimed++;			    }			}		     		    /*		     * Set retransmit timer if not currently set,		     * and not doing an ack or a keep-alive probe.		     * Initial value for retransmit timer is smoothed		     * round-trip time + 2 * round-trip time variance.		     * Initialize shift counter which is used for backoff		     * of retransmit time.		     */		    if (tp->t_timer[TCPT_REXMT] == 0 &&			tp->snd_nxt != tp->snd_una) 			{			tp->t_timer[TCPT_REXMT] = tp->t_rxtcur;			if (tp->t_timer[TCPT_PERSIST]) 			    {			    tp->t_timer[TCPT_PERSIST] = 0;			    tp->t_rxtshift = 0;			    }			}		    } else			if (SEQ_GT(tp->snd_nxt + len, tp->snd_max))			    tp->snd_max = tp->snd_nxt + len;		}	    if (error == ENOBUFS) 		{		tcp_quench(tp->t_inpcb, 0);		return (0);		}            if (error == EMSGSIZE)                {                /*                 * Update the MSS to reflect the new MTU estimate.                 * Exit when complete since the tcp_updatemtu() routine                 * already triggers retransmission.                 */                 tcp_updatemtu (tp->t_inpcb, 0);                 return (0);                 }	    if ((error == EHOSTUNREACH || error == ENETDOWN)		&& TCPS_HAVERCVDSYN(tp->t_state)) 		{		tp->t_softerror = error;		return (0);		}	    return (error);	    }	tcpstat.tcps_sndtotal++;	/*	 * Data sent (as far as we can tell).	 * If this advertises a larger window than any other segment,	 * then remember the size of the advertised window.	 * Any pending ACK has now been sent.	 */	if (win > 0 && SEQ_GT(tp->rcv_nxt+win, tp->rcv_adv))		tp->rcv_adv = tp->rcv_nxt + win;	tp->last_ack_sent = tp->rcv_nxt;	tp->t_flags &= ~(TF_ACKNOW|TF_DELACK);	if (sendalot)		goto again;	return (0);}voidtcp_setpersist(tp)	register struct tcpcb *tp;{	register int t = ((tp->t_srtt >> 2) + tp->t_rttvar) >> 1;	if (tp->t_timer[TCPT_REXMT])		panic("tcp_output REXMT");	/*	 * Start/restart persistance timer.	 */	TCPT_RANGESET(tp->t_timer[TCPT_PERSIST],	    t * tcp_backoff[tp->t_rxtshift],	    TCPTV_PERSMIN, TCPTV_PERSMAX);	if (tp->t_rxtshift < TCP_MAXRXTSHIFT)		tp->t_rxtshift++;}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
久久久噜噜噜久久人人看 | 91啪亚洲精品| 91精品久久久久久蜜臀| 日韩欧美国产电影| 久久精品国产秦先生| 精品国产91洋老外米糕| 国产suv精品一区二区三区| 欧美激情一区不卡| 色噜噜狠狠一区二区三区果冻| 亚洲欧美日韩国产一区二区三区| 在线欧美日韩国产| 日韩国产在线观看| 久久久噜噜噜久噜久久综合| 成人免费高清视频| 亚洲国产色一区| 2022国产精品视频| 91国产福利在线| 精油按摩中文字幕久久| 中文字幕av一区 二区| 欧美视频在线一区二区三区| 久久狠狠亚洲综合| 中文字幕欧美一| 91精品免费观看| 成人小视频在线观看| 午夜精品在线视频一区| 久久久久久**毛片大全| 欧美专区日韩专区| 国产专区欧美精品| 亚洲午夜视频在线| 久久久亚洲精华液精华液精华液| 色综合久久久久久久久久久| 麻豆91在线观看| 亚洲视频在线观看三级| 欧美电视剧在线观看完整版| 99re免费视频精品全部| 美女爽到高潮91| 亚洲激情图片小说视频| 久久久三级国产网站| 欧美军同video69gay| 国产精品888| 日韩二区三区四区| 亚洲激情自拍偷拍| 国产欧美综合在线观看第十页| 欧美日韩美少妇| 99久久精品国产网站| 国产一区不卡精品| 免费观看久久久4p| 韩国毛片一区二区三区| 视频一区中文字幕| 一个色在线综合| 中文字幕精品一区二区精品绿巨人 | 亚洲精品中文字幕乱码三区| 日韩一区二区不卡| 在线视频欧美精品| 成人性生交大片免费看中文 | 亚洲女厕所小便bbb| 国产无一区二区| 精品久久久久香蕉网| 欧美日韩美女一区二区| 欧美最猛黑人xxxxx猛交| 91丨porny丨国产入口| 粉嫩绯色av一区二区在线观看| 久久精品国产99久久6| 日韩激情视频在线观看| 亚洲成人www| 亚洲成a天堂v人片| 亚洲电影激情视频网站| 亚洲一区二区视频在线观看| 亚洲欧美另类在线| 亚洲人一二三区| 亚洲人成网站色在线观看| 国产精品沙发午睡系列990531| 久久久久综合网| 久久久久久亚洲综合| 久久久久久久久久久久久久久99 | 欧美三级在线视频| 欧美这里有精品| 欧美亚洲动漫另类| 欧美色图一区二区三区| 欧美中文字幕一区二区三区 | 日韩中文欧美在线| 青椒成人免费视频| 久久精品国产999大香线蕉| 另类小说图片综合网| 国产一区二区三区日韩| 国产精品影音先锋| 成人黄色在线看| 日本乱人伦aⅴ精品| 欧美三级电影一区| 在线不卡一区二区| 日韩一级片网址| 中文字幕国产一区二区| 亚洲欧洲在线观看av| 亚洲精品视频在线观看免费| 一区二区三区日韩欧美| 日日夜夜免费精品视频| 久久电影网电视剧免费观看| 国产一区二区三区在线观看免费| 福利电影一区二区三区| 91成人网在线| 日韩欧美一级二级| 中文字幕在线不卡一区| 成人午夜激情在线| 色综合天天综合在线视频| 欧美人狂配大交3d怪物一区| 欧美成人在线直播| 亚洲欧洲99久久| 日韩和欧美一区二区三区| 国产在线播放一区| 一本一道久久a久久精品| 欧美一区二区性放荡片| 国产精品美女一区二区在线观看| 一区二区三区在线不卡| 狠狠色综合日日| 欧美中文字幕一区二区三区亚洲| 日韩欧美国产1| 亚洲欧美一区二区三区极速播放| 天涯成人国产亚洲精品一区av| 国产一区不卡精品| 欧美美女一区二区| 国产欧美一二三区| 日韩av网站免费在线| 成人黄页毛片网站| 日韩一区二区电影在线| 亚洲另类在线制服丝袜| 麻豆精品视频在线观看免费| 99re热视频这里只精品| 2022国产精品视频| 亚洲第一精品在线| eeuss鲁片一区二区三区在线观看| 欧美丰满高潮xxxx喷水动漫 | 中文字幕视频一区二区三区久| 天堂av在线一区| 色综合天天狠狠| 国产日韩欧美综合一区| 免费成人在线观看| 欧美吞精做爰啪啪高潮| 中文字幕欧美日韩一区| 卡一卡二国产精品 | 日韩成人免费电影| 色天使色偷偷av一区二区| 久久久亚洲午夜电影| 丝袜脚交一区二区| 欧美性大战久久久久久久蜜臀 | 亚洲精品videosex极品| 国产成人精品影视| 欧美大度的电影原声| 亚洲精品国产精华液| 国产成a人亚洲精品| 日韩欧美成人一区| 男女男精品视频网| 欧美午夜精品一区二区三区| 亚洲人一二三区| av一区二区三区黑人| 国产精品天天看| 播五月开心婷婷综合| 国产校园另类小说区| 国产一区二区在线看| 精品久久国产老人久久综合| 热久久免费视频| 日韩欧美国产系列| 久久精品久久久精品美女| 欧美一区二区三区四区高清| 性欧美大战久久久久久久久| 欧美视频自拍偷拍| 午夜影视日本亚洲欧洲精品| 欧美色涩在线第一页| 亚洲第一激情av| 在线不卡a资源高清| 日本中文字幕一区| 午夜伊人狠狠久久| 3751色影院一区二区三区| 日本一不卡视频| 日韩欧美专区在线| 国产一区二区三区观看| 久久久精品欧美丰满| youjizz久久| 亚洲永久精品国产| 91精品婷婷国产综合久久| 捆绑调教美女网站视频一区| 久久久噜噜噜久久中文字幕色伊伊| 国产精品99久| 亚洲免费在线视频| 欧美高清视频不卡网| 精品无人码麻豆乱码1区2区| 2023国产精品| 色综合色综合色综合色综合色综合 | 久久99国产精品麻豆| 国产亚洲成av人在线观看导航| 成人免费观看av| 亚洲电影欧美电影有声小说| 日韩一区二区免费电影| 国产高清在线精品| 亚洲精品视频在线观看网站| 91精品国产综合久久精品app| 国产一区美女在线| 亚洲人成网站色在线观看| 欧美肥胖老妇做爰| 成人美女视频在线观看| 亚洲一区二区三区精品在线|