@@ -13,6 +13,7 @@ openvswitchinclude_HEADERS = \
include/openvswitch/ofp-errors.h \
include/openvswitch/ofp-msgs.h \
include/openvswitch/ofp-parse.h \
+ include/openvswitch/ofp-print.h \
include/openvswitch/ofp-prop.h \
include/openvswitch/ofp-util.h \
include/openvswitch/packets.h \
new file mode 100644
@@ -0,0 +1,58 @@
+/*
+ * Copyright (c) 2008, 2009, 2011, 2012, 2015 Nicira, Inc.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at:
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/* OpenFlow protocol pretty-printer. */
+
+#ifndef OFP_PRINT_H
+#define OFP_PRINT_H 1
+
+#include <stdint.h>
+#include <stdio.h>
+
+struct ds;
+struct ofp10_match;
+struct ofp_flow_mod;
+struct ofp_header;
+struct ofputil_flow_stats;
+struct ofputil_table_features;
+struct ofputil_table_stats;
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+void ofp_print(FILE *, const void *, size_t, int verbosity);
+void ofp_print_packet(FILE *stream, const void *data, size_t len);
+
+void ofp10_match_print(struct ds *, const struct ofp10_match *, int verbosity);
+
+char *ofp_to_string(const void *, size_t, int verbosity);
+char *ofp10_match_to_string(const struct ofp10_match *, int verbosity);
+char *ofp_packet_to_string(const void *data, size_t len);
+
+void ofp_print_flow_stats(struct ds *, struct ofputil_flow_stats *);
+void ofp_print_version(const struct ofp_header *, struct ds *);
+void ofp_print_table_features(
+ struct ds *, const struct ofputil_table_features *features,
+ const struct ofputil_table_features *prev_features,
+ const struct ofputil_table_stats *stats,
+ const struct ofputil_table_stats *prev_stats);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* ofp-print.h */
@@ -142,7 +142,6 @@ lib_libopenvswitch_la_SOURCES = \
lib/ofp-msgs.c \
lib/ofp-parse.c \
lib/ofp-print.c \
- lib/ofp-print.h \
lib/ofp-prop.c \
lib/ofp-util.c \
lib/ofp-version-opt.h \
@@ -39,21 +39,22 @@
#include "dpif.h"
#include "dpif-provider.h"
#include "dummy.h"
-#include "openvswitch/dynamic-string.h"
#include "fat-rwlock.h"
#include "flow.h"
#include "hmapx.h"
#include "latch.h"
-#include "openvswitch/list.h"
-#include "openvswitch/match.h"
#include "netdev.h"
#include "netdev-dpdk.h"
#include "netdev-vport.h"
#include "netlink.h"
#include "odp-execute.h"
#include "odp-util.h"
-#include "ofp-print.h"
+#include "openvswitch/dynamic-string.h"
+#include "openvswitch/list.h"
+#include "openvswitch/match.h"
+#include "openvswitch/ofp-print.h"
#include "openvswitch/ofpbuf.h"
+#include "openvswitch/vlog.h"
#include "ovs-numa.h"
#include "ovs-rcu.h"
#include "packets.h"
@@ -69,8 +70,6 @@
#include "unixctl.h"
#include "util.h"
-#include "openvswitch/vlog.h"
-
VLOG_DEFINE_THIS_MODULE(dpif_netdev);
#define FLOW_DUMP_MAX_BATCH 50
@@ -33,7 +33,7 @@
#include "netlink.h"
#include "odp-execute.h"
#include "odp-util.h"
-#include "ofp-print.h"
+#include "openvswitch/ofp-print.h"
#include "openvswitch/ofp-util.h"
#include "openvswitch/ofpbuf.h"
#include "packets.h"
@@ -29,11 +29,11 @@
#include "flow.h"
#include "hmap.h"
#include "mac-learning.h"
-#include "ofp-print.h"
#include "openflow/openflow.h"
#include "openvswitch/ofp-actions.h"
#include "openvswitch/ofp-errors.h"
#include "openvswitch/ofp-msgs.h"
+#include "openvswitch/ofp-print.h"
#include "openvswitch/ofp-util.h"
#include "openvswitch/ofp-parse.h"
#include "openvswitch/ofpbuf.h"
@@ -34,12 +34,13 @@
#include "dp-packet.h"
#include "dpif-netdev.h"
#include "fatal-signal.h"
-#include "openvswitch/list.h"
#include "netdev-dpdk.h"
#include "netdev-provider.h"
#include "netdev-vport.h"
#include "odp-util.h"
-#include "ofp-print.h"
+#include "openvswitch/list.h"
+#include "openvswitch/ofp-print.h"
+#include "openvswitch/vlog.h"
#include "ovs-numa.h"
#include "ovs-thread.h"
#include "ovs-rcu.h"
@@ -50,7 +51,6 @@
#include "unaligned.h"
#include "timeval.h"
#include "unixctl.h"
-#include "openvswitch/vlog.h"
#include "rte_config.h"
#include "rte_mbuf.h"
@@ -22,14 +22,15 @@
#include "dp-packet.h"
#include "dpif-netdev.h"
-#include "openvswitch/dynamic-string.h"
#include "flow.h"
-#include "openvswitch/list.h"
#include "netdev-provider.h"
#include "netdev-vport.h"
#include "odp-util.h"
-#include "ofp-print.h"
+#include "openvswitch/dynamic-string.h"
+#include "openvswitch/list.h"
+#include "openvswitch/ofp-print.h"
#include "openvswitch/ofpbuf.h"
+#include "openvswitch/vlog.h"
#include "ovs-atomic.h"
#include "packets.h"
#include "pcap-file.h"
@@ -41,7 +42,6 @@
#include "timeval.h"
#include "unixctl.h"
#include "reconnect.h"
-#include "openvswitch/vlog.h"
VLOG_DEFINE_THIS_MODULE(netdev_dummy);
@@ -15,7 +15,6 @@
*/
#include <config.h>
-#include "ofp-print.h"
#include <errno.h>
#include <inttypes.h>
@@ -30,11 +29,13 @@
#include "byte-order.h"
#include "colors.h"
#include "compiler.h"
+#include "dp-packet.h"
#include "flow.h"
#include "learn.h"
#include "multipath.h"
#include "netdev.h"
#include "nx-match.h"
+#include "odp-util.h"
#include "openflow/nicira-ext.h"
#include "openflow/openflow.h"
#include "openvswitch/dynamic-string.h"
@@ -42,13 +43,12 @@
#include "openvswitch/ofp-actions.h"
#include "openvswitch/ofp-errors.h"
#include "openvswitch/ofp-msgs.h"
+#include "openvswitch/ofp-print.h"
#include "openvswitch/ofp-util.h"
#include "openvswitch/ofpbuf.h"
#include "openvswitch/type-props.h"
#include "packets.h"
-#include "dp-packet.h"
#include "unaligned.h"
-#include "odp-util.h"
#include "util.h"
#include "uuid.h"
deleted file mode 100644
@@ -1,58 +0,0 @@
-/*
- * Copyright (c) 2008, 2009, 2011, 2012, 2015 Nicira, Inc.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at:
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-/* OpenFlow protocol pretty-printer. */
-
-#ifndef OFP_PRINT_H
-#define OFP_PRINT_H 1
-
-#include <stdint.h>
-#include <stdio.h>
-
-struct ds;
-struct ofp10_match;
-struct ofp_flow_mod;
-struct ofp_header;
-struct ofputil_flow_stats;
-struct ofputil_table_features;
-struct ofputil_table_stats;
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-void ofp_print(FILE *, const void *, size_t, int verbosity);
-void ofp_print_packet(FILE *stream, const void *data, size_t len);
-
-void ofp10_match_print(struct ds *, const struct ofp10_match *, int verbosity);
-
-char *ofp_to_string(const void *, size_t, int verbosity);
-char *ofp10_match_to_string(const struct ofp10_match *, int verbosity);
-char *ofp_packet_to_string(const void *data, size_t len);
-
-void ofp_print_flow_stats(struct ds *, struct ofputil_flow_stats *);
-void ofp_print_version(const struct ofp_header *, struct ds *);
-void ofp_print_table_features(
- struct ds *, const struct ofputil_table_features *features,
- const struct ofputil_table_features *prev_features,
- const struct ofputil_table_stats *stats,
- const struct ofputil_table_stats *prev_stats);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* ofp-print.h */
@@ -15,7 +15,6 @@
*/
#include <config.h>
-#include "ofp-print.h"
#include <ctype.h>
#include <errno.h>
#include <inttypes.h>
@@ -23,6 +22,7 @@
#include <netinet/in.h>
#include <netinet/icmp6.h>
#include <stdlib.h>
+#include "bitmap.h"
#include "bundle.h"
#include "byte-order.h"
#include "classifier.h"
@@ -37,6 +37,7 @@
#include "openvswitch/ofp-actions.h"
#include "openvswitch/ofp-errors.h"
#include "openvswitch/ofp-msgs.h"
+#include "openvswitch/ofp-print.h"
#include "openvswitch/ofp-prop.h"
#include "openvswitch/ofp-util.h"
#include "openvswitch/ofpbuf.h"
@@ -47,7 +48,6 @@
#include "random.h"
#include "tun-metadata.h"
#include "unaligned.h"
-#include "bitmap.h"
#include "uuid.h"
VLOG_DEFINE_THIS_MODULE(ofp_util);
@@ -23,21 +23,21 @@
#include <stdlib.h>
#include <string.h>
#include "coverage.h"
-#include "openvswitch/dynamic-string.h"
#include "fatal-signal.h"
#include "flow.h"
#include "jsonrpc.h"
-#include "ofp-print.h"
-#include "openvswitch/ofpbuf.h"
#include "openflow/nicira-ext.h"
#include "openflow/openflow.h"
+#include "openvswitch/dynamic-string.h"
+#include "openvswitch/ofp-print.h"
+#include "openvswitch/ofpbuf.h"
+#include "openvswitch/vlog.h"
#include "ovs-thread.h"
#include "packets.h"
#include "poll-loop.h"
#include "random.h"
#include "socket-util.h"
#include "util.h"
-#include "openvswitch/vlog.h"
VLOG_DEFINE_THIS_MODULE(stream);
@@ -25,12 +25,12 @@
#include "coverage.h"
#include "fatal-signal.h"
#include "flow.h"
-#include "ofp-print.h"
#include "openflow/nicira-ext.h"
#include "openflow/openflow.h"
#include "openvswitch/dynamic-string.h"
#include "openvswitch/ofp-errors.h"
#include "openvswitch/ofp-msgs.h"
+#include "openvswitch/ofp-print.h"
#include "openvswitch/ofp-util.h"
#include "openvswitch/ofpbuf.h"
#include "openvswitch/vlog.h"
@@ -40,7 +40,6 @@
#include "nx-match.h"
#include "odp-util.h"
#include "odp-execute.h"
-#include "ofp-print.h"
#include "ofproto/ofproto-dpif.h"
#include "ofproto/ofproto-provider.h"
#include "ofproto-dpif-ipfix.h"
@@ -54,6 +53,7 @@
#include "openvswitch/dynamic-string.h"
#include "openvswitch/meta-flow.h"
#include "openvswitch/ofp-parse.h"
+#include "openvswitch/ofp-print.h"
#include "openvswitch/ofp-util.h"
#include "openvswitch/ofpbuf.h"
#include "openvswitch/vlog.h"
@@ -34,7 +34,6 @@
#include "hmap.h"
#include "netdev.h"
#include "nx-match.h"
-#include "ofp-print.h"
#include "ofproto.h"
#include "ofproto-provider.h"
#include "openflow/nicira-ext.h"
@@ -44,6 +43,7 @@
#include "openvswitch/ofp-actions.h"
#include "openvswitch/ofp-errors.h"
#include "openvswitch/ofp-msgs.h"
+#include "openvswitch/ofp-print.h"
#include "openvswitch/ofp-util.h"
#include "openvswitch/ofpbuf.h"
#include "openvswitch/vlog.h"
@@ -19,12 +19,12 @@
#include "hash.h"
#include "hmap.h"
#include "ofctrl.h"
-#include "ofp-print.h"
#include "openflow/openflow.h"
#include "openvswitch/dynamic-string.h"
#include "openvswitch/match.h"
#include "openvswitch/ofp-actions.h"
#include "openvswitch/ofp-msgs.h"
+#include "openvswitch/ofp-print.h"
#include "openvswitch/ofp-util.h"
#include "openvswitch/ofpbuf.h"
#include "openvswitch/vlog.h"
@@ -22,9 +22,9 @@
#include "dp-packet.h"
#include "flow.h"
#include "lport.h"
-#include "ofp-print.h"
#include "openvswitch/ofp-actions.h"
#include "openvswitch/ofp-msgs.h"
+#include "openvswitch/ofp-print.h"
#include "openvswitch/ofp-util.h"
#include "openvswitch/vlog.h"
#include "ovn-controller.h"
@@ -22,16 +22,16 @@
#include <stdlib.h>
#include <string.h>
#include "classifier.h"
-#include "openvswitch/ofpbuf.h"
-#include "ofp-print.h"
-#include "openvswitch/ofp-util.h"
#include "openflow/openflow.h"
+#include "openvswitch/ofp-print.h"
+#include "openvswitch/ofp-util.h"
+#include "openvswitch/ofpbuf.h"
+#include "openvswitch/vlog.h"
#include "ovstest.h"
#include "dp-packet.h"
#include "pcap-file.h"
#include "timeval.h"
#include "util.h"
-#include "openvswitch/vlog.h"
static void
test_flows_main(int argc OVS_UNUSED, char *argv[] OVS_UNUSED)
@@ -93,7 +93,7 @@
+
+#include "interface.h"
+#include "openflow/openflow.h"
-+#include "../../lib/ofp-print.h"
++#include "openvswitch/ofp-print.h"
+
+void
+openflow_print(const u_char *sp, u_int length)
@@ -40,7 +40,6 @@
#include "fatal-signal.h"
#include "nx-match.h"
#include "odp-util.h"
-#include "ofp-print.h"
#include "ofp-version-opt.h"
#include "ofproto/ofproto.h"
#include "openflow/nicira-ext.h"
@@ -50,6 +49,7 @@
#include "openvswitch/ofp-actions.h"
#include "openvswitch/ofp-errors.h"
#include "openvswitch/ofp-msgs.h"
+#include "openvswitch/ofp-print.h"
#include "openvswitch/ofp-util.h"
#include "openvswitch/ofp-parse.h"
#include "openvswitch/ofpbuf.h"
@@ -28,28 +28,31 @@
#include "daemon.h"
#include "dirs.h"
#include "dpif.h"
-#include "openvswitch/dynamic-string.h"
#include "hash.h"
#include "hmap.h"
#include "hmapx.h"
+#include "if-notifier.h"
#include "jsonrpc.h"
#include "lacp.h"
-#include "openvswitch/list.h"
-#include "ovs-lldp.h"
#include "mac-learning.h"
#include "mcast-snooping.h"
-#include "openvswitch/meta-flow.h"
#include "netdev.h"
#include "nx-match.h"
-#include "ofp-print.h"
-#include "openvswitch/ofp-util.h"
-#include "openvswitch/ofpbuf.h"
#include "ofproto/bond.h"
#include "ofproto/ofproto.h"
+#include "openvswitch/dynamic-string.h"
+#include "openvswitch/list.h"
+#include "openvswitch/meta-flow.h"
+#include "openvswitch/ofp-print.h"
+#include "openvswitch/ofp-util.h"
+#include "openvswitch/ofpbuf.h"
+#include "openvswitch/vlog.h"
+#include "ovs-lldp.h"
#include "ovs-numa.h"
+#include "packets.h"
#include "poll-loop.h"
-#include "if-notifier.h"
#include "seq.h"
+#include "sflow_api.h"
#include "sha1.h"
#include "shash.h"
#include "smap.h"
@@ -64,10 +67,7 @@
#include "vlandev.h"
#include "lib/vswitch-idl.h"
#include "xenserver.h"
-#include "openvswitch/vlog.h"
-#include "sflow_api.h"
#include "vlan-bitmap.h"
-#include "packets.h"
VLOG_DEFINE_THIS_MODULE(bridge);