+/* Gets the fault status of 'cfm'. Returns a bit mask of 'cfm_fault_reason's
+ * indicating the cause of the connectivity fault, or zero if there is no
+ * fault. */
+int
+cfm_get_fault(const struct cfm *cfm) OVS_EXCLUDED(mutex)
+{
+ int fault;
+
+ ovs_mutex_lock(&mutex);
+ fault = cfm_get_fault__(cfm);
+ ovs_mutex_unlock(&mutex);
+ return fault;
+}
+
+/* Gets the number of cfm fault flapping since start. */
+uint64_t
+cfm_get_flap_count(const struct cfm *cfm) OVS_EXCLUDED(mutex)
+{
+ uint64_t flap_count;
+ ovs_mutex_lock(&mutex);
+ flap_count = cfm->flap_count;
+ ovs_mutex_unlock(&mutex);
+ return flap_count;
+}
+
+/* Gets the health of 'cfm'. Returns an integer between 0 and 100 indicating
+ * the health of the link as a percentage of ccm frames received in
+ * CFM_HEALTH_INTERVAL * 'fault_interval' if there is only 1 remote_mpid,
+ * returns 0 if there are no remote_mpids, and returns -1 if there are more
+ * than 1 remote_mpids. */
+int
+cfm_get_health(const struct cfm *cfm) OVS_EXCLUDED(mutex)
+{
+ int health;
+
+ ovs_mutex_lock(&mutex);
+ health = cfm->health;
+ ovs_mutex_unlock(&mutex);
+ return health;
+}
+
+/* Gets the operational state of 'cfm'. 'cfm' is considered operationally down
+ * if it has received a CCM with the operationally down bit set from any of its
+ * remote maintenance points. Returns 1 if 'cfm' is operationally up, 0 if
+ * 'cfm' is operationally down, or -1 if 'cfm' has no operational state
+ * (because it isn't in extended mode). */
+int
+cfm_get_opup(const struct cfm *cfm_) OVS_EXCLUDED(mutex)
+{
+ struct cfm *cfm = CONST_CAST(struct cfm *, cfm_);
+ bool extended;
+ int opup;
+
+ ovs_mutex_lock(&mutex);
+ atomic_read(&cfm->extended, &extended);
+ opup = extended ? cfm->remote_opup : -1;
+ ovs_mutex_unlock(&mutex);
+
+ return opup;
+}
+