Changeset 22218 in vbox for trunk/src/VBox/Devices/Network
- Timestamp:
- Aug 13, 2009 5:25:21 AM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/Network/DevE1000.cpp
r21969 r22218 4059 4059 4060 4060 /** 4061 * Returns the value of a bit in a bit vector.4062 *4063 * @returns true if bit is set.4064 * @param pBitVector The ethernet packet.4065 * @param u16Bit Bit number.4066 * @thread EMT4067 */4068 DECLINLINE(bool) e1kGetBit(uint32_t* pBitVector, uint16_t u16Bit)4069 {4070 return !!(pBitVector[u16Bit] & (1 << (u16Bit & 0x1F)));4071 }4072 4073 /**4074 4061 * Matches the packet addresses against Multicast Table Array. 4075 4062 * … … 4098 4085 if (offset < 3) 4099 4086 u16Bit = u16Bit >> (4 - offset); 4100 return e1kGetBit(pState->auMTA, u16Bit & 0xFFF);4087 return ASMBitTest(pState->auMTA, u16Bit & 0xFFF); 4101 4088 } 4102 4089 … … 4181 4168 pStatus->fVP = true; 4182 4169 /* It is 802.1q packet indeed, let's filter by VID */ 4183 if ( e1kGetBit(pState->auVFTA, RT_BE2H_U16(u16Ptr[7]) & 0xFFF))4170 if (ASMBitTest(pState->auVFTA, RT_BE2H_U16(u16Ptr[7]) & 0xFFF)) 4184 4171 return true; 4185 4172 E1kLog2(("%s Packet filter: no VLAN match\n", INSTANCE(pState)));
Note:
See TracChangeset
for help on using the changeset viewer.