Package net.floodlightcontroller.linkdiscovery.ILinkDiscovery

Examples of net.floodlightcontroller.linkdiscovery.ILinkDiscovery.LinkType


        if (ld != null) {
            links.putAll(ld.getLinks());
            for (Link link: links.keySet()) {
                LinkInfo info = links.get(link);
                LinkType type = ld.getLinkType(link, info);
                if (type == LinkType.DIRECT_LINK || type == LinkType.TUNNEL) {
                    LinkWithType lwt;

                    long src = link.getSrc();
                    long dst = link.getDst();
                    short srcPort = link.getSrcPort();
                    short dstPort = link.getDstPort();
                    Link otherLink = new Link(dst, dstPort, src, srcPort);
                    LinkInfo otherInfo = links.get(otherLink);
                    LinkType otherType = null;
                    if (otherInfo != null)
                        otherType = ld.getLinkType(otherLink, otherInfo);
                    if (otherType == LinkType.DIRECT_LINK ||
                            otherType == LinkType.TUNNEL) {
                        // This is a bi-direcitonal link.
View Full Code Here


        if (ld != null) {
            links.putAll(ld.getLinks());
            for (Link link: links.keySet()) {
                LinkInfo info = links.get(link);
                LinkType type = ld.getLinkType(link, info);
                if (type == LinkType.MULTIHOP_LINK) {
                    LinkWithType lwt;

                    long src = link.getSrc();
                    long dst = link.getDst();
                    short srcPort = link.getSrcPort();
                    short dstPort = link.getDstPort();
                    Link otherLink = new Link(dst, dstPort, src, srcPort);
                    LinkInfo otherInfo = links.get(otherLink);
                    LinkType otherType = null;
                    if (otherInfo != null)
                        otherType = ld.getLinkType(otherLink, otherInfo);
                    if (otherType == LinkType.MULTIHOP_LINK) {
                        // This is a bi-direcitonal link.
                        // It is sufficient to add only one side of it.
View Full Code Here

        if (ld != null) {
            links.putAll(ld.getLinks());
            for (Link link: links.keySet()) {
                LinkInfo info = links.get(link);
                LinkType type = ld.getLinkType(link, info);
                if (type == LinkType.DIRECT_LINK || type == LinkType.TUNNEL) {
                    LinkWithType lwt = new LinkWithType(link,
                            type,LinkDirection.UNIDIRECTIONAL);
                    returnLinkSet.add(lwt);
                }
View Full Code Here

                updateOperation = UpdateOperation.LINK_UPDATED;
                linkChanged = true;

                // Log direct links only. Multi-hop links may be numerous
                // Add all to event history
                LinkType linkType = getLinkType(lt, newInfo);
                if (linkType == ILinkDiscovery.LinkType.DIRECT_LINK) {
                    log.info("Inter-switch link detected: {}", lt);
                    evDirectLink.updateEventNoFlush(new DirectLinkEvent(lt.getSrc(),
                         lt.getSrcPort(), lt.getDst(), lt.getDstPort(), "direct-link-added::rcvd LLDP"));
                }
                notifier.postNotification("Link added: " + lt.toString());
            } else {
                linkChanged = updateLink(lt, oldInfo, newInfo);
                if (linkChanged) {
                    updateOperation = UpdateOperation.LINK_UPDATED;
                    LinkType linkType = getLinkType(lt, newInfo);
                    if (linkType == ILinkDiscovery.LinkType.DIRECT_LINK) {
                        log.info("Inter-switch link updated: {}", lt);
                        evDirectLink.updateEventNoFlush(new DirectLinkEvent(lt.getSrc(),
                            lt.getSrcPort(), lt.getDst(), lt.getDstPort(),
                            "link-port-state-updated::rcvd LLDP"));
View Full Code Here

                    if (this.portLinks.get(dstNpt).isEmpty())
                                                             this.portLinks.remove(dstNpt);
                }

                LinkInfo info = this.links.remove(lt);
                LinkType linkType = getLinkType(lt, info);
                linkUpdateList.add(new LDUpdate(lt.getSrc(),
                                                lt.getSrcPort(),
                                                lt.getDst(),
                                                lt.getDstPort(),
                                                linkType,
View Full Code Here

     *            The LinkTuple to write
     * @param linkInfo
     *            The LinkInfo to write
     */
    protected void writeLinkToStorage(Link lt, LinkInfo linkInfo) {
        LinkType type = getLinkType(lt, linkInfo);

        // Write only direct links. Do not write links to external
        // L2 network.
        // if (type != LinkType.DIRECT_LINK && type != LinkType.TUNNEL) {
        // return;
View Full Code Here

TOP

Related Classes of net.floodlightcontroller.linkdiscovery.ILinkDiscovery.LinkType

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.