本文整理汇总了Java中org.openflow.protocol.OFFeaturesRequest类的典型用法代码示例。如果您正苦于以下问题:Java OFFeaturesRequest类的具体用法?Java OFFeaturesRequest怎么用?Java OFFeaturesRequest使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
OFFeaturesRequest类属于org.openflow.protocol包,在下文中一共展示了OFFeaturesRequest类的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: processOFFeaturesRequest
import org.openflow.protocol.OFFeaturesRequest; //导入依赖的package包/类
@Override
void processOFFeaturesRequest(final ControllerChannelHandler h,
final OFFeaturesRequest m) {
final OFFeaturesReply reply = h.sw.getFeaturesReply();
if (reply == null) {
h.log.error("OVXSwitch failed to return a featuresReply message: {}"
+ h.sw.getSwitchName());
h.channel.disconnect();
}
reply.setXid(m.getXid());
h.channel.write(Collections.singletonList(reply));
h.log.info("Connected dpid {} to controller {}",
h.sw.getSwitchName(), h.channel.getRemoteAddress());
h.sw.setConnected(true);
h.setState(ACTIVE);
}
开发者ID:CoVisor,项目名称:CoVisor,代码行数:17,代码来源:ControllerChannelHandler.java
示例2: getFeaturesReplyFromSwitch
import org.openflow.protocol.OFFeaturesRequest; //导入依赖的package包/类
@Override
public Future<OFFeaturesReply> getFeaturesReplyFromSwitch()
throws IOException {
OFMessage request = new OFFeaturesRequest();
request.setXid(getNextTransactionId());
OFFeaturesReplyFuture future =
new OFFeaturesReplyFuture(threadPool, this, request.getXid());
this.featuresFutureMap.put(request.getXid(), future);
List<OFMessage> msglist = new ArrayList<OFMessage>(1);
msglist.add(request);
this.channel.write(msglist);
return future;
}
开发者ID:vishalshubham,项目名称:Multipath-Hedera-system-in-Floodlight-controller,代码行数:14,代码来源:OFSwitchImpl.java
示例3: processOFMessage
import org.openflow.protocol.OFFeaturesRequest; //导入依赖的package包/类
@Override
void processOFMessage(final ControllerChannelHandler h,
final OFMessage m) throws IOException {
switch (m.getType()) {
case HELLO:
this.processOFHello(h, (OFHello) m);
break;
case ECHO_REPLY:
break;
case ECHO_REQUEST:
this.processOFEchoRequest(h, (OFEchoRequest) m);
break;
case FEATURES_REQUEST:
this.processOFFeaturesRequest(h, (OFFeaturesRequest) m);
break;
case BARRIER_REQUEST:
// TODO: actually implement barrier contract
final OFBarrierReply breply = new OFBarrierReply();
breply.setXid(m.getXid());
h.channel.write(Collections.singletonList(breply));
break;
case SET_CONFIG:
case ERROR:
case PACKET_OUT:
case PORT_MOD:
case QUEUE_GET_CONFIG_REQUEST:
case STATS_REQUEST:
case FLOW_MOD:
case GET_CONFIG_REQUEST:
h.sw.handleIO(m, h.channel);
break;
case VENDOR:
processOFVendor(h, (OFVendor) m);
break;
case FEATURES_REPLY:
case FLOW_REMOVED:
case PACKET_IN:
case PORT_STATUS:
case BARRIER_REPLY:
case GET_CONFIG_REPLY:
case STATS_REPLY:
case QUEUE_GET_CONFIG_REPLY:
this.illegalMessageReceived(h, m);
break;
default:
break;
}
}
开发者ID:CoVisor,项目名称:CoVisor,代码行数:51,代码来源:ControllerChannelHandler.java
注:本文中的org.openflow.protocol.OFFeaturesRequest类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论