-/* Copyright (c) 2013, 2014, 2015, 2016 Nicira, Inc.
+/* Copyright (c) 2013, 2014, 2015, 2016, 2017 Nicira, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
ds_put_format(&ds,
"%s: %s."
- "\n\tvers:%"PRIu8" diag:\"%s\" state:%s mult:%"PRIu8
+ "\n\tvers:%d diag:\"%s\" state:%s mult:%"PRIu8
" length:%"PRIu8
"\n\tflags: %s"
"\n\tmy_disc:0x%"PRIx32" your_disc:0x%"PRIx32
/*
- * Copyright (c) 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016 Nicira, Inc.
+ * Copyright (c) 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017 Nicira, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
format_eth_masked(s, "arp_tha", f->arp_tha, wc->masks.arp_tha);
}
if (wc->masks.nw_tos & IP_DSCP_MASK) {
- ds_put_format(s, "%snw_tos=%s%"PRIu8",",
+ ds_put_format(s, "%snw_tos=%s%d,",
colors.param, colors.end, f->nw_tos & IP_DSCP_MASK);
}
if (wc->masks.nw_tos & IP_ECN_MASK) {
- ds_put_format(s, "%snw_ecn=%s%"PRIu8",",
+ ds_put_format(s, "%snw_ecn=%s%d,",
colors.param, colors.end, f->nw_tos & IP_ECN_MASK);
}
if (wc->masks.nw_ttl) {
- ds_put_format(s, "%snw_ttl=%s%"PRIu8",",
+ ds_put_format(s, "%snw_ttl=%s%d,",
colors.param, colors.end, f->nw_ttl);
}
if (wc->masks.mpls_lse[0] & htonl(MPLS_LABEL_MASK)) {
/*
- * Copyright (c) 2010, 2011, 2012, 2013, 2014, 2016 Nicira, Inc.
+ * Copyright (c) 2010, 2011, 2012, 2013, 2014, 2016, 2017 Nicira, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
algorithm = "<unknown>";
}
- ds_put_format(s, "%smultipath(%s%s,%"PRIu16",%s,%d,%"PRIu16",",
+ ds_put_format(s, "%smultipath(%s%s,%"PRIu16",%s,%d,%"PRIu32",",
colors.paren, colors.end, fields, mp->basis, algorithm,
mp->max_link + 1, mp->arg);
mf_format_subfield(&mp->dst, s);
/*
- * Copyright (c) 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016 Nicira, Inc.
+ * Copyright (c) 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017 Nicira, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
{
size_t len = nl_attr_get_size(a);
- ds_put_format(ds, "action%"PRId16, nl_attr_type(a));
+ ds_put_format(ds, "action%d", nl_attr_type(a));
if (len) {
const uint8_t *unspec;
unsigned int i;
if (userdata_len == sizeof cookie.sflow
&& cookie.type == USER_ACTION_COOKIE_SFLOW) {
ds_put_format(ds, ",sFlow("
- "vid=%"PRIu16",pcp=%"PRIu8",output=%"PRIu32")",
+ "vid=%"PRIu16",pcp=%d,output=%"PRIu32")",
vlan_tci_to_vid(cookie.sflow.vlan_tci),
vlan_tci_to_pcp(cookie.sflow.vlan_tci),
cookie.sflow.output);
l3 = eth + 1;
/* Ethernet */
- ds_put_format(ds, "header(size=%"PRIu8",type=%"PRIu8",eth(dst=",
+ ds_put_format(ds, "header(size=%"PRIu32",type=%"PRIu32",eth(dst=",
data->header_len, data->tnl_type);
ds_put_format(ds, ETH_ADDR_FMT, ETH_ADDR_ARGS(eth->eth_dst));
ds_put_format(ds, ",src=");
ipv6_format_addr(&ip6->ip6_src, ds);
ds_put_format(ds, ",dst=");
ipv6_format_addr(&ip6->ip6_dst, ds);
- ds_put_format(ds, ",label=%i,proto=%"PRIu8",tclass=0x%"PRIx8
+ ds_put_format(ds, ",label=%i,proto=%"PRIu8",tclass=0x%"PRIx32
",hlimit=%"PRIu8"),",
ntohl(ip6->ip6_flow) & IPV6_LABEL_MASK, ip6->ip6_nxt,
(ntohl(ip6->ip6_flow) >> 20) & 0xff, ip6->ip6_hlim);
&& bundle->algorithm != NX_BD_ALG_ACTIVE_BACKUP) {
VLOG_WARN_RL(&rl, "unsupported algorithm %d", (int) bundle->algorithm);
} else if (slave_type != mf_nxm_header(MFF_IN_PORT)) {
- VLOG_WARN_RL(&rl, "unsupported slave type %"PRIu16, slave_type);
+ VLOG_WARN_RL(&rl, "unsupported slave type %"PRIu32, slave_type);
} else {
error = 0;
}
if (slaves_size < bundle->n_slaves * sizeof(ovs_be16)) {
VLOG_WARN_RL(&rl, "Nicira action %s only has %"PRIuSIZE" bytes "
"allocated for slaves. %"PRIuSIZE" bytes are required "
- "for %"PRIu16" slaves.",
+ "for %u slaves.",
load ? "bundle_load" : "bundle", slaves_size,
bundle->n_slaves * sizeof(ovs_be16), bundle->n_slaves);
error = OFPERR_OFPBAC_BAD_LEN;
if (ids_size < ids->n_controllers * sizeof(ovs_be16)) {
VLOG_WARN_RL(&rl, "Nicira action dec_ttl_cnt_ids only has %"PRIuSIZE" "
"bytes allocated for controller ids. %"PRIuSIZE" bytes "
- "are required for %"PRIu16" controllers.",
+ "are required for %u controllers.",
ids_size, ids->n_controllers * sizeof(ovs_be16),
ids->n_controllers);
return OFPERR_OFPBAC_BAD_LEN;
static void
format_CONJUNCTION(const struct ofpact_conjunction *oc, struct ds *s)
{
- ds_put_format(s, "%sconjunction(%s%"PRIu32",%"PRIu8"/%"PRIu8"%s)%s",
+ ds_put_format(s, "%sconjunction(%s%"PRIu32",%d/%"PRIu8"%s)%s",
colors.paren, colors.end,
oc->id, oc->clause + 1, oc->n_clauses,
colors.paren, colors.end);
} else if (!strcmp(key, "table")) {
error = str_to_u8(value, "recirc_table", &oc->recirc_table);
if (!error && oc->recirc_table == NX_CT_RECIRC_NONE) {
- error = xasprintf("invalid table %#"PRIx16, oc->recirc_table);
+ error = xasprintf("invalid table %#"PRIx8, oc->recirc_table);
}
} else if (!strcmp(key, "zone")) {
error = str_to_u16(value, "zone", &oc->zone_imm);
ds_put_format(s, "importance:%"PRIu16" ", fm.importance);
}
if (fm.priority != OFP_DEFAULT_PRIORITY && need_priority) {
- ds_put_format(s, "pri:%"PRIu16" ", fm.priority);
+ ds_put_format(s, "pri:%d ", fm.priority);
}
if (fm.buffer_id != UINT32_MAX) {
ds_put_format(s, "buf:0x%"PRIx32" ", fm.buffer_id);
name, port32);
} else if (port32 < ofp11_to_u32(OFPP11_MAX)) {
VLOG_WARN("port %u is outside the supported range 0 through "
- "%"PRIx16" or 0x%x through 0x%"PRIx32, port32,
+ "%x or 0x%x through 0x%"PRIx32, port32,
UINT16_MAX, ofp11_to_u32(OFPP11_MAX), UINT32_MAX);
return false;
} else {
/*
- * Copyright (c) 2014, 2015, 2016 Nicira, Inc.
+ * Copyright (c) 2014, 2015, 2016, 2017 Nicira, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
if (IN6_IS_ADDR_V4MAPPED(&rt->nw_addr)) {
plen -= 96;
}
- ds_put_format(&ds, "/%"PRIu16, plen);
+ ds_put_format(&ds, "/%"PRIu8, plen);
if (rt->mark) {
ds_put_format(&ds, " MARK %"PRIu32, rt->mark);
}
if (vid) {
xlate_report_error(ctx, "dropping VLAN %"PRIu16" tagged "
"packet received on port %s configured as VLAN "
- "%"PRIu16" access port", vid, in_xbundle->name,
+ "%d access port", vid, in_xbundle->name,
in_xbundle->vlan);
return false;
}
/*
- * Copyright (c) 2011, 2012, 2013, 2014, 2015 Nicira, Inc.
+ * Copyright (c) 2011, 2012, 2013, 2014, 2015, 2017 Nicira, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
break;
case IPPROTO_ICMP:
- printf(", ICMP %"PRIu16":%"PRIu16,
+ printf(", ICMP %u:%u",
ntohs(rec->dst_port) >> 8,
ntohs(rec->dst_port) & 0xff);
if (rec->src_port != htons(0)) {
printf("%04"PRIx16"/%04"PRIx16",", vid, mask);
if (vid && vlan_tci_to_pcp(nxm_match.wc.masks.vlans[0].tci)) {
- printf("%02"PRIx8"\n",
- vlan_tci_to_pcp(nxm_match.flow.vlans[0].tci));
+ printf("%02d\n", vlan_tci_to_pcp(nxm_match.flow.vlans[0].tci));
} else {
printf("--\n");
}
/* Set Status column. */
smap_init(&smap);
- smap_add_format(&smap, "stp_port_id", STP_PORT_ID_FMT, status.port_id);
+ smap_add_format(&smap, "stp_port_id", "%d", status.port_id);
smap_add(&smap, "stp_state", stp_state_name(status.state));
smap_add_format(&smap, "stp_sec_in_state", "%u", status.sec_in_state);
smap_add(&smap, "stp_role", stp_role_name(status.role));