summaryrefslogtreecommitdiff
path: root/lib/cfm.h
diff options
context:
space:
mode:
authorEthan Jackson <ethan@nicira.com>2011-05-13 15:37:23 -0700
committerEthan Jackson <ethan@nicira.com>2011-05-20 15:53:29 -0700
commita56104575c4db202bfc5db3079ea969820d77867 (patch)
tree8ee998e14012194079002e139c92ab7e37f2f99b /lib/cfm.h
parent93b8df3853659238df58b1e1e69a0c5608e208f8 (diff)
downloadopenvswitch-a56104575c4db202bfc5db3079ea969820d77867.tar.gz
cfm: Cleanup CFM module interface.
This patch makes the CFM module interface a bit more like the LACP module interface. In my opinion it's much cleaner.
Diffstat (limited to 'lib/cfm.h')
-rw-r--r--lib/cfm.h16
1 files changed, 6 insertions, 10 deletions
diff --git a/lib/cfm.h b/lib/cfm.h
index 5472cda67..02f50d5fd 100644
--- a/lib/cfm.h
+++ b/lib/cfm.h
@@ -47,17 +47,13 @@ struct ccm {
} __attribute__((packed));
BUILD_ASSERT_DECL(CCM_LEN == sizeof(struct ccm));
-/* A 'cfm' represent a local Maintenance Point (MP) and its Connectivity Fault
- * Management (CFM) state machine. Its configuration variables should be set
- * by clients of the CFM library. */
-struct cfm {
- /* Configuration Variables. */
+struct cfm_settings {
uint16_t mpid; /* The MPID of this CFM. */
int interval; /* The requested transmission interval. */
const char *name; /* Name of this CFM object. */
- /* Statistics. */
- bool fault; /* Indicates connectivity vaults. */
+ const uint16_t *remote_mpids; /* Array of remote MPIDs */
+ size_t n_remote_mpids; /* Number of MPIDs in 'remote_mpids'. */
};
void cfm_init(void);
@@ -74,12 +70,12 @@ void cfm_compose_ccm(struct cfm *, struct ccm *);
void cfm_wait(struct cfm *);
-bool cfm_configure(struct cfm *);
-
-void cfm_update_remote_mps(struct cfm *, const uint16_t *mpid, size_t n_mpids);
+bool cfm_configure(struct cfm *, const struct cfm_settings *);
bool cfm_should_process_flow(const struct flow *);
void cfm_process_heartbeat(struct cfm *, const struct ofpbuf *packet);
+bool cfm_get_fault(const struct cfm *);
+
#endif /* cfm.h */