So guys, we were going to write Netlink Hello world example.
We shall write a Netlink Hello world userspace and Linux kernel module to demonstrate the netlink based
communication.
We shall design our userspace application which folks a separate thread to receive data from the kernel
space while in the main thread.
Our userspace application will send the data to the kernel space.
Right.
So our user space application would be like two threads.
One is the main thread and another thread is the recipient thread.
Right.
While in the main thread, our userspace application will keep sending data to the kernel space, whereas
in the another thread, our user space application will keep receiving the data from the kernel space.
Right.
So our user space application will be two threaded application.
We will still use the same typical steps involved in socket programming.
That is creating a socket specifying the source and destination address.
Now we will see that in case of communication between user space and kernel space, what will be the
source and destination addresses?
Right.
And what to specify in the bind system call?
We will use the send message and receive message APIs to send and receive message as usual.
And then we will finally close the connection using close so you can see that you must have used all
these APIs while writing a typical socket program.
As we discussed, that socket is a unified interface.
Therefore, for any socket based communication will eventually going to involve the use of the same
set of APIs.
Netlink is no different and we will going to use the same set of APIs, right?
So I will explain the new APIs that we shall encounter right in the code walk.
So in the next section of the course we will begin a new project and incrementally add new code as we
learn more and more new concepts.
So let us start with building our first very basic netlink program.
So in the next section we will going to write our first Netlink program.