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

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

?? socklib.c

?? vxwork源代碼
?? C
?? 第 1 頁 / 共 4 頁
字號(hào):
/* sockLib.c - generic socket library *//* Copyright 1984 - 2002 Wind River Systems, Inc. */#include "copyright_wrs.h"/*modification history--------------------05g,27jun02,rae  removed excessive accept() argument validation05f,21may02,vvv  updated connectWithTimeout doc (SPR #27684)05e,10may02,kbw  making man page edits05d,28apr02,rae  Corrected getsockname() doc (SPR #70327)05c,26apr02,vvv  updated setsockopt doc (SPR #21992/28868/30335)05b,07dec01,rae  merge from synth ver 05c (spr #28181 correctly)05a,15oct01,rae  merge from truestack ver 05b base 04q (SPR #28181 etc.)04z,12sep01,cyr  doc: correct typo per SPR 2906404y,16jan01,cco  Add 'See Also' reference to UNIX network Programming04x,10jan01,dgr  correcting comment header block for shutdown() as per                 SPR#3552904w,14nov00,rae  removed unused argument from sockLibAdd()04v,10nov00,ham  doc: corrected setsockopt(SO_DEBUG) example (SPR #62267).04u,24oct00,dgr  adding to setsockopt() comment header block (re: SPR #20562)04t,18oct00,zhu  change return value for sockFdtosockFunc04s,17oct00,zhu  calloc doesn't need zero out04r,16oct00,zhu  zero out pSockFdMap and move file descriptor check funtion		 here04q,17aug99,pai  changed send() prototype to use const on the second param                 (SPR 21829)04t,08nov99,pul  T2 cumulative patch 204s,29apr99,pul  Upgraded NPT phase3 code to tor2.0.004r,16mar99,spm  recovered orphaned code from tor2_0_x branch (SPR #25770)04q,-2feb99,sgv  Added bitFlags to the sockLibAdd routine, added routine		 sockfdtosockFunc04p,02dec98,n_s  updated comments for sendmsg and recvmsg. spr 2355204o,10nov98,spm  changed socket map for removal of closed files (SPR #21583)04n,15mar99,c_c  Doc: Updated setsockopt () with SO_DEBUG flag (SPR #9636).04m,14dec97,jdi  doc: cleanup.04l,10dec97,kbw  fixed man page problems 04k,04aug97,kbw  fixed man page problems found in beta review04j,15apr97,kbw  fixed minor man page format problems04i,14apr97,vin  added changes to setsockopt docs.04l,14jul97,dgp  doc: change ^C to CTRL-C in setsockopt()04k,10jul97,dgp  doc: fix SPRs 8470 & 8471, parameters of getsockopt()04j,31jul95,dzb  check for lib init in sockLibAdd() and socket().04i,25jul95,dzb  added fd-to-pSockFunc table.  added sockLibAdd().04h,21jul95,dzb  changed to be a BSD/STREAMS switchyard.		 Previous sockLib.c file moved to bsdSockLib.c.04i,26oct95,rhp  doc: mention values for <flags> params in socket                 calls (SPR#4423)04h,14oct95,jdi  doc: revised pathnames for Tornado.04g,13mar95,dzb  added spl semaphore protection to socket() (SPR #4016).04f,11feb95,jdi  doc format repairs.04e,18jan95,jdi  doc cleanup for connectWithTimeout().04d,14not94,rhp  added socket-option documentation to setsockopt man page,                 and added pointers from send() and sendto() (SPR#3785);                 specified no support for UNIX Domain sockets (SPR#3519,1432)04c,18aug94,dzb  Removed the NOMANUAL from connectWithTimeout() (SPR #3550).                 Added m_freem() calls for mbuf interface (MSG_MBUF).04b,22apr93,caf  ansification: added cast to ioctl() parameter.04a,11aug93,jmm  Changed ioctl.h and socket.h to sys/ioctl.h and sys/socket.h03z,01mar93,jdi  doc: addition of ioctl() functions (SPR 1922); added		 explanation of accept() parameters (SPR 1382).03y,03feb93,jdi  documentation cleanup for 5.1.03x,19aug92,smb  changed systime.h to sys/times.h.03w,26may92,rrr  the tree shuffle03v,04oct91,rrr  passed through the ansification filter                  -changed functions to ansi style		  -changed includes to have absolute path from h/		  -changed copyright notice03u,30apr91,jdi	 documentation tweaks.03t,05apr91,jdi	 documentation -- removed header parens and x-ref numbers;		 doc review by dnw.03s,24mar91,jaa  documentation cleanup.03r,07feb91,elh  changed recvfrom to check if from is NULL before filling it.03q,31jan91,jaa	 documentation.03p,25oct90,dnw  changed utime.h to systime.h.03o,04oct90,shl  made connectWithTimeOut() NOMANUAL.03n,02oct90,hjb  eliminated a race and a bug in sockClose().03m,25may90,dnw  removed malloc of file name "(socket)" before calling iosFdSet.		 added "(socket)" as device name for iosFdSet optimization.03l,11may90,yao  added missing modification history (03k) for the last checkin.03k,09may90,yao  typecasted malloc to (char *).03j,07may90,hjb  added sockFdVerify(), connectWithTimeout(), a hack to avoid		 register d2 trashing bug.03i,19apr90,hjb  deleted sendit(), recvit() and modified sendmsg() and		 recvmsg() accordingly, de-linted.03h,18mar90,hjb  optimization of send(), sendto(), sockWrite(), recv(),		 recvfrom(), sockRead().03g,16mar90,rdc  removed polling version of select.03f,09jun89,gae  cleanup of 03e.03e,07jun89,gae  changed SOCKADDR back to "struct sockaddr".03d,24may89,hjb  fixed a bug in bind(); when sobind() fails, we now free		 the allocated mbuf before returning error code.03c,14apr89,gae  made select backward compatible with BSD 4.2, fixed bug,		 made time of 0 not actually delay, more optimizing.03b,13apr89,rdc  made select detect passively closed sockets.		 installed marc ullman's select optimizations.03a,15oct88,dnw  changed call to sleep() to ksleep().02z,13sep88,llk  Fixed bug in select.  Now it polls at least once at all times.02y,26aug88,gae  lint.02x,18aug88,gae  documentation.02w,15jul88,llk  changed to malloc the name of a socket fd before calling		   iosFdNew.02v,22jun88,dnw  changed apparent socket filename from "(network)" to "(socket)"02u,30may88,dnw  changed to v4 names.02t,28may88,dnw  removed setNetStatus to netLib.02s,04may88,jcf  changed so_timeoSem to so_timeoSemId	   +ecs  fixed bug in select introduced in 02r.02r,30mar88,gae  made mainly iosLib independent.  Cleaned up select(),		   made it use BSD4.3 fd_set's and caught small bug.02q,27jan88,jcf  made kernel independent.02p,05jan88,rdc  added include of sysm.h02o,14dec87,gae  added include of vxWorks.h!!!02n,18nov87,ecs  documentation.02m,17nov87,rdc  fixed documentation for setsockopt.02l,04nov87,dnw  fixed warning from missing coercion in sendto.02k,03nov87,rdc  added shutdown, cleaned up documentation.02j,13oct87,rdc  added select, setSelectDelay. make setNetStatus not be LOCAL.02i,30sep87,gae  removed use of fdTable by replacing with calls to iosFdSet().02h,02may87,dnw  removed unnecessary includes.02g,01apr87,ecs  fixed bugs in getsockname & getpeername (found by lint!)		 changed references to "struct sockaddr" to "SOCKADDR".02f,26mar87,rdc  made sendit and recvit call splnet first thing.02e,23mar87,jlf  documentation.02d,30jan87,rdc  added getsockname and getpeername.		 sendit and recvit weren't always calling setNetStatus.02c,24dec86,gae  changed stsLib.h to vwModNum.h.02b,08nov86,dnw  fixed bug in closeSock of not freeing fd.02a,15oct86,rdc  completely rewritten for new 4.3 network code.01i,04sep86,jlf  minor documentation.		 made listen return OK always.01h,01jul86,jlf  minor documentation01g,18jun86,rdc  delinted.01f,29apr86,rdc  changed memAllocates to mallocs and de-linted.		 Added getsockopt and setsockopt to implement KEEP_ALIVE.01e,09apr86,rdc  all linked list code now uses lstLib.		 added sockCloseAll and sockNumActive.01d,28jan86,jlf  documentation01c,20nov85,rdc  fixed accept to be 4.2 like01b,08oct85,rdc  de-linted01a,03oct85,rdc  written*//*This library provides UNIX BSD 4.4 compatible socket calls.  Use these calls to open, close, read, and write sockets. These sockets can join processes on the same CPU or on different CPUs between which there is anetwork connection.  The calling sequences of these routines are identical to their equivalents under UNIX BSD 4.4.However, although the socket interface is compatible with VxWorks, the VxWorks environment does affect how you use sockets. Specifically, the globally accessible file descriptors available in the single address space world of VxWorks require that you take extra precautions when closing a file descriptor.You must make sure that you do not close the file descriptor on which a task is pending during an accept(). Although the accept() on the closed file descriptor sometimes returns with an error, the accept() can also fail to return at all. Thus, if you need to be able to close a socket connections file descriptor asynchronously, you may need to set up a semaphore-based locking mechanism that prevents the close while an accept() is pending on the file descriptor.ADDRESS FAMILYVxWorks sockets support only the Internet Domain address family.  UseAF_INET for the <domain> argument in subroutines that require it.There is no support for the UNIX Domain address family.IOCTL FUNCTIONSSockets respond to the following ioctl() functions.  These functions aredefined in the header files ioLib.h and ioctl.h..IP 'FIONBIO' 15 Turns on/off non-blocking I/O..CS    on = TRUE;    status = ioctl (sFd, FIONBIO, &on);.CE.IP 'FIONREAD'Reports the number of read-ready bytes available on the socket.  On the return of ioctl(), <bytesAvailable> has the number of bytes available to read from the socket..CS    status = ioctl (sFd, FIONREAD, &bytesAvailable);.CE.IP 'SIOCATMARK'Reports whether there is out-of-band data to be read from the socket.  Onthe return of ioctl(), <atMark> is TRUE (1) if there is out-of-banddata.  Otherwise, it is FALSE (0)..CS    status = ioctl (sFd, SIOCATMARK, &atMark);.CETo use this feature, include the following component:INCLUDE_BSD_SOCKETINCLUDE FILES: types.h, mbuf.h, socket.h, socketvar.hSEE ALSO: netLib,.I "UNIX Network Programming", by W. Richard Stevens*//* includes */#include "vxWorks.h"#include "stdlib.h"#include "iosLib.h"#include "netLib.h"#include "errnoLib.h"#include "sockFunc.h"#include "sockLib.h"#include "memPartLib.h"#include "netBufLib.h"#include "string.h"#ifdef VIRTUAL_STACK#include "netinet/vsLib.h"#endif    /* VIRTUAL_STACK *//* globals */SOCK_FUNC ** 	pSockFdMap = NULL;/* locals */LOCAL SOCK_LIB_MAP *	pSockLibMapH = NULL;LOCAL UINT		sockFdMax = 0;	/* for parameter verification *//********************************************************************************* sockLibInit - initialize a socket library back-end library.** RETURNS: OK, or ERROR if the back-end could not be initialized.** NOMANUAL*/STATUS sockLibInit    (    int		fdMax			/* maximum file descriptors */    )    {    if (pSockFdMap != NULL)		/* already initialized ? */	return (OK);    /* allocate fd-to-pSockFunc mapping array */    if ((pSockFdMap = (SOCK_FUNC **) KHEAP_ALLOC(fdMax *	sizeof (SOCK_FUNC **))) == NULL)	return (ERROR);        bzero ((char *)pSockFdMap, fdMax * sizeof(SOCK_FUNC **));    sockFdMax = fdMax;    return (OK);    }/********************************************************************************* sockLibAdd - add a socket library back-end** RETURNS: OK, or ERROR if the socket back-end could not be added.** NOMANUAL*/STATUS sockLibAdd    (    FUNCPTR	sockLibInitRtn,		/* back-end init routine */    int		domainMap,		/* address family */    int		domainReal		/* address family */    )    {    SOCK_LIB_MAP *	pSockLibMap;	/* back-end mapping entry ptr */    if (pSockFdMap == NULL)		/* initialized yet ? */	return (ERROR);    if ((pSockLibMap = (SOCK_LIB_MAP *) KHEAP_ALLOC(sizeof(SOCK_LIB_MAP))) == NULL)	return (ERROR);    /* init socket back-end */    if ((sockLibInitRtn == NULL) ||	((pSockLibMap->pSockFunc = (SOCK_FUNC *) (sockLibInitRtn) ()) == NULL))	{	KHEAP_FREE((char *)pSockLibMap);	/* back-end error */	return (ERROR);	}    pSockLibMap->domainMap = domainMap;   /* stuff mapping address family */    pSockLibMap->domainReal = domainReal; /* stuff real address family */    pSockLibMap->pNext = pSockLibMapH;    /* hook into lib list */    pSockLibMapH = pSockLibMap;		/* update lib list head */    return (OK);    }/********************************************************************************* socket - open a socket** This routine opens a socket and returns a socket descriptor.* The socket descriptor is passed to the other socket routines to identify the* socket.  The socket descriptor is a standard I/O system file descriptor* (fd) and can be used with the close(), read(), write(), and ioctl() routines.** Available socket types include:* .IP SOCK_STREAM 18* Specifies a connection-based (stream) socket.* .IP SOCK_DGRAM* Specifies a datagram (UDP) socket.* .IP SOCK_RAW* Specifies a raw socket.* .LP** RETURNS: A socket descriptor, or ERROR.*/int socket    (    int domain,         /* address family (for example, AF_INET) */    int type,           /* SOCK_STREAM, SOCK_DGRAM, or SOCK_RAW */    int protocol        /* socket protocol (usually 0) */    )    {    SOCK_LIB_MAP *	pSockLibMap;    int			newFd;    if (pSockFdMap == NULL)		/* initialized yet ? */	return (ERROR);    /* search for a suitable back-end library entry */    for (pSockLibMap = pSockLibMapH; (pSockLibMap != NULL) &&	(pSockLibMap->domainMap != domain); pSockLibMap = pSockLibMap->pNext)	;    /* found library map entry ? */    if ((pSockLibMap == NULL) || (pSockLibMap->pSockFunc->socketRtn == NULL))	{	netErrnoSet (ENOTSUP);	return (ERROR);	}    /* call back-end to open a socket */    if ((newFd = (pSockLibMap->pSockFunc->socketRtn)	(pSockLibMap->domainReal, type, protocol)) == ERROR)	return (ERROR);    pSockFdMap[newFd] = pSockLibMap->pSockFunc;	/* stuff fd map array */    return (newFd);    }/********************************************************************************* bind - bind a name to a socket** This routine associates a network address (also referred to as its "name")* with a specified socket so that other processes can connect or send to it.* When a socket is created with socket(), it belongs to an address family* but has no assigned name.** RETURNS:* OK, or ERROR if there is an invalid socket, the address is either* unavailable or in use, or the socket is already bound.*/STATUS bind    (    int s,                      /* socket descriptor */    struct sockaddr *name,      /* name to be bound */    int namelen                 /* length of name */    )    {    SOCK_FUNC *	pSockFunc = NULL;

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號(hào) Ctrl + =
減小字號(hào) Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
日本视频一区二区三区| 538prom精品视频线放| 欧美电影免费观看完整版| 亚洲专区一二三| 国产69精品久久久久777| 欧美一区二区三区免费视频| 亚洲欧美激情在线| 久久精品久久99精品久久| 欧美精品在线一区二区三区| 一个色综合网站| 在线免费观看日本一区| 国产精品午夜春色av| 国产在线视频不卡二| 91麻豆精品国产91久久久久久| 一区二区免费看| 欧美影院一区二区| 蜜桃91丨九色丨蝌蚪91桃色| 欧美丰满少妇xxxbbb| 国产精品欧美久久久久无广告 | 国内外成人在线| 亚洲欧美一区二区三区孕妇| 91蜜桃在线观看| 日韩在线一区二区| 欧美大黄免费观看| 不卡的电视剧免费网站有什么| 欧美韩日一区二区三区| 欧美影片第一页| 日韩黄色片在线观看| 欧美不卡在线视频| 蜜臀精品久久久久久蜜臀| 久久精品亚洲精品国产欧美| 一本色道**综合亚洲精品蜜桃冫| 亚洲电影你懂得| 日韩一区二区麻豆国产| 日本电影欧美片| 成人综合在线观看| 奇米精品一区二区三区四区 | 亚洲一区二区视频| 国产精品麻豆久久久| 日韩女优电影在线观看| 91久久奴性调教| 日本网站在线观看一区二区三区| 中文字幕一区二区日韩精品绯色| 欧美精品一二三四| 欧洲在线/亚洲| 99这里只有久久精品视频| 国产在线精品国自产拍免费| 日韩电影在线观看电影| 久久久久久久久一| a在线欧美一区| 国产成人在线视频网址| 国产一区二区三区免费播放| 日韩激情视频在线观看| 日韩黄色一级片| 日本不卡的三区四区五区| 亚洲妇女屁股眼交7| 午夜影视日本亚洲欧洲精品| 夜夜嗨av一区二区三区中文字幕 | 日韩精品一二区| 天天综合网 天天综合色| 日韩精品免费视频人成| 日韩高清不卡在线| 国产麻豆精品在线| av激情亚洲男人天堂| 欧洲色大大久久| 7777精品伊人久久久大香线蕉经典版下载| 91精彩视频在线| 欧美日韩国产免费一区二区| 日韩欧美色综合网站| 久久网站热最新地址| 亚洲视频 欧洲视频| 视频一区免费在线观看| 国产一区二区三区av电影| 成人一级片网址| 欧美久久久久久蜜桃| 久久久久久久国产精品影院| 亚洲人成网站精品片在线观看| 亚洲国产成人av网| 懂色av一区二区三区蜜臀| 在线观看亚洲一区| 日本一二三四高清不卡| 一区二区三区不卡视频| 国产99一区视频免费| 欧美三级在线看| 一区二区三区日韩精品视频| 在线精品亚洲一区二区不卡| 亚洲自拍偷拍欧美| 欧美精三区欧美精三区| 亚洲制服丝袜av| 51久久夜色精品国产麻豆| 国产在线精品一区在线观看麻豆| 欧美亚州韩日在线看免费版国语版| 亚洲视频每日更新| 国产91精品在线观看| 宅男噜噜噜66一区二区66| 亚洲综合色视频| 欧美最猛性xxxxx直播| 日本一区二区视频在线观看| 国产一二精品视频| 国产亚洲欧美色| 成a人片国产精品| 亚洲人成伊人成综合网小说| 91一区在线观看| 亚洲成人综合在线| 欧美喷潮久久久xxxxx| 视频在线观看一区二区三区| 日韩丝袜情趣美女图片| 精品制服美女丁香| 中文字幕一区不卡| 欧美羞羞免费网站| 老司机免费视频一区二区| 国产色爱av资源综合区| 日本高清不卡一区| 久久成人18免费观看| 亚洲视频在线观看一区| 欧美丝袜丝交足nylons| 麻豆精品在线看| 亚洲啪啪综合av一区二区三区| 精品视频在线视频| 成人avav影音| 美国毛片一区二区| 国产精品短视频| 中文久久乱码一区二区| 91美女精品福利| 久久九九久精品国产免费直播| 麻豆精品一区二区三区| 日韩欧美国产成人一区二区| 亚洲黄色片在线观看| 日韩成人免费电影| 欧美综合天天夜夜久久| 亚洲福利视频导航| 中文在线资源观看网站视频免费不卡 | 亚洲一卡二卡三卡四卡无卡久久| 看电视剧不卡顿的网站| 日韩片之四级片| 色综合久久中文字幕| 秋霞av亚洲一区二区三| 在线亚洲高清视频| 美国十次综合导航| 亚洲一二三区视频在线观看| 久久精品亚洲精品国产欧美kt∨ | 性欧美大战久久久久久久久| 国产精品视频免费| 国产欧美综合在线| 精品国产凹凸成av人网站| 欧美乱熟臀69xxxxxx| 日本韩国欧美一区| 色婷婷亚洲综合| 色老头久久综合| 91福利小视频| 欧洲亚洲精品在线| 成人精品鲁一区一区二区| 国产成人av电影在线观看| 国产一区二区三区精品视频| 国产精品123| 99精品国产热久久91蜜凸| 色老综合老女人久久久| 欧美在线一区二区三区| 欧美视频一区二区在线观看| 欧美人妇做爰xxxⅹ性高电影| 欧美日本一区二区三区| 欧美一级生活片| 欧美国产精品专区| 一区二区国产盗摄色噜噜| 日韩影视精彩在线| 国产成人亚洲综合a∨猫咪 | 亚洲国产成人高清精品| 日韩和欧美的一区| 国产a视频精品免费观看| 色一情一乱一乱一91av| 日韩片之四级片| 国产精品二区一区二区aⅴ污介绍| 亚洲综合精品自拍| 国精产品一区一区三区mba视频| 成人app软件下载大全免费| 欧美日韩在线一区二区| 久久众筹精品私拍模特| 亚洲精品欧美在线| 国产91精品一区二区麻豆网站| 91黄视频在线观看| 国产女人水真多18毛片18精品视频| 亚洲三级小视频| 成人a级免费电影| 精品第一国产综合精品aⅴ| 一区二区在线观看免费视频播放| 久久精品国产成人一区二区三区| 成人aa视频在线观看| 久久久亚洲精华液精华液精华液 | 免费在线看成人av| 欧美在线高清视频| 亚洲精品成人a在线观看| 成人av免费在线播放| 国产喷白浆一区二区三区| 美女在线一区二区| 日韩欧美一区二区不卡| 日日嗨av一区二区三区四区| 欧美羞羞免费网站| 亚洲电影一级黄| 欧美一级一区二区| 欧美a级理论片|