third_party/virtualbox/src/VBox/Devices/Network/DevE1000.cpp
/**
 * Matches the packet addresses against Multicast Table Array.
 *
 * @remarks This is imperfect match since it matches not exact address but
 *          a subset of addresses.
 *
 * @returns true if address matches.
 * @param   pThis          Pointer to the state structure.
 * @param   pvBuf           The ethernet packet.
 * @param   cb              Number of bytes available in the packet.
 * @thread  EMT
 */
Matches the packet addresses against Multicast Table Array.
@remarks This is imperfect match since it matches not exact address but
a subset of addresses.

@returns true if address matches.
@param   pThis          Pointer to the state structure.
@param   pvBuf           The ethernet packet.
@param   cb              Number of bytes available in the packet.
@thread  EMT
Matches the packet addresses against Multicast Table Array . @remarks This is imperfect match since it matches not exact address but a subset of addresses . @returns true if address matches . @param pThis Pointer to the state structure . @param pvBuf The ethernet packet . @param cb Number of bytes available in the packet . @thread EMT
static bool e1kImperfectMatch(PE1KSTATE pThis, const void *pvBuf)
{
    uint16_t u16Bit = ((uint16_t*)pvBuf)[2];
    unsigned offset = GET_BITS(RCTL, MO);
    if (offset < 3)
        u16Bit = u16Bit >> (4 - offset);
    return ASMBitTest(pThis->auMTA, u16Bit & 0xFFF);
}
static bool e1kImperfectMatch ( PE1KSTATE pThis , const void * pvBuf ) { uint16_t u16Bit = ( ( uint16_t * ) pvBuf ) [ 2 ] ; unsigned offset = GET_BITS ( RCTL , MO ) ; if ( offset < 3 ) u16Bit = u16Bit >> ( 4 - offset ) ; return ASMBitTest ( pThis -> auMTA , u16Bit & 0xFFF ) ; }
Matches the packet addresses against Multicast Table Array.
Matches the packet addresses against Multicast Table Array .
/* Get bits 32..47 of destination address */ /*
     * offset means:
     * 00b = bits 36..47
     * 01b = bits 35..46
     * 10b = bits 34..45
     * 11b = bits 32..43
     */