Back to home page

OSCL-LXR

 
 

    


0001 /* SPDX-License-Identifier: GPL-2.0+ WITH Linux-syscall-note */
0002 /*
0003  *  IPv6 IOAM Lightweight Tunnel API
0004  *
0005  *  Author:
0006  *  Justin Iurman <justin.iurman@uliege.be>
0007  */
0008 
0009 #ifndef _UAPI_LINUX_IOAM6_IPTUNNEL_H
0010 #define _UAPI_LINUX_IOAM6_IPTUNNEL_H
0011 
0012 /* Encap modes:
0013  *  - inline: direct insertion
0014  *  - encap: ip6ip6 encapsulation
0015  *  - auto: inline for local packets, encap for in-transit packets
0016  */
0017 enum {
0018     __IOAM6_IPTUNNEL_MODE_MIN,
0019 
0020     IOAM6_IPTUNNEL_MODE_INLINE,
0021     IOAM6_IPTUNNEL_MODE_ENCAP,
0022     IOAM6_IPTUNNEL_MODE_AUTO,
0023 
0024     __IOAM6_IPTUNNEL_MODE_MAX,
0025 };
0026 
0027 #define IOAM6_IPTUNNEL_MODE_MIN (__IOAM6_IPTUNNEL_MODE_MIN + 1)
0028 #define IOAM6_IPTUNNEL_MODE_MAX (__IOAM6_IPTUNNEL_MODE_MAX - 1)
0029 
0030 enum {
0031     IOAM6_IPTUNNEL_UNSPEC,
0032 
0033     /* Encap mode */
0034     IOAM6_IPTUNNEL_MODE,        /* u8 */
0035 
0036     /* Tunnel dst address.
0037      * For encap,auto modes.
0038      */
0039     IOAM6_IPTUNNEL_DST,     /* struct in6_addr */
0040 
0041     /* IOAM Trace Header */
0042     IOAM6_IPTUNNEL_TRACE,       /* struct ioam6_trace_hdr */
0043 
0044     /* Insertion frequency:
0045      * "k over n" packets (0 < k <= n)
0046      * [0.0001% ... 100%]
0047      */
0048 #define IOAM6_IPTUNNEL_FREQ_MIN 1
0049 #define IOAM6_IPTUNNEL_FREQ_MAX 1000000
0050     IOAM6_IPTUNNEL_FREQ_K,      /* u32 */
0051     IOAM6_IPTUNNEL_FREQ_N,      /* u32 */
0052 
0053     __IOAM6_IPTUNNEL_MAX,
0054 };
0055 
0056 #define IOAM6_IPTUNNEL_MAX (__IOAM6_IPTUNNEL_MAX - 1)
0057 
0058 #endif /* _UAPI_LINUX_IOAM6_IPTUNNEL_H */