]>
git.proxmox.com Git - ovs.git/blob - ofproto/netflow.h
2 * Copyright (c) 2008, 2009, 2010, 2011, 2013, 2014 Nicira, Inc.
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:
8 * http://www.apache.org/licenses/LICENSE-2.0
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.
17 #ifndef OFPROTO_NETFLOW_H
18 #define OFPROTO_NETFLOW_H 1
24 /* Default active timeout interval, in seconds.
26 * (The active timeout interval is the interval at which NetFlow records are
27 * sent for flows that do not expire, so that such flows are still
29 #define NF_ACTIVE_TIMEOUT_DEFAULT 600
31 struct netflow_options
{
32 struct sset collectors
;
39 #define NF_OUT_FLOOD OFP_PORT_C(UINT16_MAX)
40 #define NF_OUT_MULTI OFP_PORT_C(UINT16_MAX - 1)
41 #define NF_OUT_DROP OFP_PORT_C(UINT16_MAX - 2)
43 struct netflow
*netflow_create(void);
44 struct netflow
*netflow_ref(const struct netflow
*);
45 void netflow_unref(struct netflow
*);
46 bool netflow_exists(void);
48 int netflow_set_options(struct netflow
*, const struct netflow_options
*);
50 void netflow_run(struct netflow
*);
51 void netflow_wait(struct netflow
*);
53 void netflow_mask_wc(struct flow
*, struct flow_wildcards
*);
55 void netflow_flow_clear(struct netflow
*netflow
, struct flow
*flow
);
57 void netflow_flow_update(struct netflow
*nf
, const struct flow
*flow
,
58 ofp_port_t output_iface
,
59 const struct dpif_flow_stats
*);
61 #endif /* netflow.h */