It depends on the particular Ethernet MAC chip you are trying to talk to. Even chips in the same family often have small differences in how they work. That's why modern OSs have the concept of a โdriverโ: a hardware manufacturer usually writes a driver because it knows the hardware, and the driver provides a translation between the hardware and what the OS wants to see.
You can often get documentation from the manufacturer of the MAC chip to write your own driver. Again, you must know exactly which chip you are trying to talk with in order to get the right specifications. Some chips do not have public documentation, but usually this is not a problem with Ethernet chips.
source
share