Search in sources :

Example 1 with SourceDestAddressBuilder

use of org.onosproject.lisp.msg.types.lcaf.LispSourceDestLcafAddress.SourceDestAddressBuilder in project onos by opennetworkinglab.

the class LispSourceDestLcafAddressTest method setup.

@Before
public void setup() {
    SourceDestAddressBuilder builder1 = new SourceDestAddressBuilder();
    LispIpv4Address srcAddress1 = new LispIpv4Address(IpAddress.valueOf("192.168.1.1"));
    LispIpv4Address dstAddress1 = new LispIpv4Address(IpAddress.valueOf("192.168.1.2"));
    address1 = builder1.withReserved((short) 1).withSrcMaskLength((byte) 0x01).withDstMaskLength((byte) 0x01).withSrcPrefix(srcAddress1).withDstPrefix(dstAddress1).build();
    SourceDestAddressBuilder builder2 = new SourceDestAddressBuilder();
    sameAsAddress1 = builder2.withReserved((short) 1).withSrcMaskLength((byte) 0x01).withDstMaskLength((byte) 0x01).withSrcPrefix(srcAddress1).withDstPrefix(dstAddress1).build();
    SourceDestAddressBuilder builder3 = new SourceDestAddressBuilder();
    LispIpv4Address srcAddress2 = new LispIpv4Address(IpAddress.valueOf("192.168.2.1"));
    LispIpv4Address dstAddress2 = new LispIpv4Address(IpAddress.valueOf("192.168.2.2"));
    address2 = builder3.withReserved((short) 2).withSrcMaskLength((byte) 0x02).withDstMaskLength((byte) 0x02).withSrcPrefix(srcAddress2).withDstPrefix(dstAddress2).build();
}
Also used : LispIpv4Address(org.onosproject.lisp.msg.types.LispIpv4Address) SourceDestAddressBuilder(org.onosproject.lisp.msg.types.lcaf.LispSourceDestLcafAddress.SourceDestAddressBuilder) Before(org.junit.Before)

Aggregations

Before (org.junit.Before)1 LispIpv4Address (org.onosproject.lisp.msg.types.LispIpv4Address)1 SourceDestAddressBuilder (org.onosproject.lisp.msg.types.lcaf.LispSourceDestLcafAddress.SourceDestAddressBuilder)1