2 * SR-IPv6 implementation
5 * David Lebrun <david.lebrun@uclouvain.be>
8 * This program is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU General Public License
10 * as published by the Free Software Foundation; either version
11 * 2 of the License, or (at your option) any later version.
14 #ifndef _UAPI_LINUX_SEG6_LOCAL_H
15 #define _UAPI_LINUX_SEG6_LOCAL_H
17 #include <linux/seg6.h>
34 #define SEG6_LOCAL_MAX (__SEG6_LOCAL_MAX - 1)
37 SEG6_LOCAL_ACTION_UNSPEC = 0,
39 SEG6_LOCAL_ACTION_END = 1,
40 /* adjacency segment (IPv6 cross-connect) */
41 SEG6_LOCAL_ACTION_END_X = 2,
42 /* lookup of next seg NH in table */
43 SEG6_LOCAL_ACTION_END_T = 3,
44 /* decap and L2 cross-connect */
45 SEG6_LOCAL_ACTION_END_DX2 = 4,
46 /* decap and IPv6 cross-connect */
47 SEG6_LOCAL_ACTION_END_DX6 = 5,
48 /* decap and IPv4 cross-connect */
49 SEG6_LOCAL_ACTION_END_DX4 = 6,
50 /* decap and lookup of DA in v6 table */
51 SEG6_LOCAL_ACTION_END_DT6 = 7,
52 /* decap and lookup of DA in v4 table */
53 SEG6_LOCAL_ACTION_END_DT4 = 8,
54 /* binding segment with insertion */
55 SEG6_LOCAL_ACTION_END_B6 = 9,
56 /* binding segment with encapsulation */
57 SEG6_LOCAL_ACTION_END_B6_ENCAP = 10,
58 /* binding segment with MPLS encap */
59 SEG6_LOCAL_ACTION_END_BM = 11,
60 /* lookup last seg in table */
61 SEG6_LOCAL_ACTION_END_S = 12,
62 /* forward to SR-unaware VNF with static proxy */
63 SEG6_LOCAL_ACTION_END_AS = 13,
64 /* forward to SR-unaware VNF with masquerading */
65 SEG6_LOCAL_ACTION_END_AM = 14,
66 /* custom BPF action */
67 SEG6_LOCAL_ACTION_END_BPF = 15,
68 /* decap and lookup of DA in v4 or v6 table */
69 SEG6_LOCAL_ACTION_END_DT46 = 16,
71 __SEG6_LOCAL_ACTION_MAX,
74 #define SEG6_LOCAL_ACTION_MAX (__SEG6_LOCAL_ACTION_MAX - 1)
77 SEG6_LOCAL_BPF_PROG_UNSPEC,
79 SEG6_LOCAL_BPF_PROG_NAME,
80 __SEG6_LOCAL_BPF_PROG_MAX,
83 #define SEG6_LOCAL_BPF_PROG_MAX (__SEG6_LOCAL_BPF_PROG_MAX - 1)
85 /* SRv6 Behavior counters are encoded as netlink attributes guaranteeing the
87 * Each counter is identified by a different attribute type (i.e.
88 * SEG6_LOCAL_CNT_PACKETS).
90 * - SEG6_LOCAL_CNT_PACKETS: identifies a counter that counts the number of
91 * packets that have been CORRECTLY processed by an SRv6 Behavior instance
92 * (i.e., packets that generate errors or are dropped are NOT counted).
94 * - SEG6_LOCAL_CNT_BYTES: identifies a counter that counts the total amount
95 * of traffic in bytes of all packets that have been CORRECTLY processed by
96 * an SRv6 Behavior instance (i.e., packets that generate errors or are
97 * dropped are NOT counted).
99 * - SEG6_LOCAL_CNT_ERRORS: identifies a counter that counts the number of
100 * packets that have NOT been properly processed by an SRv6 Behavior instance
101 * (i.e., packets that generate errors or are dropped).
104 SEG6_LOCAL_CNT_UNSPEC,
105 SEG6_LOCAL_CNT_PAD, /* pad for 64 bits values */
106 SEG6_LOCAL_CNT_PACKETS,
107 SEG6_LOCAL_CNT_BYTES,
108 SEG6_LOCAL_CNT_ERRORS,
109 __SEG6_LOCAL_CNT_MAX,
112 #define SEG6_LOCAL_CNT_MAX (__SEG6_LOCAL_CNT_MAX - 1)
114 /* SRv6 End* Flavor attributes */
116 SEG6_LOCAL_FLV_UNSPEC,
117 SEG6_LOCAL_FLV_OPERATION,
118 SEG6_LOCAL_FLV_LCBLOCK_BITS,
119 SEG6_LOCAL_FLV_LCNODE_FN_BITS,
120 __SEG6_LOCAL_FLV_MAX,
123 #define SEG6_LOCAL_FLV_MAX (__SEG6_LOCAL_FLV_MAX - 1)
125 /* Designed flavor operations for SRv6 End* Behavior */
127 SEG6_LOCAL_FLV_OP_UNSPEC,
128 SEG6_LOCAL_FLV_OP_PSP,
129 SEG6_LOCAL_FLV_OP_USP,
130 SEG6_LOCAL_FLV_OP_USD,
131 SEG6_LOCAL_FLV_OP_NEXT_CSID,
132 __SEG6_LOCAL_FLV_OP_MAX
135 #define SEG6_LOCAL_FLV_OP_MAX (__SEG6_LOCAL_FLV_OP_MAX - 1)