xref: /linux/include/net/mpls_iptunnel.h (revision e3e4712ec0961ed586a8db340bd994c4ad7f5dba)
1*e3e4712eSRoopa Prabhu /*
2*e3e4712eSRoopa Prabhu  * Copyright (c) 2015 Cumulus Networks, Inc.
3*e3e4712eSRoopa Prabhu  *
4*e3e4712eSRoopa Prabhu  * This program is free software; you can redistribute it and/or
5*e3e4712eSRoopa Prabhu  * modify it under the terms of version 2 of the GNU General Public
6*e3e4712eSRoopa Prabhu  * License as published by the Free Software Foundation.
7*e3e4712eSRoopa Prabhu  *
8*e3e4712eSRoopa Prabhu  * This program is distributed in the hope that it will be useful, but
9*e3e4712eSRoopa Prabhu  * WITHOUT ANY WARRANTY; without even the implied warranty of
10*e3e4712eSRoopa Prabhu  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11*e3e4712eSRoopa Prabhu  * General Public License for more details.
12*e3e4712eSRoopa Prabhu  */
13*e3e4712eSRoopa Prabhu 
14*e3e4712eSRoopa Prabhu #ifndef _NET_MPLS_IPTUNNEL_H
15*e3e4712eSRoopa Prabhu #define _NET_MPLS_IPTUNNEL_H 1
16*e3e4712eSRoopa Prabhu 
17*e3e4712eSRoopa Prabhu #define MAX_NEW_LABELS 2
18*e3e4712eSRoopa Prabhu 
19*e3e4712eSRoopa Prabhu struct mpls_iptunnel_encap {
20*e3e4712eSRoopa Prabhu 	u32	label[MAX_NEW_LABELS];
21*e3e4712eSRoopa Prabhu 	u32	labels;
22*e3e4712eSRoopa Prabhu };
23*e3e4712eSRoopa Prabhu 
24*e3e4712eSRoopa Prabhu static inline struct mpls_iptunnel_encap *mpls_lwtunnel_encap(struct lwtunnel_state *lwtstate)
25*e3e4712eSRoopa Prabhu {
26*e3e4712eSRoopa Prabhu 	return (struct mpls_iptunnel_encap *)lwtstate->data;
27*e3e4712eSRoopa Prabhu }
28*e3e4712eSRoopa Prabhu 
29*e3e4712eSRoopa Prabhu #endif
30