So, guys, now let us try to understand the nature of Netlink communication.
So from Netlink flags which we discussed in the previous lecture video, you should get an idea that
Netlink based communication user space application is generally the requester that is the master who
is placing an order.
Right?
And kernel space is generally the request entertainer that is the kernel space acts as a slave to the
user space who acts on applications, order or request.
Right.
So most of the time it is user space application which initiate the communication with the kernel space
and places the order, right?
So user space application acts as a master, whereas your Linux kernel module acts as a slave, right?
However, in case of event based notification, it is kernel which initiate the communication with the
userspace application.
So let us try to understand this with the help of an example.
Let us suppose that your Linux kernel module, which is a routing table manager, maintains a routing
table in which there are three entries, let us say entry R1 and three R2 and entry R3.
So these three are the entries of the routing table present in the Linux kernel space.
Now let us suppose the process P two and process P three, which are running in the user space, are
interested in the entry number R3, Right.
And suppose in the kernel space we have triggered the timer that after 10s the entry R3 will going to
be deleted.
Now the process P2 and P3 has placed the request that whenever the entry R3 gets deleted, the process,
P2 and P3 both want to be notified from the kernel space of such deletion.
So after the 10s has been elapsed, it is the responsibility of your Linux kernel module to delete the
entry R3 and also notify the interested process, P2 and P3 about the event.
So this example illustrates the event based notification.
That is, some event happens in the kernel space and the interested processes running in the user space
needs to be notified of that event.
We will going to cover event based notification in the last section of this course more elaborately.
This is just one example to explain what is event based notification.