use of org.onosproject.lisp.msg.protocols.DefaultLispReferralRecord.DefaultReferralRecordBuilder in project onos by opennetworkinglab.
the class DefaultLispMapReferralTest method getReferralRecord.
private LispReferralRecord getReferralRecord() {
ReferralRecordBuilder builder = new DefaultReferralRecordBuilder();
LispIpv4Address ipv4Locator = new LispIpv4Address(IpAddress.valueOf(IP_ADDRESS));
return builder.withRecordTtl(100).withIsAuthoritative(true).withIsIncomplete(false).withMapVersionNumber((short) 1).withMaskLength((byte) 0x01).withAction(LispMapReplyAction.NativelyForward).withEidPrefixAfi(ipv4Locator).build();
}
use of org.onosproject.lisp.msg.protocols.DefaultLispReferralRecord.DefaultReferralRecordBuilder in project onos by opennetworkinglab.
the class DefaultLispReferralRecordTest method setup.
@Before
public void setup() {
ReferralRecordBuilder builder1 = new DefaultReferralRecordBuilder();
LispIpv4Address ipv4Address1 = new LispIpv4Address(IpAddress.valueOf(IP_ADDRESS1));
record1 = builder1.withRecordTtl(100).withIsAuthoritative(true).withIsIncomplete(false).withMapVersionNumber((short) 1).withMaskLength((byte) 0x01).withAction(LispMapReplyAction.NativelyForward).withEidPrefixAfi(ipv4Address1).build();
ReferralRecordBuilder builder2 = new DefaultReferralRecordBuilder();
sameAsRecord1 = builder2.withRecordTtl(100).withIsAuthoritative(true).withIsIncomplete(false).withMapVersionNumber((short) 1).withMaskLength((byte) 0x01).withAction(LispMapReplyAction.NativelyForward).withEidPrefixAfi(ipv4Address1).build();
ReferralRecordBuilder builder3 = new DefaultReferralRecordBuilder();
LispIpv4Address ipv4Address2 = new LispIpv4Address(IpAddress.valueOf(IP_ADDRESS2));
record2 = builder3.withRecordTtl(200).withIsAuthoritative(false).withIsIncomplete(true).withMapVersionNumber((short) 2).withMaskLength((byte) 0x02).withAction(LispMapReplyAction.Drop).withEidPrefixAfi(ipv4Address2).build();
}
Aggregations