X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;ds=sidebyside;f=lib%2Fofp-util.c;h=d91fbb11fe1e287a2bd6c9bd5128e6f467b2ceab;hb=b0421aa20c401c8503946a102428d0a4adb976f9;hp=e42abc50f9a630135a956042e3ba425069661fe5;hpb=ebb57021a9827b59997a00defc32bf761bc16148;p=openvswitch diff --git a/lib/ofp-util.c b/lib/ofp-util.c index e42abc50..d91fbb11 100644 --- a/lib/ofp-util.c +++ b/lib/ofp-util.c @@ -1863,6 +1863,19 @@ make_echo_reply(const struct ofp_header *rq) return out; } +/* Converts the members of 'opp' from host to network byte order. */ +void +hton_ofp_phy_port(struct ofp_phy_port *opp) +{ + opp->port_no = htons(opp->port_no); + opp->config = htonl(opp->config); + opp->state = htonl(opp->state); + opp->curr = htonl(opp->curr); + opp->advertised = htonl(opp->advertised); + opp->supported = htonl(opp->supported); + opp->peer = htonl(opp->peer); +} + const struct ofp_flow_stats * flow_stats_first(struct flow_stats_iterator *iter, const struct ofp_stats_reply *osr)