net.clackrouter.protocol.data
Class VNSHWInfo.InterfaceEntry

java.lang.Object
  extended by net.clackrouter.protocol.data.VNSHWInfo.InterfaceEntry
Enclosing class:
VNSHWInfo

public class VNSHWInfo.InterfaceEntry
extends java.lang.Object

Encapsulates interface information.


Constructor Summary
VNSHWInfo.InterfaceEntry(java.lang.String name)
          Constructs an interface entry.
 
Method Summary
 java.nio.ByteBuffer getEthernetAddress()
          Returns the hardware address of an interface.
 java.nio.ByteBuffer getIPAddress()
          Returns the IP address of an interface.
 java.nio.ByteBuffer getMask()
          Returns the subnet mask of an interface.
 java.lang.String getName()
          Returns the name of the interface.
 int getSpeed()
          Returns the speed of an interface, in bits per second.
protected  java.lang.StringBuffer getStringBuffer(java.nio.ByteBuffer byteBuffer)
           
 java.nio.ByteBuffer getSubnet()
          Returns the subnet mask of an interface.
 void setEthernetAddress(java.nio.ByteBuffer ethernetAddress)
          Sets the hardware address of an interface.
 void setIPAddress(java.nio.ByteBuffer ipAddress)
          Sets the IP address of an interface.
 void setMask(java.nio.ByteBuffer mask)
          Sets the subnet mask of an interface.
 void setName(java.lang.String name)
          Sets the name of an interface.
 void setSpeed(int speed)
          Sets the speed of an interface, in bits per second.
 void setSubnet(java.nio.ByteBuffer subnet)
          Sets the subnet IP address of an interface.
 java.lang.String toString()
          Represents the interface information in a readable format, by field.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

VNSHWInfo.InterfaceEntry

public VNSHWInfo.InterfaceEntry(java.lang.String name)
Constructs an interface entry.

Parameters:
name - Name of an interface, e.g. eth0.
Method Detail

getName

public java.lang.String getName()
Returns the name of the interface.

Returns:
Name of an interface

getSpeed

public int getSpeed()
Returns the speed of an interface, in bits per second.

Returns:
Speed of an interface

getSubnet

public java.nio.ByteBuffer getSubnet()
Returns the subnet mask of an interface.

Returns:
Byte buffer containing the subnet mask of an interface

getEthernetAddress

public java.nio.ByteBuffer getEthernetAddress()
Returns the hardware address of an interface.

Returns:
Byte buffer containing the hardware address of an interface

getIPAddress

public java.nio.ByteBuffer getIPAddress()
Returns the IP address of an interface.

Returns:
Byte buffer containing the IP address of an interface

getMask

public java.nio.ByteBuffer getMask()
Returns the subnet mask of an interface.

Returns:
Byte buffer containing the subnet mask of an interface.

setName

public void setName(java.lang.String name)
Sets the name of an interface.

Parameters:
name - Name of an interface

setSpeed

public void setSpeed(int speed)
Sets the speed of an interface, in bits per second.

Parameters:
speed - Speed of an interface

setSubnet

public void setSubnet(java.nio.ByteBuffer subnet)
Sets the subnet IP address of an interface.

Parameters:
subnet - Subnet IP address of an interface

setEthernetAddress

public void setEthernetAddress(java.nio.ByteBuffer ethernetAddress)
Sets the hardware address of an interface.

Parameters:
ethernetAddress - Byte buffer containing hardware address of an interface

setIPAddress

public void setIPAddress(java.nio.ByteBuffer ipAddress)
Sets the IP address of an interface.

Parameters:
ipAddress - Byte buffer containing IP address of an interface

setMask

public void setMask(java.nio.ByteBuffer mask)
Sets the subnet mask of an interface.

Parameters:
mask - Byte buffer containing subnet mask of an interface

toString

public java.lang.String toString()
Represents the interface information in a readable format, by field.

Overrides:
toString in class java.lang.Object
Returns:
Interface information in a readable format, by field

getStringBuffer

protected java.lang.StringBuffer getStringBuffer(java.nio.ByteBuffer byteBuffer)