]>
Commit | Line | Data |
---|---|---|
29089a54 RL |
1 | /* |
2 | * Copyright (c) 2012 Nicira, Inc. | |
3 | * | |
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: | |
7 | * | |
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. | |
15 | */ | |
16 | ||
17 | #ifndef OFPROTO_DPIF_IPFIX_H | |
18 | #define OFPROTO_DPIF_IPFIX_H 1 | |
19 | ||
20 | #include <stddef.h> | |
21 | #include <stdint.h> | |
8b7ea2d4 WZ |
22 | #include <stdbool.h> |
23 | #include "lib/odp-util.h" | |
29089a54 RL |
24 | |
25 | struct flow; | |
cf62fa4c | 26 | struct dp_packet; |
29089a54 RL |
27 | struct ofproto_ipfix_bridge_exporter_options; |
28 | struct ofproto_ipfix_flow_exporter_options; | |
8b7ea2d4 WZ |
29 | struct flow_tnl; |
30 | struct ofport; | |
29089a54 RL |
31 | |
32 | struct dpif_ipfix *dpif_ipfix_create(void); | |
d857c8aa EJ |
33 | struct dpif_ipfix *dpif_ipfix_ref(const struct dpif_ipfix *); |
34 | void dpif_ipfix_unref(struct dpif_ipfix *); | |
35 | ||
8b7ea2d4 WZ |
36 | void dpif_ipfix_add_tunnel_port(struct dpif_ipfix *, struct ofport *, odp_port_t); |
37 | void dpif_ipfix_del_tunnel_port(struct dpif_ipfix *, odp_port_t); | |
38 | ||
29089a54 | 39 | uint32_t dpif_ipfix_get_bridge_exporter_probability(const struct dpif_ipfix *); |
8b7ea2d4 WZ |
40 | bool dpif_ipfix_get_bridge_exporter_tunnel_sampling(const struct dpif_ipfix *); |
41 | bool dpif_ipfix_get_bridge_exporter_input_sampling(const struct dpif_ipfix *); | |
42 | bool dpif_ipfix_get_bridge_exporter_output_sampling(const struct dpif_ipfix *); | |
43 | bool dpif_ipfix_get_tunnel_port(const struct dpif_ipfix *, odp_port_t); | |
29089a54 RL |
44 | void dpif_ipfix_set_options( |
45 | struct dpif_ipfix *, | |
46 | const struct ofproto_ipfix_bridge_exporter_options *, | |
47 | const struct ofproto_ipfix_flow_exporter_options *, size_t); | |
48 | ||
cf62fa4c | 49 | void dpif_ipfix_bridge_sample(struct dpif_ipfix *, const struct dp_packet *, |
8b7ea2d4 WZ |
50 | const struct flow *, |
51 | odp_port_t, odp_port_t, const struct flow_tnl *); | |
cf62fa4c | 52 | void dpif_ipfix_flow_sample(struct dpif_ipfix *, const struct dp_packet *, |
29089a54 RL |
53 | const struct flow *, uint32_t, uint16_t, uint32_t, |
54 | uint32_t); | |
55 | ||
978427a5 RL |
56 | void dpif_ipfix_run(struct dpif_ipfix *); |
57 | void dpif_ipfix_wait(struct dpif_ipfix *); | |
58 | ||
29089a54 | 59 | #endif /* ofproto/ofproto-dpif-ipfix.h */ |