You can easily delay packets
leaving the system using traffic control, but
entering? That's a ton harder and much less stable: It has to store everything before it lets it enter, you get the potential for states where the kernel can't store as fast as it's receiving and has no way to tell the other end to slow down. In-kernel memory is also limited.
I'm not sure you need driver hacking to do it anyway. Doing it in userspace avoids most of the above problems. I'd try this:
- Create a tun/tap interface (see Documentation/networking/tuntap.txt in the linux kernel)
- Configure your ethernet device for 0.0.0.0, remove it from the routing table, and just read/write raw packets with a userspace program.
- Write raw packets from the ethernet adaptor to the tun/tap device. Write raw packets from the tun/tap device to the ethernet adaptor. Your program can store them for how long you want inbetween.
- Use your tun/tap device for normal traffic. Add it to the routing table, etc. so normal programs use it.