Class Interface


  • public class Interface
    extends Object
    An Interface maps network configuration information (such as addresses and vlans) to a port in the network.
    • Constructor Detail

      • Interface

        public Interface​(String name,
                         ConnectPoint connectPoint,
                         List<InterfaceIpAddress> ipAddresses,
                         org.onlab.packet.MacAddress macAddress,
                         org.onlab.packet.VlanId vlan)
        Creates new Interface with the provided configuration.
        Parameters:
        name - name of the interface
        connectPoint - the connect point this interface maps to
        ipAddresses - list of IP addresses
        macAddress - MAC address
        vlan - VLAN ID
      • Interface

        public Interface​(String name,
                         ConnectPoint connectPoint,
                         List<InterfaceIpAddress> ipAddresses,
                         org.onlab.packet.MacAddress macAddress,
                         org.onlab.packet.VlanId vlan,
                         org.onlab.packet.VlanId vlanUntagged,
                         Set<org.onlab.packet.VlanId> vlanTagged,
                         org.onlab.packet.VlanId vlanNative)
        Creates new Interface with the provided configuration.
        Parameters:
        name - name of the interface
        connectPoint - the connect point this interface maps to
        ipAddresses - list of IP addresses
        macAddress - MAC address
        vlan - VLAN ID
        vlanUntagged - untagged VLAN. Cannot be used with vlanTagged or vlanNative.
        vlanTagged - tagged VLANs. Cannot be used with vlanUntagged.
        vlanNative - native vLAN. Optional. Can only be used when vlanTagged is specified. Cannot be used with vlanUntagged.
    • Method Detail

      • name

        public String name()
        Retrieves the name of the interface.
        Returns:
        name
      • connectPoint

        public ConnectPoint connectPoint()
        Retrieves the connection point that this interface maps to.
        Returns:
        the connection point
      • ipAddressesList

        public List<InterfaceIpAddress> ipAddressesList()
        Retrieves a list of IP addresses that are assigned to the interface in the order that they were configured.
        Returns:
        list of IP addresses
      • mac

        public org.onlab.packet.MacAddress mac()
        Retrieves the MAC address that is assigned to the interface.
        Returns:
        the MAC address
      • vlan

        public org.onlab.packet.VlanId vlan()
        Retrieves the VLAN ID that is assigned to the interface.
        Returns:
        the VLAN ID
      • vlanUntagged

        public org.onlab.packet.VlanId vlanUntagged()
        Retrieves the VLAN ID that is assigned to untagged packets.
        Returns:
        the VLAN ID
      • vlanTagged

        public Set<org.onlab.packet.VlanId> vlanTagged()
        Retrieves the set of VLAN IDs that are allowed on this interface.
        Returns:
        the VLAN ID
      • vlanNative

        public org.onlab.packet.VlanId vlanNative()
        Retrieves the VLAN ID that is assigned to untagged packets on this tagged interface.
        Returns:
        the VLAN ID
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object