Somehow I overlooked these in my documentation effort a while back.
| OFPPC_NO_PACKET_IN);
new_config = (port.opp.config & ~mask) | (ntohl(opm->config) & mask);
if (new_config != port.opp.config) {
- wdp_port_set_config(p->wdp, ntohs(opm->port_no), new_config);
+ error = wdp_port_set_config(p->wdp, ntohs(opm->port_no),
+ new_config);
}
if (opm->advertise) {
netdev_set_advertisements(port.netdev, ntohl(opm->advertise));
}
- error = 0;
}
wdp_port_free(&port);
int (*port_list)(const struct wdp *wdp, struct wdp_port **portsp,
size_t *n_portsp);
+ /* Updates the configuration for the port number 'port_no' within 'wdp' to
+ * 'config', which is a set of OpenFlow OFPPC_* constants in host byte
+ * order. Returns 0 if successful, otherwise an OpenFlow error code
+ * constructed with ofp_mkerr(). */
int (*port_set_config)(struct wdp *wdp, uint16_t port_no,
uint32_t config);
return error;
}
+/* Updates the configuration for the port number 'port_no' within 'wdp' to
+ * 'config', which is a set of OpenFlow OFPPC_* constants in host byte order.
+ * Returns 0 if successful, otherwise an OpenFlow error code constructed with
+ * ofp_mkerr(). */
int
wdp_port_set_config(struct wdp *wdp, uint16_t port_no, uint32_t config)
{