usrEndLib.c
资源名称:ixp425BSP.rar [点击查看]
上传用户:luoyougen
上传日期:2008-05-12
资源大小:23136k
文件大小:2k
源码类别:
VxWorks
开发平台:
C/C++
- /* usrEndLib.c - End Init routines */
- /* Copyright 1992 - 1998 Wind River Systems, Inc. */
- /*
- modification history
- --------------------
- 01e,29may01,pch Change type of pCookie to (void *), to match muxDevLoad()
- 01d,02mar01,rae Corrected pCookie conversion
- 01c,30jul99,pul replace arpresolve with ipEtherResolvRtn
- 01b,30sep98,ms folded in INCLUDE_NT_ULIP hacks from usrNetwork.c
- 01a,18aug98,ann created from usrNetwork.c
- */
- /*
- DESCRIPTION
- This configlette contains the initialization routine for the
- INCLUDE_END component.
- NOMANUAL
- */
- #ifdef INCLUDE_NT_ULIP
- extern int ntResolv ();
- #endif /* INCLUDE_NT_ULIP */
- STATUS usrEndLibInit()
- {
- int count;
- END_TBL_ENTRY * pDevTbl;
- void * pCookie = NULL;
- /* Add our default address resolution functions. */
- #ifdef INCLUDE_NT_ULIP
- muxAddrResFuncAdd (M2_ifType_ethernet_csmacd, 0x800, ntResolv);
- #else
- muxAddrResFuncAdd (M2_ifType_ethernet_csmacd, 0x800, ipEtherResolvRtn);
- #endif
- /* Add in mux ENDs. */
- for (count = 0, pDevTbl = endDevTbl; pDevTbl->endLoadFunc != END_TBL_END;
- pDevTbl++, count++)
- {
- /* Make sure that WDB has not already installed the device. */
- if (!pDevTbl->processed)
- {
- pCookie = muxDevLoad (pDevTbl->unit,
- pDevTbl->endLoadFunc,
- pDevTbl->endLoadString,
- pDevTbl->endLoan, pDevTbl->pBSP);
- if (pCookie == NULL)
- {
- printf("muxDevLoad failed for device entry %d!n", count);
- }
- else
- {
- pDevTbl->processed = TRUE;
- if (muxDevStart(pCookie) == ERROR)
- {
- printf("muxDevStart failed for device entry %d!n", count);
- }
- }
- }
- }
- return (OK);
- }