xref: /linux/include/net/mpls_iptunnel.h (revision a59166e470868d92f0813977817e99e699398af5)
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];
21f8efb73cSRoopa Prabhu 	u8	labels;
22*a59166e4SRobert Shearman 	u8	ttl_propagate;
23*a59166e4SRobert Shearman 	u8	default_ttl;
24e3e4712eSRoopa Prabhu };
25e3e4712eSRoopa Prabhu 
26e3e4712eSRoopa Prabhu static inline struct mpls_iptunnel_encap *mpls_lwtunnel_encap(struct lwtunnel_state *lwtstate)
27e3e4712eSRoopa Prabhu {
28e3e4712eSRoopa Prabhu 	return (struct mpls_iptunnel_encap *)lwtstate->data;
29e3e4712eSRoopa Prabhu }
30e3e4712eSRoopa Prabhu 
31e3e4712eSRoopa Prabhu #endif
32