summaryrefslogtreecommitdiffstats
path: root/include/net/lwtunnel.h
diff options
context:
space:
mode:
authorRoopa Prabhu <roopa@cumulusnetworks.com>2015-07-21 04:43:49 -0400
committerDavid S. Miller <davem@davemloft.net>2015-07-21 13:39:04 -0400
commitffce41962ef64b8e685e5b621caf24bf381addd9 (patch)
treea731e4ae211389d6ab5f722177379975a918b54f /include/net/lwtunnel.h
parent19e42e45150672124b6a4341e2bc7982d247f0ac (diff)
lwtunnel: support dst output redirect function
This patch introduces lwtunnel_output function to call corresponding lwtunnels output function to xmit the packet. It adds two variants lwtunnel_output and lwtunnel_output6 for ipv4 and ipv6 respectively today. But this is subject to change when lwtstate will reside in dst or dst_metadata (as per upstream discussions). Signed-off-by: Roopa Prabhu <roopa@cumulusnetworks.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/net/lwtunnel.h')
-rw-r--r--include/net/lwtunnel.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/include/net/lwtunnel.h b/include/net/lwtunnel.h
index df24b3611ff4..918e03c1dafa 100644
--- a/include/net/lwtunnel.h
+++ b/include/net/lwtunnel.h
@@ -69,6 +69,8 @@ int lwtunnel_fill_encap(struct sk_buff *skb,
69int lwtunnel_get_encap_size(struct lwtunnel_state *lwtstate); 69int lwtunnel_get_encap_size(struct lwtunnel_state *lwtstate);
70struct lwtunnel_state *lwtunnel_state_alloc(int hdr_len); 70struct lwtunnel_state *lwtunnel_state_alloc(int hdr_len);
71int lwtunnel_cmp_encap(struct lwtunnel_state *a, struct lwtunnel_state *b); 71int lwtunnel_cmp_encap(struct lwtunnel_state *a, struct lwtunnel_state *b);
72int lwtunnel_output(struct sock *sk, struct sk_buff *skb);
73int lwtunnel_output6(struct sock *sk, struct sk_buff *skb);
72 74
73#else 75#else
74 76
@@ -127,6 +129,16 @@ static inline int lwtunnel_cmp_encap(struct lwtunnel_state *a,
127 return 0; 129 return 0;
128} 130}
129 131
132static inline int lwtunnel_output(struct sock *sk, struct sk_buff *skb)
133{
134 return -EOPNOTSUPP;
135}
136
137static inline int lwtunnel_output6(struct sock *sk, struct sk_buff *skb)
138{
139 return -EOPNOTSUPP;
140}
141
130#endif 142#endif
131 143
132#endif /* __NET_LWTUNNEL_H */ 144#endif /* __NET_LWTUNNEL_H */