使用netlink之前,先参考一下资料:http://www.ibm.com/developerworks/cn/linux/l-connector/

 

 

 

 

netlink通信机制介绍:资料来源 linux-4.8.13/Documentation/connector/connector.txt 2016-12-10 21:31:04

/*****************************************/
Kernel Connector.
/*****************************************/

Kernel connector - new netlink based userspace <-> kernel space easy
to use communication module.

The Connector driver makes it easy to connect various agents using a
netlink based network.  One must register a callback and an identifier.
When the driver receives a special netlink message with the appropriate
identifier, the appropriate callback will be called.

From the userspace point of view it's quite straightforward:

    socket();
    bind();
    send();
    recv();

延伸阅读

学习是年轻人改变自己的最好方式-Java培训,做最负责任的教育,学习改变命运,软件学习,再就业,大学生如何就业,帮大学生找到好工作,lphotoshop培训,电脑培训,电脑维修培训,移动软件开发培训,网站设计培训,网站建设培训学习是年轻人改变自己的最好方式