How to transfer kernel data to user data using procfs

 ̄綄美尐妖づ 提交于 2019-12-13 21:44:00

问题


I am calculating a timestamp in kernel and storing it in a buffer as shown in the code below. I want to make this data available to the user space program by using process file system (procfs). I am finding it very difficult to understand the procfs file system. Can someone help me understand how to do this, or point me in the right direction of some document or tutorial regarding this?

//this code is at network device driver level.
int netif_rx(struct sk_buff *skb) 
{
    __net_timestamp(skb);//I modify the code in kernel to get the timestamp and store in buffer
}

来源:https://stackoverflow.com/questions/23080920/how-to-transfer-kernel-data-to-user-data-using-procfs

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!