+/* Configuration of bundles. */
+struct ofproto_bundle_settings {
+ char *name; /* For use in log messages. */
+
+ ofp_port_t *slaves; /* OpenFlow port numbers for slaves. */
+ size_t n_slaves;
+
+ enum port_vlan_mode vlan_mode; /* Selects mode for vlan and trunks */
+ int vlan; /* VLAN VID, except for PORT_VLAN_TRUNK. */
+ unsigned long *trunks; /* vlan_bitmap, except for PORT_VLAN_ACCESS. */
+ bool use_priority_tags; /* Use 802.1p tag for frames in VLAN 0? */
+
+ struct bond_settings *bond; /* Must be nonnull iff if n_slaves > 1. */
+
+ struct lacp_settings *lacp; /* Nonnull to enable LACP. */
+ struct lacp_slave_settings *lacp_slaves; /* Array of n_slaves elements. */
+
+ /* Linux VLAN device support (e.g. "eth0.10" for VLAN 10.)
+ *
+ * This is deprecated. It is only for compatibility with broken device
+ * drivers in old versions of Linux that do not properly support VLANs when
+ * VLAN devices are not used. When broken device drivers are no longer in
+ * widespread use, we will delete these interfaces. */
+ ofp_port_t realdev_ofp_port;/* OpenFlow port number of real device. */
+};
+
+int ofproto_bundle_register(struct ofproto *, void *aux,
+ const struct ofproto_bundle_settings *);
+int ofproto_bundle_unregister(struct ofproto *, void *aux);
+
+/* Configuration of mirrors. */
+struct ofproto_mirror_settings {
+ /* Name for log messages. */
+ char *name;
+
+ /* Bundles that select packets for mirroring upon ingress. */
+ void **srcs; /* A set of registered ofbundle handles. */
+ size_t n_srcs;
+
+ /* Bundles that select packets for mirroring upon egress. */
+ void **dsts; /* A set of registered ofbundle handles. */
+ size_t n_dsts;
+
+ /* VLANs of packets to select for mirroring. */
+ unsigned long *src_vlans; /* vlan_bitmap, NULL selects all VLANs. */
+
+ /* Output (mutually exclusive). */
+ void *out_bundle; /* A registered ofbundle handle or NULL. */
+ uint16_t out_vlan; /* Output VLAN, only if out_bundle is NULL. */
+};
+
+int ofproto_mirror_register(struct ofproto *, void *aux,
+ const struct ofproto_mirror_settings *);
+int ofproto_mirror_unregister(struct ofproto *, void *aux);
+int ofproto_mirror_get_stats(struct ofproto *, void *aux,
+ uint64_t *packets, uint64_t *bytes);
+
+int ofproto_set_flood_vlans(struct ofproto *, unsigned long *flood_vlans);
+bool ofproto_is_mirror_output_bundle(const struct ofproto *, void *aux);
+
+/* Configuration of OpenFlow tables. */
+struct ofproto_table_settings {
+ char *name; /* Name exported via OpenFlow or NULL. */
+ unsigned int max_flows; /* Maximum number of flows or UINT_MAX. */
+
+ /* These members determine the handling of an attempt to add a flow that
+ * would cause the table to have more than 'max_flows' flows.
+ *
+ * If 'groups' is NULL, overflows will be rejected with an error.
+ *
+ * If 'groups' is nonnull, an overflow will cause a flow to be removed.
+ * The flow to be removed is chosen to give fairness among groups
+ * distinguished by different values for the subfields within 'groups'. */
+ struct mf_subfield *groups;
+ size_t n_groups;
+
+ /*
+ * Fields for which prefix trie lookup is maintained.
+ */
+ unsigned int n_prefix_fields;
+ enum mf_field_id prefix_fields[CLS_MAX_TRIES];
+};
+
+int ofproto_get_n_tables(const struct ofproto *);
+uint8_t ofproto_get_n_visible_tables(const struct ofproto *);
+void ofproto_configure_table(struct ofproto *, int table_id,
+ const struct ofproto_table_settings *);