]>
Commit | Line | Data |
---|---|---|
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 | 27 | struct ds; |
bdcc5925 BP |
28 | struct ofp10_match; |
29 | struct ofp_flow_mod; | |
30 | struct ofp_header; | |
31 | struct ofputil_flow_stats; | |
8811fc0a BP |
32 | struct ofputil_table_features; |
33 | struct ofputil_table_stats; | |
2482b0b0 | 34 | struct dp_packet; |
064af421 BP |
35 | |
36 | #ifdef __cplusplus | |
37 | extern "C" { | |
38 | #endif | |
39 | ||
50f96b10 BP |
40 | void ofp_print(FILE *, const void *, size_t, const struct ofputil_port_map *, |
41 | int verbosity); | |
2482b0b0 JS |
42 | void ofp_print_packet(FILE *stream, const void *data, |
43 | size_t len, ovs_be32 packet_type); | |
44 | void ofp_print_dp_packet(FILE *stream, const struct dp_packet *packet); | |
064af421 | 45 | |
50f96b10 BP |
46 | void ofp10_match_print(struct ds *, const struct ofp10_match *, |
47 | const struct ofputil_port_map *, int verbosity); | |
4f2cad2c | 48 | |
50f96b10 BP |
49 | char *ofp_to_string(const void *, size_t, const struct ofputil_port_map *, |
50 | int verbosity); | |
51 | char *ofp10_match_to_string(const struct ofp10_match *, | |
52 | const struct ofputil_port_map *, int verbosity); | |
2482b0b0 JS |
53 | char *ofp_packet_to_string(const void *data, size_t len, ovs_be32 packet_type); |
54 | char *ofp_dp_packet_to_string(const struct dp_packet *packet); | |
4f2cad2c | 55 | |
bdcc5925 | 56 | void ofp_print_version(const struct ofp_header *, struct ds *); |
8811fc0a BP |
57 | void 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 |
63 | void 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 */ |