private static final int PST_LENGTH = 1;
private static final int OFFSET = CONTENT_LENGTH - PST_LENGTH;
private static final short RSVP_TE_PST = 0;
+ private static final short SR_PST = 1;
private static final String UNSUPPORTED_PST = "Unsupported path setup type.";
protected static final Set<Short> PSTS = Sets.newHashSet();
public PathSetupTypeTlvParser() {
PSTS.add(RSVP_TE_PST);
+ PSTS.add(SR_PST);
}
@Override
private static final byte[] PST_TLV_BYTES = { 0x0, 0x1C, 0x0, 0x4, 0x0, 0x0, 0x0, 0x0 };
- private static final byte[] PST_TLV_BYTES_UNSUPPORTED = { 0x0, 0x1C, 0x0, 0x4, 0x0, 0x0, 0x0, 0x1 };
+ private static final byte[] PST_TLV_BYTES_UNSUPPORTED = { 0x0, 0x1C, 0x0, 0x4, 0x0, 0x0, 0x0, 0x2 };
private final AbstractVendorSpecificTlvParser vsParser = new AbstractVendorSpecificTlvParser() {
@Test(expected=IllegalArgumentException.class)
public void testUnsupportedPSTSerializer() {
final PathSetupTypeTlvParser parser = new PathSetupTypeTlvParser();
- final PathSetupType pstTlv = new PathSetupTypeBuilder().setPst((short) 1).build();
+ final PathSetupType pstTlv = new PathSetupTypeBuilder().setPst((short) 2).build();
final ByteBuf buff = Unpooled.buffer();
parser.serializeTlv(pstTlv, buff);
}