嵌入式 arp响应

libnet移植【考虑静态库】

http://blog.csdn.net/xtx1990/article/details/6951422

http://coaku.diandian.com/post/2011-04-16/4856665


ping 路由???


基于libnet的实现

http://blog.csdn.net/nihaojiayu/article/details/6528746

http://blog.chinaunix.net/uid-15625022-id-2768965.html

http://blog.csdn.net/steve505/article/details/5111289


移植

libpcap-1.1.1:http://www.tcpdump.org/release/libpcap-1.1.1.tar.gz libnet-1.1.5:http://ncu.dl.sourceforge.net/project/libnet-dev/libnet-1.1.5.tar.gz 解压: libpcap-1.1.1 libnet-1.1.5 先来编译libpcap:

export PATH=$PATH:/usr/local/yourapp/Source/dvsdk_ipnctools/linux-devkit/bin/

./configure CFLAGS=-I/usr/local/yourapp/Source/dvsdk_ipnctools/linux-devkit/arm-arago-linux-gnueabi/include LDFLAGS=-L/usr/local/yourapp/Source/dvsdk_ipnctools/linux-devkit/arm-arago-linux-gnueabi/lib CC=arm-arago-linux-gnueabi-gcc --host=arm-linux --prefix=/usr/local/mytools/libnet --with-pcap=null

在这里如果--with-pcap报错,可以改成--with-pcap=null 然后

make make install

再编译libnet:

./configure CC=arm-arago-linux-gnueabi-gcc --host=arm-linux prefix=/usr/local/mytools/libnet

make make install

使用

arm-arago-linux-gnueabi-gcc -L./lib -I./include -o arm_arp arp.c -lnet

你可能感兴趣的:(嵌入式 arp响应)