kaitoy / pcap4j

A Java library for capturing, crafting, and sending packets.

Home Page:https://www.pcap4j.org/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

setDirestion() in Windows.

nonokatori opened this issue · comments

Hi!

I am writing a sniffer.
I need to choose the direction of the packets being caught (source or destination), but the method setDirection(PcapHandle.PcapDirection dir) does not work under Windows.
Is there any way to solve this problem? Or is made this method only for Linux?

From the docs:

pcap_setdirection() isn't necessarily fully supported on all platforms;
some platforms might return an error for all values, and some other platforms might not support PCAP_D_OUT. 

Thank you! You helped me a lot!

I thought I was doing something wrong.