]> git.proxmox.com Git - mirror_ovs.git/blame - include/openvswitch/ofp-print.h
Support accepting and displaying port names in OVS tools.
[mirror_ovs.git] / include / openvswitch / ofp-print.h
CommitLineData
064af421 1/*
c2f4c39b 2 * Copyright (c) 2008, 2009, 2011, 2012, 2015, 2017 Nicira, Inc.
064af421 3 *
a14bc59f
BP
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at:
064af421 7 *
a14bc59f
BP
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
064af421
BP
15 */
16
17/* OpenFlow protocol pretty-printer. */
18
25d436fb
BW
19#ifndef OPENVSWITCH_OFP_PRINT_H
20#define OPENVSWITCH_OFP_PRINT_H 1
064af421
BP
21
22#include <stdint.h>
23#include <stdio.h>
24
2482b0b0
JS
25#include <openvswitch/types.h>
26
4f2cad2c 27struct ds;
bdcc5925
BP
28struct ofp10_match;
29struct ofp_flow_mod;
30struct ofp_header;
31struct ofputil_flow_stats;
8811fc0a
BP
32struct ofputil_table_features;
33struct ofputil_table_stats;
2482b0b0 34struct dp_packet;
064af421
BP
35
36#ifdef __cplusplus
37extern "C" {
38#endif
39
50f96b10
BP
40void ofp_print(FILE *, const void *, size_t, const struct ofputil_port_map *,
41 int verbosity);
2482b0b0
JS
42void ofp_print_packet(FILE *stream, const void *data,
43 size_t len, ovs_be32 packet_type);
44void ofp_print_dp_packet(FILE *stream, const struct dp_packet *packet);
064af421 45
50f96b10
BP
46void ofp10_match_print(struct ds *, const struct ofp10_match *,
47 const struct ofputil_port_map *, int verbosity);
4f2cad2c 48
50f96b10
BP
49char *ofp_to_string(const void *, size_t, const struct ofputil_port_map *,
50 int verbosity);
51char *ofp10_match_to_string(const struct ofp10_match *,
52 const struct ofputil_port_map *, int verbosity);
2482b0b0
JS
53char *ofp_packet_to_string(const void *data, size_t len, ovs_be32 packet_type);
54char *ofp_dp_packet_to_string(const struct dp_packet *packet);
4f2cad2c 55
bdcc5925 56void ofp_print_version(const struct ofp_header *, struct ds *);
8811fc0a
BP
57void ofp_print_table_features(
58 struct ds *, const struct ofputil_table_features *features,
59 const struct ofputil_table_features *prev_features,
60 const struct ofputil_table_stats *stats,
61 const struct ofputil_table_stats *prev_stats);
50f96b10
BP
62\f
63void ofp_print_flow_stats(struct ds *, const struct ofputil_flow_stats *,
64 const struct ofputil_port_map *);
bdcc5925 65
064af421
BP
66#ifdef __cplusplus
67}
68#endif
69
70#endif /* ofp-print.h */