Linux Kernel Programming - API Hierarchy - External APIs, Internal APIs, Wrapper APIs, Helper APIs, Core Helper APIs, Nested Internal Helper APIs
Linux Kernel Programming - API Hierarchy - External APIs, Internal APIs, Wrapper APIs, Helper APIs, Core Helper APIs, Nested Internal Helper APIs

When you start newly working in the Linux Kernel space you will go through various books and other study material. You read about Kernel data-structures, APIs and so on. But the issue is, Kernel source is ever evolving so the examples you see in these books will not look the same the moment you start reading the actual kernel source since time to time APIs and data-structures change as kernel gets new features and bug fixes.

So when you do a kernel source code walk, you find various APIs types in Linux Kernel. Some of these APIs are External APIs usually accompanied by EXPORT_SYMBOL() after the function implementation usually in .c files. And of course prototypes for the same in the .h files. Apart from that you also find these External APIs in the form of Wrapper APIs, and various other internal supporting Helper APIs. And within these Helper APIs there again you find variants and hierarchy such as some are “core” helper APIs and some of just single or multiple nested internal helper APIs. Here is my detailed Youtube video episode on the same.

Refer:
Linux Kernel Source API examples discussed in my video:
skb_copy()
https://elixir.bootlin.com/linux/latest/source/include/linux/skbuff.h#L1344
https://elixir.bootlin.com/linux/latest/source/net/core/skbuff.c#L1972

dev_alloc_name()
https://elixir.bootlin.com/linux/v6.6/source/net/core/dev.c#L1185
https://elixir.bootlin.com/linux/v3.17.7/source/net/core/dev.c#L1032

ip_rcv()
https://elixir.bootlin.com/linux/v6.6/source/net/ipv4/ip_input.c#L560
https://elixir.bootlin.com/linux/v3.17.7/source/net/ipv4/ip_input.c#L376