Hacker News new | ask | show | jobs
by ams6110 3368 days ago
MAC is a hexadecimal number so testing a packet header is literally a bitwise AND and then drop the packet if the result is not equal to the card's MAC address, or an XOR and drop if the result is not zero. I am not speaking from knowledge but I'd be astonished if this doesn't happen on the card and never involves the CPU.
1 comments

It can't possibly an AND operation, can it? If your MAC address has a lot of zero bits you'd get a ton of false positives?
I think ams... is talking about masking about whatever parts of the header are not the MAC address.

Although whether even that requires AND gates depends on the details of the hardware. Maybe the appropriate bits in the buffer are just directly wired to a comparison unit.

Such an equality comparison unit would generally be an XOR-NAND combination.