In this section, we have created a quick comparison table of the various user-kernel interfacing methods that were described in this chapter, based on a few parameters:
Parameter /Interfacing method |
procfs |
sysfs |
debugfs |
netlink socket |
ioctl |
Ease of development |
Easy to learn and use. |
(Relatively) easy to learn and use. |
(Very) easy to learn and use. |
Harder; have to write user space C + driver code + understand socket APIs. |
Fair/harder; have to write user space C + driver code. |
Appropriate for what use |
Core kernel only (a few older drivers may still use it); best avoided by drivers. |
Device driver interfacing. |
Driver (and other) interfacing for production and debug purposes. |
Various interfacing: users include device drivers, core networking code, the udev system, and more. |
Device driver interfacing mostly (includes many). |
Interface visibility |
Visible... |