📄 arp.c
字号:
/* arp.c test the arp module * linqianghe@163.com * 2006-09-30 */#include "arp.h"#include "log.h"#include <net/route.h>static void test_bind_neighbour(void){ struct rtable table[10]; int i; for( i = 0; i < 10; i ++ ){ memset( &table[i], 0, sizeof(struct rtable) ); table[i].rt_gateway = i * 10; if( (table[i].u.dst.dev = dev_get_by_name( "mylo" )) == NULL ){ PR_ERR( "please load the device mylo first, test myarp_bind_neighbour stopped!\n"); return; } if( myarp_bind_neighbour( &(table[i].u.dst) ) < 0 ) PR_NOTICE( "test myarp_bind_neighbour failed!\n" ); else PR_NOTICE( "test myarp_bind_neighbour successed!\n" ); } for( i = 0; i < 10; i ++ ) dev_put( table[i].u.dst.dev );}void arp_test(void){ test_bind_neighbour();}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -