Partager via


IOCTL_HAL_GET_RNDIS_MACADDR (Compact 2013)

10/16/2014

This I/O control message obtains up to two Media Access Control (MAC) addresses for networking a device. Send this message with OEMIoControl.

Syntax

BOOL OEMIoControl(
    DWORD dwIoControlCode,    // use IOCTL_HAL_GET_RNDIS_MACADDR
    LPVOID lpInBuffer,        // pointer to input buffer
    DWORD nInBufferSize,      // input buffer size
    LPVOID lpOutBuffer,       // pointer to output buffer
    DWORD nOutBufferSize,     // output buffer size
    LPDWORD lpBytesReturned   // number of bytes returned
);

Parameters

  • dwIoControlCode
    [in] Control code for the operation. Use IOCTL_HAL_GET_RNDIS_MACADDR for this operation.
  • lpInBuffer
    [in] Set to NULL.
  • nInBufferSize
    [in] Set to zero.
  • lpOutBuffer
    [in][out] On input, set to a buffer pointer that can hold 12 bytes. On output, contains up two 6-byte MAC addresses.
  • nOutBufferSize
    [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.

Remarks

This I/O control 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. You use this I/O control for devices that can join a network by using the RNDIS protocol but that were not assigned MAC addresses by the original hardware manufacturer.

When this I/O control 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 this I/O control returns only 6 bytes, they 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

See Also

Reference

Other OAL IOCTLs
OEMIoControl