git://git.onelab.eu
/
sliver-openvswitch.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Prepare for post-2.2.0 (2.2.90).
[sliver-openvswitch.git]
/
lib
/
ofp-print.c
diff --git
a/lib/ofp-print.c
b/lib/ofp-print.c
index
7e0963c
..
9091b1b
100644
(file)
--- a/
lib/ofp-print.c
+++ b/
lib/ofp-print.c
@@
-68,17
+68,18
@@
ofp_packet_to_string(const void *data, size_t len)
flow_extract(&buf, &md, &flow);
flow_format(&ds, &flow);
flow_extract(&buf, &md, &flow);
flow_format(&ds, &flow);
- l4_size = ofpbuf_
get_
l4_size(&buf);
+ l4_size = ofpbuf_l4_size(&buf);
if (flow.nw_proto == IPPROTO_TCP && l4_size >= TCP_HEADER_LEN) {
if (flow.nw_proto == IPPROTO_TCP && l4_size >= TCP_HEADER_LEN) {
- struct tcp_header *th = ofpbuf_
get_
l4(&buf);
+ struct tcp_header *th = ofpbuf_l4(&buf);
ds_put_format(&ds, " tcp_csum:%"PRIx16, ntohs(th->tcp_csum));
} else if (flow.nw_proto == IPPROTO_UDP && l4_size >= UDP_HEADER_LEN) {
ds_put_format(&ds, " tcp_csum:%"PRIx16, ntohs(th->tcp_csum));
} else if (flow.nw_proto == IPPROTO_UDP && l4_size >= UDP_HEADER_LEN) {
- struct udp_header *uh = ofpbuf_
get_
l4(&buf);
+ struct udp_header *uh = ofpbuf_l4(&buf);
ds_put_format(&ds, " udp_csum:%"PRIx16, ntohs(uh->udp_csum));
} else if (flow.nw_proto == IPPROTO_SCTP && l4_size >= SCTP_HEADER_LEN) {
ds_put_format(&ds, " udp_csum:%"PRIx16, ntohs(uh->udp_csum));
} else if (flow.nw_proto == IPPROTO_SCTP && l4_size >= SCTP_HEADER_LEN) {
- struct sctp_header *sh = ofpbuf_get_l4(&buf);
- ds_put_format(&ds, " sctp_csum:%"PRIx32, ntohl(sh->sctp_csum));
+ struct sctp_header *sh = ofpbuf_l4(&buf);
+ ds_put_format(&ds, " sctp_csum:%"PRIx32,
+ ntohl(get_16aligned_be32(&sh->sctp_csum)));
}
ds_put_char(&ds, '\n');
}
ds_put_char(&ds, '\n');
@@
-742,6
+743,12
@@
ofp_print_flow_flags(struct ds *s, enum ofputil_flow_mod_flags flags)
if (flags & OFPUTIL_FF_NO_BYT_COUNTS) {
ds_put_cstr(s, "no_byte_counts ");
}
if (flags & OFPUTIL_FF_NO_BYT_COUNTS) {
ds_put_cstr(s, "no_byte_counts ");
}
+ if (flags & OFPUTIL_FF_HIDDEN_FIELDS) {
+ ds_put_cstr(s, "allow_hidden_fields ");
+ }
+ if (flags & OFPUTIL_FF_NO_READONLY) {
+ ds_put_cstr(s, "no_readonly_table ");
+ }
}
static void
}
static void
@@
-1367,6
+1374,7
@@
ofp_print_error_msg(struct ds *string, const struct ofp_header *oh)
ds_put_cstr(string, s);
free(s);
}
ds_put_cstr(string, s);
free(s);
}
+ ofpbuf_uninit(&payload);
}
static void
}
static void