Source MAC address per IP packet

Hello,

for a networking application, I need to set the source MAC address individually for every IP packet that I send. Is this possible at all? I know that the MAC address can be changed in software but per IP frame? On the other hand, every layer 2 switch does exactly this, so it must be possible in principle. Do I need special network controller chips that support this feature? All datasheets of ethernet controllers I got hands on allow you to program the MAC address but it is then automatically filled in for every packet.

Also, how would the programming side look like? I presume I must use
RAW sockets but in which field would I set the source MAC address?

Thanks,
Albrecht