- private static final String CHASSISID = "ChassisId";
- private static final String PORTID = "PortId";
- private static final String TTL = "TTL";
- private static final int LLDPDefaultTlvs = 3;
- private static LLDPTLV emptyTLV = new LLDPTLV().setLength((short)0).setType((byte)0);
- public static final byte[] LLDPMulticastMac = {1,(byte)0x80,(byte)0xc2, 0, 0,(byte)0xe};
- private Map<Byte, LLDPTLV> tlvList;
-
- /**
- * Default constructor that creates the tlvList LinkedHashMap
- */
- public LLDP() {
- super();
- tlvList = new LinkedHashMap<Byte,LLDPTLV>(LLDPDefaultTlvs);
- }
-
- /**
- * Constructor that creates the tlvList LinkedHashMap and sets
- * the write access for the same
- */
- public LLDP (boolean writeAccess) {
- super(writeAccess);
- tlvList = new LinkedHashMap<Byte,LLDPTLV>(LLDPDefaultTlvs); // Mandatory TLVs
- }
-
- /**
- * @param String - description of the type of TLV
- * @return byte - type of TLV
- */
- private byte getType(String typeDesc) {
- if (typeDesc.equals(CHASSISID)) {
- return LLDPTLV.TLVType.ChassisID.getValue();
- } else if (typeDesc.equals(PORTID)) {
- return LLDPTLV.TLVType.PortID.getValue();
- } else if (typeDesc.equals(TTL)) {
- return LLDPTLV.TLVType.TTL.getValue();
- } else {
- return LLDPTLV.TLVType.Unknown.getValue();
- }
- }
-
- /**
- * @param String - description of the type of TLV
- * @return LLDPTLV - full TLV
- */
+ 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 = 4;
+ private static LLDPTLV emptyTLV = new LLDPTLV().setLength((short) 0)
+ .setType((byte) 0);
+ public static final byte[] LLDPMulticastMac = { 1, (byte) 0x80,
+ (byte) 0xc2, 0, 0, (byte) 0xe };
+ private Map<Byte, LLDPTLV> tlvList;
+
+ /**
+ * Default constructor that creates the tlvList LinkedHashMap
+ */
+ public LLDP() {
+ super();
+ tlvList = new LinkedHashMap<Byte, LLDPTLV>(LLDPDefaultTlvs);
+ }
+
+ /**
+ * Constructor that creates the tlvList LinkedHashMap and sets the write
+ * access for the same
+ */
+ public LLDP(boolean writeAccess) {
+ super(writeAccess);
+ tlvList = new LinkedHashMap<Byte, LLDPTLV>(LLDPDefaultTlvs); // Mandatory
+ // TLVs
+ }
+
+ /**
+ * @param String
+ * - description of the type of TLV
+ * @return byte - type of TLV
+ */
+ private byte getType(String typeDesc) {
+ if (typeDesc.equals(CHASSISID)) {
+ return LLDPTLV.TLVType.ChassisID.getValue();
+ } else if (typeDesc.equals(PORTID)) {
+ return LLDPTLV.TLVType.PortID.getValue();
+ } else if (typeDesc.equals(TTL)) {
+ return LLDPTLV.TLVType.TTL.getValue();
+ } else {
+ return LLDPTLV.TLVType.Unknown.getValue();
+ }
+ }
+
+ /**
+ * @param String
+ * - description of the type of TLV
+ * @return LLDPTLV - full TLV
+ */