1 /* Copyright (c) 2010, 2011 Nicira Networks.
3 * Licensed under the Apache License, Version 2.0 (the "License");
4 * you may not use this file except in compliance with the License.
5 * You may obtain a copy of the License at:
7 * http://www.apache.org/licenses/LICENSE-2.0
9 * Unless required by applicable law or agreed to in writing, software
10 * distributed under the License is distributed on an "AS IS" BASIS,
11 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 * See the License for the specific language governing permissions and
13 * limitations under the License.
22 #include "openvswitch/types.h"
28 uint16_t mpid; /* The MPID of this CFM. */
29 int interval; /* The requested transmission interval. */
31 const uint16_t *remote_mpids; /* Array of remote MPIDs */
32 size_t n_remote_mpids; /* Number of MPIDs in 'remote_mpids'. */
36 struct cfm *cfm_create(const char *name);
37 void cfm_destroy(struct cfm *);
38 void cfm_run(struct cfm *);
39 bool cfm_should_send_ccm(struct cfm *);
40 void cfm_compose_ccm(struct cfm *, struct ofpbuf *packet, uint8_t eth_src[6]);
41 void cfm_wait(struct cfm *);
42 bool cfm_configure(struct cfm *, const struct cfm_settings *);
43 bool cfm_should_process_flow(const struct flow *);
44 void cfm_process_heartbeat(struct cfm *, const struct ofpbuf *packet);
45 bool cfm_get_fault(const struct cfm *);