📄 mirrorutils.c
字号:
/* mirrorUtils.c - Utility routines for the mirror END driver *//* Copyright 1984-2003 Wind River Systems, Inc. */#include "copyright_wrs.h"/*modification history--------------------01e,17apr03,svk Update copyright date01d,15apr02,zhu made changes for docs01c,04apr02,svk Replace hard-coded device name and unit number01b,12mar01,ann fixing some compilation warnings01a,22feb01,ann written*//*DESCRIPTIONThis library contains the utility routines for implementing themirror END driver.INCLUDE FILES: muxLib.h*/#include "muxLib.h"LOCAL char* baseDeviceName = "";LOCAL int baseUnitNum = 0;/******************************************************************************** mirrorEnetAddrGet - get the MAC address for an interface** This routine copies the MAC address from the END object of the * interface specified. The data is copied into the buffer provided* to this routine. ** RETURNS: n/a* */void mirrorEnetAddrGet ( char * pAddress /* Buffer for the MAC address */ ) { END_OBJ * pEndObj = NULL; pEndObj = endFindByName (baseDeviceName, baseUnitNum); bcopy ((char *)pEndObj->mib2Tbl.ifPhysAddress.phyAddress, pAddress, pEndObj->mib2Tbl.ifPhysAddress.addrLength); }/******************************************************************************** mirrorBaseParamsSet - Store the base device name and unit number.** This routine Stores the base device name and unit number. It is needed for * mirrorEnetAddrGet() to work.** RETURNS: n/a*/void mirrorBaseParamsSet ( char * devName, int unit ) { baseDeviceName = devName; baseUnitNum = unit; }
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -