Interface NetworkServices
- All Known Implementing Classes:
NetworkServicesBase,NetworkServicesUnix
public interface NetworkServices
Instances of this class should know how to configure, start and stop network
services of the OS.
-
Method Summary
Modifier and TypeMethodDescriptionvoidaddListener(NetworkChangeListener listener) voidapplyNetworkConfiguration(NetworkConfiguration networkConfiguration) voidconfigureDhcpServer(NetworkConfiguration configuration) voidconfigureEblockerDns(NetworkConfiguration configuration) voidvoidvoidvoidvoidenableDhcpServer(boolean start) voidenableFirewall(boolean masquerade, boolean enableSSL, boolean enableOpenVpnServer, boolean enableMalwareSet) Write the firewall configurationvoidenableStaticIp(NetworkConfiguration configuration) booleanRetrieve DHCP-statusbooleanhealDevice(Device device) Restore "normal" ARP cache of devicevoidsetNameserverAddresses(NetworkConfiguration configuration) voidRetrieve the OS's current gateway and store itvoidvoidupdateNetworkIp6Configuration(NetworkIp6Configuration networkIp6Configuration)
-
Method Details
-
getCurrentNetworkConfiguration
NetworkConfiguration getCurrentNetworkConfiguration() -
enableArpSpoofer
void enableArpSpoofer() -
disableArpSpoofer
void disableArpSpoofer() -
enableDhcpServer
void enableDhcpServer(boolean start) -
configureDhcpServer
-
disableDhcpServer
void disableDhcpServer() -
enableDhcpClient
void enableDhcpClient() -
enableStaticIp
-
configureEblockerDns
-
setNameserverAddresses
-
updateIp6State
void updateIp6State() -
enableFirewall
void enableFirewall(boolean masquerade, boolean enableSSL, boolean enableOpenVpnServer, boolean enableMalwareSet) Write the firewall configuration- Parameters:
masquerade- should SNAT or masquerading be enabled?
-
applyNetworkConfiguration
-
healDevice
Restore "normal" ARP cache of device- Parameters:
device-- Returns:
- true if ARP messages were sent
-
updateGateway
void updateGateway()Retrieve the OS's current gateway and store it -
getDHCPActive
boolean getDHCPActive()Retrieve DHCP-status- Returns:
- true if the eBlocker is the DHCP server
-
addListener
-
getNetworkIp6Configuration
NetworkIp6Configuration getNetworkIp6Configuration() -
updateNetworkIp6Configuration
-