usrBsdSocket.c
上传用户:luoyougen
上传日期:2008-05-12
资源大小:23136k
文件大小:1k
源码类别:

VxWorks

开发平台:

C/C++

  1. /* usrBsdSocket.c - Initialization configlette for BSD sockets */
  2. /* Copyright 1992 - 1998 Wind River Systems, Inc. */
  3. /*
  4. modification history
  5. --------------------
  6. 01d,14nov00,rae  removed unused argument from sockLibAdd()
  7. 01c,30jul99,pul  configure max_linkhdr
  8. 01b,30jul99,pul  modify sockLibAdd to add extra parameter for future
  9.                  scalability
  10. 01a,18aug98,ann  created this configlette from usrNetwork.c
  11. */
  12. /*
  13. DESCRIPTION
  14. This configlette is included when the INCLUDE_BSD_SOCKET component is
  15. chosen. It initializes the BSD socket library and adds the required
  16. socket library back-ends.
  17. NOMANUAL
  18. */
  19. STATUS usrBsdSockLibInit(void)
  20.     {
  21.     
  22.     max_linkhdr=USR_MAX_LINK_HDR;
  23.     if (sockLibInit (NUM_FILES) == ERROR)
  24.         {
  25.         printf ("usrBsdSockLibInit failedn");
  26. return (ERROR);
  27.         }
  28.     if (sockLibAdd ((FUNCPTR) bsdSockLibInit, AF_INET_BSD, AF_INET) == ERROR)
  29.         {
  30.         printf ("usrBsdSockLibInit failed in addn");
  31.         return (ERROR);
  32.         }
  33.     if (sockLibAdd ((FUNCPTR) bsdSockLibInit, AF_INET, AF_INET) == ERROR)
  34.         {
  35.         printf ("usrBsdSockLibInit failed in adding other second INET.n");
  36.         return (ERROR);
  37.         }
  38.     return (OK);
  39.     }