rc_timer.c

来自「Adhoc无线网络路由协议源码」· C语言 代码 · 共 38 行

C
38
字号
#include "rc_timer.h"#include "module_main.h"#include "route_cache.h"#include <linux/stddef.h>#include <linux/string.h>#include <linux/unistd.h>#include <linux/fs.h>struct timer_list rc_timer ; int sync_it();void rc_timer_handler(unsigned long data){	/* Sync with the kernel routing table */	sync_it();		/* set the timer off again */	rc_timer.expires = jiffies + (EXPIRE_TIME * HZ);	rc_timer.data = 0;	rc_timer.function = rc_timer_handler ;	add_timer(&rc_timer);}intsync_it(){//	int fd;//	fd = open("/proc/net/route", O_RDONLY);//	printk(KERN_INFO "route_check.o : sync_it() \n");//	close(fd);		return 0;}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?