如何使用procfs将内核数据传输到用户数据

时间:2014-04-15 10:21:56

标签: c linux linux-kernel kernel proc

我正在计算内核中的时间戳并将其存储在缓冲区中,如下面的代码所示。我想通过使用进程文件系统(procfs)将这些数据提供给用户空间程序。我发现很难理解procfs文件系统。有人可以帮我理解如何做到这一点,或者指出一些关于这个的文档或教程的正确方向?

//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
}

0 个答案:

没有答案