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 _LINUX_SEG6_LOCAL_H
15 #define _LINUX_SEG6_LOCAL_H
17 #include <linux/seg6.h>
33 #define SEG6_LOCAL_MAX (__SEG6_LOCAL_MAX - 1)
36 SEG6_LOCAL_ACTION_UNSPEC
= 0,
38 SEG6_LOCAL_ACTION_END
= 1,
39 /* adjacency segment (IPv6 cross-connect) */
40 SEG6_LOCAL_ACTION_END_X
= 2,
41 /* lookup of next seg NH in table */
42 SEG6_LOCAL_ACTION_END_T
= 3,
43 /* decap and L2 cross-connect */
44 SEG6_LOCAL_ACTION_END_DX2
= 4,
45 /* decap and IPv6 cross-connect */
46 SEG6_LOCAL_ACTION_END_DX6
= 5,
47 /* decap and IPv4 cross-connect */
48 SEG6_LOCAL_ACTION_END_DX4
= 6,
49 /* decap and lookup of DA in v6 table */
50 SEG6_LOCAL_ACTION_END_DT6
= 7,
51 /* decap and lookup of DA in v4 table */
52 SEG6_LOCAL_ACTION_END_DT4
= 8,
53 /* binding segment with insertion */
54 SEG6_LOCAL_ACTION_END_B6
= 9,
55 /* binding segment with encapsulation */
56 SEG6_LOCAL_ACTION_END_B6_ENCAP
= 10,
57 /* binding segment with MPLS encap */
58 SEG6_LOCAL_ACTION_END_BM
= 11,
59 /* lookup last seg in table */
60 SEG6_LOCAL_ACTION_END_S
= 12,
61 /* forward to SR-unaware VNF with static proxy */
62 SEG6_LOCAL_ACTION_END_AS
= 13,
63 /* forward to SR-unaware VNF with masquerading */
64 SEG6_LOCAL_ACTION_END_AM
= 14,
65 /* custom BPF action */
66 SEG6_LOCAL_ACTION_END_BPF
= 15,
67 /* decap and lookup of DA in v4 or v6 table */
68 SEG6_LOCAL_ACTION_END_DT46
= 16,
70 __SEG6_LOCAL_ACTION_MAX
,
73 #define SEG6_LOCAL_ACTION_MAX (__SEG6_LOCAL_ACTION_MAX - 1)
76 SEG6_LOCAL_BPF_PROG_UNSPEC
,
78 SEG6_LOCAL_BPF_PROG_NAME
,
79 __SEG6_LOCAL_BPF_PROG_MAX
,
82 #define SEG6_LOCAL_BPF_PROG_MAX (__SEG6_LOCAL_BPF_PROG_MAX - 1)
84 /* SRv6 Behavior counters are encoded as netlink attributes guaranteeing the
86 * Each counter is identified by a different attribute type (i.e.
87 * SEG6_LOCAL_CNT_PACKETS).
89 * - SEG6_LOCAL_CNT_PACKETS: identifies a counter that counts the number of
90 * packets that have been CORRECTLY processed by an SRv6 Behavior instance
91 * (i.e., packets that generate errors or are dropped are NOT counted).
93 * - SEG6_LOCAL_CNT_BYTES: identifies a counter that counts the total amount
94 * of traffic in bytes of all packets that have been CORRECTLY processed by
95 * an SRv6 Behavior instance (i.e., packets that generate errors or are
96 * dropped are NOT counted).
98 * - SEG6_LOCAL_CNT_ERRORS: identifies a counter that counts the number of
99 * packets that have NOT been properly processed by an SRv6 Behavior instance
100 * (i.e., packets that generate errors or are dropped).
103 SEG6_LOCAL_CNT_UNSPEC
,
104 SEG6_LOCAL_CNT_PAD
, /* pad for 64 bits values */
105 SEG6_LOCAL_CNT_PACKETS
,
106 SEG6_LOCAL_CNT_BYTES
,
107 SEG6_LOCAL_CNT_ERRORS
,
108 __SEG6_LOCAL_CNT_MAX
,
111 #define SEG6_LOCAL_CNT_MAX (__SEG6_LOCAL_CNT_MAX - 1)