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