コード例 #1
0
  private static OFPortDesc portDesc(int port) {
    OFPortDesc.Builder builder = OFFactoryVer10.INSTANCE.buildPortDesc();
    builder.setPortNo(OFPort.of(port));

    return builder.build();
  }
コード例 #2
0
  private OFPortDesc portDesc(PortNumber port) {
    OFPortDesc.Builder builder = OFFactoryVer10.INSTANCE.buildPortDesc();
    builder.setPortNo(OFPort.of((int) port.toLong()));

    return builder.build();
  }