xref: /linux/include/net/mpls_iptunnel.h (revision 949d6b405e6160ae44baea39192d67b39cb7eeac)
15b497af4SThomas Gleixner /* SPDX-License-Identifier: GPL-2.0-only */
2e3e4712eSRoopa Prabhu /*
3e3e4712eSRoopa Prabhu  * Copyright (c) 2015 Cumulus Networks, Inc.
4e3e4712eSRoopa Prabhu  */
5e3e4712eSRoopa Prabhu 
6e3e4712eSRoopa Prabhu #ifndef _NET_MPLS_IPTUNNEL_H
7e3e4712eSRoopa Prabhu #define _NET_MPLS_IPTUNNEL_H 1
8e3e4712eSRoopa Prabhu 
9*949d6b40SJakub Kicinski #include <linux/types.h>
10*949d6b40SJakub Kicinski #include <net/lwtunnel.h>
11*949d6b40SJakub Kicinski 
12e3e4712eSRoopa Prabhu struct mpls_iptunnel_encap {
13f8efb73cSRoopa Prabhu 	u8	labels;
14a59166e4SRobert Shearman 	u8	ttl_propagate;
15a59166e4SRobert Shearman 	u8	default_ttl;
161511009cSDavid Ahern 	u8	reserved1;
17680a9316SGustavo A. R. Silva 	u32	label[];
18e3e4712eSRoopa Prabhu };
19e3e4712eSRoopa Prabhu 
20e3e4712eSRoopa Prabhu static inline struct mpls_iptunnel_encap *mpls_lwtunnel_encap(struct lwtunnel_state *lwtstate)
21e3e4712eSRoopa Prabhu {
22e3e4712eSRoopa Prabhu 	return (struct mpls_iptunnel_encap *)lwtstate->data;
23e3e4712eSRoopa Prabhu }
24e3e4712eSRoopa Prabhu 
25e3e4712eSRoopa Prabhu #endif
26