Java Code Examples for org.pcap4j.core.PcapNetworkInterface.PromiscuousMode#PROMISCUOUS
The following examples show how to use
org.pcap4j.core.PcapNetworkInterface.PromiscuousMode#PROMISCUOUS .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: CapEnv.java From NSS with Apache License 2.0 | 5 votes |
PromiscuousMode getMode(PcapNetworkInterface pi){ PromiscuousMode mode=null; String string=(pi.getDescription()+":"+pi.getName()).toLowerCase(); if(string.contains("wireless")){ mode= PromiscuousMode.NONPROMISCUOUS; }else { mode= PromiscuousMode.PROMISCUOUS; } return mode; }
Example 2
Source File: CapEnv.java From finalspeed-91yun with GNU General Public License v2.0 | 5 votes |
PromiscuousMode getMode(PcapNetworkInterface pi){ PromiscuousMode mode=null; String string=(pi.getDescription()+":"+pi.getName()).toLowerCase(); if(string.contains("wireless")){ mode=PromiscuousMode.NONPROMISCUOUS; }else { mode=PromiscuousMode.PROMISCUOUS; } return mode; }
Example 3
Source File: CapEnv.java From finalspeed with GNU General Public License v2.0 | 5 votes |
PromiscuousMode getMode(PcapNetworkInterface pi) { PromiscuousMode mode; String string = (pi.getDescription() + ":" + pi.getName()).toLowerCase(); if (string.contains("wireless")) { mode = PromiscuousMode.NONPROMISCUOUS; } else { mode = PromiscuousMode.PROMISCUOUS; } return mode; }