blob: 4f0370646bc69b4cce96cfaf81e7fd2b9cb36179 [file] [log] [blame]
Pravin B Shelare6445712013-10-03 18:16:47 -07001/*
2 * Copyright (c) 2007-2013 Nicira, Inc.
3 *
4 * This program is free software; you can redistribute it and/or
5 * modify it under the terms of version 2 of the GNU General Public
6 * License as published by the Free Software Foundation.
7 *
8 * This program is distributed in the hope that it will be useful, but
9 * WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11 * General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program; if not, write to the Free Software
15 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
16 * 02110-1301, USA
17 */
18
19
20#ifndef FLOW_NETLINK_H
21#define FLOW_NETLINK_H 1
22
23#include <linux/kernel.h>
24#include <linux/netlink.h>
25#include <linux/openvswitch.h>
26#include <linux/spinlock.h>
27#include <linux/types.h>
28#include <linux/rcupdate.h>
29#include <linux/if_ether.h>
30#include <linux/in6.h>
31#include <linux/jiffies.h>
32#include <linux/time.h>
33#include <linux/flex_array.h>
34
35#include <net/inet_ecn.h>
36#include <net/ip_tunnels.h>
37
38#include "flow.h"
39
Joe Stringer41af73e2014-10-18 16:14:14 -070040size_t ovs_key_attr_size(void);
41
Pravin B Shelare6445712013-10-03 18:16:47 -070042void ovs_match_init(struct sw_flow_match *match,
43 struct sw_flow_key *key, struct sw_flow_mask *mask);
44
45int ovs_nla_put_flow(const struct sw_flow_key *,
46 const struct sw_flow_key *, struct sk_buff *);
Pravin B Shelar83c8df22014-09-15 19:20:31 -070047int ovs_nla_get_flow_metadata(const struct nlattr *, struct sw_flow_key *);
48
Pravin B Shelare6445712013-10-03 18:16:47 -070049int ovs_nla_get_match(struct sw_flow_match *match,
Pravin B Shelare6445712013-10-03 18:16:47 -070050 const struct nlattr *,
51 const struct nlattr *);
52
53int ovs_nla_copy_actions(const struct nlattr *attr,
Simon Horman25cd9ba2014-10-06 05:05:13 -070054 const struct sw_flow_key *key,
Pravin B Shelare6445712013-10-03 18:16:47 -070055 struct sw_flow_actions **sfa);
56int ovs_nla_put_actions(const struct nlattr *attr,
57 int len, struct sk_buff *skb);
58
59struct sw_flow_actions *ovs_nla_alloc_flow_actions(int actions_len);
60void ovs_nla_free_flow_actions(struct sw_flow_actions *);
61
62#endif /* flow_netlink.h */