if ((openflow_len + sizeof(struct ofp_header)) > UINT16_MAX) {
if (net_ratelimit())
- printk("alloc_openflow_skb: openflow message too large: %d\n",
+ printk("alloc_openflow_skb: openflow message too large: %zu\n",
openflow_len);
return NULL;
}
struct nlattr *attrs[ARRAY_SIZE(openflow_policy)];
struct buffer *buffer;
struct ofp_header *oh;
- size_t ofp_len;
+ uint16_t ofp_len;
int retval;
buffer = *bufferp = NULL;
if (!dladdr(frame[1], &addrinfo) || !addrinfo.dli_sname) {
fprintf(stderr, " 0x%08"PRIxPTR"\n", (uintptr_t) frame[1]);
} else {
- fprintf(stderr, " 0x%08"PRIxPTR" (%s+0x%x)\n",
+ fprintf(stderr, " 0x%08"PRIxPTR" (%s+0x%lx)\n",
(uintptr_t) frame[1], addrinfo.dli_sname,
(char *) frame[1] - (char *) addrinfo.dli_saddr);
}
struct eth_header *eth;
if (b.size < ETH_TOTAL_MIN) {
- VLOG_WARN("packet length %d less than minimum size %d",
+ VLOG_WARN("packet length %zu less than minimum size %d",
b.size, ETH_TOTAL_MIN);
}
ofp_print_match(string, &ofe->match);
ds_put_format(string,
- " pri%d secs%d pkts%lld bytes%lld\n",
+ " pri%"PRIu16" secs%"PRIu32" pkts%"PRIu64" bytes%"PRIu64"n",
ofe->match.wildcards ? ntohs(ofe->priority) : (uint16_t)-1,
ntohl(ofe->duration), ntohll(ofe->packet_count),
ntohll(ofe->byte_count));
len, pkt->min_size);
} else if (!pkt->printer) {
if (len > sizeof *oh) {
- ds_put_format(&string, " length=%zu (decoder not implemented)\n",
+ ds_put_format(&string, " length=%"PRIu16" (decoder not implemented)\n",
ntohs(oh->length));
}
} else {
}
return errno;
} else if (n_bytes != buffer->size) {
- VLOG_WARN("send partial Ethernet packet (%d bytes of %d) on %s",
+ VLOG_WARN("send partial Ethernet packet (%d bytes of %zu) on %s",
(int) n_bytes, buffer->size, netdev->name);
return EMSGSIZE;
} else {