Files
KLALB/src/org/kne/cloud/network/srv6/SRv6TLV.java
T

42 lines
856 B
Java

package org.kne.cloud.network.srv6;
import java.nio.ByteBuffer;
import java.util.Arrays;
public class SRv6TLV {
public static final int PAD1=0;
public static final int PADN=4;
public static final int HMAC=5;
public static final int SEQS=7;
private int type;
private int length;
private byte[]value;
public SRv6TLV(int type, int length, byte[] value) {
super();
this.type = type;
this.length = length;
this.value = value;
}
@Override
public String toString() {
return "SRv6TLV [type=" + type + ", length=" + length + ", value=" + Arrays.toString(value) + "]";
}
public int getType() {
return type;
}
public int getLength() {
return length;
}
public byte[] getValue() {
return value;
}
public int getTotalLength() {
if(type==PAD1) {
return 1;
}
return 2+length;
}
}