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

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

?? uipc_sock.c

?? vxwork源代碼
?? C
?? 第 1 頁 / 共 3 頁
字號(hào):
	struct mbuf *nam;{	int s;	int error;#ifdef WV_INSTRUMENTATION#ifdef INCLUDE_WVNET    /* WV_NET_VERBOSE event */    WV_NET_MARKER_1 (NET_AUX_EVENT, WV_NET_VERBOSE, 52, 18,                     WV_NETEVENT_SOCONNECT_START, so->so_fd)#endif  /* INCLUDE_WVNET */#endif	if (so->so_options & SO_ACCEPTCONN)            {#ifdef WV_INSTRUMENTATION#ifdef INCLUDE_WVNET    /* WV_NET_ERROR event */            WV_NET_MARKER_1 (NET_AUX_EVENT, WV_NET_ERROR, 45, 8,                             WV_NETEVENT_SOCONNECT_BADSOCK, so->so_fd)#endif  /* INCLUDE_WVNET */#endif            return (EOPNOTSUPP);            }	s = splnet();	/*	 * If protocol is connection-based, can only connect once.	 * Otherwise, if connected, try to disconnect first.	 * This allows user to disconnect by connecting to, e.g.,	 * a null address.	 */	if (so->so_state & (SS_ISCONNECTED|SS_ISCONNECTING) &&	    ((so->so_proto->pr_flags & PR_CONNREQUIRED) ||	    (error = sodisconnect(so))))		error = EISCONN;	else		error = (*so->so_proto->pr_usrreq)(so, PRU_CONNECT,		    (struct mbuf *)0, nam, (struct mbuf *)0);	splx(s);	return (error);}intsoconnect2(so1, so2)	register struct socket *so1;	struct socket *so2;{	int s = splnet();	int error;/* * XXX - This event cannot currently occur: the socket operation which uses *       the soconnect2() routine is not supported by VxWorks#ifdef WV_INSTRUMENTATION#ifdef INCLUDE_WVNET    /@ WV_NET_VERBOSE event @/    WV_NET_MARKER_2 (NET_AUX_EVENT, WV_NET_VERBOSE, 53, 19,                     WV_NETEVENT_SOCONNECT2_START, so1->so_fd, so2->so_fd)#endif  /@ INCLUDE_WVNET @/#endif * XXX - end of unused event */	error = (*so1->so_proto->pr_usrreq)(so1, PRU_CONNECT2,	    (struct mbuf *)0, (struct mbuf *)so2, (struct mbuf *)0);	splx(s);	return (error);}intsodisconnect(so)	register struct socket *so;{	int s = splnet();	int error;	if ((so->so_state & SS_ISCONNECTED) == 0) {		error = ENOTCONN;		goto bad;	}	if (so->so_state & SS_ISDISCONNECTING) {		error = EALREADY;		goto bad;	}	error = (*so->so_proto->pr_usrreq)(so, PRU_DISCONNECT,	    (struct mbuf *)0, (struct mbuf *)0, (struct mbuf *)0);bad:	splx(s);#ifdef WV_INSTRUMENTATION#ifdef INCLUDE_WVNET    /* WV_NET_ERROR event */    WV_NET_MARKER_2 (NET_AUX_EVENT, WV_NET_ERROR, 46, 9,                     WV_NETEVENT_SODISCONN_STATUS, so->so_fd, error)#endif  /* INCLUDE_WVNET */#endif	return (error);}#define	SBLOCKWAIT(f)	(((f) & MSG_DONTWAIT) ? M_DONTWAIT : M_WAIT)/* * Send on a socket. * If send must go all at once and message is larger than * send buffering, then hard error. * Lock against other senders. * If must go all at once and not enough room now, then * inform user that this would block and do nothing. * Otherwise, if nonblocking, send as much as possible. * The data to be sent is described by "uio" if nonzero, * otherwise by the mbuf chain "top" (which must be null * if uio is not).  Data provided in mbuf chain must be small * enough to send all at once. * * Returns nonzero on error, timeout or signal; callers * must check for short counts if EINTR/ERESTART are returned. * Data and control buffers are freed on return. * * WRS mods removed sblock and sbunlock and replaced with splnet and splx * which should serve the purpose. * Removed null check of uio so that blocking can be implemented for zbufs * also.  * CAVEAT: the zbuf length cannot be more than the socket high water mark. * The user should implement his flow control.  * So this call would block only if zbuf length is bigger the space available * in the socket buffer and less than the socket higt water mark.  * Added a flag canWait which is set to M_DONTWAIT if the socket option SS_NBIO * is set. This prevents blocking if the user chose SS_NBIO and for some reason * if the system runs out of mbufs. canWait defaults to M_WAIT -(vinai). */intsosend(so, addr, uio, top, control, flags)	register struct socket *so;	struct mbuf *addr;	struct uio *uio;	struct mbuf *top;	struct mbuf *control;	int flags;{	struct mbuf **mp;	register struct mbuf *m;	register long space, len, resid;	int clen = 0, error, s, dontroute;	int atomic = sosendallatonce(so) || top;	register int canWait;	int outcount = 0;	if (uio)		resid = uio->uio_resid;	else		resid = top->m_pkthdr.len;	/*	 * In theory resid should be unsigned.	 * However, space must be signed, as it might be less than 0	 * if we over-committed, and we must use a signed comparison	 * of space and resid.  On the other hand, a negative resid	 * causes us to loop sending 0-length segments to the protocol.	 */	if (resid < 0)		return (EINVAL);	dontroute =	    (flags & MSG_DONTROUTE) && (so->so_options & SO_DONTROUTE) == 0 &&	    (so->so_proto->pr_flags & PR_ATOMIC);	if (control)		clen = control->m_len;	canWait = (so->so_state & SS_NBIO) ? M_DONTWAIT : M_WAIT;#define	snderr(errno)	{ error = errno; splx(s); goto out; }	s = splnet();restart:	do {		if (so->so_state & SS_CANTSENDMORE)			snderr(EPIPE);		if (so->so_error)			snderr(so->so_error);		if ((so->so_state & SS_ISCONNECTED) == 0) {			if (so->so_proto->pr_flags & PR_CONNREQUIRED) {				if ((so->so_state & SS_ISCONFIRMING) == 0 &&				    !(resid == 0 && clen != 0))					snderr(ENOTCONN);			} else if (addr == 0)				snderr(EDESTADDRREQ);		}		space = sbspace(&so->so_snd);		if (flags & MSG_OOB)			space += 1024;		if (atomic && ((resid > so->so_snd.sb_hiwat) ||		    (clen > so->so_snd.sb_hiwat)))			snderr(EMSGSIZE);		if (space < resid + clen && 		    (atomic || space < so->so_snd.sb_lowat || space < clen)) {			if (so->so_state & SS_NBIO)			    {			    if (flags & MSG_MBUF)				top = NULL; /* don't free the zero copy mbuf */			    snderr(EWOULDBLOCK);			    }			sbwait(&so->so_snd);			goto restart;		}		mp = &top;		space -= clen;		do {		    if (uio == NULL) {			/*			 * Data is prepackaged in "top".			 */			resid = 0;			if (flags & MSG_EOR)				top->m_flags |= M_EOR;		    } else do {		        len = min(resid, space);						if (top == 0) {			        m = mBufClGet(canWait, MT_DATA, len + max_hdr,					      FALSE);				if (m == NULL)				    snderr(ENOBUFS);				len = min(len, m->m_extSize);				m->m_flags |= M_PKTHDR;				m->m_pkthdr.len = 0;				m->m_pkthdr.rcvif = (struct ifnet *)0;                                /*                                 * the assumption here is that max_hdr is                                 * always less than the minimum cluster size                                 * available.  Or don't set len, namely use                                 * len which set by min() above.                                 */                                if (atomic && m->m_extSize > max_hdr) {                                	len = min((m->m_extSize - max_hdr),                                                  len);                                        m->m_data += max_hdr;                                }			}			else			    {			    m = mBufClGet(canWait, MT_DATA, len, FALSE);			    if (m == NULL)				snderr(ENOBUFS);			    len = min(len, m->m_extSize);			    }                   			space -= (m->m_extSize + MSIZE);			error = uiomove(mtod(m, caddr_t), (int)len, uio);			resid = uio->uio_resid;			m->m_len = len;			*mp = m;			top->m_pkthdr.len += len;			if (error)				goto release;			mp = &m->m_next;			if (resid <= 0) {				if (flags & MSG_EOR)					top->m_flags |= M_EOR;				break;			}		    } while (space > 0 && atomic);		    if (dontroute)			    so->so_options |= SO_DONTROUTE;                    if (!sosendallatonce (so))			{		        top->m_flags &= ~M_EOB;		        if (((resid == 0) || (space <= 0)) && (outcount > 0))			    top->m_flags |= M_EOB;                        outcount++;                        if (resid)			    top->m_flags &= ~M_EOB;                        }		    error = (*so->so_proto->pr_usrreq)(so,			(flags & MSG_OOB) ? PRU_SENDOOB : PRU_SEND,			top, addr, control);		    if (dontroute)			    so->so_options &= ~SO_DONTROUTE;		    clen = 0;		    control = 0;		    top = 0;		    mp = &top;		    if (error)			goto release;		} while (resid && space > 0);	} while (resid);release:	splx(s);	out:	if (top)		m_freem(top);	if (control)		m_freem(control);	if (error != 0)            {#ifdef WV_INSTRUMENTATION#ifdef INCLUDE_WVNET    /* WV_NET_CRITICAL event */            WV_NET_EVENT_2 (NET_CORE_EVENT, WV_NET_CRITICAL, 34, 4,                            WV_NETEVENT_SOSEND_FAIL, WV_NET_SEND,                            so->so_fd, error)#endif  /* INCLUDE_WVNET */#endif	    netErrnoSet (error);            }#ifdef WV_INSTRUMENTATION#ifdef INCLUDE_WVNET    /* WV_NET_VERBOSE event */        else            {            WV_NET_EVENT_1 (NET_CORE_EVENT, WV_NET_VERBOSE, 54, 20,                            WV_NETEVENT_SOSEND_FINISH, WV_NET_SEND, so->so_fd)            }#endif  /* INCLUDE_WVNET */#endif	return (error);}/* * Implement receive operations on a socket. * We depend on the way that records are added to the sockbuf * by sbappend*.  In particular, each record (mbufs linked through m_next) * must begin with an address if the protocol so specifies, * followed by an optional mbuf or mbufs containing ancillary data, * and then zero or more mbufs of data. * In order to avoid blocking network interrupts for the entire time here, * we splx() while doing the actual copy to user space. * Although the sockbuf is locked, new data may still be appended, * and thus we must maintain consistency of the sockbuf during that time. * * The caller may receive the data as a single mbuf chain by supplying * an mbuf **mp0 for use in returning the chain.  The uio is then used * only for the count in uio_resid. * * WRS mods: implement zero copy if out of band data is requested. */intsoreceive(so, paddr, uio, mp0, controlp, flagsp)	register struct socket *so;	struct mbuf **paddr;	struct uio *uio;	struct mbuf **mp0;	struct mbuf **controlp;	int *flagsp;{	register struct mbuf *m, **mp;	register int flags, len, error = 0, s, offset;	struct protosw *pr = so->so_proto;	struct mbuf *nextrecord;	int moff, type = 0;	int orig_resid = uio->uio_resid;	mp = mp0;	if (paddr)		*paddr = 0;	if (controlp)		*controlp = 0;	if (flagsp)		flags = *flagsp &~ MSG_EOR;	else		flags = 0;	/* this is the zero copy ptr To ptr to mbuf passed */	if (mp)				*mp = (struct mbuf *)0;	if (flags & MSG_OOB) {		m = mBufClGet(M_WAIT, MT_DATA, CL_SIZE_128, TRUE);		if (m == (struct mbuf *) NULL)		    {		    return (ENOBUFS);		    }		error = (*pr->pr_usrreq)(so, PRU_RCVOOB, m,		    (struct mbuf *)(long)(flags & MSG_PEEK), (struct mbuf *)0);		if (error)			goto bad;		if (mp) do { 			/* if zero copy interface */		    uio->uio_resid -= m->m_len; 		    *mp = m; 		    mp = &m->m_next; 		    m = m->m_next; 		} while (*mp);  		else do {			/* if not zero copy iface */			error = uiomove(mtod(m, caddr_t),			    (int) min(uio->uio_resid, m->m_len), uio);			m = m_free(m);		} while (uio->uio_resid && error == 0 && m);bad:		if (m)			m_freem(m);		netErrnoSet (error);		return (error);	}	if (so->so_state & SS_ISCONFIRMING && uio->uio_resid)		(*pr->pr_usrreq)(so, PRU_RCVD, (struct mbuf *)0,		    (struct mbuf *)0, (struct mbuf *)0);	s = splnet();restart:	m = so->so_rcv.sb_mb;	/*	 * If we have less data than requested, block awaiting more	 * (subject to any timeout) if:	 *   1. the current count is less than the low water mark, or	 *   2. MSG_WAITALL is set, and it is possible to do the entire	 *	receive operation at once if we block (resid <= hiwat), or	 *   3. MSG_DONTWAIT is not set.	 * If MSG_WAITALL is set but resid is larger than the receive buffer,	 * we have to do the receive in sections, and thus risk returning	 * a short count if a timeout or signal occurs after we start.	 */	if ( m == 0 ||             ( ((flags & MSG_DONTWAIT) == 0) &&	       (so->so_rcv.sb_cc < uio->uio_resid) &&	       (so->so_rcv.sb_cc < so->so_rcv.sb_lowat)             ) ||	     ( (flags & MSG_WAITALL) &&               (uio->uio_resid <= so->so_rcv.sb_hiwat) &&	       (m->m_nextpkt == 0) &&               ((pr->pr_flags & PR_ATOMIC) == 0)             )            ) {#ifdef DIAGNOSTIC		if (m == 0 && so->so_rcv.sb_cc)			panic("receive 1");#endif		if (so->so_error) {			if (m)				goto dontblock;			error = so->so_error;			if ((flags & MSG_PEEK) == 0)				so->so_error = 0;			goto release;		}		if (so->so_state & SS_CANTRCVMORE) {			if (m)				goto dontblock;			else				goto release;		}		for (; m; m = m->m_next)			if (m->m_type == MT_OOBDATA  || (m->m_flags & M_EOR)) {				m = so->so_rcv.sb_mb;				goto dontblock;			}		if ((so->so_state & (SS_ISCONNECTED|SS_ISCONNECTING)) == 0 &&		    (so->so_proto->pr_flags & PR_CONNREQUIRED)) {			error = ENOTCONN;			goto release;		}		if (uio->uio_resid == 0)			goto release;		if ((so->so_state & SS_NBIO) || (flags & MSG_DONTWAIT)) {			error = EWOULDBLOCK;			goto release;		}		sbwait(&so->so_rcv);		goto restart;	}dontblock:	nextrecord = m->m_nextpkt;	if (pr->pr_flags & PR_ADDR) {#ifdef DIAGNOSTIC		if (m->m_type != MT_SONAME)			panic("receive 1a");#endif		orig_resid = 0;		if (flags & MSG_PEEK) {			if (paddr)				*paddr = m_copy(m, 0, m->m_len);			m = m->m_next;		} else {			sbfree(&so->so_rcv, m);			if (paddr) {				*paddr = m;				so->so_rcv.sb_mb = m->m_next;				m->m_next = 0;				m = so->so_rcv.sb_mb;			} else {				so->so_rcv.sb_mb = m_free(m);				m = so->so_rcv.sb_mb;			}		}	}	while (m && m->m_type == MT_CONTROL && error == 0) {		if (flags & MSG_PEEK) {			if (controlp)

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號(hào) Ctrl + =
減小字號(hào) Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
麻豆免费精品视频| 国产精品成人一区二区三区夜夜夜| 日韩国产高清在线| 久久久亚洲高清| 成人av免费在线| 亚洲一二三专区| 久久久一区二区| av一区二区三区黑人| 午夜影院在线观看欧美| 久久蜜桃一区二区| 欧美亚一区二区| 国产成人午夜视频| 亚洲线精品一区二区三区| 久久久噜噜噜久噜久久综合| 一本一本大道香蕉久在线精品 | 亚洲黄色小视频| 欧美xxxxxxxxx| 一本久久精品一区二区| 日本vs亚洲vs韩国一区三区二区| 欧美国产激情一区二区三区蜜月| 欧美日本一道本| 成人国产精品免费观看动漫| 亚洲一区电影777| 国产亚洲成aⅴ人片在线观看 | 日韩中文字幕区一区有砖一区| 欧美国产在线观看| 日韩欧美一区在线观看| 色欧美乱欧美15图片| 国产在线精品一区二区不卡了| 亚洲va国产va欧美va观看| √…a在线天堂一区| www精品美女久久久tv| 成人免费毛片app| 黑人精品欧美一区二区蜜桃| 婷婷国产在线综合| 一区二区三区不卡视频在线观看| 久久久亚洲精品石原莉奈| 欧美一级片免费看| 欧美大黄免费观看| 欧美中文字幕一区| 粉嫩av一区二区三区粉嫩| 美女诱惑一区二区| 日韩不卡一二三区| 五月天亚洲婷婷| 午夜精品久久久久影视| 亚洲欧美激情视频在线观看一区二区三区| 亚洲精品一区二区三区精华液| 欧美日韩国产在线观看| 欧美性极品少妇| 粉嫩av一区二区三区粉嫩| 国产一区二区三区黄视频| 国产一区免费电影| 精品在线亚洲视频| 肉色丝袜一区二区| 日韩高清国产一区在线| 日韩经典一区二区| 免费观看成人av| 美国十次综合导航| 麻豆精品国产传媒mv男同| 日本成人在线电影网| 男男视频亚洲欧美| 狠狠狠色丁香婷婷综合久久五月| 久久99久久精品| 国产精品自在欧美一区| 国产馆精品极品| 国内精品写真在线观看| 精品在线一区二区| 国产激情91久久精品导航| 国产精品一区二区在线观看不卡| 国内精品嫩模私拍在线| 国产精品亚洲人在线观看| 国产成人午夜电影网| 福利一区二区在线观看| 精品亚洲国产成人av制服丝袜| 精品无人区卡一卡二卡三乱码免费卡| 亚洲超碰97人人做人人爱| 婷婷国产在线综合| 久久精品二区亚洲w码| 日日夜夜一区二区| 久久国产精品99久久久久久老狼 | 91麻豆精品在线观看| 在线一区二区三区四区五区| 欧美在线小视频| 91精品久久久久久久91蜜桃 | 欧美日韩成人综合天天影院 | 国产精品福利av| 亚洲精品伦理在线| 自拍偷拍欧美激情| 综合激情成人伊人| 免费成人美女在线观看| 国产麻豆精品95视频| 91亚洲永久精品| 欧美日韩国产区一| 精品久久一二三区| 国产精品丝袜久久久久久app| 亚洲女性喷水在线观看一区| 亚洲男人天堂av网| 亚洲综合在线观看视频| 美国毛片一区二区| 99精品久久只有精品| 欧美日韩国产另类一区| 国产日韩欧美精品在线| 亚洲美女一区二区三区| 麻豆一区二区在线| 91免费精品国自产拍在线不卡| 欧美精品久久天天躁| 精品日韩在线观看| 夜夜亚洲天天久久| 韩国女主播一区| 欧美亚洲愉拍一区二区| 久久―日本道色综合久久| 一区二区三区在线影院| 精品制服美女久久| 久久久久国产免费免费| 伊人一区二区三区| 国产精品自拍一区| 欧美亚洲国产一区二区三区| 欧美一区二区成人6969| 亚洲天堂网中文字| 国产精品1区2区| 91精品国产综合久久精品app| 国产精品视频一二三区| 日韩高清在线电影| 国产高清一区日本| 欧美亚一区二区| 1024国产精品| 成人免费视频caoporn| 欧美α欧美αv大片| 亚洲第一搞黄网站| 在线亚洲一区二区| 日本一二三不卡| 亚洲女同一区二区| 久久99久久99小草精品免视看| 成人黄页在线观看| 久久久久亚洲蜜桃| 美腿丝袜亚洲色图| 欧美一区二区三区四区视频| 亚洲人被黑人高潮完整版| 国产成人av影院| www成人在线观看| 久久国产福利国产秒拍| 欧美福利视频导航| 亚洲日本va午夜在线电影| 成人精品免费看| 国产人伦精品一区二区| 激情av综合网| 亚洲精品一区二区三区在线观看| 香蕉成人伊视频在线观看| 在线观看亚洲精品视频| 亚洲品质自拍视频| 日本高清不卡在线观看| 亚洲久草在线视频| 欧美日韩综合不卡| 免费精品视频最新在线| 久久蜜臀精品av| 97久久超碰国产精品电影| 一区二区三区国产精品| 欧美一区二区性放荡片| 国产一区二区三区四| 国产精品看片你懂得| 欧美系列亚洲系列| 精品无码三级在线观看视频| 久久久久久久久久美女| 91网站在线观看视频| 五月天激情小说综合| 欧美电影免费观看高清完整版在 | 成人激情午夜影院| 亚洲欧美一区二区久久| 欧美巨大另类极品videosbest | 一区二区三区电影在线播| 欧美欧美午夜aⅴ在线观看| 国产在线一区二区| 亚洲天堂精品视频| 国产精选一区二区三区| 日韩国产欧美视频| 一区二区三区在线视频免费 | 精品免费国产二区三区| 激情五月婷婷综合网| 亚洲欧美一区二区三区孕妇| 日韩视频一区在线观看| 99热在这里有精品免费| 蜜桃传媒麻豆第一区在线观看| 中文字幕国产精品一区二区| 久久免费精品国产久精品久久久久| 91麻豆免费在线观看| 韩国精品主播一区二区在线观看 | 欧美一区二区精品| 色综合天天做天天爱| 国产综合色视频| 夜夜嗨av一区二区三区中文字幕| 精品少妇一区二区三区在线视频| 色婷婷精品大视频在线蜜桃视频| 蜜桃av一区二区在线观看| 一区二区三区欧美视频| 国产喂奶挤奶一区二区三区| 欧美日韩一区二区三区在线看| 成人av在线一区二区三区| 蜜臀av亚洲一区中文字幕| 亚洲一区二区综合| 中文无字幕一区二区三区|