extern unsigned long current_rx_time;
EXPORT_SYMBOL(current_rx_time);
int netif_rx(struct sk_buff *skb)
{
current_rx_time = jiffies;
}
I modified the kernel source code in dev.c as shown above. Later I am creating a loadable kernel module in procfs and using the currentrx_time to send it to user space as shown below :
static int my_proc_show(struct seq_file *m, void *v)
{
//I AM JUST PRINTING THAT VALUE BELOW
seq_printf(m, "%lu\n", current_rx_time *1000/HZ);
return 0;
}
but I am getting a error when I compile my module above as current_rx_time
is undeclared. Could someone tell me how to solve this problem?