xref: /linux/include/uapi/linux/ioam6_iptunnel.h (revision 4f2c0a4acffbec01079c28f839422e64ddeff004)
13edede08SJustin Iurman /* SPDX-License-Identifier: GPL-2.0+ WITH Linux-syscall-note */
23edede08SJustin Iurman /*
33edede08SJustin Iurman  *  IPv6 IOAM Lightweight Tunnel API
43edede08SJustin Iurman  *
53edede08SJustin Iurman  *  Author:
63edede08SJustin Iurman  *  Justin Iurman <justin.iurman@uliege.be>
73edede08SJustin Iurman  */
83edede08SJustin Iurman 
93edede08SJustin Iurman #ifndef _UAPI_LINUX_IOAM6_IPTUNNEL_H
103edede08SJustin Iurman #define _UAPI_LINUX_IOAM6_IPTUNNEL_H
113edede08SJustin Iurman 
128cb3bf8bSJustin Iurman /* Encap modes:
138cb3bf8bSJustin Iurman  *  - inline: direct insertion
148cb3bf8bSJustin Iurman  *  - encap: ip6ip6 encapsulation
158cb3bf8bSJustin Iurman  *  - auto: inline for local packets, encap for in-transit packets
168cb3bf8bSJustin Iurman  */
178cb3bf8bSJustin Iurman enum {
188cb3bf8bSJustin Iurman 	__IOAM6_IPTUNNEL_MODE_MIN,
198cb3bf8bSJustin Iurman 
208cb3bf8bSJustin Iurman 	IOAM6_IPTUNNEL_MODE_INLINE,
218cb3bf8bSJustin Iurman 	IOAM6_IPTUNNEL_MODE_ENCAP,
228cb3bf8bSJustin Iurman 	IOAM6_IPTUNNEL_MODE_AUTO,
238cb3bf8bSJustin Iurman 
248cb3bf8bSJustin Iurman 	__IOAM6_IPTUNNEL_MODE_MAX,
258cb3bf8bSJustin Iurman };
268cb3bf8bSJustin Iurman 
278cb3bf8bSJustin Iurman #define IOAM6_IPTUNNEL_MODE_MIN (__IOAM6_IPTUNNEL_MODE_MIN + 1)
288cb3bf8bSJustin Iurman #define IOAM6_IPTUNNEL_MODE_MAX (__IOAM6_IPTUNNEL_MODE_MAX - 1)
298cb3bf8bSJustin Iurman 
303edede08SJustin Iurman enum {
313edede08SJustin Iurman 	IOAM6_IPTUNNEL_UNSPEC,
328cb3bf8bSJustin Iurman 
338cb3bf8bSJustin Iurman 	/* Encap mode */
348cb3bf8bSJustin Iurman 	IOAM6_IPTUNNEL_MODE,		/* u8 */
358cb3bf8bSJustin Iurman 
368cb3bf8bSJustin Iurman 	/* Tunnel dst address.
378cb3bf8bSJustin Iurman 	 * For encap,auto modes.
388cb3bf8bSJustin Iurman 	 */
398cb3bf8bSJustin Iurman 	IOAM6_IPTUNNEL_DST,		/* struct in6_addr */
408cb3bf8bSJustin Iurman 
418cb3bf8bSJustin Iurman 	/* IOAM Trace Header */
423edede08SJustin Iurman 	IOAM6_IPTUNNEL_TRACE,		/* struct ioam6_trace_hdr */
438cb3bf8bSJustin Iurman 
44*be847673SJustin Iurman 	/* Insertion frequency:
45*be847673SJustin Iurman 	 * "k over n" packets (0 < k <= n)
46*be847673SJustin Iurman 	 * [0.0001% ... 100%]
47*be847673SJustin Iurman 	 */
48*be847673SJustin Iurman #define IOAM6_IPTUNNEL_FREQ_MIN 1
49*be847673SJustin Iurman #define IOAM6_IPTUNNEL_FREQ_MAX 1000000
50*be847673SJustin Iurman 	IOAM6_IPTUNNEL_FREQ_K,		/* u32 */
51*be847673SJustin Iurman 	IOAM6_IPTUNNEL_FREQ_N,		/* u32 */
52*be847673SJustin Iurman 
533edede08SJustin Iurman 	__IOAM6_IPTUNNEL_MAX,
543edede08SJustin Iurman };
553edede08SJustin Iurman 
563edede08SJustin Iurman #define IOAM6_IPTUNNEL_MAX (__IOAM6_IPTUNNEL_MAX - 1)
573edede08SJustin Iurman 
583edede08SJustin Iurman #endif /* _UAPI_LINUX_IOAM6_IPTUNNEL_H */
59