Skip to content

A hands-on project showcasing bidirectional greeting message exchanges between Linux kernel and user space via Netlink sockets. Dive into kernel-user communication! πŸš€πŸ§

License

Notifications You must be signed in to change notification settings

ANSANJAY/NetlinkGreetingExchange

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

30 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

NetlinkGreetingExchange

A hands-on project showcasing bidirectional greeting message exchanges between Linux kernel and user space via Netlink sockets. Dive into kernel-user communication! πŸš€πŸ§

Welcome to the repository dedicated to understanding and implementing communication between Linux kernel and user space using Netlink sockets.

This repo provides a step-by-step guide to the intricacies involved in establishing, sending, and receiving data via Netlink sockets. It's complemented by a series of markdown files which detail each phase of the implementation.


πŸ“ Repository Structure:

  • πŸ“„ 1_NetlinkGreetExample.md: An introduction and basic greeting example using Netlink sockets.

  • πŸ“„ 2_NetlinkProtocolNumber.md: Dive into the Netlink protocol numbers, their significance, and how to use them.

  • πŸ“„ 3_NetlinkGreetCodWalk1.md: A code walk-through for the initial greeting implementation using Netlink.

  • πŸ“„ 4_KernelSocketbuffers.md: Detailed exploration of Kernel Socket Buffers, their role, and how they function.

  • πŸ“„ 5_NetlinkGreetCodeWalkReceivingUserSpaceMsg.md: Code walk-through detailing how to receive messages in user space using Netlink.

  • πŸ“„ 6_NetlinkGreetCodWal3SendingReplyUserspace.md: Code walk-through illustrating how to send replies from Kernel to user space.

  • πŸ“„ 7_UserspaceProgramThreadModel.md: Introduction to the userspace program thread model.

  • πŸ“„ 8_APISendmsgtoKernel.md: Detailed look into the API send message to Kernel.

  • πŸ“„ 9_CodeWalksend_netlink_msg_to_kernel().md: A code walk-through for the send_netlink_msg_to_kernel() function.

  • πŸ“„ 10_Userspace.c flowchart.md: A flowchart explaining the userspace.c file.

  • πŸ“„ 11_Userspace.cSendCodeImplementation.md: Dive into the implementation of the sending code for userspace.c.

  • πŸ“„ 12_Userspace.cRecvCodeImplementation.md: Understand the implementation of the receiving code for userspace.c.

  • πŸ“‚ pkg: Contains the source code for this project. Dive in to see the real implementation and get your hands dirty with some coding!

    • Inside the pkg directory, there's also a dedicated README.md which provides instructions on how to run the project.

πŸš€ Getting Started:

  1. If you're new to Netlink sockets, begin with 1_NetlinkGreetExample.md for a basic understanding and introduction.
  2. For those interested in the source code, head to the pkg directory. Make sure to check the README.md inside pkg for setup and running instructions.
  3. Navigate through the markdown files in sequence for a comprehensive understanding of Netlink sockets communication.

πŸ“š Resources & References:


Feel free to explore these resources to deepen your understanding of Netlink sockets and their application in Linux Kernel-User communication.


🀝 Contribution:

Feel free to raise issues, send pull requests, or provide feedback to enhance the repository. All contributions are welcome!


License:

This project is licensed under the MIT License. See the LICENSE file for more details.


πŸ™ Acknowledgements:

A big shoutout to the Linux community and everyone who made the resources available to make this repo a reality.


Happy coding and learning! πŸ’»πŸš€

About

A hands-on project showcasing bidirectional greeting message exchanges between Linux kernel and user space via Netlink sockets. Dive into kernel-user communication! πŸš€πŸ§

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published