struct flow flow;
ofpbuf_use_const(&buf, data, len);
- flow_extract(&buf, 0, 0, NULL, 0, &flow);
+ flow_extract(&buf, 0, 0, NULL, NULL, &flow);
flow_format(&ds, &flow);
if (buf.l7) {
{
const struct ofputil_phy_port *a = a_;
const struct ofputil_phy_port *b = b_;
- uint16_t ap = a->port_no;
- uint16_t bp = b->port_no;
+ uint16_t ap = ofp_to_u16(a->port_no);
+ uint16_t bp = ofp_to_u16(b->port_no);
return ap < bp ? -1 : ap > bp;
}
static void
print_wild_port(struct ds *string, const char *leader, int is_wild,
- int verbosity, uint16_t port)
+ int verbosity, ofp_port_t port)
{
if (is_wild && verbosity < 2) {
return;
}
}
print_wild_port(&f, "in_port=", w & OFPFW10_IN_PORT, verbosity,
- ntohs(om->in_port));
+ u16_to_ofp(ntohs(om->in_port)));
print_wild(&f, "dl_vlan=", w & OFPFW10_DL_VLAN, verbosity,
"%d", ntohs(om->dl_vlan));
print_wild(&f, "dl_vlan_pcp=", w & OFPFW10_DL_VLAN_PCP, verbosity,
static void
ofp_print_ofpst_port_request(struct ds *string, const struct ofp_header *oh)
{
- uint16_t ofp10_port;
+ ofp_port_t ofp10_port;
enum ofperr error;
error = ofputil_decode_port_stats_request(oh, &ofp10_port);
}
ds_put_cstr(string, " port ");
- if (ps.port_no < 10) {
+ if (ofp_to_u16(ps.port_no) < 10) {
ds_put_char(string, ' ');
}
ofputil_format_port(ps.port_no, string);