当前位置: 首页>>代码示例>>Java>>正文


Java LsaHeader.setAdvertisingRouter方法代码示例

本文整理汇总了Java中org.onosproject.ospf.protocol.lsa.LsaHeader.setAdvertisingRouter方法的典型用法代码示例。如果您正苦于以下问题:Java LsaHeader.setAdvertisingRouter方法的具体用法?Java LsaHeader.setAdvertisingRouter怎么用?Java LsaHeader.setAdvertisingRouter使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.onosproject.ospf.protocol.lsa.LsaHeader的用法示例。


在下文中一共展示了LsaHeader.setAdvertisingRouter方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: createLsaHeader

import org.onosproject.ospf.protocol.lsa.LsaHeader; //导入方法依赖的package包/类
/**
 * Utility method used by junit methods.
 */
private LsaHeader createLsaHeader() {
    lsaHeader = new LsaHeader();
    lsaHeader.setAge(10);
    lsaHeader.setLinkStateId("10.226.165.164");
    lsaHeader.setLsCheckSum(222);
    lsaHeader.setLsPacketLen(48);
    lsaHeader.setLsSequenceNo(2020);
    lsaHeader.setLsType(5);
    lsaHeader.setOptions(2);
    lsaHeader.setAdvertisingRouter(Ip4Address.valueOf("10.226.165.165"));
    return lsaHeader;
}
 
开发者ID:shlee89,项目名称:athena,代码行数:16,代码来源:LsAcknowledgeTest.java

示例2: createLsaHeader

import org.onosproject.ospf.protocol.lsa.LsaHeader; //导入方法依赖的package包/类
/**
 * Utility method used by junit methods.
 */
private LsaHeader createLsaHeader() {
    lsaHeader = new LsaHeader();
    lsaHeader.setAge(10);
    lsaHeader.setLinkStateId("10.226.165.164");
    lsaHeader.setLsCheckSum(222);
    lsaHeader.setLsPacketLen(48);
    lsaHeader.setLsSequenceNo(2020);
    lsaHeader.setLsType(2);
    lsaHeader.setOptions(2);
    lsaHeader.setAdvertisingRouter(Ip4Address.valueOf("10.226.165.165"));
    return lsaHeader;
}
 
开发者ID:shlee89,项目名称:athena,代码行数:16,代码来源:DdPacketTest.java

示例3: createLsaHeader

import org.onosproject.ospf.protocol.lsa.LsaHeader; //导入方法依赖的package包/类
/**
 * Utility method used by junit methods.
 */
private LsaHeader createLsaHeader() {
    lsaHeader = new LsaHeader();
    lsaHeader.setLsType(1);
    lsaHeader.setLsPacketLen(48);
    lsaHeader.setLsCheckSum(10);
    lsaHeader.setAge(4);
    lsaHeader.setLinkStateId("10.226.165.164");
    lsaHeader.setLsSequenceNo(250);
    lsaHeader.setAdvertisingRouter(Ip4Address.valueOf("100.226.165.165"));
    lsaHeader.setOptions(2);
    return lsaHeader;
}
 
开发者ID:shlee89,项目名称:athena,代码行数:16,代码来源:ExternalLsaTest.java

示例4: createLsaHeader

import org.onosproject.ospf.protocol.lsa.LsaHeader; //导入方法依赖的package包/类
/**
 * Utility method used by junit methods.
 */
private LsaHeader createLsaHeader() {
    lsaHeader = new LsaHeader();
    lsaHeader.setLsType(3);
    lsaHeader.setLsPacketLen(48);
    lsaHeader.setLsCheckSum(10);
    lsaHeader.setAge(4);
    lsaHeader.setLinkStateId("10.226.165.164");
    lsaHeader.setLsSequenceNo(250);
    lsaHeader.setAdvertisingRouter(Ip4Address.valueOf("100.226.165.165"));
    lsaHeader.setOptions(2);
    return lsaHeader;
}
 
开发者ID:shlee89,项目名称:athena,代码行数:16,代码来源:SummaryLsaTest.java

示例5: createLsaHeader

import org.onosproject.ospf.protocol.lsa.LsaHeader; //导入方法依赖的package包/类
/**
 * Utility method used by junit methods.
 */
private LsaHeader createLsaHeader() {
    lsaHeader = new LsaHeader();
    lsaHeader.setLsType(2);
    lsaHeader.setLsPacketLen(48);
    lsaHeader.setLsCheckSum(10);
    lsaHeader.setAge(4);
    lsaHeader.setLinkStateId("10.226.165.164");
    lsaHeader.setLsSequenceNo(250);
    lsaHeader.setAdvertisingRouter(Ip4Address.valueOf("100.226.165.165"));
    lsaHeader.setOptions(2);
    return lsaHeader;
}
 
开发者ID:shlee89,项目名称:athena,代码行数:16,代码来源:NetworkLsaTest.java

示例6: setUp

import org.onosproject.ospf.protocol.lsa.LsaHeader; //导入方法依赖的package包/类
@Before
public void setUp() throws Exception {
    lsaHeader = new LsaHeader();
    opaqueLsaHeader = new OpaqueLsaHeader();
    opaqueLsaHeader.setAdvertisingRouter(ip4Address);
    lsaHeader.setAdvertisingRouter(ip4Address);
    routerLsa = new RouterLsa(lsaHeader);
    routerLsa.setAdvertisingRouter(ip4Address);
    opaqueLsa10 = new OpaqueLsa10(opaqueLsaHeader);
    ospfArea = new OspfAreaImpl();
    ospfInterface1 = new OspfInterfaceImpl();
    topologyForDeviceAndLink = new TopologyForDeviceAndLinkImpl();
    ospfNbr = new OspfNbrImpl(ospfArea, ospfInterface1, ip4Address, ip4Address1,
                              2, topologyForDeviceAndLink);
    ospfNbr.setState(OspfNeighborState.EXCHANGE);
    ospfNbr1 = new OspfNbrImpl(ospfArea, ospfInterface1, ip4Address, ip4Address1,
                               2, topologyForDeviceAndLink);
    ospfNbr1.setState(OspfNeighborState.FULL);
    ospfNbr1.setNeighborId(ip4Address);
    ospfNbr.setNeighborId(ip4Address);
    ospfNbr.setIsOpaqueCapable(true);
    ospfInterface1.addNeighbouringRouter(ospfNbr);
    ospfInterface1.addNeighbouringRouter(ospfNbr1);
    ospfInterface2 = new OspfInterfaceImpl();
    ospfInterface2.setIpAddress(ip4Address);
    ospfInterface2.setIpNetworkMask(networkAddress);
    ospfInterface2.setState(OspfInterfaceState.LOOPBACK);
    ospfInterface2.addNeighbouringRouter(ospfNbr);
    ospfInterface2.addNeighbouringRouter(ospfNbr1);
    ospfInterfaces.add(ospfInterface2);
}
 
开发者ID:shlee89,项目名称:athena,代码行数:32,代码来源:OspfAreaImplTest.java

示例7: testGetLsaKey

import org.onosproject.ospf.protocol.lsa.LsaHeader; //导入方法依赖的package包/类
/**
 * Tests getLsaKey() method.
 */
@Test
public void testGetLsaKey() throws Exception {
    lsaHeader = new LsaHeader();
    lsaHeader.setAdvertisingRouter(Ip4Address.valueOf("1.1.1.1"));
    assertThat(ospfArea.getLsaKey(lsaHeader), is(notNullValue()));
}
 
开发者ID:shlee89,项目名称:athena,代码行数:10,代码来源:OspfAreaImplTest.java


注:本文中的org.onosproject.ospf.protocol.lsa.LsaHeader.setAdvertisingRouter方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。