如何过滤自定义协议包?

时间:2013-06-30 10:27:33

标签: c filter winpcap

我想设置“ether type”的过滤器,其值等于0xe188。 如何编写此过滤器?

我的过滤器是"ether type 0xe188",但它使用ERROR编译:

if(pcap_compile(fp, &fcode,"ether proto 0xe188", 1, NetMask) >= 0)
    pcap_setfilter(fp, &fcode);

1 个答案:

答案 0 :(得分:2)

此语法为ether proto