+/**
+ * Match client and OST server connection feature flags.
+ *
+ * Compute the compatibility flags for a connection request based on
+ * features mutually supported by client and server.
+ *
+ * The obd_export::exp_connect_data.ocd_connect_flags field in \a exp
+ * must not be updated here, otherwise a partially initialized value may
+ * be exposed. After the connection request is successfully processed,
+ * the top-level tgt_connect() request handler atomically updates the export
+ * connect flags from the obd_connect_data::ocd_connect_flags field of the
+ * reply. \see tgt_connect().
+ *
+ * \param[in] env execution environment
+ * \param[in] exp the obd_export associated with this
+ * client/target pair
+ * \param[in] data stores data for this connect request
+ * \param[in] new_connection is this connection new or not
+ *
+ * \retval 0 if success
+ * \retval -EPROTO client and server feature requirements are
+ * incompatible
+ * \retval -EBADF OST index in connect request doesn't match
+ * real OST index
+ */