日期:2014-05-16  浏览次数:20720 次

安装l7 filter编译出错
最近要截包,就装了这个软件。然后遇到各种问题,现在到了编译时又出现下面的错误,请高手指点啊!
错误如下:
[root@martin l7-filter-userspace-0.11]# make
make all-am
make[1]: 进入目录“/home/martin/l7userspace/l7-filter-userspace-0.11”
g++ -DHAVE_CONFIG_H -I. -I/usr/local/include -g -O2 -MT l7-queue.o -MD -MP -MF .deps/l7-queue.Tpo -c -o l7-queue.o l7-queue.cpp
l7-queue.cpp: 在函数‘int l7_queue_cb(nfq_q_handle*, nfgenmsg*, nfq_data*, void*)’中:
l7-queue.cpp:80:12: 警告:不建议使用‘int nfq_set_verdict_mark(nfq_q_handle*, u_int32_t, u_int32_t, u_int32_t, u_int32_t, const unsigned char*)’(声明于 /usr/local/include/libnetfilter_queue/libnetfilter_queue.h:73)
l7-queue.cpp:80:340: 警告:不建议使用‘int nfq_set_verdict_mark(nfq_q_handle*, u_int32_t, u_int32_t, u_int32_t, u_int32_t, const unsigned char*)’(声明于 /usr/local/include/libnetfilter_queue/libnetfilter_queue.h:73)
l7-queue.cpp: 在成员函数‘u_int32_t l7_queue::handle_packet(nfq_data*, nfq_q_handle*)’中:
l7-queue.cpp:199:34: 错误:从类型‘char**’到类型‘unsigned char**’的转换无效
l7-queue.cpp:199:34: 错误: 初始化‘int nfq_get_payload(nfq_data*, unsigned char**)’的实参 2
l7-queue.cpp:281:10: 警告:不建议使用‘int nfq_set_verdict_mark(nfq_q_handle*, u_int32_t, u_int32_t, u_int32_t, u_int32_t, const unsigned char*)’(声明于 /usr/local/include/libnetfilter_queue/libnetfilter_queue.h:73)
l7-queue.cpp:282:348: 警告:不建议使用‘int nfq_set_verdict_mark(nfq_q_handle*, u_int32_t, u_int32_t, u_int32_t, u_int32_t, const unsigned char*)’(声明于 /usr/local/include/libnetfilter_queue/libnetfilter_queue.h:73)
make[1]: *** [l7-queue.o] 错误 1
make[1]: 离开目录“/home/martin/l7userspace/l7-filter-userspace-0.11”
make: *** [all] 错误 2
下载的好好的软件,怎么还有编译的问题。是不是缺什么设置啊,网上查半天没找到相似案例...
还有想咨询高手怎样学linux比较高效啊,我发现我装好多软件都是出现许多莫名奇妙的问题,比较费时啊,简直是太菜了!请指点迷津,先谢过了!!

------解决方案--------------------
l7-queue.cpp:199:34: 错误:从类型‘char**’到类型‘unsigned char**’的转换无效
你试一下作个强制转换看看吧