Linux kernel API
The Linux kernel provides several interfaces to user-space applications that are used for different purposes and that have different properties by design. There are two types of application programming interface (API) in the Linux kernel that are not to be confused: the "kernel–user space" API and the "kernel internal" API.
Kernel–user space API
The kernel–user space API is the API that allows programs in user space to access system resources and services of the Linux kernel. This API, by choice, never breaks. The POSIX API is only a small part of the Linux kernel API.
Much available free and open-source software is written for the POSIX API. But since the last POSIX version is from 2008, and since so much more development is going on with the Linux kernel as compared to the other POSIX-compatible kernels, various software has been developed that target solely the Linux kernel–user space API. Well-known examples are systemd and Weston.
People such as Lennart Poettering openly advocate writing software solely for the Linux kernel–user space API instead of POSIX, where this offers advantages.
The Linux kernel API versus the POSIX API
Chronological hierarchy of relationships of various UNIX API standards that ultimately gave rise to POSIX.1-2008/SUSv4. Solid lines indicate direct descent, whereas dashed lines indicate a case where either 1) one standard influenced another 2) one standard was incorporated into another, or 3) one standard deferred to another.
- C standard library – the library for the C programming language made available across implementations
- GNU C Library – the GNU Project's implementation of the C standard library
- system call – is a function to facilitate programs to requests services from the kernel
- netlink – Netlink was added by Alan Cox during Linux kernel 1.3 development as a character driver interface to provide multiple kernel and user-space bidirectional communications links. Then, Alexey Kuznetsov extended it during Linux kernel 2.1 development to provide a flexible and extensible messaging interface to the new advanced routing infrastructure. Since then, Netlink sockets have become one of the main interfaces that kernel subsystems provide to user-space applications in Linux.
- epoll, splice – system calls specific to the Linux kernel
- dnotify, fanotify, inotify, mmap – system calls
- netlink – socket family used for IPC between kernel and user space processes, designed as the successor of ioctl
- Windows API – article on various API available on Microsoft Windows operating systems
- Wine – a compatibility layer between Linux and programs written for Microsoft Windows
- The API of Linux kernel 2.6.20 – sadly no current version available
- The Linux Programming Interface
- Interactive Linux kernel map with main API functions and structures
- Linux Device Drivers by Jonathan Corbet, Greg Kroah-Hartman and Alessandro Rubini, 3rd edition
- Linux Kernel Linked List Explained
- TLPI: API changes, changes since the The Linux Programming Interface was released in 2010