X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=blobdiff_plain;ds=sidebyside;f=opendaylight%2Fsal%2Fapi%2Fsrc%2Fmain%2Fjava%2Forg%2Fopendaylight%2Fcontroller%2Fsal%2Fpacket%2FLLDP.java;h=95edca943bc8a61681c34c582f4aeb9dddb7972e;hb=d1ab4c3ea79bcd74e02aa9334bc660cb7fc6d037;hp=6a896c6c712aee0e06d94b7be31bbf27529c7845;hpb=7c3362df780f30a47d0f6a7b7695360bbb5513bc;p=controller.git diff --git a/opendaylight/sal/api/src/main/java/org/opendaylight/controller/sal/packet/LLDP.java b/opendaylight/sal/api/src/main/java/org/opendaylight/controller/sal/packet/LLDP.java index 6a896c6c71..95edca943b 100644 --- a/opendaylight/sal/api/src/main/java/org/opendaylight/controller/sal/packet/LLDP.java +++ b/opendaylight/sal/api/src/main/java/org/opendaylight/controller/sal/packet/LLDP.java @@ -21,9 +21,10 @@ import org.opendaylight.controller.sal.utils.NetUtils; public class LLDP extends Packet { private static final String CHASSISID = "ChassisId"; + private static final String SYSTEMNAMEID = "SystemNameID"; private static final String PORTID = "PortId"; private static final String TTL = "TTL"; - private static final int LLDPDefaultTlvs = 3; + private static final int LLDPDefaultTlvs = 4; private static LLDPTLV emptyTLV = new LLDPTLV().setLength((short) 0) .setType((byte) 0); public static final byte[] LLDPMulticastMac = { 1, (byte) 0x80, @@ -101,6 +102,22 @@ public class LLDP extends Packet { return this; } + /** + * @return the SystemName TLV + */ + public LLDPTLV getSystemNameId() { + return getTLV(SYSTEMNAMEID); + } + + /** + * @param LLDPTLV + * - the chassisId to set + */ + public LLDP setSystemNameId(LLDPTLV systemNameId) { + tlvList.put(getType(SYSTEMNAMEID), systemNameId); + return this; + } + /** * @return LLDPTLV - the portId TLV */