/** * Sends a role reply. * * @param role the role * @param xid the transaction ID * @param channel the channel on which to send */ private void sendRoleReply(Role role, int xid, Channel channel) { OFVendor vendor = new OFVendor(); vendor.setXid(xid); vendor.setVendor(OFNiciraVendorData.NX_VENDOR_ID); OFRoleReplyVendorData reply = new OFRoleReplyVendorData(role.toNxRole()); vendor.setVendorData(reply); vendor.setLengthU(OFVendor.MINIMUM_LENGTH + reply.getLength()); channel.write(Collections.singletonList(vendor)); }