xref: /OK3568_Linux_fs/kernel/tools/include/uapi/linux/seg6_local.h (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1*4882a593Smuzhiyun /*
2*4882a593Smuzhiyun  *  SR-IPv6 implementation
3*4882a593Smuzhiyun  *
4*4882a593Smuzhiyun  *  Author:
5*4882a593Smuzhiyun  *  David Lebrun <david.lebrun@uclouvain.be>
6*4882a593Smuzhiyun  *
7*4882a593Smuzhiyun  *
8*4882a593Smuzhiyun  *  This program is free software; you can redistribute it and/or
9*4882a593Smuzhiyun  *      modify it under the terms of the GNU General Public License
10*4882a593Smuzhiyun  *      as published by the Free Software Foundation; either version
11*4882a593Smuzhiyun  *      2 of the License, or (at your option) any later version.
12*4882a593Smuzhiyun  */
13*4882a593Smuzhiyun 
14*4882a593Smuzhiyun #ifndef _UAPI_LINUX_SEG6_LOCAL_H
15*4882a593Smuzhiyun #define _UAPI_LINUX_SEG6_LOCAL_H
16*4882a593Smuzhiyun 
17*4882a593Smuzhiyun #include <linux/seg6.h>
18*4882a593Smuzhiyun 
19*4882a593Smuzhiyun enum {
20*4882a593Smuzhiyun 	SEG6_LOCAL_UNSPEC,
21*4882a593Smuzhiyun 	SEG6_LOCAL_ACTION,
22*4882a593Smuzhiyun 	SEG6_LOCAL_SRH,
23*4882a593Smuzhiyun 	SEG6_LOCAL_TABLE,
24*4882a593Smuzhiyun 	SEG6_LOCAL_NH4,
25*4882a593Smuzhiyun 	SEG6_LOCAL_NH6,
26*4882a593Smuzhiyun 	SEG6_LOCAL_IIF,
27*4882a593Smuzhiyun 	SEG6_LOCAL_OIF,
28*4882a593Smuzhiyun 	SEG6_LOCAL_BPF,
29*4882a593Smuzhiyun 	__SEG6_LOCAL_MAX,
30*4882a593Smuzhiyun };
31*4882a593Smuzhiyun #define SEG6_LOCAL_MAX (__SEG6_LOCAL_MAX - 1)
32*4882a593Smuzhiyun 
33*4882a593Smuzhiyun enum {
34*4882a593Smuzhiyun 	SEG6_LOCAL_ACTION_UNSPEC	= 0,
35*4882a593Smuzhiyun 	/* node segment */
36*4882a593Smuzhiyun 	SEG6_LOCAL_ACTION_END		= 1,
37*4882a593Smuzhiyun 	/* adjacency segment (IPv6 cross-connect) */
38*4882a593Smuzhiyun 	SEG6_LOCAL_ACTION_END_X		= 2,
39*4882a593Smuzhiyun 	/* lookup of next seg NH in table */
40*4882a593Smuzhiyun 	SEG6_LOCAL_ACTION_END_T		= 3,
41*4882a593Smuzhiyun 	/* decap and L2 cross-connect */
42*4882a593Smuzhiyun 	SEG6_LOCAL_ACTION_END_DX2	= 4,
43*4882a593Smuzhiyun 	/* decap and IPv6 cross-connect */
44*4882a593Smuzhiyun 	SEG6_LOCAL_ACTION_END_DX6	= 5,
45*4882a593Smuzhiyun 	/* decap and IPv4 cross-connect */
46*4882a593Smuzhiyun 	SEG6_LOCAL_ACTION_END_DX4	= 6,
47*4882a593Smuzhiyun 	/* decap and lookup of DA in v6 table */
48*4882a593Smuzhiyun 	SEG6_LOCAL_ACTION_END_DT6	= 7,
49*4882a593Smuzhiyun 	/* decap and lookup of DA in v4 table */
50*4882a593Smuzhiyun 	SEG6_LOCAL_ACTION_END_DT4	= 8,
51*4882a593Smuzhiyun 	/* binding segment with insertion */
52*4882a593Smuzhiyun 	SEG6_LOCAL_ACTION_END_B6	= 9,
53*4882a593Smuzhiyun 	/* binding segment with encapsulation */
54*4882a593Smuzhiyun 	SEG6_LOCAL_ACTION_END_B6_ENCAP	= 10,
55*4882a593Smuzhiyun 	/* binding segment with MPLS encap */
56*4882a593Smuzhiyun 	SEG6_LOCAL_ACTION_END_BM	= 11,
57*4882a593Smuzhiyun 	/* lookup last seg in table */
58*4882a593Smuzhiyun 	SEG6_LOCAL_ACTION_END_S		= 12,
59*4882a593Smuzhiyun 	/* forward to SR-unaware VNF with static proxy */
60*4882a593Smuzhiyun 	SEG6_LOCAL_ACTION_END_AS	= 13,
61*4882a593Smuzhiyun 	/* forward to SR-unaware VNF with masquerading */
62*4882a593Smuzhiyun 	SEG6_LOCAL_ACTION_END_AM	= 14,
63*4882a593Smuzhiyun 	/* custom BPF action */
64*4882a593Smuzhiyun 	SEG6_LOCAL_ACTION_END_BPF	= 15,
65*4882a593Smuzhiyun 
66*4882a593Smuzhiyun 	__SEG6_LOCAL_ACTION_MAX,
67*4882a593Smuzhiyun };
68*4882a593Smuzhiyun 
69*4882a593Smuzhiyun #define SEG6_LOCAL_ACTION_MAX (__SEG6_LOCAL_ACTION_MAX - 1)
70*4882a593Smuzhiyun 
71*4882a593Smuzhiyun enum {
72*4882a593Smuzhiyun 	SEG6_LOCAL_BPF_PROG_UNSPEC,
73*4882a593Smuzhiyun 	SEG6_LOCAL_BPF_PROG,
74*4882a593Smuzhiyun 	SEG6_LOCAL_BPF_PROG_NAME,
75*4882a593Smuzhiyun 	__SEG6_LOCAL_BPF_PROG_MAX,
76*4882a593Smuzhiyun };
77*4882a593Smuzhiyun 
78*4882a593Smuzhiyun #define SEG6_LOCAL_BPF_PROG_MAX (__SEG6_LOCAL_BPF_PROG_MAX - 1)
79*4882a593Smuzhiyun 
80*4882a593Smuzhiyun #endif
81