X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=blobdiff_plain;f=opendaylight%2Fmd-sal%2Ftopology-lldp-discovery%2Fsrc%2Fmain%2Fjava%2Forg%2Fopendaylight%2Fmd%2Fcontroller%2Ftopology%2Flldp%2Futils%2FLLDPDiscoveryUtils.java;h=82ab4432462af79fbbc6fe611f06175fa5cb93e9;hb=48814d6a264b8f13e5db1422336d9ef25cb05fa9;hp=c0bcbaa8ad1684daa531f7594898f016d154069d;hpb=eb538dbc16c0bb487f8ed70547b0df2c8c96c432;p=controller.git diff --git a/opendaylight/md-sal/topology-lldp-discovery/src/main/java/org/opendaylight/md/controller/topology/lldp/utils/LLDPDiscoveryUtils.java b/opendaylight/md-sal/topology-lldp-discovery/src/main/java/org/opendaylight/md/controller/topology/lldp/utils/LLDPDiscoveryUtils.java index c0bcbaa8ad..82ab443246 100644 --- a/opendaylight/md-sal/topology-lldp-discovery/src/main/java/org/opendaylight/md/controller/topology/lldp/utils/LLDPDiscoveryUtils.java +++ b/opendaylight/md-sal/topology-lldp-discovery/src/main/java/org/opendaylight/md/controller/topology/lldp/utils/LLDPDiscoveryUtils.java @@ -1,3 +1,10 @@ +/* + * Copyright (c) 2014 Cisco Systems, Inc. and others. All rights reserved. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v1.0 which accompanies this distribution, + * and is available at http://www.eclipse.org/legal/epl-v10.html + */ package org.opendaylight.md.controller.topology.lldp.utils; import java.nio.charset.Charset; @@ -20,10 +27,10 @@ import org.slf4j.LoggerFactory; public class LLDPDiscoveryUtils { static Logger LOG = LoggerFactory.getLogger(LLDPDiscoveryUtils.class); - + public static final Long LLDP_INTERVAL = (long) (1000*5); // Send LLDP every five seconds public static final Long LLDP_EXPIRATION_TIME = LLDP_INTERVAL*3; // Let up to three intervals pass before we decide we are expired. - + public static String macToString(byte[] mac) { StringBuilder b = new StringBuilder(); for (int i = 0; i < mac.length; i++) { @@ -32,7 +39,7 @@ public class LLDPDiscoveryUtils { return b.toString(); } - + public static NodeConnectorRef lldpToNodeConnectorRef(byte[] payload) { Ethernet ethPkt = new Ethernet(); try { @@ -43,7 +50,7 @@ public class LLDPDiscoveryUtils { if (ethPkt.getPayload() instanceof LLDP) { LLDP lldp = (LLDP) ethPkt.getPayload(); - + try { NodeId srcNodeId = null; NodeConnectorId srcNodeConnectorId = null;