mirror of
https://github.com/openvswitch/ovs
synced 2025-08-31 14:25:26 +00:00
packets: Change IP_ARGS interface to take an ovs_be32 instead of a pointer.
An ovs_be32 is a more obvious way to represent an IP address than a pointer to one. It is also more type-safe, especially since "sparse" is able to check that the argument is in network byte order. Signed-off-by: Ben Pfaff <blp@nicira.com> Acked-by: Ethan Jackson <ethan@nicira.com>
This commit is contained in:
@@ -75,7 +75,7 @@ print_netflow(struct ofpbuf *buf)
|
||||
}
|
||||
|
||||
printf("seq %"PRIu32": "IP_FMT" > "IP_FMT, ntohl(hdr->flow_seq),
|
||||
IP_ARGS(&rec->src_addr), IP_ARGS(&rec->dst_addr));
|
||||
IP_ARGS(rec->src_addr), IP_ARGS(rec->dst_addr));
|
||||
|
||||
printf(", if %"PRIu16" > %"PRIu16,
|
||||
ntohs(rec->input), ntohs(rec->output));
|
||||
@@ -137,7 +137,7 @@ print_netflow(struct ofpbuf *buf)
|
||||
ntohl(rec->init_time), ntohl(rec->used_time));
|
||||
|
||||
if (rec->nexthop != htonl(0)) {
|
||||
printf(", nexthop "IP_FMT, IP_ARGS(&rec->nexthop));
|
||||
printf(", nexthop "IP_FMT, IP_ARGS(rec->nexthop));
|
||||
}
|
||||
if (rec->src_as != htons(0) || rec->dst_as != htons(0)) {
|
||||
printf(", AS %"PRIu16" > %"PRIu16,
|
||||
|
Reference in New Issue
Block a user