免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
12下一页
最近访问板块 发新帖
查看: 7725 | 回复: 19
打印 上一主题 下一主题

PF_RING的pfcount没有抓到包 [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2010-02-03 11:26 |只看该作者 |倒序浏览
折腾了几天,又遇到问题,在使用examples中的pfcount时,总是抓不到包,如下
# ./pfcount -i eth1
Capturing from eth1
Using PF_RING v.4.1.0
# Device RX channels: 1
# Polling threads:    1
=========================
Absolute Stats: [0 pkts rcvd][0 pkts dropped]
Total Pkts=0/Dropped=0.0 %
0 pkts - 0 bytes [0.0 pkt/sec - 0.00 Mbit/sec]
=========================

=========================
Absolute Stats: [0 pkts rcvd][0 pkts dropped]
Total Pkts=0/Dropped=0.0 %
0 pkts - 0 bytes [0.0 pkt/sec - 0.00 Mbit/sec]
=========================
Actual Stats: 0 pkts [1002.0 ms][0.0 pkt/sec]
=========================

=========================
Absolute Stats: [0 pkts rcvd][0 pkts dropped]
Total Pkts=0/Dropped=0.0 %
0 pkts - 0 bytes [0.0 pkt/sec - 0.00 Mbit/sec]
=========================
Actual Stats: 0 pkts [1002.0 ms][0.0 pkt/sec]
=========================

Leaving...
=========================
Absolute Stats: [0 pkts rcvd][0 pkts dropped]
Total Pkts=0/Dropped=0.0 %
0 pkts - 0 bytes [0.0 pkt/sec - 0.00 Mbit/sec]
=========================
Actual Stats: 0 pkts [190.8 ms][0.0 pkt/sec]
=========================


但使用pcount时却可以抓到包,但似乎流量不大的样子,
# ./pcount
Capturing from eth1
=========================
Absolute Stats: [12 pkts rcvd][0 pkts dropped]
Total Pkts=12/Dropped=0.0 %
12 pkts [12.1 pkt/sec] - 1024 bytes [0.01 Mbit/sec]
=========================
=========================
Absolute Stats: [24 pkts rcvd][0 pkts dropped]
Total Pkts=24/Dropped=0.0 %
24 pkts [12.1 pkt/sec] - 2234 bytes [0.01 Mbit/sec]
=========================
Actual Stats: 24 pkts [1001.3 ms][24.0 pkt/sec]
=========================
=========================
Absolute Stats: [42 pkts rcvd][0 pkts dropped]
Total Pkts=42/Dropped=0.0 %
42 pkts [14.1 pkt/sec] - 4034 bytes [0.01 Mbit/sec]
=========================
Actual Stats: 18 pkts [1000.3 ms][18.0 pkt/sec]
=========================
=========================
Absolute Stats: [49 pkts rcvd][0 pkts dropped]
Total Pkts=49/Dropped=0.0 %
49 pkts [12.3 pkt/sec] - 4940 bytes [0.01 Mbit/sec]
=========================
Actual Stats: 7 pkts [991.1 ms][7.1 pkt/sec]
=========================


info中的信息如下
cat /proc/net/pf_ring/info
PF_RING Version     : 4.1.0 ($Revision: 4113$)
Ring slots          : 4096
Slot version        : 10
Capture TX          : Yes [RX+TX]
IP Defragment       : No
Transparent mode    : No
Total rings         : 0
Total plugins       : 0
其中的Transparent mode 无论YES还是NO都一样,不知是何原因,有没有熟悉的朋友

论坛徽章:
0
2 [报告]
发表于 2010-02-04 14:08 |只看该作者
都没人知道吗。。。那在安装驱动方面呢,所谓的PF_RING-aware drivers,这个有没有装过,根据PF_RING提供的源码安装网卡驱动,又是一堆错,实在无奈了
make
make -C /lib/modules/2.6.18-164.el5/build SUBDIRS=/usr/src/PF_RING/drivers/tg3-3.102 modules
make[1]: Entering directory `/usr/src/kernels/2.6.18-164.el5-x86_64'
  CC [M]  /usr/src/PF_RING/drivers/tg3-3.102/tg3.o
/usr/src/PF_RING/drivers/tg3-3.102/tg3.c:36:27: error: linux/brcmphy.h: No such file or directory
/usr/src/PF_RING/drivers/tg3-3.102/tg3.c: In function 鈚g3_napi_disable?
/usr/src/PF_RING/drivers/tg3-3.102/tg3.c:713: error: implicit declaration of function 鈔api_disable?
/usr/src/PF_RING/drivers/tg3-3.102/tg3.c: In function 鈚g3_napi_enable?
/usr/src/PF_RING/drivers/tg3-3.102/tg3.c:721: error: implicit declaration of function 鈔api_enable?
/usr/src/PF_RING/drivers/tg3-3.102/tg3.c: In function 鈚g3_netif_start?
/usr/src/PF_RING/drivers/tg3-3.102/tg3.c:737: error: implicit declaration of function 鈔etif_tx_wake_all_queues?
/usr/src/PF_RING/drivers/tg3-3.102/tg3.c: In function 鈚g3_mdio_config_5785?
/usr/src/PF_RING/drivers/tg3-3.102/tg3.c:967: error: 鈙truct phy_device?has no member named 鈏nterface?
/usr/src/PF_RING/drivers/tg3-3.102/tg3.c:967: error: 釶HY_INTERFACE_MODE_RGMII?undeclared (first use in this function)
/usr/src/PF_RING/drivers/tg3-3.102/tg3.c:967: error: (Each undeclared identifier is reported only once
/usr/src/PF_RING/drivers/tg3-3.102/tg3.c:967: error: for each function it appears in.)
/usr/src/PF_RING/drivers/tg3-3.102/tg3.c: In function 鈚g3_mdio_init?
/usr/src/PF_RING/drivers/tg3-3.102/tg3.c:1062: error: implicit declaration of function 鈓diobus_alloc?
/usr/src/PF_RING/drivers/tg3-3.102/tg3.c:1062: warning: assignment makes pointer from integer without a cast
/usr/src/PF_RING/drivers/tg3-3.102/tg3.c:1067: error: 釳II_BUS_ID_SIZE?undeclared (first use in this function)
/usr/src/PF_RING/drivers/tg3-3.102/tg3.c:1068: warning: passing argument 1 of 鈙nprintf?makes pointer from integer without a cast
/usr/src/PF_RING/drivers/tg3-3.102/tg3.c:1070: error: 鈙truct mii_bus?has no member named 鈖arent?
/usr/src/PF_RING/drivers/tg3-3.102/tg3.c:1092: error: implicit declaration of function 鈓diobus_free?
/usr/src/PF_RING/drivers/tg3-3.102/tg3.c:1107: error: 鈙truct phy_device?has no member named 鈏nterface?
/usr/src/PF_RING/drivers/tg3-3.102/tg3.c:1107: error: 釶HY_INTERFACE_MODE_GMII?undeclared (first use in this function)
/usr/src/PF_RING/drivers/tg3-3.102/tg3.c:1111: error: 釶HY_BRCM_STD_IBND_DISABLE?undeclared (first use in this function)
/usr/src/PF_RING/drivers/tg3-3.102/tg3.c:1113: error: 釶HY_BRCM_EXT_IBND_RX_ENABLE?undeclared (first use in this function)
/usr/src/PF_RING/drivers/tg3-3.102/tg3.c:1115: error: 釶HY_BRCM_EXT_IBND_TX_ENABLE?undeclared (first use in this function)
/usr/src/PF_RING/drivers/tg3-3.102/tg3.c:1118: error: 鈙truct phy_device?has no member named 鈏nterface?
/usr/src/PF_RING/drivers/tg3-3.102/tg3.c:1118: error: 釶HY_INTERFACE_MODE_RGMII?undeclared (first use in this function)
/usr/src/PF_RING/drivers/tg3-3.102/tg3.c:1122: error: 鈙truct phy_device?has no member named 鈏nterface?
/usr/src/PF_RING/drivers/tg3-3.102/tg3.c:1122: error: 釶HY_INTERFACE_MODE_MII?undeclared (first use in this function)
/usr/src/PF_RING/drivers/tg3-3.102/tg3.c: In function 鈚g3_link_report?
...
/usr/src/PF_RING/drivers/tg3-3.102/tg3.c:5164: error: 鈙truct skb_shared_info?has no member named 鈊ma_head?
/usr/src/PF_RING/drivers/tg3-3.102/tg3.c: At top level:
/usr/src/PF_RING/drivers/tg3-3.102/tg3.c:5226: error: expected ?? ?? ?? 鈇sm?or 鈅_attribute__?before 鈚g3_start_xmit?
/usr/src/PF_RING/drivers/tg3-3.102/tg3.c:5362: error: expected ?? ?? ?? 鈇sm?or 鈅_attribute__?before 鈚g3_start_xmit_dma_bug?
/usr/src/PF_RING/drivers/tg3-3.102/tg3.c: In function 鈚g3_tso_bug?
/usr/src/PF_RING/drivers/tg3-3.102/tg3.c:5390: error: implicit declaration of function 鈚g3_start_xmit_dma_bug?
/usr/src/PF_RING/drivers/tg3-3.102/tg3.c: At top level:
/usr/src/PF_RING/drivers/tg3-3.102/tg3.c:5402: error: expected ?? ?? ?? 鈇sm?or 鈅_attribute__?before 鈚g3_start_xmit_dma_bug?
/usr/src/PF_RING/drivers/tg3-3.102/tg3.c: In function 鈚g3_reset_hw?
/usr/src/PF_RING/drivers/tg3-3.102/tg3.c:7448: error: 釫TH_FCS_LEN?undeclared (first use in this function)
/usr/src/PF_RING/drivers/tg3-3.102/tg3.c:7657: error: 釶CI_X_CMD_READ_2K?undeclared (first use in this function)
/usr/src/PF_RING/drivers/tg3-3.102/tg3.c: In function 鈚g3_request_irq?
/usr/src/PF_RING/drivers/tg3-3.102/tg3.c:8078: warning: assignment from incompatible pointer type
/usr/src/PF_RING/drivers/tg3-3.102/tg3.c:8080: warning: assignment from incompatible pointer type
/usr/src/PF_RING/drivers/tg3-3.102/tg3.c:8083: warning: assignment from incompatible pointer type
/usr/src/PF_RING/drivers/tg3-3.102/tg3.c:8085: warning: assignment from incompatible pointer type
/usr/src/PF_RING/drivers/tg3-3.102/tg3.c: In function 鈚g3_test_interrupt?
/usr/src/PF_RING/drivers/tg3-3.102/tg3.c:8117: warning: passing argument 2 of 鈘equest_irq?from incompatible pointer type
/usr/src/PF_RING/drivers/tg3-3.102/tg3.c: In function 鈚g3_enable_msix?
/usr/src/PF_RING/drivers/tg3-3.102/tg3.c:8294: error: 鈙truct net_device?has no member named 鈘eal_num_tx_queues?
/usr/src/PF_RING/drivers/tg3-3.102/tg3.c: In function 鈚g3_ints_init?
/usr/src/PF_RING/drivers/tg3-3.102/tg3.c:8327: error: 鈙truct net_device?has no member named 鈘eal_num_tx_queues?
/usr/src/PF_RING/drivers/tg3-3.102/tg3.c: In function 鈚g3_open?
/usr/src/PF_RING/drivers/tg3-3.102/tg3.c:8464: error: implicit declaration of function 鈔etif_tx_start_all_queues?
/usr/src/PF_RING/drivers/tg3-3.102/tg3.c: In function 鈚g3_close?
/usr/src/PF_RING/drivers/tg3-3.102/tg3.c:8722: error: implicit declaration of function 鈉ancel_work_sync?
/usr/src/PF_RING/drivers/tg3-3.102/tg3.c:8724: error: implicit declaration of function 鈔etif_tx_stop_all_queues?
/usr/src/PF_RING/drivers/tg3-3.102/tg3.c: In function 鈚g3_set_tso?
/usr/src/PF_RING/drivers/tg3-3.102/tg3.c:9480: error: 釴ETIF_F_IPV6_CSUM?undeclared (first use in this function)
/usr/src/PF_RING/drivers/tg3-3.102/tg3.c: In function 鈚g3_get_pauseparam?
/usr/src/PF_RING/drivers/tg3-3.102/tg3.c:9606: error: 釬LOW_CTRL_RX?undeclared (first use in this function)
/usr/src/PF_RING/drivers/tg3-3.102/tg3.c:9611: error: 釬LOW_CTRL_TX?undeclared (first use in this function)
/usr/src/PF_RING/drivers/tg3-3.102/tg3.c: In function 鈚g3_set_pauseparam?
/usr/src/PF_RING/drivers/tg3-3.102/tg3.c:9662: error: 釬LOW_CTRL_RX?undeclared (first use in this function)
/usr/src/PF_RING/drivers/tg3-3.102/tg3.c:9667: error: 釬LOW_CTRL_TX?undeclared (first use in this function)
/usr/src/PF_RING/drivers/tg3-3.102/tg3.c: In function 鈚g3_set_tx_csum?
/usr/src/PF_RING/drivers/tg3-3.102/tg3.c:9747: error: implicit declaration of function 鈋thtool_op_set_tx_ipv6_csum?
/usr/src/PF_RING/drivers/tg3-3.102/tg3.c: At top level:
/usr/src/PF_RING/drivers/tg3-3.102/tg3.c:10775: error: unknown field 鈍et_sset_count?specified in initializer
/usr/src/PF_RING/drivers/tg3-3.102/tg3.c:10775: warning: initialization from incompatible pointer type
/usr/src/PF_RING/drivers/tg3-3.102/tg3.c: In function 鈚g3_get_invariants?
/usr/src/PF_RING/drivers/tg3-3.102/tg3.c:12628: error: 釴ETIF_F_IPV6_CSUM?undeclared (first use in this function)
/usr/src/PF_RING/drivers/tg3-3.102/tg3.c: At top level:
/usr/src/PF_RING/drivers/tg3-3.102/tg3.c:13824: error: variable 鈚g3_netdev_ops?has initializer but incomplete type
/usr/src/PF_RING/drivers/tg3-3.102/tg3.c:13825: error: unknown field 鈔do_open?specified in initializer
/usr/src/PF_RING/drivers/tg3-3.102/tg3.c:13825: warning: excess elements in struct initializer
/usr/src/PF_RING/drivers/tg3-3.102/tg3.c:13825: warning: (near initialization for 鈚g3_netdev_ops?
/usr/src/PF_RING/drivers/tg3-3.102/tg3.c:13826: error: unknown field 鈔do_stop?specified in initializer
/usr/src/PF_RING/drivers/tg3-3.102/tg3.c:13826: warning: excess elements in struct initializer
/usr/src/PF_RING/drivers/tg3-3.102/tg3.c:13826: warning: (near initialization for 鈚g3_netdev_ops?
/usr/src/PF_RING/drivers/tg3-3.102/tg3.c:13827: error: unknown field 鈔do_start_xmit?specified in initializer
/usr/src/PF_RING/drivers/tg3-3.102/tg3.c:13827: error: 鈚g3_start_xmit?undeclared here (not in a function)
/usr/src/PF_RING/drivers/tg3-3.102/tg3.c:13827: warning: excess elements in struct initializer
/usr/src/PF_RING/drivers/tg3-3.102/tg3.c:13827: warning: (near initialization for 鈚g3_netdev_ops?
/usr/src/PF_RING/drivers/tg3-3.102/tg3.c:13828: error: unknown field 鈔do_get_stats?specified in initializer
/usr/src/PF_RING/drivers/tg3-3.102/tg3.c:13828: warning: excess elements in struct initializer
/usr/src/PF_RING/drivers/tg3-3.102/tg3.c:13828: warning: (near initialization for 鈚g3_netdev_ops?
/usr/src/PF_RING/drivers/tg3-3.102/tg3.c:13829: error: unknown field 鈔do_validate_addr?specified in initializer
/usr/src/PF_RING/drivers/tg3-3.102/tg3.c:13829: error: 鈋th_validate_addr?undeclared here (not in a function)
/usr/src/PF_RING/drivers/tg3-3.102/tg3.c:13829: warning: excess elements in struct initializer
/usr/src/PF_RING/drivers/tg3-3.102/tg3.c:13829: warning: (near initialization for 鈚g3_netdev_ops?
/usr/src/PF_RING/drivers/tg3-3.102/tg3.c:13830: error: unknown field 鈔do_set_multicast_list?specified in initializer
/usr/src/PF_RING/drivers/tg3-3.102/tg3.c:13830: warning: excess elements in struct initializer
/usr/src/PF_RING/drivers/tg3-3.102/tg3.c:13830: warning: (near initialization for 鈚g3_netdev_ops?
/usr/src/PF_RING/drivers/tg3-3.102/tg3.c:13831: error: unknown field 鈔do_set_mac_address?specified in initializer
/usr/src/PF_RING/drivers/tg3-3.102/tg3.c:13831: warning: excess elements in struct initializer
/usr/src/PF_RING/drivers/tg3-3.102/tg3.c:13831: warning: (near initialization for 鈚g3_netdev_ops?
/usr/src/PF_RING/drivers/tg3-3.102/tg3.c:13832: error: unknown field 鈔do_do_ioctl?specified in initializer
/usr/src/PF_RING/drivers/tg3-3.102/tg3.c:13832: warning: excess elements in struct initializer
/usr/src/PF_RING/drivers/tg3-3.102/tg3.c:13832: warning: (near initialization for 鈚g3_netdev_ops?
/usr/src/PF_RING/drivers/tg3-3.102/tg3.c:13833: error: unknown field 鈔do_tx_timeout?specified in initializer
/usr/src/PF_RING/drivers/tg3-3.102/tg3.c:13833: warning: excess elements in struct initializer
/usr/src/PF_RING/drivers/tg3-3.102/tg3.c:13833: warning: (near initialization for 鈚g3_netdev_ops?
/usr/src/PF_RING/drivers/tg3-3.102/tg3.c:13834: error: unknown field 鈔do_change_mtu?specified in initializer
/usr/src/PF_RING/drivers/tg3-3.102/tg3.c:13834: warning: excess elements in struct initializer
/usr/src/PF_RING/drivers/tg3-3.102/tg3.c:13834: warning: (near initialization for 鈚g3_netdev_ops?
/usr/src/PF_RING/drivers/tg3-3.102/tg3.c:13836: error: unknown field 鈔do_vlan_rx_register?specified in initializer
/usr/src/PF_RING/drivers/tg3-3.102/tg3.c:13836: warning: excess elements in struct initializer
/usr/src/PF_RING/drivers/tg3-3.102/tg3.c:13836: warning: (near initialization for 鈚g3_netdev_ops?
/usr/src/PF_RING/drivers/tg3-3.102/tg3.c:13839: error: unknown field 鈔do_poll_controller?specified in initializer
/usr/src/PF_RING/drivers/tg3-3.102/tg3.c:13839: warning: excess elements in struct initializer
/usr/src/PF_RING/drivers/tg3-3.102/tg3.c:13839: warning: (near initialization for 鈚g3_netdev_ops?
/usr/src/PF_RING/drivers/tg3-3.102/tg3.c:13843: error: variable 鈚g3_netdev_ops_dma_bug?has initializer but incomplete type
/usr/src/PF_RING/drivers/tg3-3.102/tg3.c:13844: error: unknown field 鈔do_open?specified in initializer
/usr/src/PF_RING/drivers/tg3-3.102/tg3.c:13844: warning: excess elements in struct initializer
/usr/src/PF_RING/drivers/tg3-3.102/tg3.c:13844: warning: (near initialization for 鈚g3_netdev_ops_dma_bug?
/usr/src/PF_RING/drivers/tg3-3.102/tg3.c:13845: error: unknown field 鈔do_stop?specified in initializer
/usr/src/PF_RING/drivers/tg3-3.102/tg3.c:13845: warning: excess elements in struct initializer
/usr/src/PF_RING/drivers/tg3-3.102/tg3.c:13845: warning: (near initialization for 鈚g3_netdev_ops_dma_bug?
/usr/src/PF_RING/drivers/tg3-3.102/tg3.c:13846: error: unknown field 鈔do_start_xmit?specified in initializer
/usr/src/PF_RING/drivers/tg3-3.102/tg3.c:13846: error: 鈚g3_start_xmit_dma_bug?undeclared here (not in a function)
/usr/src/PF_RING/drivers/tg3-3.102/tg3.c:13846: warning: excess elements in struct initializer
/usr/src/PF_RING/drivers/tg3-3.102/tg3.c:13846: warning: (near initialization for 鈚g3_netdev_ops_dma_bug?
/usr/src/PF_RING/drivers/tg3-3.102/tg3.c:13847: error: unknown field 鈔do_get_stats?specified in initializer
/usr/src/PF_RING/drivers/tg3-3.102/tg3.c:13847: warning: excess elements in struct initializer
/usr/src/PF_RING/drivers/tg3-3.102/tg3.c:13847: warning: (near initialization for 鈚g3_netdev_ops_dma_bug?
/usr/src/PF_RING/drivers/tg3-3.102/tg3.c:13848: error: unknown field 鈔do_validate_addr?specified in initializer
/usr/src/PF_RING/drivers/tg3-3.102/tg3.c:13848: warning: excess elements in struct initializer
/usr/src/PF_RING/drivers/tg3-3.102/tg3.c:13848: warning: (near initialization for 鈚g3_netdev_ops_dma_bug?
/usr/src/PF_RING/drivers/tg3-3.102/tg3.c:13849: error: unknown field 鈔do_set_multicast_list?specified in initializer
/usr/src/PF_RING/drivers/tg3-3.102/tg3.c:13849: warning: excess elements in struct initializer
/usr/src/PF_RING/drivers/tg3-3.102/tg3.c:13849: warning: (near initialization for 鈚g3_netdev_ops_dma_bug?
/usr/src/PF_RING/drivers/tg3-3.102/tg3.c:13850: error: unknown field 鈔do_set_mac_address?specified in initializer
/usr/src/PF_RING/drivers/tg3-3.102/tg3.c:13850: warning: excess elements in struct initializer
/usr/src/PF_RING/drivers/tg3-3.102/tg3.c:13850: warning: (near initialization for 鈚g3_netdev_ops_dma_bug?
/usr/src/PF_RING/drivers/tg3-3.102/tg3.c:13851: error: unknown field 鈔do_do_ioctl?specified in initializer
/usr/src/PF_RING/drivers/tg3-3.102/tg3.c:13851: warning: excess elements in struct initializer
/usr/src/PF_RING/drivers/tg3-3.102/tg3.c:13851: warning: (near initialization for 鈚g3_netdev_ops_dma_bug?
/usr/src/PF_RING/drivers/tg3-3.102/tg3.c:13852: error: unknown field 鈔do_tx_timeout?specified in initializer
/usr/src/PF_RING/drivers/tg3-3.102/tg3.c:13852: warning: excess elements in struct initializer
/usr/src/PF_RING/drivers/tg3-3.102/tg3.c:13852: warning: (near initialization for 鈚g3_netdev_ops_dma_bug?
/usr/src/PF_RING/drivers/tg3-3.102/tg3.c:13853: error: unknown field 鈔do_change_mtu?specified in initializer
/usr/src/PF_RING/drivers/tg3-3.102/tg3.c:13853: warning: excess elements in struct initializer
/usr/src/PF_RING/drivers/tg3-3.102/tg3.c:13853: warning: (near initialization for 鈚g3_netdev_ops_dma_bug?
/usr/src/PF_RING/drivers/tg3-3.102/tg3.c:13855: error: unknown field 鈔do_vlan_rx_register?specified in initializer
/usr/src/PF_RING/drivers/tg3-3.102/tg3.c:13855: warning: excess elements in struct initializer
/usr/src/PF_RING/drivers/tg3-3.102/tg3.c:13855: warning: (near initialization for 鈚g3_netdev_ops_dma_bug?
/usr/src/PF_RING/drivers/tg3-3.102/tg3.c:13858: error: unknown field 鈔do_poll_controller?specified in initializer
/usr/src/PF_RING/drivers/tg3-3.102/tg3.c:13858: warning: excess elements in struct initializer
/usr/src/PF_RING/drivers/tg3-3.102/tg3.c:13858: warning: (near initialization for 鈚g3_netdev_ops_dma_bug?
/usr/src/PF_RING/drivers/tg3-3.102/tg3.c: In function 鈚g3_init_one?
/usr/src/PF_RING/drivers/tg3-3.102/tg3.c:13901: error: implicit declaration of function 鈇lloc_etherdev_mq?
/usr/src/PF_RING/drivers/tg3-3.102/tg3.c:13901: warning: assignment makes pointer from integer without a cast
/usr/src/PF_RING/drivers/tg3-3.102/tg3.c:13949:43: error: macro "INIT_WORK" requires 3 arguments, but only 2 given
/usr/src/PF_RING/drivers/tg3-3.102/tg3.c:13949: error: 釯NIT_WORK?undeclared (first use in this function)
/usr/src/PF_RING/drivers/tg3-3.102/tg3.c:13951: error: implicit declaration of function 鈖ci_ioremap_bar?
/usr/src/PF_RING/drivers/tg3-3.102/tg3.c:13951: warning: assignment makes pointer from integer without a cast
/usr/src/PF_RING/drivers/tg3-3.102/tg3.c:14008: error: implicit declaration of function 鈔etif_napi_add?
/usr/src/PF_RING/drivers/tg3-3.102/tg3.c:14009: warning: assignment discards qualifiers from pointer target type
/usr/src/PF_RING/drivers/tg3-3.102/tg3.c:14022: error: 鈙truct net_device?has no member named 鈔etdev_ops?
/usr/src/PF_RING/drivers/tg3-3.102/tg3.c:14024: error: 鈙truct net_device?has no member named 鈔etdev_ops?
/usr/src/PF_RING/drivers/tg3-3.102/tg3.c:14095: error: 釴ETIF_F_IPV6_CSUM?undeclared (first use in this function)
/usr/src/PF_RING/drivers/tg3-3.102/tg3.c:14123: warning: assignment makes pointer from integer without a cast
/usr/src/PF_RING/drivers/tg3-3.102/tg3.c:14156: error: 釬LOW_CTRL_TX?undeclared (first use in this function)
/usr/src/PF_RING/drivers/tg3-3.102/tg3.c:14156: error: 釬LOW_CTRL_RX?undeclared (first use in this function)
/usr/src/PF_RING/drivers/tg3-3.102/tg3.c:14181: warning: format ?s?expects type 鈉har *? but argument 4 has type 鈏nt?
/usr/src/PF_RING/drivers/tg3-3.102/tg3.c: In function 鈚g3_suspend?
/usr/src/PF_RING/drivers/tg3-3.102/tg3.c:14299: error: 鈙truct pci_dev?has no member named 鈖m_cap?
/usr/src/PF_RING/drivers/tg3-3.102/tg3.c:14299: error: implicit declaration of function 鈖ci_target_state?
make[2]: *** [/usr/src/PF_RING/drivers/tg3-3.102/tg3.o] Error 1
make[1]: *** [_module_/usr/src/PF_RING/drivers/tg3-3.102] Error 2
make[1]: Leaving directory `/usr/src/kernels/2.6.18-164.el5-x86_64'
make: *** [default] Error 2

论坛徽章:
0
3 [报告]
发表于 2010-02-04 14:08 |只看该作者
错误太长了,被我省略了一部分,还望有研究的朋友相告

论坛徽章:
0
4 [报告]
发表于 2010-02-04 16:52 |只看该作者
解决了,应该是这一句的问题
pfring_toggle_filtering_policy(pd, 0);  /*Default to drop */
默认都丢包了,难怪抓不到包,也不报告。。。

论坛徽章:
0
5 [报告]
发表于 2010-02-04 16:54 |只看该作者
还得进去看看源码才行,犯了低级错误。。。

论坛徽章:
0
6
发表于 2014-04-28 21:45
struct bpf_insns  insns[] = {
          BPF_STMT(BPF_LD+BPF_H+BPF_ABS, 12),
          BPF_JUMP(BPF_JMP+BPF_JEQ+BPF_K, ETHERTYPE_IP, 0, ,
          BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 26),
          BPF_JUMP(BPF_JMP+BPF_JEQ+BPF_K, 0x8003700f, 0, 2),
          BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 30),
          BPF_JUMP(BPF_JMP+BPF_JEQ+BPF_K, 0x80037023, 3, 4),
          BPF_JUMP(BPF_JMP+BPF_JEQ+BPF_K, 0x80037023, 0, 3),
          BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 30),
          BPF_JUMP(BPF_JMP+BPF_JEQ+BPF_K, 0x8003700f, 0, 1),
          BPF_STMT(BPF_RET+BPF_K, (u_int)-1),
          BPF_STMT(BPF_RET+BPF_K, 0),
      };
filter.bf_insns=insns;
filter.bf_len=sizeof(filter)/sizeof(insns[0]);
添加完这个结构体数组之后
pfcount.c: In function 'dummyProcesssPacket':
pfcount.c:316: error: array type has incomplete element type
pfcount.c:316: warning: unused variable 'insns'
请大神们帮帮忙

论坛徽章:
9
辰龙
日期:2014-08-18 20:38:42未羊
日期:2014-09-04 08:50:45丑牛
日期:2014-09-06 00:12:55寅虎
日期:2014-12-22 20:50:56摩羯座
日期:2015-01-14 22:28:15巳蛇
日期:2015-01-23 20:39:272015年辞旧岁徽章
日期:2015-03-03 16:54:1515-16赛季CBA联赛之青岛
日期:2016-03-13 23:37:1915-16赛季CBA联赛之深圳
日期:2016-03-29 18:52:38
7 [报告]
发表于 2014-04-29 00:31 |只看该作者
本帖最后由 Tinnal 于 2014-04-29 00:32 编辑

回复 6# siyu_yangyang
BPF_JUMP(BPF_JMP+BPF_JEQ+BPF_K, ETHERTYPE_IP, 0, , 
语法错了。应改为:
BPF_JUMP(BPF_JMP+BPF_JEQ+BPF_K, ETHERTYPE_IP, 0, <这里漏一跳转值>< 这里漏一‘)’>,




还有就是,你这问题根因是BPF的问题,pfcount这边是否会有进一步的问题就不好说的。




同时,你也用不着你个PF_RING的贴都跟一个你的问题吧。
   

论坛徽章:
9
辰龙
日期:2014-08-18 20:38:42未羊
日期:2014-09-04 08:50:45丑牛
日期:2014-09-06 00:12:55寅虎
日期:2014-12-22 20:50:56摩羯座
日期:2015-01-14 22:28:15巳蛇
日期:2015-01-23 20:39:272015年辞旧岁徽章
日期:2015-03-03 16:54:1515-16赛季CBA联赛之青岛
日期:2016-03-13 23:37:1915-16赛季CBA联赛之深圳
日期:2016-03-29 18:52:38
8 [报告]
发表于 2014-04-29 00:38 |只看该作者
另外,不建议你自己去写BPF,容易错,变更又麻烦,为什么不用libpcap呢??过滤的方案非常人性化。

论坛徽章:
0
9 [报告]
发表于 2014-04-29 08:04 |只看该作者
主要是不知道怎么改,找不到错误的原因

论坛徽章:
0
10 [报告]
发表于 2014-04-29 08:27 |只看该作者
回复 8# Tinnal


   我也想用pcap 但是用pcap的可以实现例如 192.168.2 ~192.168.10之间的IP数据包过滤吗,如果可以的话,请指点一下我怎么配rule,
我只会配单个ip过滤的rule!谢谢
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP