Skip to content

Commit

Permalink
[Network] Present used arping tool to user (openhab#4821)
Browse files Browse the repository at this point in the history
Signed-off-by: davidgraeff <[email protected]>
Signed-off-by: Pshatsillo <[email protected]>
  • Loading branch information
David Gräff authored and Pshatsillo committed Jun 19, 2019
1 parent 7a1df5e commit 9821c9c
Showing 1 changed file with 19 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -186,11 +186,29 @@ public void setUseArpPing(boolean enable, String arpPingUtilPath, @Nullable Inet
arpPingMethod = ArpPingUtilEnum.UNKNOWN_TOOL;
return;
} else if (destinationAddress == null || !(destinationAddress instanceof Inet4Address)) {
arpPingState = "Destination is not IPv4";
arpPingState = "Destination is not a valid IPv4 address";
arpPingMethod = ArpPingUtilEnum.UNKNOWN_TOOL;
return;
}
arpPingMethod = networkUtils.determineNativeARPpingMethod(arpPingUtilPath);
switch (arpPingMethod) {
case UNKNOWN_TOOL: {
arpPingState = "Unknown arping tool";
break;
}
case THOMAS_HABERT_ARPING: {
arpPingState = "Arping tool by Thomas Habets";
break;
}
case THOMAS_HABERT_ARPING_WITHOUT_TIMEOUT: {
arpPingState = "Arping tool by Thomas Habets (old version)";
break;
}
case IPUTILS_ARPING: {
arpPingState = "Ipuitls Arping";
break;
}
}
}

/**
Expand Down

0 comments on commit 9821c9c

Please sign in to comment.