Поделиться через


Including the VBridge Library in the Run-Time Image (Windows Embedded CE 6.0)

1/5/2010

The VBridge library acts as a MAC layer bridging the kernel's Ethernet debug traffic and the TCP/IP and Winsock application traffic. The VBridge library communicates with the VMini miniport driver through kernel IOCTLs. For more information about these IOCTLs, see VMINI IOCTLs.

The procedure that follows shows how to include the VBridge library in the run-time image. If you are not using the common library, you must complete this procedure and also modify functions that are used to send or receive packets in the KITL network and initialize the KITL Ethernet driver. For example implementations, see the KitlEthSend,KitlEthRecv, and OALKitlEthInit functions in %_WINCEROOT%\Platform\Common\Src\Common\Kitl\kitleth.c.

Note

This procedure is unnecessary if you are linking with one of the Oal_Kitl_<Platform>.lib libraries.

To include the VBridge library in the run-time image

  1. Include VBridge.lib in the sources file in %_WINCEROOT%\Platform\<Hardware Platform Name>\Src\KITL.

  2. Include Ethdbg.h to the source file containing the KITLIoctl function, and add the following IOCTLs.

    case IOCTL_VBRIDGE_GET_TX_PACKET:
      return VBridgeUGetOneTxPacket((PUCHAR *)lpOutBuf, nInBufSize);
    
    case IOCTL_VBRIDGE_GET_TX_PACKET_COMPLETE:
      VBridgeUGetOneTxPacketComplete((PUCHAR)lpInBuf, nInBufSize);
      return TRUE;
    
    case IOCTL_VBRIDGE_GET_RX_PACKET:
      return VBridgeUGetOneRxPacket((PUCHAR *)lpOutBuf, lpBytesReturned);
    
    case IOCTL_VBRIDGE_GET_RX_PACKET_COMPLETE:
      VBridgeUGetOneRxPacketComplete((PUCHAR)lpInBuf);
      return TRUE;
    
    case IOCTL_VBRIDGE_GET_ETHERNET_MAC:
      VBridgeUGetEDBGMac((PBYTE)lpOutBuf);
      return TRUE;
    
    case IOCTL_VBRIDGE_CURRENT_PACKET_FILTER:
      // Check whether the filter setting has been implemented and then 
      // inform VBridge of the new filtering. 
      if (OEMEthCurrentPacketFilter((PDWORD)lpInBuf))
      {
        VBridgeUCurrentPacketFilter((PDWORD)lpInBuf);
        return TRUE;
      }
      return FALSE;
    
    case IOCTL_VBRIDGE_802_3_MULTICAST_LIST:
      if (OEMEthMulticastList((PUCHAR)lpInBuf, nInBufSize))
        return TRUE;
      return FALSE;
    
    case IOCTL_VBRIDGE_SHARED_ETHERNET:
      // This kernel supports a shared Ethernet port.
      return TRUE;
    

See Also

Concepts

Ethernet Debugging Services