~james-page/ubuntu/saucy/openvswitch/1.12-snapshot

« back to all changes in this revision

Viewing changes to lib/cfm.h

  • Committer: James Page
  • Date: 2013-08-21 10:16:57 UTC
  • mfrom: (1.1.20)
  • Revision ID: james.page@canonical.com-20130821101657-3o0z0qeiv5zkwlzi
New upstream snapshot

Show diffs side-by-side

added added

removed removed

Lines of Context:
23
23
 
24
24
struct flow;
25
25
struct ofpbuf;
 
26
struct netdev;
 
27
struct flow_wildcards;
26
28
 
27
29
#define CFM_RANDOM_VLAN UINT16_MAX
28
30
 
53
55
    uint64_t mpid;              /* The MPID of this CFM. */
54
56
    int interval;               /* The requested transmission interval. */
55
57
    bool extended;              /* Run in extended mode. */
 
58
    bool demand;                /* Run in demand mode. */
56
59
    bool opup;                  /* Operational State. */
57
60
    uint16_t ccm_vlan;          /* CCM Vlan tag. Zero if none.
58
61
                                   CFM_RANDOM_VLAN if random. */
62
65
};
63
66
 
64
67
void cfm_init(void);
65
 
struct cfm *cfm_create(const char *name);
66
 
void cfm_destroy(struct cfm *);
 
68
struct cfm *cfm_create(const struct netdev *);
 
69
struct cfm *cfm_ref(const struct cfm *);
 
70
void cfm_unref(struct cfm *);
67
71
void cfm_run(struct cfm *);
68
72
bool cfm_should_send_ccm(struct cfm *);
69
73
void cfm_compose_ccm(struct cfm *, struct ofpbuf *packet, uint8_t eth_src[6]);
70
74
void cfm_wait(struct cfm *);
71
75
bool cfm_configure(struct cfm *, const struct cfm_settings *);
72
 
bool cfm_should_process_flow(const struct cfm *cfm, const struct flow *);
 
76
void cfm_set_netdev(struct cfm *, const struct netdev *);
 
77
bool cfm_should_process_flow(const struct cfm *cfm, const struct flow *,
 
78
                             struct flow_wildcards *);
73
79
void cfm_process_heartbeat(struct cfm *, const struct ofpbuf *packet);
74
80
int cfm_get_fault(const struct cfm *);
75
81
int cfm_get_health(const struct cfm *);
76
82
int cfm_get_opup(const struct cfm *);
77
 
void cfm_get_remote_mpids(const struct cfm *, const uint64_t **rmps,
78
 
                          size_t *n_rmps);
 
83
void cfm_get_remote_mpids(const struct cfm *, uint64_t **rmps, size_t *n_rmps);
79
84
const char *cfm_fault_reason_to_str(int fault);
80
85
 
81
86
#endif /* cfm.h */