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
lib: simplify flow_extract() API
[sliver-openvswitch.git]
/
utilities
/
ovs-ofctl.c
diff --git
a/utilities/ovs-ofctl.c
b/utilities/ovs-ofctl.c
index
4ab9ca4
..
e62e646
100644
(file)
--- a/
utilities/ovs-ofctl.c
+++ b/
utilities/ovs-ofctl.c
@@
-1864,12
+1864,13
@@
ofctl_ofp_parse_pcap(int argc OVS_UNUSED, char *argv[])
struct ofpbuf *packet;
long long int when;
struct flow flow;
struct ofpbuf *packet;
long long int when;
struct flow flow;
+ const struct pkt_metadata md = PKT_METADATA_INITIALIZER(ODPP_NONE);
error = ovs_pcap_read(file, &packet, &when);
if (error) {
break;
}
error = ovs_pcap_read(file, &packet, &when);
if (error) {
break;
}
- flow_extract(packet,
0, 0, NULL, NULL
, &flow);
+ flow_extract(packet,
&md
, &flow);
if (flow.dl_type == htons(ETH_TYPE_IP)
&& flow.nw_proto == IPPROTO_TCP
&& (is_openflow_port(flow.tp_src, argv + 2) ||
if (flow.dl_type == htons(ETH_TYPE_IP)
&& flow.nw_proto == IPPROTO_TCP
&& (is_openflow_port(flow.tp_src, argv + 2) ||
@@
-3208,6
+3209,7
@@
ofctl_parse_pcap(int argc OVS_UNUSED, char *argv[])
for (;;) {
struct ofpbuf *packet;
struct flow flow;
for (;;) {
struct ofpbuf *packet;
struct flow flow;
+ const struct pkt_metadata md = PKT_METADATA_INITIALIZER(ODPP_NONE);
int error;
error = ovs_pcap_read(pcap, &packet, NULL);
int error;
error = ovs_pcap_read(pcap, &packet, NULL);
@@
-3217,7
+3219,7
@@
ofctl_parse_pcap(int argc OVS_UNUSED, char *argv[])
ovs_fatal(error, "%s: read failed", argv[1]);
}
ovs_fatal(error, "%s: read failed", argv[1]);
}
- flow_extract(packet,
0, 0, NULL, NULL
, &flow);
+ flow_extract(packet,
&md
, &flow);
flow_print(stdout, &flow);
putchar('\n');
ofpbuf_delete(packet);
flow_print(stdout, &flow);
putchar('\n');
ofpbuf_delete(packet);