]> git.proxmox.com Git - mirror_ovs.git/blame - ofproto/ofproto-dpif-ipfix.h
python: Fixup python shebangs to python3.
[mirror_ovs.git] / ofproto / ofproto-dpif-ipfix.h
CommitLineData
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
25struct flow;
cf62fa4c 26struct dp_packet;
29089a54
RL
27struct ofproto_ipfix_bridge_exporter_options;
28struct ofproto_ipfix_flow_exporter_options;
8b7ea2d4
WZ
29struct flow_tnl;
30struct ofport;
29089a54 31
564230b6
PS
32struct dpif_ipfix_actions {
33 bool output_action; /* Set to true if packet has at least one
34 OVS_ACTION_ATTR_OUTPUT action. */
35};
36
29089a54 37struct dpif_ipfix *dpif_ipfix_create(void);
d857c8aa
EJ
38struct dpif_ipfix *dpif_ipfix_ref(const struct dpif_ipfix *);
39void dpif_ipfix_unref(struct dpif_ipfix *);
40
cd32509e
MW
41void dpif_ipfix_add_port(struct dpif_ipfix *, struct ofport *, odp_port_t);
42void dpif_ipfix_del_port(struct dpif_ipfix *, odp_port_t);
8b7ea2d4 43
29089a54 44uint32_t dpif_ipfix_get_bridge_exporter_probability(const struct dpif_ipfix *);
8b7ea2d4
WZ
45bool dpif_ipfix_get_bridge_exporter_tunnel_sampling(const struct dpif_ipfix *);
46bool dpif_ipfix_get_bridge_exporter_input_sampling(const struct dpif_ipfix *);
47bool dpif_ipfix_get_bridge_exporter_output_sampling(const struct dpif_ipfix *);
f69f713b
BY
48bool dpif_ipfix_get_flow_exporter_tunnel_sampling(const struct dpif_ipfix *,
49 const uint32_t);
cd32509e 50bool dpif_ipfix_is_tunnel_port(const struct dpif_ipfix *, odp_port_t);
29089a54
RL
51void dpif_ipfix_set_options(
52 struct dpif_ipfix *,
53 const struct ofproto_ipfix_bridge_exporter_options *,
54 const struct ofproto_ipfix_flow_exporter_options *, size_t);
55
fb8f22c1
BY
56int dpif_ipfix_get_stats(const struct dpif_ipfix *, bool, struct ovs_list *);
57
cf62fa4c 58void dpif_ipfix_bridge_sample(struct dpif_ipfix *, const struct dp_packet *,
8b7ea2d4 59 const struct flow *,
564230b6
PS
60 odp_port_t, odp_port_t, const struct flow_tnl *,
61 const struct dpif_ipfix_actions *);
cf62fa4c 62void dpif_ipfix_flow_sample(struct dpif_ipfix *, const struct dp_packet *,
8de6ff3e
JP
63 const struct flow *,
64 const struct user_action_cookie *,
564230b6
PS
65 odp_port_t, const struct flow_tnl *,
66 const struct dpif_ipfix_actions *);
29089a54 67
978427a5
RL
68void dpif_ipfix_run(struct dpif_ipfix *);
69void dpif_ipfix_wait(struct dpif_ipfix *);
70
564230b6
PS
71void dpif_ipfix_read_actions(const struct flow *flow,
72 const struct nlattr *actions,
73 size_t actions_len,
74 struct dpif_ipfix_actions *ipfix_actions);
75
29089a54 76#endif /* ofproto/ofproto-dpif-ipfix.h */