I was wondering how does the C or ASM code from kernel communicate with network card. I can't find this anywhere. Like when I would write my own kernel , and wanted networking how would I go about that, would I need to have separate code for each networking card that exists?