Java 类org.projectfloodlight.openflow.protocol.OFSetConfig 实例源码

项目:fresco_floodlight    文件:OFSwitchHandshakeHandler.java   
/**
 * Send the configuration requests to tell the switch we want full
 * packets
 * @throws IOException
 */
private void sendHandshakeSetConfig() {
    // Ensure we receive the full packet via PacketIn
    // FIXME: We don't set the reassembly flags.
    OFSetConfig configSet = factory.buildSetConfig()
            .setXid(handshakeTransactionIds--)
            .setMissSendLen(0xffff)
            .build();

    // Barrier
    OFBarrierRequest barrier = factory.buildBarrierRequest()
            .setXid(handshakeTransactionIds--)
            .build();

    // Verify (need barrier?)
    OFGetConfigRequest configReq = factory.buildGetConfigRequest()
            .setXid(handshakeTransactionIds--)
            .build();
    List<OFMessage> msgList = ImmutableList.<OFMessage>of(configSet, barrier, configReq);
    mainConnection.write(msgList);
}
项目:fresco_floodlight    文件:OFSwitchHandlerTestBase.java   
/** Move the channel from scratch to WAIT_CONFIG_REPLY state
 * adds testing for beginHandshake() which moves the state from
 * InitState to WaitConfigReply.
 */
@Test
public void moveToWaitConfigReply() throws Exception {
    moveToPreConfigReply();

    List<OFMessage> msgs = connection.getMessages();
    assertEquals(3, msgs.size());
    assertEquals(OFType.SET_CONFIG, msgs.get(0).getType());
    OFSetConfig sc = (OFSetConfig)msgs.get(0);
    assertEquals(0xffff, sc.getMissSendLen());
    assertEquals(OFType.BARRIER_REQUEST, msgs.get(1).getType());
    assertEquals(OFType.GET_CONFIG_REQUEST, msgs.get(2).getType());
    verifyUniqueXids(msgs);
    msgs.clear();
    assertThat(switchHandler.getStateForTesting(), CoreMatchers.instanceOf(OFSwitchHandshakeHandler.WaitConfigReplyState.class));
    verifyAll();
}
项目:iTAP-controller    文件:OFSwitchHandshakeHandler.java   
/**
 * Send the configuration requests to tell the switch we want full
 * packets
 * @throws IOException
 */
private void sendHandshakeSetConfig() {
    // Ensure we receive the full packet via PacketIn
    // FIXME: We don't set the reassembly flags.
    OFSetConfig configSet = factory.buildSetConfig()
            .setXid(handshakeTransactionIds--)
            .setMissSendLen(0xffff)
            .build();

    // Barrier
    OFBarrierRequest barrier = factory.buildBarrierRequest()
            .setXid(handshakeTransactionIds--)
            .build();

    // Verify (need barrier?)
    OFGetConfigRequest configReq = factory.buildGetConfigRequest()
            .setXid(handshakeTransactionIds--)
            .build();
    List<OFMessage> msgList = ImmutableList.<OFMessage>of(configSet, barrier, configReq);
    mainConnection.write(msgList);
}
项目:iTAP-controller    文件:OFSwitchHandlerTestBase.java   
/** Move the channel from scratch to WAIT_CONFIG_REPLY state
 * adds testing for beginHandshake() which moves the state from
 * InitState to WaitConfigReply.
 */
@Test
public void moveToWaitConfigReply() throws Exception {
    moveToPreConfigReply();

    List<OFMessage> msgs = connection.getMessages();
    assertEquals(3, msgs.size());
    assertEquals(OFType.SET_CONFIG, msgs.get(0).getType());
    OFSetConfig sc = (OFSetConfig)msgs.get(0);
    assertEquals(0xffff, sc.getMissSendLen());
    assertEquals(OFType.BARRIER_REQUEST, msgs.get(1).getType());
    assertEquals(OFType.GET_CONFIG_REQUEST, msgs.get(2).getType());
    verifyUniqueXids(msgs);
    msgs.clear();
    assertThat(switchHandler.getStateForTesting(), CoreMatchers.instanceOf(OFSwitchHandshakeHandler.WaitConfigReplyState.class));
    verifyAll();
}
项目:SDN-Multicast    文件:OFSwitchHandshakeHandler.java   
/**
 * Send the configuration requests to tell the switch we want full
 * packets
 * @throws IOException
 */
private void sendHandshakeSetConfig() {
    // Ensure we receive the full packet via PacketIn
    // FIXME: We don't set the reassembly flags.
    OFSetConfig configSet = factory.buildSetConfig()
            .setXid(handshakeTransactionIds--)
            .setMissSendLen(0xffff)
            .build();

    // Barrier
    OFBarrierRequest barrier = factory.buildBarrierRequest()
            .setXid(handshakeTransactionIds--)
            .build();

    // Verify (need barrier?)
    OFGetConfigRequest configReq = factory.buildGetConfigRequest()
            .setXid(handshakeTransactionIds--)
            .build();
    List<OFMessage> msgList = ImmutableList.<OFMessage>of(configSet, barrier, configReq);
    mainConnection.write(msgList);
}
项目:SDN-Multicast    文件:OFSwitchHandlerTestBase.java   
/** Move the channel from scratch to WAIT_CONFIG_REPLY state
 * adds testing for beginHandshake() which moves the state from
 * InitState to WaitConfigReply.
 */
@Test
public void moveToWaitConfigReply() throws Exception {
    moveToPreConfigReply();

    List<OFMessage> msgs = connection.getMessages();
    assertEquals(3, msgs.size());
    assertEquals(OFType.SET_CONFIG, msgs.get(0).getType());
    OFSetConfig sc = (OFSetConfig)msgs.get(0);
    assertEquals(0xffff, sc.getMissSendLen());
    assertEquals(OFType.BARRIER_REQUEST, msgs.get(1).getType());
    assertEquals(OFType.GET_CONFIG_REQUEST, msgs.get(2).getType());
    verifyUniqueXids(msgs);
    msgs.clear();
    assertThat(switchHandler.getStateForTesting(), CoreMatchers.instanceOf(OFSwitchHandshakeHandler.WaitConfigReplyState.class));
    verifyAll();
}
项目:arscheduler    文件:OFSwitchHandshakeHandler.java   
/**
 * Send the configuration requests to tell the switch we want full
 * packets
 * @throws IOException
 */
private void sendHandshakeSetConfig() {
    // Ensure we receive the full packet via PacketIn
    // FIXME: We don't set the reassembly flags.
    OFSetConfig configSet = factory.buildSetConfig()
            .setXid(handshakeTransactionIds--)
            .setMissSendLen(0xffff)
            .build();

    // Barrier
    OFBarrierRequest barrier = factory.buildBarrierRequest()
            .setXid(handshakeTransactionIds--)
            .build();

    // Verify (need barrier?)
    OFGetConfigRequest configReq = factory.buildGetConfigRequest()
            .setXid(handshakeTransactionIds--)
            .build();
    List<OFMessage> msgList = ImmutableList.<OFMessage>of(configSet, barrier, configReq);
    mainConnection.write(msgList);
}
项目:arscheduler    文件:OFSwitchHandlerTestBase.java   
/** Move the channel from scratch to WAIT_CONFIG_REPLY state
 * adds testing for beginHandshake() which moves the state from
 * InitState to WaitConfigReply.
 */
@Test
public void moveToWaitConfigReply() throws Exception {
    moveToPreConfigReply();

    List<OFMessage> msgs = connection.getMessages();
    assertEquals(3, msgs.size());
    assertEquals(OFType.SET_CONFIG, msgs.get(0).getType());
    OFSetConfig sc = (OFSetConfig)msgs.get(0);
    assertEquals(0xffff, sc.getMissSendLen());
    assertEquals(OFType.BARRIER_REQUEST, msgs.get(1).getType());
    assertEquals(OFType.GET_CONFIG_REQUEST, msgs.get(2).getType());
    verifyUniqueXids(msgs);
    msgs.clear();
    assertThat(switchHandler.getStateForTesting(), CoreMatchers.instanceOf(OFSwitchHandshakeHandler.WaitConfigReplyState.class));
    verifyAll();
}
项目:floodlight1.2-delay    文件:OFSwitchHandshakeHandler.java   
/**
 * Send the configuration requests to tell the switch we want full
 * packets
 * @throws IOException
 */
private void sendHandshakeSetConfig() {
    // Ensure we receive the full packet via PacketIn
    // FIXME: We don't set the reassembly flags.
    OFSetConfig configSet = factory.buildSetConfig()
            .setXid(handshakeTransactionIds--)
            .setMissSendLen(0xffff)
            .build();

    // Barrier
    OFBarrierRequest barrier = factory.buildBarrierRequest()
            .setXid(handshakeTransactionIds--)
            .build();

    // Verify (need barrier?)
    OFGetConfigRequest configReq = factory.buildGetConfigRequest()
            .setXid(handshakeTransactionIds--)
            .build();
    List<OFMessage> msgList = ImmutableList.<OFMessage>of(configSet, barrier, configReq);
    mainConnection.write(msgList);
}
项目:floodlight1.2-delay    文件:OFSwitchHandlerTestBase.java   
/** Move the channel from scratch to WAIT_CONFIG_REPLY state
 * adds testing for beginHandshake() which moves the state from
 * InitState to WaitConfigReply.
 */
@Test
public void moveToWaitConfigReply() throws Exception {
    moveToPreConfigReply();

    List<OFMessage> msgs = connection.getMessages();
    assertEquals(3, msgs.size());
    assertEquals(OFType.SET_CONFIG, msgs.get(0).getType());
    OFSetConfig sc = (OFSetConfig)msgs.get(0);
    assertEquals(0xffff, sc.getMissSendLen());
    assertEquals(OFType.BARRIER_REQUEST, msgs.get(1).getType());
    assertEquals(OFType.GET_CONFIG_REQUEST, msgs.get(2).getType());
    verifyUniqueXids(msgs);
    msgs.clear();
    assertThat(switchHandler.getStateForTesting(), CoreMatchers.instanceOf(OFSwitchHandshakeHandler.WaitConfigReplyState.class));
    verifyAll();
}
项目:floodlight-hardware    文件:OFSwitchHandshakeHandler.java   
/**
 * Send the configuration requests to tell the switch we want full
 * packets
 * @throws IOException
 */
private void sendHandshakeSetConfig() {
    // Ensure we receive the full packet via PacketIn
    // FIXME: We don't set the reassembly flags.
    OFSetConfig configSet = factory.buildSetConfig()
            .setXid(handshakeTransactionIds--)
            .setMissSendLen(0xffff)
            .build();

    // Barrier
    OFBarrierRequest barrier = factory.buildBarrierRequest()
            .setXid(handshakeTransactionIds--)
            .build();

    // Verify (need barrier?)
    OFGetConfigRequest configReq = factory.buildGetConfigRequest()
            .setXid(handshakeTransactionIds--)
            .build();
    List<OFMessage> msgList = ImmutableList.<OFMessage>of(configSet, barrier, configReq);
    mainConnection.write(msgList);
}
项目:floodlight-hardware    文件:OFSwitchHandlerTestBase.java   
/** Move the channel from scratch to WAIT_CONFIG_REPLY state
 * adds testing for beginHandshake() which moves the state from
 * InitState to WaitConfigReply.
 */
@Test
public void moveToWaitConfigReply() throws Exception {
    moveToPreConfigReply();

    List<OFMessage> msgs = connection.getMessages();
    assertEquals(3, msgs.size());
    assertEquals(OFType.SET_CONFIG, msgs.get(0).getType());
    OFSetConfig sc = (OFSetConfig)msgs.get(0);
    assertEquals(0xffff, sc.getMissSendLen());
    assertEquals(OFType.BARRIER_REQUEST, msgs.get(1).getType());
    assertEquals(OFType.GET_CONFIG_REQUEST, msgs.get(2).getType());
    verifyUniqueXids(msgs);
    msgs.clear();
    assertThat(switchHandler.getStateForTesting(), CoreMatchers.instanceOf(OFSwitchHandshakeHandler.WaitConfigReplyState.class));
    verifyAll();
}
项目:ACAMPController    文件:OFSwitchHandshakeHandler.java   
/**
 * Send the configuration requests to tell the switch we want full
 * packets
 * @throws IOException
 */
private void sendHandshakeSetConfig() {
    // Ensure we receive the full packet via PacketIn
    // FIXME: We don't set the reassembly flags.
    OFSetConfig configSet = factory.buildSetConfig()
            .setXid(handshakeTransactionIds--)
            .setMissSendLen(0xffff)
            .build();

    // Barrier
    OFBarrierRequest barrier = factory.buildBarrierRequest()
            .setXid(handshakeTransactionIds--)
            .build();

    // Verify (need barrier?)
    OFGetConfigRequest configReq = factory.buildGetConfigRequest()
            .setXid(handshakeTransactionIds--)
            .build();
    List<OFMessage> msgList = ImmutableList.<OFMessage>of(configSet, barrier, configReq);
    mainConnection.write(msgList);
}
项目:ACAMPController    文件:OFSwitchHandlerTestBase.java   
/** Move the channel from scratch to WAIT_CONFIG_REPLY state
 * adds testing for beginHandshake() which moves the state from
 * InitState to WaitConfigReply.
 */
@Test
public void moveToWaitConfigReply() throws Exception {
    moveToPreConfigReply();

    List<OFMessage> msgs = connection.getMessages();
    assertEquals(3, msgs.size());
    assertEquals(OFType.SET_CONFIG, msgs.get(0).getType());
    OFSetConfig sc = (OFSetConfig)msgs.get(0);
    assertEquals(0xffff, sc.getMissSendLen());
    assertEquals(OFType.BARRIER_REQUEST, msgs.get(1).getType());
    assertEquals(OFType.GET_CONFIG_REQUEST, msgs.get(2).getType());
    verifyUniqueXids(msgs);
    msgs.clear();
    assertThat(switchHandler.getStateForTesting(), CoreMatchers.instanceOf(OFSwitchHandshakeHandler.WaitConfigReplyState.class));
    verifyAll();
}
项目:fast-failover-demo    文件:OFSwitchHandshakeHandler.java   
/**
 * Send the configuration requests to tell the switch we want full
 * packets
 * @throws IOException
 */
private void sendHandshakeSetConfig() {
    // Ensure we receive the full packet via PacketIn
    // FIXME: We don't set the reassembly flags.
    OFSetConfig configSet = factory.buildSetConfig()
            .setXid(handshakeTransactionIds--)
            .setMissSendLen(0xffff)
            .build();

    // Barrier
    OFBarrierRequest barrier = factory.buildBarrierRequest()
            .setXid(handshakeTransactionIds--)
            .build();

    // Verify (need barrier?)
    OFGetConfigRequest configReq = factory.buildGetConfigRequest()
            .setXid(handshakeTransactionIds--)
            .build();
    List<OFMessage> msgList = ImmutableList.<OFMessage>of(configSet, barrier, configReq);
    mainConnection.write(msgList);
}
项目:fast-failover-demo    文件:OFSwitchHandlerTestBase.java   
/** Move the channel from scratch to WAIT_CONFIG_REPLY state
 * adds testing for beginHandshake() which moves the state from
 * InitState to WaitConfigReply.
 */
@Test
public void moveToWaitConfigReply() throws Exception {
    moveToPreConfigReply();

    List<OFMessage> msgs = connection.getMessages();
    assertEquals(3, msgs.size());
    assertEquals(OFType.SET_CONFIG, msgs.get(0).getType());
    OFSetConfig sc = (OFSetConfig)msgs.get(0);
    assertEquals(0xffff, sc.getMissSendLen());
    assertEquals(OFType.BARRIER_REQUEST, msgs.get(1).getType());
    assertEquals(OFType.GET_CONFIG_REQUEST, msgs.get(2).getType());
    verifyUniqueXids(msgs);
    msgs.clear();
    assertThat(switchHandler.getStateForTesting(), CoreMatchers.instanceOf(OFSwitchHandshakeHandler.WaitConfigReplyState.class));
    verifyAll();
}
项目:floodlightLB    文件:OFSwitchHandshakeHandler.java   
/**
 * Send the configuration requests to tell the switch we want full
 * packets
 * @throws IOException
 */
private void sendHandshakeSetConfig() {
    // Ensure we receive the full packet via PacketIn
    // FIXME: We don't set the reassembly flags.
    OFSetConfig configSet = factory.buildSetConfig()
            .setXid(handshakeTransactionIds--)
            .setMissSendLen(0xffff)
            .build();

    // Barrier
    OFBarrierRequest barrier = factory.buildBarrierRequest()
            .setXid(handshakeTransactionIds--)
            .build();

    // Verify (need barrier?)
    OFGetConfigRequest configReq = factory.buildGetConfigRequest()
            .setXid(handshakeTransactionIds--)
            .build();
    List<OFMessage> msgList = ImmutableList.<OFMessage>of(configSet, barrier, configReq);
    mainConnection.write(msgList);
}
项目:floodlightLB    文件:OFSwitchHandlerTestBase.java   
/** Move the channel from scratch to WAIT_CONFIG_REPLY state
 * adds testing for beginHandshake() which moves the state from
 * InitState to WaitConfigReply.
 */
@Test
public void moveToWaitConfigReply() throws Exception {
    moveToPreConfigReply();

    List<OFMessage> msgs = connection.getMessages();
    assertEquals(3, msgs.size());
    assertEquals(OFType.SET_CONFIG, msgs.get(0).getType());
    OFSetConfig sc = (OFSetConfig)msgs.get(0);
    assertEquals(0xffff, sc.getMissSendLen());
    assertEquals(OFType.BARRIER_REQUEST, msgs.get(1).getType());
    assertEquals(OFType.GET_CONFIG_REQUEST, msgs.get(2).getType());
    verifyUniqueXids(msgs);
    msgs.clear();
    assertThat(switchHandler.getStateForTesting(), CoreMatchers.instanceOf(OFSwitchHandshakeHandler.WaitConfigReplyState.class));
    verifyAll();
}
项目:DSC    文件:OFSwitchHandshakeHandler.java   
/**
 * Send the configuration requests to tell the switch we want full
 * packets
 * @throws IOException
 */
private void sendHandshakeSetConfig() {
    // Ensure we receive the full packet via PacketIn
    // FIXME: We don't set the reassembly flags.
    OFSetConfig configSet = factory.buildSetConfig()
            .setXid(handshakeTransactionIds--)
            .setMissSendLen(0xffff)
            .build();

    // Barrier
    OFBarrierRequest barrier = factory.buildBarrierRequest()
            .setXid(handshakeTransactionIds--)
            .build();

    // Verify (need barrier?)
    OFGetConfigRequest configReq = factory.buildGetConfigRequest()
            .setXid(handshakeTransactionIds--)
            .build();
    List<OFMessage> msgList = ImmutableList.<OFMessage>of(configSet, barrier, configReq);
    mainConnection.write(msgList);
}
项目:DSC    文件:OFSwitchHandlerTestBase.java   
/** Move the channel from scratch to WAIT_CONFIG_REPLY state
 * adds testing for beginHandshake() which moves the state from
 * InitState to WaitConfigReply.
 */
@Test
public void moveToWaitConfigReply() throws Exception {
    moveToPreConfigReply();

    List<OFMessage> msgs = connection.getMessages();
    assertEquals(3, msgs.size());
    assertEquals(OFType.SET_CONFIG, msgs.get(0).getType());
    OFSetConfig sc = (OFSetConfig)msgs.get(0);
    assertEquals(0xffff, sc.getMissSendLen());
    assertEquals(OFType.BARRIER_REQUEST, msgs.get(1).getType());
    assertEquals(OFType.GET_CONFIG_REQUEST, msgs.get(2).getType());
    verifyUniqueXids(msgs);
    msgs.clear();
    assertThat(switchHandler.getStateForTesting(), CoreMatchers.instanceOf(OFSwitchHandshakeHandler.WaitConfigReplyState.class));
    verifyAll();
}
项目:floodlight    文件:OFSwitchHandshakeHandler.java   
/**
 * Send the configuration requests to tell the switch we want full
 * packets
 * @throws IOException
 */
private void sendHandshakeSetConfig() {
    // Ensure we receive the full packet via PacketIn
    // FIXME: We don't set the reassembly flags.
    OFSetConfig configSet = factory.buildSetConfig()
            .setXid(handshakeTransactionIds--)
            .setMissSendLen(0xffff)
            .build();

    // Barrier
    OFBarrierRequest barrier = factory.buildBarrierRequest()
            .setXid(handshakeTransactionIds--)
            .build();

    // Verify (need barrier?)
    OFGetConfigRequest configReq = factory.buildGetConfigRequest()
            .setXid(handshakeTransactionIds--)
            .build();
    List<OFMessage> msgList = ImmutableList.<OFMessage>of(configSet, barrier, configReq);
    mainConnection.write(msgList);
}
项目:floodlight    文件:OFSwitchHandlerTestBase.java   
/** Move the channel from scratch to WAIT_CONFIG_REPLY state
 * adds testing for beginHandshake() which moves the state from
 * InitState to WaitConfigReply.
 */
@Test
public void moveToWaitConfigReply() throws Exception {
    moveToPreConfigReply();

    List<OFMessage> msgs = connection.getMessages();
    assertEquals(3, msgs.size());
    assertEquals(OFType.SET_CONFIG, msgs.get(0).getType());
    OFSetConfig sc = (OFSetConfig)msgs.get(0);
    assertEquals(0xffff, sc.getMissSendLen());
    assertEquals(OFType.BARRIER_REQUEST, msgs.get(1).getType());
    assertEquals(OFType.GET_CONFIG_REQUEST, msgs.get(2).getType());
    verifyUniqueXids(msgs);
    msgs.clear();
    assertThat(switchHandler.getStateForTesting(), CoreMatchers.instanceOf(OFSwitchHandshakeHandler.WaitConfigReplyState.class));
    verifyAll();
}
项目:spring-open    文件:OFChannelHandlerTest.java   
/**
 * Move the channel from scratch to WAIT_CONFIG_REPLY state
 * Builds on moveToWaitFeaturesReply
 * adds testing for WAIT_FEATURES_REPLY state
 */
@Test
public void moveToWaitConfigReply() throws Exception {
    moveToWaitFeaturesReply();

    resetChannel();
    channel.write(capture(writeCapture));
    expectLastCall().andReturn(null).atLeastOnce();
    replay(channel);

    sendMessageToHandlerWithControllerReset(Collections.<OFMessage>singletonList(featuresReply));
    List<OFMessage> msgs = getMessagesFromCapture();
    assertEquals(3, msgs.size());
    assertEquals(OFType.SET_CONFIG, msgs.get(0).getType());
    OFSetConfig sc = (OFSetConfig)msgs.get(0);
    assertEquals((short)0xffff, sc.getMissSendLen());
    assertEquals(OFType.BARRIER_REQUEST, msgs.get(1).getType());
    assertEquals(OFType.GET_CONFIG_REQUEST, msgs.get(2).getType());
    verifyUniqueXids(msgs);
    assertEquals(OFChannelHandler.ChannelState.WAIT_CONFIG_REPLY,
            handler.getStateForTesting());
}
项目:athena    文件:OFChannelHandler.java   
/**
    * Send the configuration requests to tell the switch we want full
    * packets.
    * @throws IOException
    */
   private void sendHandshakeSetConfig() throws IOException {
       OFFactory factory = (ofVersion == OFVersion.OF_13) ? factory13 : factory10;
       //log.debug("Sending CONFIG_REQUEST to {}", channel.getRemoteAddress());
       List<OFMessage> msglist = new ArrayList<OFMessage>(3);

       // Ensure we receive the full packet via PacketIn
       // FIXME: We don't set the reassembly flags.
// Only send config to switches to send full packets, if they have a buffer.
       // Saves a packet & OFSetConfig can't be handled by certain switches.
       if(this.featuresReply.getNBuffers() > 0) {
           OFSetConfig sc = factory
                   .buildSetConfig()
                   .setMissSendLen((short) 0xffff)
                   .setXid(this.handshakeTransactionIds--)
                   .build();
           msglist.add(sc);
       }

       // Barrier
       OFBarrierRequest br = factory
               .buildBarrierRequest()
               .setXid(this.handshakeTransactionIds--)
               .build();
       msglist.add(br);

       // Verify (need barrier?)
       OFGetConfigRequest gcr = factory
               .buildGetConfigRequest()
               .setXid(this.handshakeTransactionIds--)
               .build();
       msglist.add(gcr);
       channel.write(msglist);
   }
项目:ravikumaran201504    文件:OFChannelHandler.java   
/**
 * Send the configuration requests to tell the switch we want full
 * packets.
 * @throws IOException
 */
private void sendHandshakeSetConfig() throws IOException {
    OFFactory factory = (ofVersion == OFVersion.OF_13) ? factory13 : factory10;
    //log.debug("Sending CONFIG_REQUEST to {}", channel.getRemoteAddress());
    List<OFMessage> msglist = new ArrayList<OFMessage>(3);

    // Ensure we receive the full packet via PacketIn
    // FIXME: We don't set the reassembly flags.
    OFSetConfig sc = factory
            .buildSetConfig()
            .setMissSendLen((short) 0xffff)
            .setXid(this.handshakeTransactionIds--)
            .build();
    msglist.add(sc);

    // Barrier
    OFBarrierRequest br = factory
            .buildBarrierRequest()
            .setXid(this.handshakeTransactionIds--)
            .build();
    msglist.add(br);

    // Verify (need barrier?)
    OFGetConfigRequest gcr = factory
            .buildGetConfigRequest()
            .setXid(this.handshakeTransactionIds--)
            .build();
    msglist.add(gcr);
    channel.write(msglist);
}
项目:spring-open    文件:OFChannelHandler.java   
/**
 * Send the configuration requests to tell the switch we want full packets
 *
 * @throws IOException
 */
private void sendHandshakeSetConfig() throws IOException {
    OFFactory factory = (ofVersion == OFVersion.OF_13) ? factory13 : factory10;
    // log.debug("Sending CONFIG_REQUEST to {}",
    // channel.getRemoteAddress());
    List<OFMessage> msglist = new ArrayList<OFMessage>(3);

    // Ensure we receive the full packet via PacketIn
    // FIXME: We don't set the reassembly flags.
    OFSetConfig sc = factory
            .buildSetConfig()
            .setMissSendLen((short) 0xffff)
            .setXid(this.handshakeTransactionIds--)
            .build();
    msglist.add(sc);

    // Barrier
    OFBarrierRequest br = factory
            .buildBarrierRequest()
            .setXid(this.handshakeTransactionIds--)
            .build();
    msglist.add(br);

    // Verify (need barrier?)
    OFGetConfigRequest gcr = factory
            .buildGetConfigRequest()
            .setXid(this.handshakeTransactionIds--)
            .build();
    msglist.add(gcr);
    channel.write(msglist);
}
项目:onos    文件:OFChannelHandler.java   
/**
 * Send the configuration requests to tell the switch we want full
 * packets.
 * @throws IOException
 */
private void sendHandshakeSetConfig() throws IOException {
    log.debug("Sending CONFIG_REQUEST to {}", channel.remoteAddress());
    List<OFMessage> msglist = new ArrayList<>(3);

    // Ensure we receive the full packet via PacketIn
    // FIXME: We don't set the reassembly flags.
    // Only send config to switches to send full packets, if they have a buffer.
    // Saves a packet & OFSetConfig can't be handled by certain switches.
    if (this.featuresReply.getNBuffers() > 0) {
        OFSetConfig sc = factory
                .buildSetConfig()
                .setMissSendLen((short) 0xffff)
                .setXid(this.handshakeTransactionIds--)
                .build();
        msglist.add(sc);
    }

    // Barrier
    OFBarrierRequest br = factory
            .buildBarrierRequest()
            .setXid(this.handshakeTransactionIds--)
            .build();
    msglist.add(br);

    // Verify (need barrier?)
    OFGetConfigRequest gcr = factory
            .buildGetConfigRequest()
            .setXid(this.handshakeTransactionIds--)
            .build();
    msglist.add(gcr);
    channel.writeAndFlush(msglist);
}
项目:onos    文件:DefaultOFSwitch.java   
@Override
public void processSetConfigMessage(Channel channel, OFMessage msg) {
    OFSetConfig ofSetConfig = (OFSetConfig) msg;
    if (missSendLen != ofSetConfig.getMissSendLen()) {
        log.trace("Changing missSendLen from {} to {}.",
                  missSendLen, ofSetConfig.getMissSendLen());
        missSendLen = ofSetConfig.getMissSendLen();
    }

    // SetConfig message is not acknowledged
}