本文整理汇总了Java中org.projectfloodlight.openflow.protocol.OFGetConfigRequest类的典型用法代码示例。如果您正苦于以下问题:Java OFGetConfigRequest类的具体用法?Java OFGetConfigRequest怎么用?Java OFGetConfigRequest使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
OFGetConfigRequest类属于org.projectfloodlight.openflow.protocol包,在下文中一共展示了OFGetConfigRequest类的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: sendHandshakeSetConfig
import org.projectfloodlight.openflow.protocol.OFGetConfigRequest; //导入依赖的package包/类
/**
* 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);
}
示例2: sendHandshakeSetConfig
import org.projectfloodlight.openflow.protocol.OFGetConfigRequest; //导入依赖的package包/类
/**
* 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);
}
示例3: sendHandshakeSetConfig
import org.projectfloodlight.openflow.protocol.OFGetConfigRequest; //导入依赖的package包/类
/**
* 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);
}
示例4: sendHandshakeSetConfig
import org.projectfloodlight.openflow.protocol.OFGetConfigRequest; //导入依赖的package包/类
/**
* 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);
}
示例5: sendHandshakeSetConfig
import org.projectfloodlight.openflow.protocol.OFGetConfigRequest; //导入依赖的package包/类
/**
* 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);
}