X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=lib%2Fcfm.h;h=02f50d5fdad667e828620dc74952c405b7cc1213;hb=a56104575c4db202bfc5db3079ea969820d77867;hp=5472cda6709c1f5996e3025c118875d35ef61d06;hpb=93b8df3853659238df58b1e1e69a0c5608e208f8;p=sliver-openvswitch.git 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 */