1 /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
5 #include <linux/types.h>
6 #include <linux/netfilter.h>
8 /* Values for "mt_flags" field in struct ip6t_srh */
9 #define IP6T_SRH_NEXTHDR 0x0001
10 #define IP6T_SRH_LEN_EQ 0x0002
11 #define IP6T_SRH_LEN_GT 0x0004
12 #define IP6T_SRH_LEN_LT 0x0008
13 #define IP6T_SRH_SEGS_EQ 0x0010
14 #define IP6T_SRH_SEGS_GT 0x0020
15 #define IP6T_SRH_SEGS_LT 0x0040
16 #define IP6T_SRH_LAST_EQ 0x0080
17 #define IP6T_SRH_LAST_GT 0x0100
18 #define IP6T_SRH_LAST_LT 0x0200
19 #define IP6T_SRH_TAG 0x0400
20 #define IP6T_SRH_PSID 0x0800
21 #define IP6T_SRH_NSID 0x1000
22 #define IP6T_SRH_LSID 0x2000
23 #define IP6T_SRH_MASK 0x3FFF
25 /* Values for "mt_invflags" field in struct ip6t_srh */
26 #define IP6T_SRH_INV_NEXTHDR 0x0001
27 #define IP6T_SRH_INV_LEN_EQ 0x0002
28 #define IP6T_SRH_INV_LEN_GT 0x0004
29 #define IP6T_SRH_INV_LEN_LT 0x0008
30 #define IP6T_SRH_INV_SEGS_EQ 0x0010
31 #define IP6T_SRH_INV_SEGS_GT 0x0020
32 #define IP6T_SRH_INV_SEGS_LT 0x0040
33 #define IP6T_SRH_INV_LAST_EQ 0x0080
34 #define IP6T_SRH_INV_LAST_GT 0x0100
35 #define IP6T_SRH_INV_LAST_LT 0x0200
36 #define IP6T_SRH_INV_TAG 0x0400
37 #define IP6T_SRH_INV_PSID 0x0800
38 #define IP6T_SRH_INV_NSID 0x1000
39 #define IP6T_SRH_INV_LSID 0x2000
40 #define IP6T_SRH_INV_MASK 0x3FFF
43 * struct ip6t_srh - SRH match options
44 * @ next_hdr: Next header field of SRH
45 * @ hdr_len: Extension header length field of SRH
46 * @ segs_left: Segments left field of SRH
47 * @ last_entry: Last entry field of SRH
48 * @ tag: Tag field of SRH
49 * @ mt_flags: match options
50 * @ mt_invflags: Invert the sense of match options
64 * struct ip6t_srh1 - SRH match options (revision 1)
65 * @ next_hdr: Next header field of SRH
66 * @ hdr_len: Extension header length field of SRH
67 * @ segs_left: Segments left field of SRH
68 * @ last_entry: Last entry field of SRH
69 * @ tag: Tag field of SRH
70 * @ psid_addr: Address of previous SID in SRH SID list
71 * @ nsid_addr: Address of NEXT SID in SRH SID list
72 * @ lsid_addr: Address of LAST SID in SRH SID list
73 * @ psid_msk: Mask of previous SID in SRH SID list
74 * @ nsid_msk: Mask of next SID in SRH SID list
75 * @ lsid_msk: MAsk of last SID in SRH SID list
76 * @ mt_flags: match options
77 * @ mt_invflags: Invert the sense of match options
86 struct in6_addr psid_addr;
87 struct in6_addr nsid_addr;
88 struct in6_addr lsid_addr;
89 struct in6_addr psid_msk;
90 struct in6_addr nsid_msk;
91 struct in6_addr lsid_msk;
96 #endif /*_IP6T_SRH_H*/