Java 类org.projectfloodlight.openflow.types.ArpOpcode 实例源码

项目:fresco_floodlight    文件:ARP.java   
/**
 * @return the opCode
 */
public ArpOpcode getOpCode() {
    return opCode;
}
项目:fresco_floodlight    文件:ARP.java   
/**
 * @param opCode the opCode to set
 */
public ARP setOpCode(ArpOpcode opCode) {
    this.opCode = opCode;
    return this;
}
项目:SDN-Multicast    文件:ARP.java   
/**
 * @return the opCode
 */
public ArpOpcode getOpCode() {
    return opCode;
}
项目:SDN-Multicast    文件:ARP.java   
/**
 * @param opCode the opCode to set
 */
public ARP setOpCode(ArpOpcode opCode) {
    this.opCode = opCode;
    return this;
}
项目:arscheduler    文件:ARP.java   
/**
 * @return the opCode
 */
public ArpOpcode getOpCode() {
    return opCode;
}
项目:arscheduler    文件:ARP.java   
/**
 * @param opCode the opCode to set
 */
public ARP setOpCode(ArpOpcode opCode) {
    this.opCode = opCode;
    return this;
}
项目:floodlight1.2-delay    文件:ARP.java   
/**
 * @return the opCode
 */
public ArpOpcode getOpCode() {
    return opCode;
}
项目:floodlight1.2-delay    文件:ARP.java   
/**
 * @param opCode the opCode to set
 */
public ARP setOpCode(ArpOpcode opCode) {
    this.opCode = opCode;
    return this;
}
项目:floodlight-hardware    文件:ARP.java   
/**
 * @return the opCode
 */
public ArpOpcode getOpCode() {
    return opCode;
}
项目:floodlight-hardware    文件:ARP.java   
/**
 * @param opCode the opCode to set
 */
public ARP setOpCode(ArpOpcode opCode) {
    this.opCode = opCode;
    return this;
}
项目:ACAMPController    文件:ARP.java   
/**
 * @return the opCode
 */
public ArpOpcode getOpCode() {
    return opCode;
}
项目:ACAMPController    文件:ARP.java   
/**
 * @param opCode the opCode to set
 */
public ARP setOpCode(ArpOpcode opCode) {
    this.opCode = opCode;
    return this;
}
项目:floodlightLB    文件:ARP.java   
/**
 * @return the opCode
 */
public ArpOpcode getOpCode() {
    return opCode;
}
项目:floodlightLB    文件:ARP.java   
/**
 * @param opCode the opCode to set
 */
public ARP setOpCode(ArpOpcode opCode) {
    this.opCode = opCode;
    return this;
}
项目:loxigen-artifacts    文件:MatchFieldIterationBase.java   
@SuppressWarnings("unchecked")
@Test
public void iterateArpFields() {
    MacAddress macSrc = MacAddress.of("00:01:02:03:04:05");
    MacAddress macDst = MacAddress.of("01:01:02:02:03:03");
    IPv4Address ipSrc = IPv4Address.of("10.192.20.1");
    IPv4Address ipDst = IPv4Address.of("10.192.20.2");
    OFVersion version = factory.getVersion();
    boolean supportsArpHardwareAddress = (version != OFVersion.OF_10) &&
            (version != OFVersion.OF_11) && (version != OFVersion.OF_12);
    int matchFieldCount = 4;
    Match.Builder builder = factory.buildMatch();
    builder.setExact(MatchField.ETH_TYPE, EthType.ARP)
            .setExact(MatchField.ARP_OP, ArpOpcode.REPLY)
            .setExact(MatchField.ARP_SPA, ipSrc)
            .setExact(MatchField.ARP_TPA, ipDst);
    if (supportsArpHardwareAddress) {
        builder.setExact(MatchField.ARP_SHA, macSrc);
        builder.setExact(MatchField.ARP_THA, macDst);
        matchFieldCount += 2;
    }
    Match match = builder.build();
    assertThat(Iterables.size(match.getMatchFields()), is(matchFieldCount));
    for (MatchField<?> matchField: match.getMatchFields()) {
        switch (matchField.id) {
        case ETH_TYPE:
            EthType ethType = match.get((MatchField<EthType>) matchField);
            assertThat(ethType, is(EthType.ARP));
            break;
        case ARP_OP:
            ArpOpcode opcode = match.get((MatchField<ArpOpcode>) matchField);
            assertThat(opcode, is(ArpOpcode.REPLY));
            break;
        case ARP_SHA:
            MacAddress mac = match.get((MatchField<MacAddress>) matchField);
            assertThat(mac, is(macSrc));
            break;
        case ARP_THA:
            mac = match.get((MatchField<MacAddress>) matchField);
            assertThat(mac, is(macDst));
            break;
        case ARP_SPA:
            IPv4Address ip = match.get((MatchField<IPv4Address>) matchField);
            assertThat(ip, is(ipSrc));
            break;
        case ARP_TPA:
            ip = match.get((MatchField<IPv4Address>) matchField);
            assertThat(ip, is(ipDst));
            break;
        default:
            fail("Unexpected match field returned from iterator");
        }
    }
}