Share via


IOCTL_HAL_GET_RNDIS_MACADDR (Windows Embedded CE 6.0)

1/5/2010

This IOCTL returns up to two Media Access Control (MAC) addresses for networking a device. It provides a software workaround for the devices that could join a network using the RNDIS protocol, but were not assigned MAC addresses by the original hardware manufacturer.

Parameters

  • dwIoControlCode
    [in] Set to IOCTL_HAL_GET_RNDIS_MACADDR to retrieve up to two MAC addresses for use with RNDIS.

    The OEM must implement the section of code in the OAL to handle the call to the KernelIoControl function.

  • lpInBuf
    [in] Set to NULL.
  • nInBufSize
    [in] Set to zero.
  • lpOutBuf
    [in, out] On input, set to a buffer pointer that can hold 12 bytes.

    On output, contains up two 6-byte MAC addresses.

  • nOutBufSize
    [in] Set to the size of the buffer, at least 12 bytes.
  • lpBytesReturned
    [in, out] On input, the address of a DWORD that receives the size, in bytes, of the returned data.

    On output, set to the number of bytes written to the supplied buffer.

    Return of 6 bytes means that one MAC address was returned.

    Return of 12 bytes means that two MAC addresses were returned.

Return Values

IOCTL_HAL_GET_RNDIS_MACADDR can be implemented to return two MAC addresses: one when the device is the RNDIS Host, and the other when the device is the RNDIS Client/Function.

When IOCTL_HAL_GET_RNDIS_MACADDR contains two MAC addresses, it returns 12 bytes. The first 6 bytes are the RNDIS Host MAC address and the second 6 bytes are the Function MAC address.

If IOCTL_HAL_GET_RNDIS_MACADDR returns only 6 bytes, they will all represent the MAC address of RNDIS Host. The MAC address of RNDIS Function is calculated by setting the second least significant bit of the RNDIS Host MAC address to 1.

Requirements

Header pkfuncs.h
Windows Embedded CE Windows CE 5.0 and later

See Also

Reference

Other OAL IOCTLs
OEMIoControl

Other Resources

RNDIS Driver Implementation Guide
KernelIoControl
RNDIS Concepts