Back to home page

OSCL-LXR

 
 

    


0001 /* SPDX-License-Identifier: GPL-2.0+ WITH Linux-syscall-note */
0002 /*
0003  *  SR-IPv6 implementation
0004  *
0005  *  Author:
0006  *  David Lebrun <david.lebrun@uclouvain.be>
0007  *
0008  *
0009  *  This program is free software; you can redistribute it and/or
0010  *      modify it under the terms of the GNU General Public License
0011  *      as published by the Free Software Foundation; either version
0012  *      2 of the License, or (at your option) any later version.
0013  */
0014 
0015 #ifndef _UAPI_LINUX_SEG6_IPTUNNEL_H
0016 #define _UAPI_LINUX_SEG6_IPTUNNEL_H
0017 
0018 #include <linux/seg6.h>     /* For struct ipv6_sr_hdr. */
0019 
0020 enum {
0021     SEG6_IPTUNNEL_UNSPEC,
0022     SEG6_IPTUNNEL_SRH,
0023     __SEG6_IPTUNNEL_MAX,
0024 };
0025 #define SEG6_IPTUNNEL_MAX (__SEG6_IPTUNNEL_MAX - 1)
0026 
0027 struct seg6_iptunnel_encap {
0028     int mode;
0029     struct ipv6_sr_hdr srh[];
0030 };
0031 
0032 #define SEG6_IPTUN_ENCAP_SIZE(x) ((sizeof(*x)) + (((x)->srh->hdrlen + 1) << 3))
0033 
0034 enum {
0035     SEG6_IPTUN_MODE_INLINE,
0036     SEG6_IPTUN_MODE_ENCAP,
0037     SEG6_IPTUN_MODE_L2ENCAP,
0038     SEG6_IPTUN_MODE_ENCAP_RED,
0039     SEG6_IPTUN_MODE_L2ENCAP_RED,
0040 };
0041 
0042 #endif