-
-void ofproto_port_unregister(struct ofproto *, uint32_t port_no);
-
-void ofproto_port_clear_cfm(struct ofproto *, uint32_t port_no);
-void ofproto_port_set_cfm(struct ofproto *, uint32_t port_no,
- const struct cfm *,
- const uint16_t *remote_mps, size_t n_remote_mps);
-const struct cfm *ofproto_port_get_cfm(struct ofproto *, uint32_t port_no);
-int ofproto_port_is_lacp_current(struct ofproto *, uint16_t ofp_port);
+void ofproto_port_unregister(struct ofproto *, ofp_port_t ofp_port);
+
+void ofproto_port_clear_cfm(struct ofproto *, ofp_port_t ofp_port);
+void ofproto_port_set_cfm(struct ofproto *, ofp_port_t ofp_port,
+ const struct cfm_settings *);
+void ofproto_port_set_bfd(struct ofproto *, ofp_port_t ofp_port,
+ const struct smap *cfg);
+int ofproto_port_get_bfd_status(struct ofproto *, ofp_port_t ofp_port,
+ struct smap *);
+int ofproto_port_is_lacp_current(struct ofproto *, ofp_port_t ofp_port);
+int ofproto_port_set_stp(struct ofproto *, ofp_port_t ofp_port,
+ const struct ofproto_port_stp_settings *);
+int ofproto_port_get_stp_status(struct ofproto *, ofp_port_t ofp_port,
+ struct ofproto_port_stp_status *);
+int ofproto_port_get_stp_stats(struct ofproto *, ofp_port_t ofp_port,
+ struct ofproto_port_stp_stats *);
+int ofproto_port_set_queues(struct ofproto *, ofp_port_t ofp_port,
+ const struct ofproto_port_queue *,
+ size_t n_queues);
+
+/* The behaviour of the port regarding VLAN handling */
+enum port_vlan_mode {
+ /* This port is an access port. 'vlan' is the VLAN ID. 'trunks' is
+ * ignored. */
+ PORT_VLAN_ACCESS,
+
+ /* This port is a trunk. 'trunks' is the set of trunks. 'vlan' is
+ * ignored. */
+ PORT_VLAN_TRUNK,
+
+ /* Untagged incoming packets are part of 'vlan', as are incoming packets
+ * tagged with 'vlan'. Outgoing packets tagged with 'vlan' stay tagged.
+ * Other VLANs in 'trunks' are trunked. */
+ PORT_VLAN_NATIVE_TAGGED,
+
+ /* Untagged incoming packets are part of 'vlan', as are incoming packets
+ * tagged with 'vlan'. Outgoing packets tagged with 'vlan' are untagged.
+ * Other VLANs in 'trunks' are trunked. */
+ PORT_VLAN_NATIVE_UNTAGGED
+};