Examples of LLDP


Examples of net.floodlightcontroller.packet.LLDP

        if (log.isTraceEnabled()) {
            log.trace("Sending LLDP out of interface: {}/{}",
                      HexString.toHexString(sw), port);
        }

        LLDP lldp = new LLDP();
        lldp.setChassisId(new LLDPTLV().setType((byte) 1)
                                       .setLength((short) chassisId.length)
                                       .setValue(chassisId));
        lldp.setPortId(new LLDPTLV().setType((byte) 2)
                                    .setLength((short) portId.length)
                                    .setValue(portId));
        lldp.setTtl(new LLDPTLV().setType((byte) 3)
                                 .setLength((short) ttlValue.length)
                                 .setValue(ttlValue));
        lldp.getOptionalTLVList().add(dpidTLV);

        // Add the controller identifier to the TLV value.
        lldp.getOptionalTLVList().add(controllerTLV);
        if (isReverse) {
            lldp.getOptionalTLVList().add(reverseTLV);
        } else {
            lldp.getOptionalTLVList().add(forwardTLV);
        }

        Ethernet ethernet;
        if (isStandard) {
            ethernet = new Ethernet().setSourceMACAddress(ofpPort.getHardwareAddress())
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.