2013-06-30 71 views
0

我想設置值爲0xe188的「ether type」的過濾器。 如何編寫此過濾器?如何過濾自定義協議包?

我的過濾器是"ether type 0xe188",但它與錯誤編譯:

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

回答

2

的語法,這是ether proto

+0

「ether proto 0xe188」不起作用,該如何寫這個過濾器字符串? – tfzxyinhao

+0

「ether proto 0xe188」產生了什麼錯誤信息? – 2013-06-30 18:51:38

+0

@GuyHarris沒有錯誤,但設置此過濾器後沒有任何數據 – tfzxyinhao