Commit f46b81d6 authored by garciay's avatar garciay
Browse files

Validate RSUsimulator against AtsDenm in secured mode

parent 7ea95047
...@@ -49,7 +49,7 @@ public class PcapMultiplexer implements Runnable { ...@@ -49,7 +49,7 @@ public class PcapMultiplexer implements Runnable {
int r = Pcap.findAllDevs(alldevs, errbuf); int r = Pcap.findAllDevs(alldevs, errbuf);
if (r == Pcap.NOT_OK || alldevs.isEmpty()) { if (r == Pcap.NOT_OK || alldevs.isEmpty()) {
TERFactory.getInstance().logError("Can't read list of devices, error is %s" + errbuf.toString()); //TERFactory.getInstance().logError("Can't read list of devices, error is %s" + errbuf.toString());
return; return;
} }
...@@ -72,7 +72,7 @@ public class PcapMultiplexer implements Runnable { ...@@ -72,7 +72,7 @@ public class PcapMultiplexer implements Runnable {
} }
device = alldevs.get(ifaceIndex); device = alldevs.get(ifaceIndex);
// TERFactory.getInstance().logDebug("Listening: " + device.getName()); //TERFactory.getInstance().logDebug("Listening: " + device.getName());
} }
/** /**
...@@ -84,7 +84,7 @@ public class PcapMultiplexer implements Runnable { ...@@ -84,7 +84,7 @@ public class PcapMultiplexer implements Runnable {
} }
public synchronized void register(Layer client, byte[] macAddress, short frameType) { public synchronized void register(Layer client, byte[] macAddress, short frameType) {
// TERFactory.getInstance().logDebug(">>>PcapMultiplexer.registering: " + frameType); //TERFactory.getInstance().logDebug(">>>PcapMultiplexer.registering: " + frameType);
if(clientsToMacs.isEmpty()) { if(clientsToMacs.isEmpty()) {
// Open interface // Open interface
...@@ -94,8 +94,7 @@ public class PcapMultiplexer implements Runnable { ...@@ -94,8 +94,7 @@ public class PcapMultiplexer implements Runnable {
pcap = Pcap.openLive(device.getName(), snaplen, flags, timeout, errbuf); pcap = Pcap.openLive(device.getName(), snaplen, flags, timeout, errbuf);
if (pcap == null) { if (pcap == null) {
TERFactory.getInstance().logError("Error while opening device for capture: " //TERFactory.getInstance().logError("Error while opening device for capture: " + errbuf.toString());
+ errbuf.toString());
return; return;
} }
captureThread = new Thread(this); captureThread = new Thread(this);
...@@ -103,7 +102,7 @@ public class PcapMultiplexer implements Runnable { ...@@ -103,7 +102,7 @@ public class PcapMultiplexer implements Runnable {
filter = ""; filter = "";
} }
else { else {
// TERFactory.getInstance().logDebug("Another Client !"); //TERFactory.getInstance().logDebug("Another Client !");
filter = filter + " and "; filter = filter + " and ";
} }
...@@ -114,7 +113,7 @@ public class PcapMultiplexer implements Runnable { ...@@ -114,7 +113,7 @@ public class PcapMultiplexer implements Runnable {
} }
filter = filter + "not ether src " + strMacAddress; filter = filter + "not ether src " + strMacAddress;
// TERFactory.getInstance().logDebug("New filter: " + filter); //TERFactory.getInstance().logDebug("New filter: " + filter);
// Apply filter // Apply filter
PcapBpfProgram bpfFilter = new PcapBpfProgram(); PcapBpfProgram bpfFilter = new PcapBpfProgram();
...@@ -122,7 +121,7 @@ public class PcapMultiplexer implements Runnable { ...@@ -122,7 +121,7 @@ public class PcapMultiplexer implements Runnable {
int netmask = 0; int netmask = 0;
int r = pcap.compile(bpfFilter, filter, optimize, netmask); int r = pcap.compile(bpfFilter, filter, optimize, netmask);
if (r != Pcap.OK) { if (r != Pcap.OK) {
// TERFactory.getInstance().logDebug("Filter error: " + pcap.getErr()); //TERFactory.getInstance().logDebug("Filter error: " + pcap.getErr());
} }
pcap.setFilter(bpfFilter); pcap.setFilter(bpfFilter);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment