mirrorutils.c

来自「Bridge PNE 3.3 source code, running at m」· C语言 代码 · 共 73 行

C
73
字号
/* mirrorUtils.c - utility routines for the mirror END driver *//* Copyright 1984-2005 Wind River Systems, Inc. */#include "copyright_wrs.h"/*modification history--------------------01f,15apr05,svk  Update API descriptions01e,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 + =
减小字号Ctrl + -
显示快捷键?