65 lines · c
1/* SPDX-License-Identifier: GPL-2.0+ WITH Linux-syscall-note */2/*3 * IPv6 IOAM Lightweight Tunnel API4 *5 * Author:6 * Justin Iurman <justin.iurman@uliege.be>7 */8 9#ifndef _UAPI_LINUX_IOAM6_IPTUNNEL_H10#define _UAPI_LINUX_IOAM6_IPTUNNEL_H11 12/* Encap modes:13 * - inline: direct insertion14 * - encap: ip6ip6 encapsulation15 * - auto: inline for local packets, encap for in-transit packets16 */17enum {18 __IOAM6_IPTUNNEL_MODE_MIN,19 20 IOAM6_IPTUNNEL_MODE_INLINE,21 IOAM6_IPTUNNEL_MODE_ENCAP,22 IOAM6_IPTUNNEL_MODE_AUTO,23 24 __IOAM6_IPTUNNEL_MODE_MAX,25};26 27#define IOAM6_IPTUNNEL_MODE_MIN (__IOAM6_IPTUNNEL_MODE_MIN + 1)28#define IOAM6_IPTUNNEL_MODE_MAX (__IOAM6_IPTUNNEL_MODE_MAX - 1)29 30enum {31 IOAM6_IPTUNNEL_UNSPEC,32 33 /* Encap mode */34 IOAM6_IPTUNNEL_MODE, /* u8 */35 36 /* Tunnel dst address.37 * For encap,auto modes.38 */39 IOAM6_IPTUNNEL_DST, /* struct in6_addr */40 41 /* IOAM Trace Header */42 IOAM6_IPTUNNEL_TRACE, /* struct ioam6_trace_hdr */43 44 /* Insertion frequency:45 * "k over n" packets (0 < k <= n)46 * [0.0001% ... 100%]47 */48#define IOAM6_IPTUNNEL_FREQ_MIN 149#define IOAM6_IPTUNNEL_FREQ_MAX 100000050 IOAM6_IPTUNNEL_FREQ_K, /* u32 */51 IOAM6_IPTUNNEL_FREQ_N, /* u32 */52 53 /* Tunnel src address.54 * For encap,auto modes.55 * Optional (automatic if not provided).56 */57 IOAM6_IPTUNNEL_SRC, /* struct in6_addr */58 59 __IOAM6_IPTUNNEL_MAX,60};61 62#define IOAM6_IPTUNNEL_MAX (__IOAM6_IPTUNNEL_MAX - 1)63 64#endif /* _UAPI_LINUX_IOAM6_IPTUNNEL_H */65