com.eurotech.framework.linux.net.util
Class LinuxNetworkUtil

java.lang.Object
  extended by com.eurotech.framework.linux.net.util.LinuxNetworkUtil

public class LinuxNetworkUtil
extends Object


Constructor Summary
LinuxNetworkUtil()
           
 
Method Summary
static boolean canPing(String ipAddress, int count)
           
static void disableInterface(String interfaceName)
           
static void enableInterface(String interfaceName)
           
static List<String> getAllInterfaceNames()
           
static List<WifiAccessPoint> getAvailableAccessPoints(String interfaceName)
           
static String getCurrentBroadcastAddress(String ifaceName)
           
static String getCurrentIpAddress(String ifaceName)
           
static short getCurrentMtu(String ifaceName)
           
static String getCurrentNetmask(String ifaceName)
           
static String getCurrentPtpAddress(String ifaceName)
           
static Map<String,String> getEthernetDriver(String interfaceName)
           
static List<String> getInterfaceNames()
           
static String getMacAddress(String ifaceName)
           
static byte[] getMacAddressBytes(String interfaceName)
           
static String getSSID(String ifaceName)
           
static NetInterfaceType getType(String ifaceName)
           
static long getWifiBitrate(String ifaceName)
           
static EnumSet<WifiInterface.Capability> getWifiCapabilities(String ifaceName)
           
static WifiMode getWifiMode(String ifaceName)
           
static boolean isAutoConnect(String interfaceName)
           
static boolean isDhclientRunning(String interfaceName)
           
static boolean isEthernetControllerPowered(String interfaceName)
           
static boolean isLinkUp(NetInterfaceType ifaceType, String ifaceName)
           
static boolean isLinkUp(String ifaceName)
           
static boolean isSupportsMulticast(String interfaceName)
           
static boolean isUp(String interfaceName)
           
static void powerOnEthernetController(String interfaceName)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LinuxNetworkUtil

public LinuxNetworkUtil()
Method Detail

getInterfaceNames

public static List<String> getInterfaceNames()
                                      throws EsfException
Throws:
EsfException

getAllInterfaceNames

public static List<String> getAllInterfaceNames()
                                         throws EsfException
Throws:
EsfException

isUp

public static boolean isUp(String interfaceName)
                    throws EsfException
Throws:
EsfException

isDhclientRunning

public static boolean isDhclientRunning(String interfaceName)
                                 throws EsfException
Throws:
EsfException

getCurrentIpAddress

public static String getCurrentIpAddress(String ifaceName)
                                  throws EsfException
Throws:
EsfException

getCurrentNetmask

public static String getCurrentNetmask(String ifaceName)
                                throws EsfException
Throws:
EsfException

getCurrentMtu

public static short getCurrentMtu(String ifaceName)
                           throws EsfException
Throws:
EsfException

getCurrentBroadcastAddress

public static String getCurrentBroadcastAddress(String ifaceName)
                                         throws EsfException
Throws:
EsfException

getCurrentPtpAddress

public static String getCurrentPtpAddress(String ifaceName)
                                   throws EsfException
Throws:
EsfException

isLinkUp

public static boolean isLinkUp(String ifaceName)
                        throws EsfException
Throws:
EsfException

isLinkUp

public static boolean isLinkUp(NetInterfaceType ifaceType,
                               String ifaceName)
                        throws EsfException
Throws:
EsfException

isAutoConnect

public static boolean isAutoConnect(String interfaceName)
                             throws EsfException
Throws:
EsfException

getMacAddress

public static String getMacAddress(String ifaceName)
                            throws EsfException
Throws:
EsfException

getMacAddressBytes

public static byte[] getMacAddressBytes(String interfaceName)
                                 throws EsfException
Throws:
EsfException

isSupportsMulticast

public static boolean isSupportsMulticast(String interfaceName)
                                   throws EsfException
Throws:
EsfException

canPing

public static boolean canPing(String ipAddress,
                              int count)
                       throws EsfException
Throws:
EsfException

getType

public static NetInterfaceType getType(String ifaceName)
                                throws EsfException
Throws:
EsfException

getEthernetDriver

public static Map<String,String> getEthernetDriver(String interfaceName)
                                            throws EsfException
Throws:
EsfException

getWifiCapabilities

public static EnumSet<WifiInterface.Capability> getWifiCapabilities(String ifaceName)
                                                             throws EsfException
Throws:
EsfException

getWifiMode

public static WifiMode getWifiMode(String ifaceName)
                            throws EsfException
Throws:
EsfException

getWifiBitrate

public static long getWifiBitrate(String ifaceName)
                           throws EsfException
Throws:
EsfException

getSSID

public static String getSSID(String ifaceName)
                      throws EsfException
Throws:
EsfException

getAvailableAccessPoints

public static List<WifiAccessPoint> getAvailableAccessPoints(String interfaceName)
                                                      throws EsfException
Throws:
EsfException

disableInterface

public static void disableInterface(String interfaceName)
                             throws Exception
Throws:
Exception

enableInterface

public static void enableInterface(String interfaceName)
                            throws Exception
Throws:
Exception

powerOnEthernetController

public static void powerOnEthernetController(String interfaceName)
                                      throws EsfException
Throws:
EsfException

isEthernetControllerPowered

public static boolean isEthernetControllerPowered(String interfaceName)
                                           throws EsfException
Throws:
EsfException


Copyright © 2013. All Rights Reserved.