diff options
author | Ethan Jackson <ethan@nicira.com> | 2011-05-13 15:37:23 -0700 |
---|---|---|
committer | Ethan Jackson <ethan@nicira.com> | 2011-05-20 15:53:29 -0700 |
commit | a56104575c4db202bfc5db3079ea969820d77867 (patch) | |
tree | 8ee998e14012194079002e139c92ab7e37f2f99b /lib/cfm.h | |
parent | 93b8df3853659238df58b1e1e69a0c5608e208f8 (diff) | |
download | openvswitch-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.h | 16 |
1 files changed, 6 insertions, 10 deletions
@@ -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 */ |