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

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

?? tcp_subr.c

?? vxwork源代碼
?? C
?? 第 1 頁 / 共 2 頁
字號:
 *	discard internet protocol block *	wake up any sleepers */struct tcpcb *tcp_close(tp)	register struct tcpcb *tp;{	register struct tcpiphdr *t;	struct inpcb *inp = tp->t_inpcb;	struct socket *so = inp->inp_socket;	register struct mbuf *m;	register struct rtentry *rt;#ifdef WV_INSTRUMENTATION#ifdef INCLUDE_WVNET    /* WV_NET_INFO event */    WV_NET_MARKER_1 (NET_AUX_EVENT, WV_NET_INFO, 39, 4,                     WV_NETEVENT_TCPCLOSE_START, so->so_fd)#endif  /* INCLUDE_WVNET */#endif	/*	 * If we sent enough data to get some meaningful characteristics,	 * save them in the routing entry.  'Enough' is arbitrarily 	 * defined as the sendpipesize (default 4K) * 16.  This would	 * give us 16 rtt samples assuming we only get one sample per	 * window (the usual case on a long haul net).  16 samples is	 * enough for the srtt filter to converge to within 5% of the correct	 * value; fewer samples and we could save a very bogus rtt.	 *	 * Don't update the default route's characteristics and don't	 * update anything that the user "locked".	 */	if (SEQ_LT(tp->iss + so->so_snd.sb_hiwat * 16, tp->snd_max) &&	    (rt = inp->inp_route.ro_rt) &&	    ((struct sockaddr_in *)rt_key(rt))->sin_addr.s_addr != INADDR_ANY) {		register u_long i = 0;		if ((rt->rt_rmx.rmx_locks & RTV_RTT) == 0) {			i = tp->t_srtt *			    (RTM_RTTUNIT / (PR_SLOWHZ * TCP_RTT_SCALE));			if (rt->rt_rmx.rmx_rtt && i)				/*				 * filter this update to half the old & half				 * the new values, converting scale.				 * See route.h and tcp_var.h for a				 * description of the scaling constants.				 */				rt->rt_rmx.rmx_rtt =				    (rt->rt_rmx.rmx_rtt + i) / 2;			else				rt->rt_rmx.rmx_rtt = i;		}		if ((rt->rt_rmx.rmx_locks & RTV_RTTVAR) == 0) {			i = tp->t_rttvar *			    (RTM_RTTUNIT / (PR_SLOWHZ * TCP_RTTVAR_SCALE));			if (rt->rt_rmx.rmx_rttvar && i)				rt->rt_rmx.rmx_rttvar =				    (rt->rt_rmx.rmx_rttvar + i) / 2;			else				rt->rt_rmx.rmx_rttvar = i;		}		/*		 * update the pipelimit (ssthresh) if it has been updated		 * already or if a pipesize was specified & the threshhold		 * got below half the pipesize.  I.e., wait for bad news		 * before we start updating, then update on both good		 * and bad news.                 *                 * Update the slow start threshold when all of the                 * following conditions apply:                 *   1) The value is not locked (via a routing socket).                 *   2) Some packet loss occurred during the connection                 *       (snd_ssthresh is not zero)                 *   3) Packet loss also occurred during an earlier                 *      connection (rmx_ssthresh is not zero). This                 *      condition also applies if a user set a value                 *      in advance via a routing socket.                 *                 * If none of the above conditions apply, the system                 * still updates the slow start threshold if the                 * value for this connection's packet loss is less                 * than half the rmx_sendpipe value set via a routing                 * socket. If that pipe size is available, the update                 * occurs even if no packet loss happened.		 */		if (((rt->rt_rmx.rmx_locks & RTV_SSTHRESH) == 0 &&		       (i = tp->snd_ssthresh) && rt->rt_rmx.rmx_ssthresh) ||		    i < (rt->rt_rmx.rmx_sendpipe / 2)) {			/*			 * convert the limit from user data bytes to			 * packets then to packet data bytes.			 */			i = (i + tp->t_maxseg / 2) / tp->t_maxseg;			if (i < 2)				i = 2;			i *= (u_long)(tp->t_maxseg + sizeof (struct tcpiphdr));			if (rt->rt_rmx.rmx_ssthresh)				rt->rt_rmx.rmx_ssthresh =				    (rt->rt_rmx.rmx_ssthresh + i) / 2;			else				rt->rt_rmx.rmx_ssthresh = i;		}	}	/* free the reassembly queue, if any */	t = tp->seg_next;	while (t != (struct tcpiphdr *)tp) {		t = (struct tcpiphdr *)t->ti_next;		m = REASS_MBUF((struct tcpiphdr *)t->ti_prev);		remque(t->ti_prev);		m_freem(m);	}	if (tp->t_template)		(void) m_free(tp->t_template);	FREE(tp, MT_PCB); 	inp->inp_ppcb = 0;	soisdisconnected(so);	/* clobber input pcb cache if we're closing the cached connection */	if (inp == tcp_last_inpcb)            tcp_last_inpcb = NULL;	in_pcbdetach(inp);	tcpstat.tcps_closed++;	return ((struct tcpcb *)0);}voidtcp_drain(){}/* * Notify a tcp user of an asynchronous error; * store error as soft error, but wake up user * (for now, won't do anything until can select for soft error). */void tcp_notify    (    struct inpcb *inp,     int error    )    {    register struct tcpcb *tp = (struct tcpcb *)inp->inp_ppcb;    register struct socket *so = inp->inp_socket;    /*     * Ignore some errors if we are hooked up.     * If connection hasn't completed, has retransmitted several times,     * and receives a second error, give up now.  This is better     * than waiting a long time to establish a connection that     * can never complete.     */    if (tp->t_state == TCPS_ESTABLISHED &&        (error == EHOSTUNREACH || error == ENETUNREACH ||         error == EHOSTDOWN))        {#ifdef WV_INSTRUMENTATION#ifdef INCLUDE_WVNET    /* WV_NET_INFO event */        WV_NET_MARKER_2 (NET_AUX_EVENT, WV_NET_INFO, 40, 5,                         WV_NETEVENT_TCPNOTIFY_IGNORE, so->so_fd, error)#endif  /* INCLUDE_WVNET */#endif        return;        }    else if (tp->t_state < TCPS_ESTABLISHED && tp->t_rxtshift > 3 &&             tp->t_softerror)        {#ifdef WV_INSTRUMENTATION#ifdef INCLUDE_WVNET    /* WV_NET_INFO event */        WV_NET_MARKER_2 (NET_AUX_EVENT, WV_NET_INFO, 41, 6,                         WV_NETEVENT_TCPNOTIFY_KILL, so->so_fd, error)#endif  /* INCLUDE_WVNET */#endif        so->so_error = error;        }    else         {#ifdef WV_INSTRUMENTATION#ifdef INCLUDE_WVNET    /* WV_NET_INFO event */        WV_NET_MARKER_2 (NET_AUX_EVENT, WV_NET_INFO, 42, 7,                         WV_NETEVENT_TCPNOTIFY_ERROR, so->so_fd, error)#endif  /* INCLUDE_WVNET */#endif        tp->t_softerror = error;        }    if (so->so_timeoSem)        wakeup(so->so_timeoSem);    sorwakeup(so);    sowwakeup(so);    }voidtcp_ctlinput(cmd, sa, ip)	int cmd;	struct sockaddr *sa;	register struct ip *ip;{	register struct tcphdr *th;	extern struct in_addr zeroin_addr;	extern u_char inetctlerrmap[];	void (*notify) (struct inpcb *, int) = tcp_notify;#ifdef WV_INSTRUMENTATION#ifdef INCLUDE_WVNET    /* WV_NET_INFO event */    WV_NET_MARKER_1 (NET_AUX_EVENT, WV_NET_INFO, 43, 8,                     WV_NETEVENT_TCPCTLIN_START, cmd)#endif  /* INCLUDE_WVNET */#endif	if (cmd == PRC_QUENCH)		notify = tcp_quench;        else if (cmd == PRC_MSGSIZE)                notify = tcp_updatemtu;	else if (!PRC_IS_REDIRECT(cmd) &&		 ((unsigned)cmd > PRC_NCMDS || inetctlerrmap[cmd] == 0))		return;	if (ip) {		th = (struct tcphdr *)((caddr_t)ip + (ip->ip_hl << 2));		in_pcbnotify(&tcb, sa, th->th_dport, ip->ip_src, th->th_sport,			cmd, notify);	} else		in_pcbnotify(&tcb, sa, 0, zeroin_addr, 0, cmd, notify);}/* * When a source quench is received, close congestion window * to one segment.  We will gradually open it again as we proceed. */voidtcp_quench(inp, error)	struct inpcb *inp;	int error;{	struct tcpcb *tp = intotcpcb(inp);	if (tp)		tp->snd_cwnd = tp->t_maxseg;}/* * Look-up the routing entry to the peer of this inpcb.  If no route * is found and it cannot be allocated the return NULL.  This routine * is called by TCP routines that access the rmx structure. */struct rtentry *tcp_rtlookup(inp)        struct inpcb *inp;{        struct route *ro;        struct rtentry *rt;        ro = &inp->inp_route;        rt = ro->ro_rt;        if (rt == NULL || !(rt->rt_flags & RTF_UP)) {                /* 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);                        rt = ro->ro_rt;                }        }        return rt;}/* * When an ICMP error "need fragmentation" message causes the stack to * update the MSS based on the (already updated) path MTU estimate and * signal TCP to send data so that the dropped packet is detected. This  * routine duplicates some code from the tcp_mss() routine in tcp_input.c */void tcp_updatemtu    (    struct inpcb * inp,    int error    )    {    struct tcpcb *tp = intotcpcb(inp);    struct rtentry *rt;    struct socket *so = inp->inp_socket;    int mss;    int maxseg;    int cwnd = 0;    if (tp)        {        rt = tcp_rtlookup (inp);        if ( (rt == NULL) || (rt->rt_rmx.rmx_locks & RTV_MTU))            {            /*             * New path MTU estimate unavailable or discovery process             * ended - set segment size to default value if less than             * current estimate.             */            tp->t_maxsize = min (tp->t_maxsize, tcp_mssdflt);            tp->t_maxseg = min (so->so_snd.sb_hiwat, tp->t_maxsize);            return;            }        maxseg = rt->rt_rmx.rmx_mtu - sizeof(struct tcpiphdr);        mss = rt->rt_rmx.rmx_mss;        /*         * The following comparison violates the TCP specification by         * permitting IP datagrams larger than the mandatory default         * if the peer has not sent the initial SYN (which assigns the         * MSS value). Although TCP is forbidden to exceed the default         * unless explicitly allowed by the MSS option from a peer, that         * behavior would probably prevent path MTU discovery from occurring         * since the default is already less than many typical MTU sizes.         *         * Avoiding the conservative default might not have a significant         * impact. Any unexpectedly large segments will only occur when         * sending an initial SYN which includes options and/or data to a         * host which has never been connected. Once the remote peer sends         * a return SYN (during the connection handshake), the system will         * record a MSS value and reduce the maximum segment size if         * necessary. If that remote peer ignores the generally recommended         * "liberal acceptance" policy and discards the segment which its         * network layer successfully received, the failed connection attempts         * will reveal the problem.         */        if (mss)            {            /*             * If necessary, reduce the path MTU estimate according to the             * known segment size which the peer is required to accept.             */            maxseg = min (maxseg, mss);            }        /*         * Do not allow ICMP error messages to increase the maximum         * segment size above the initial value determined in the         * tcp_mss() routine.         */        if (tp->t_maxsize <= maxseg)            return;        tp->t_maxsize = maxseg;        /* Update the mss to ignore newly received options? */        if ((tp->t_flags & (TF_REQ_TSTMP|TF_NOOPT)) == TF_REQ_TSTMP &&            (tp->t_flags & TF_RCVD_TSTMP) == TF_RCVD_TSTMP)            maxseg -= TCPOLEN_TSTAMP_APPA;#if     (MCLBYTES & (MCLBYTES - 1)) == 0        if (maxseg > MCLBYTES)            maxseg &= ~(MCLBYTES-1);#else        if (maxseg > MCLBYTES)            maxseg = maxseg / MCLBYTES * MCLBYTES;#endif        if (so->so_snd.sb_hiwat < maxseg)            maxseg = so->so_snd.sb_hiwat;        tp->t_maxseg = maxseg;        tp->t_rtt = 0;        tp->snd_nxt = tp->snd_una;        /*	 * If tcp_updatemtu was called in response to an ICMP fragmentation-	 * needed message (error = EMSGSIZE), trigger slow-start without 	 * changing the congestion window. Temporarily set cwnd to 1 segment 	 * and then restore it to original value after tcp_output. tcp_updatemtu	 * is also called from tcp_output but in that case error is 0. We do	 * not want to trigger slow-start for that scenario.	 */        if (error == EMSGSIZE)	    {	    cwnd = tp->snd_cwnd;	    tp->snd_cwnd = maxseg;	    }        tcp_output(tp);	if (error == EMSGSIZE)	    tp->snd_cwnd = cwnd;        }    }

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
日韩成人一区二区三区在线观看| 91精品国产综合久久精品图片| 日韩免费福利电影在线观看| 日韩精品成人一区二区在线| 5566中文字幕一区二区电影| 久久超碰97中文字幕| 亚洲精品一区二区三区影院| 成人福利视频在线| 樱桃视频在线观看一区| 欧美久久免费观看| 久久99热99| 国产精品视频一二| 欧美亚洲高清一区二区三区不卡| 轻轻草成人在线| 国产亚洲精品aa午夜观看| 91在线观看视频| 日本vs亚洲vs韩国一区三区二区| 日韩精品中文字幕在线一区| 成人成人成人在线视频| 亚欧色一区w666天堂| 精品久久久影院| 日本精品裸体写真集在线观看| 热久久一区二区| 一区在线观看视频| 欧美电影免费观看高清完整版在| 风间由美性色一区二区三区| 亚洲综合激情网| 国产视频不卡一区| 欧美久久婷婷综合色| 粗大黑人巨茎大战欧美成人| 性做久久久久久久免费看| 中文字幕国产精品一区二区| 欧美日韩成人激情| 99视频热这里只有精品免费| 日本亚洲欧美天堂免费| 日韩一区在线播放| 337p粉嫩大胆色噜噜噜噜亚洲 | 91精品国产综合久久精品图片 | 成人av网在线| 天天综合网 天天综合色| 国产欧美一区二区精品忘忧草| 欧美亚洲一区二区三区四区| 国产精品一区二区无线| 亚洲午夜三级在线| 国产精品国产三级国产aⅴ原创| 91精品国产日韩91久久久久久| gogo大胆日本视频一区| 久久不见久久见免费视频7 | 天天色天天操综合| 一色屋精品亚洲香蕉网站| 2欧美一区二区三区在线观看视频| 欧洲精品一区二区| jlzzjlzz欧美大全| 国产美女在线精品| 久草中文综合在线| 日韩电影网1区2区| 亚洲国产裸拍裸体视频在线观看乱了 | 奇米影视一区二区三区| 亚洲综合免费观看高清在线观看| 国产精品久久久久久久久久久免费看| 欧美大片日本大片免费观看| 欧美日产国产精品| 日本韩国欧美在线| 色综合咪咪久久| 白白色 亚洲乱淫| 国产精品一区二区免费不卡 | 亚洲综合一区二区| 日韩一区在线免费观看| 国产精品美女久久久久久| 国产色91在线| 国产日产亚洲精品系列| 国产清纯白嫩初高生在线观看91 | 欧美午夜精品一区| 91黄视频在线| 91首页免费视频| 日本道精品一区二区三区| 91麻豆精东视频| 欧美亚洲动漫制服丝袜| 色av成人天堂桃色av| 在线影院国内精品| 欧美午夜不卡在线观看免费| 欧美亚州韩日在线看免费版国语版| 91香蕉视频在线| 在线视频你懂得一区二区三区| 色狠狠色噜噜噜综合网| 欧美午夜精品久久久久久超碰 | 91国产福利在线| 欧美日韩一区中文字幕| 欧美一区二区在线免费观看| 日韩欧美黄色影院| 国产嫩草影院久久久久| 国产精品久久久久久久第一福利| 国产精品麻豆99久久久久久| 亚洲精选一二三| 日韩专区中文字幕一区二区| 韩国女主播一区| 成人avav影音| 欧美日韩三级在线| 337p粉嫩大胆色噜噜噜噜亚洲| 欧美高清在线一区| 一区二区三区丝袜| 日本vs亚洲vs韩国一区三区二区 | 7777精品伊人久久久大香线蕉的 | 日韩一区二区电影在线| 国产亚洲一区二区三区四区| 亚洲人成伊人成综合网小说| 性做久久久久久久免费看| 经典三级在线一区| 99热在这里有精品免费| 欧美无人高清视频在线观看| 精品成人一区二区| 1区2区3区国产精品| 日本vs亚洲vs韩国一区三区二区 | 色哟哟国产精品免费观看| 欧美日韩亚洲综合在线| 久久精品日产第一区二区三区高清版 | 欧美三级视频在线播放| 精品日韩欧美一区二区| 中文字幕一区二| 老司机精品视频一区二区三区| av激情综合网| 日韩久久精品一区| 亚洲综合无码一区二区| 国产精品1024久久| 欧美日韩一区二区三区视频| 国产日韩欧美制服另类| 日韩精品一级中文字幕精品视频免费观看 | 久久精品国产一区二区三| av日韩在线网站| 久久综合中文字幕| 亚洲成国产人片在线观看| 成人午夜私人影院| 欧美电视剧在线观看完整版| 亚洲国产日韩精品| 成人午夜av在线| 精品国产伦理网| 天堂一区二区在线| 日本国产一区二区| 中文字幕在线不卡| 高清不卡一二三区| 欧美一区三区二区| 午夜视频一区在线观看| 99视频一区二区| 欧美韩国一区二区| 国内成人免费视频| 日韩视频一区二区三区| 天天色天天操综合| 在线观看免费视频综合| 成人免费视频在线观看| 国产高清久久久久| 精品国产乱码久久久久久图片 | 国产精品三级久久久久三级| 欧美精品一卡两卡| 91精品国产乱| 亚洲主播在线播放| 91玉足脚交白嫩脚丫在线播放| 欧美国产精品中文字幕| 国产一区高清在线| 久久久久久一级片| 国产伦理精品不卡| 欧美变态tickling挠脚心| 麻豆精品视频在线| 日韩一级黄色片| 免费在线观看成人| 日韩欧美色综合网站| 久久国产精品免费| 精品国产免费人成电影在线观看四季 | 不卡av在线网| 国产精品久久三| 99九九99九九九视频精品| 中日韩免费视频中文字幕| 成人av电影在线网| 亚洲日本成人在线观看| 91国产精品成人| 亚洲图片自拍偷拍| 69堂精品视频| 精品一区二区在线视频| 欧美精品一区二区三区久久久| 精品一区免费av| 中文字幕+乱码+中文字幕一区| 成人免费观看男女羞羞视频| 亚洲国产精品国自产拍av| aa级大片欧美| 一区二区国产视频| 欧美一区二区三区人| 国产精品一区二区免费不卡| 国产精品免费看片| 欧美日韩在线播放一区| 免费看精品久久片| 国产欧美精品在线观看| 99国产精品久久久久久久久久久| 亚洲一区二区欧美激情| 日韩一级免费观看| 成人av午夜电影| 亚州成人在线电影| 国产亚洲一区二区三区在线观看| 94-欧美-setu| 精品综合免费视频观看| 亚洲国产成人午夜在线一区| 91激情五月电影|