Compartilhar via


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

Send Feedback

The VBridge library acts as a MAC layer bridging the kernel's Ethernet debug traffic and the TCP/IP and Winsock application traffic. It should be linked into Nk.exe. 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, but is only required if you are not using the common libraries. In addition to the steps that follow, if you are not using the common library you must also modify functions in kitleth.c that are used to send or receive packets in the KITL network.

Note   Including Vbridge.lib in Nk.exe will cost around 30 KB of memory to be reserved for VBridge operation.

To include the VBridge library in the run-time image

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

  2. Include Ethdbg.h to the source file containing the OEMIoControl 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

Ethernet Debugging Services | Debugging and Testing

Send Feedback on this topic to the authors

Feedback FAQs

© 2006 Microsoft Corporation. All rights reserved.