Class DefaultL2Tunnel

  • All Implemented Interfaces:
    L2Tunnel

    public class DefaultL2Tunnel
    extends Object
    implements L2Tunnel
    Implementation of the default l2 tunnel.
    • Constructor Summary

      Constructors 
      Constructor Description
      DefaultL2Tunnel()
      Creates an empty l2 tunnel.
      DefaultL2Tunnel​(DefaultL2Tunnel l2Tunnel)
      Creates a l2Tunnel from a given tunnel.
      DefaultL2Tunnel​(L2Mode mode, org.onlab.packet.VlanId sdtag, long tunnelId, org.onlab.packet.MplsLabel pwLabel)
      Creates a intra-co l2 tunnel using the supplied parameters.
      DefaultL2Tunnel​(L2Mode mode, org.onlab.packet.VlanId sdtag, long tunnelId, org.onlab.packet.MplsLabel pwLabel, org.onlab.packet.MplsLabel interCoLabel)
      Creates a inter-co l2 tunnel using the supplied parameters.
    • Constructor Detail

      • DefaultL2Tunnel

        public DefaultL2Tunnel​(L2Mode mode,
                               org.onlab.packet.VlanId sdtag,
                               long tunnelId,
                               org.onlab.packet.MplsLabel pwLabel,
                               org.onlab.packet.MplsLabel interCoLabel)
        Creates a inter-co l2 tunnel using the supplied parameters.
        Parameters:
        mode - the tunnel mode
        sdtag - the service delimiting tag
        tunnelId - the tunnel id
        pwLabel - the pseudo wire label
        interCoLabel - the inter central office label
      • DefaultL2Tunnel

        public DefaultL2Tunnel​(DefaultL2Tunnel l2Tunnel)
        Creates a l2Tunnel from a given tunnel.
        Parameters:
        l2Tunnel - to replicate
      • DefaultL2Tunnel

        public DefaultL2Tunnel​(L2Mode mode,
                               org.onlab.packet.VlanId sdtag,
                               long tunnelId,
                               org.onlab.packet.MplsLabel pwLabel)
        Creates a intra-co l2 tunnel using the supplied parameters.
        Parameters:
        mode - the tunnel mode
        sdtag - the service delimiting tag
        tunnelId - the tunnel id
        pwLabel - the pseudo wire label
      • DefaultL2Tunnel

        public DefaultL2Tunnel()
        Creates an empty l2 tunnel.
    • Method Detail

      • pwMode

        public L2Mode pwMode()
        Returns the mode of the pseudo wire.
        Specified by:
        pwMode in interface L2Tunnel
        Returns:
        the pseudo wire mode
      • sdTag

        public org.onlab.packet.VlanId sdTag()
        Returns the service delimitation tag.
        Specified by:
        sdTag in interface L2Tunnel
        Returns:
        the service delimitation vlan id
      • tunnelId

        public long tunnelId()
        Returns the tunnel id of the pseudo wire.
        Specified by:
        tunnelId in interface L2Tunnel
        Returns:
        the pseudo wire tunnel id
      • pwLabel

        public org.onlab.packet.MplsLabel pwLabel()
        Returns the pw label.
        Specified by:
        pwLabel in interface L2Tunnel
        Returns:
        the mpls pw label
      • setPath

        public void setPath​(List<org.onosproject.net.Link> path)
        Set the path for the pseudowire.
        Specified by:
        setPath in interface L2Tunnel
        Parameters:
        path - The path to set
      • setTransportVlan

        public void setTransportVlan​(org.onlab.packet.VlanId vlan)
        Set the transport vlan for the pseudowire.
        Specified by:
        setTransportVlan in interface L2Tunnel
        Parameters:
        vlan - the vlan to use.
      • pathUsed

        public List<org.onosproject.net.Link> pathUsed()
        Returns the used path of the pseudowire.
        Specified by:
        pathUsed in interface L2Tunnel
        Returns:
        pathUsed
      • transportVlan

        public org.onlab.packet.VlanId transportVlan()
        Description copied from interface: L2Tunnel
        Returns the transport vlan used by the pseudowire.
        Specified by:
        transportVlan in interface L2Tunnel
        Returns:
        The transport vlan
      • interCoLabel

        public org.onlab.packet.MplsLabel interCoLabel()
        Returns the inter-co label.
        Specified by:
        interCoLabel in interface L2Tunnel
        Returns:
        the mpls inter-co label
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object