My understanding is that the domains and IP addresses are designed to facilitate the forwarding of internet traffic and management of the address space so that the physical MAC addresses, linked to the network cards, do not have to be used outside the local LAN.
The software running in switches keeps track of the MAC address or the physical address of the network card in its MAC address tables, linking the MAC address to a physical port on the switch.
You would not like to duplicate the low level functions embedded in switches and move them to software applications, it is easier to work at the logical address level, using IP addresses and subnets.
TCP/IP traffic analyzers and packet sniffers are designed to filter individual packets based on the MAC address in the packet headers. Therefore, you should be able to program an application which deals with MAC addresses, if you have all the APIs and the knowledge, if you are sure you are not re-inventing the wheel.