Kernel Module Snippets – Part 3 – Virtual Network Device

This entry is part 3 of 5 in the series Kernel Module Snippets

Intro A part of the project I’ve been working on requires the use of a virtual network device. Traditionally, this would be a tun/tap device. The user-space program would register a new tunnel device connected to /dev/net/tun, which presents the user with a tun0 device to which you can assign an IP address etc. IP…