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