@@ -16,6 +16,9 @@ typedef unsigned int sk_buff_data_t;
16
16
typedef unsigned char *sk_buff_data_t;
17
17
#endif
18
18
*/
19
+ struct llist_node {
20
+ struct llist_node * next ;
21
+ };
19
22
20
23
struct sk_buff {
21
24
union {
@@ -29,6 +32,7 @@ struct sk_buff {
29
32
};
30
33
struct rb_node rbnode ;
31
34
struct list_head list ;
35
+ struct llist_node ll_node ;
32
36
};
33
37
union {
34
38
struct sock * sk ;
@@ -45,6 +49,7 @@ struct sk_buff {
45
49
void (* destructor )(struct sk_buff * );
46
50
};
47
51
struct list_head tcp_tsorted_anchor ;
52
+ long unsigned int _sk_redir ;
48
53
};
49
54
long unsigned int _nfct ;
50
55
unsigned int len ;
@@ -59,73 +64,152 @@ struct sk_buff {
59
64
__u8 peeked : 1 ;
60
65
__u8 head_frag : 1 ;
61
66
__u8 pfmemalloc : 1 ;
67
+ __u8 pp_recycle : 1 ;
62
68
__u8 active_extensions ;
63
- __u32 headers_start [0 ];
64
- __u8 __pkt_type_offset [0 ];
65
- __u8 pkt_type : 3 ;
66
- __u8 ignore_df : 1 ;
67
- __u8 nf_trace : 1 ;
68
- __u8 ip_summed : 2 ;
69
- __u8 ooo_okay : 1 ;
70
- __u8 l4_hash : 1 ;
71
- __u8 sw_hash : 1 ;
72
- __u8 wifi_acked_valid : 1 ;
73
- __u8 wifi_acked : 1 ;
74
- __u8 no_fcs : 1 ;
75
- __u8 encapsulation : 1 ;
76
- __u8 encap_hdr_csum : 1 ;
77
- __u8 csum_valid : 1 ;
78
- __u8 __pkt_vlan_present_offset [0 ];
79
- __u8 vlan_present : 1 ;
80
- __u8 csum_complete_sw : 1 ;
81
- __u8 csum_level : 2 ;
82
- __u8 csum_not_inet : 1 ;
83
- __u8 dst_pending_confirm : 1 ;
84
- __u8 ndisc_nodetype : 2 ;
85
- __u8 ipvs_property : 1 ;
86
- __u8 inner_protocol_type : 1 ;
87
- __u8 remcsum_offload : 1 ;
88
- __u8 offload_fwd_mark : 1 ;
89
- __u8 offload_l3_fwd_mark : 1 ;
90
- __u8 tc_skip_classify : 1 ;
91
- __u8 tc_at_ingress : 1 ;
92
- __u8 redirected : 1 ;
93
- __u8 from_ingress : 1 ;
94
- __u8 decrypted : 1 ;
95
- __u16 tc_index ;
96
69
union {
97
- __wsum csum ;
98
70
struct {
99
- __u16 csum_start ;
100
- __u16 csum_offset ;
71
+ __u8 __pkt_type_offset [0 ];
72
+ __u8 pkt_type : 3 ;
73
+ __u8 ignore_df : 1 ;
74
+ __u8 dst_pending_confirm : 1 ;
75
+ __u8 ip_summed : 2 ;
76
+ __u8 ooo_okay : 1 ;
77
+ __u8 __mono_tc_offset [0 ];
78
+ __u8 mono_delivery_time : 1 ;
79
+ __u8 tc_at_ingress : 1 ;
80
+ __u8 tc_skip_classify : 1 ;
81
+ __u8 remcsum_offload : 1 ;
82
+ __u8 csum_complete_sw : 1 ;
83
+ __u8 csum_level : 2 ;
84
+ __u8 inner_protocol_type : 1 ;
85
+ __u8 l4_hash : 1 ;
86
+ __u8 sw_hash : 1 ;
87
+ __u8 wifi_acked_valid : 1 ;
88
+ __u8 wifi_acked : 1 ;
89
+ __u8 no_fcs : 1 ;
90
+ __u8 encapsulation : 1 ;
91
+ __u8 encap_hdr_csum : 1 ;
92
+ __u8 csum_valid : 1 ;
93
+ __u8 ndisc_nodetype : 2 ;
94
+ __u8 ipvs_property : 1 ;
95
+ __u8 nf_trace : 1 ;
96
+ __u8 redirected : 1 ;
97
+ __u8 from_ingress : 1 ;
98
+ __u8 nf_skip_egress : 1 ;
99
+ __u8 slow_gro : 1 ;
100
+ __u8 csum_not_inet : 1 ;
101
+ __u16 tc_index ;
102
+ u16 alloc_cpu ;
103
+ union {
104
+ __wsum csum ;
105
+ struct {
106
+ __u16 csum_start ;
107
+ __u16 csum_offset ;
108
+ };
109
+ };
110
+ __u32 priority ;
111
+ int skb_iif ;
112
+ __u32 hash ;
113
+ union {
114
+ u32 vlan_all ;
115
+ struct {
116
+ __be16 vlan_proto ;
117
+ __u16 vlan_tci ;
118
+ };
119
+ };
120
+ union {
121
+ unsigned int napi_id ;
122
+ unsigned int sender_cpu ;
123
+ };
124
+ __u32 secmark ;
125
+ union {
126
+ __u32 mark ;
127
+ __u32 reserved_tailroom ;
128
+ };
129
+ union {
130
+ __be16 inner_protocol ;
131
+ __u8 inner_ipproto ;
132
+ };
133
+ __u16 inner_transport_header ;
134
+ __u16 inner_network_header ;
135
+ __u16 inner_mac_header ;
136
+ __be16 protocol ;
137
+ __u16 transport_header ;
138
+ __u16 network_header ;
139
+ __u16 mac_header ;
101
140
};
141
+ struct {
142
+ __u8 __pkt_type_offset [0 ];
143
+ __u8 pkt_type : 3 ;
144
+ __u8 ignore_df : 1 ;
145
+ __u8 dst_pending_confirm : 1 ;
146
+ __u8 ip_summed : 2 ;
147
+ __u8 ooo_okay : 1 ;
148
+ __u8 __mono_tc_offset [0 ];
149
+ __u8 mono_delivery_time : 1 ;
150
+ __u8 tc_at_ingress : 1 ;
151
+ __u8 tc_skip_classify : 1 ;
152
+ __u8 remcsum_offload : 1 ;
153
+ __u8 csum_complete_sw : 1 ;
154
+ __u8 csum_level : 2 ;
155
+ __u8 inner_protocol_type : 1 ;
156
+ __u8 l4_hash : 1 ;
157
+ __u8 sw_hash : 1 ;
158
+ __u8 wifi_acked_valid : 1 ;
159
+ __u8 wifi_acked : 1 ;
160
+ __u8 no_fcs : 1 ;
161
+ __u8 encapsulation : 1 ;
162
+ __u8 encap_hdr_csum : 1 ;
163
+ __u8 csum_valid : 1 ;
164
+ __u8 ndisc_nodetype : 2 ;
165
+ __u8 ipvs_property : 1 ;
166
+ __u8 nf_trace : 1 ;
167
+ __u8 redirected : 1 ;
168
+ __u8 from_ingress : 1 ;
169
+ __u8 nf_skip_egress : 1 ;
170
+ __u8 slow_gro : 1 ;
171
+ __u8 csum_not_inet : 1 ;
172
+ __u16 tc_index ;
173
+ u16 alloc_cpu ;
174
+ union {
175
+ __wsum csum ;
176
+ struct {
177
+ __u16 csum_start ;
178
+ __u16 csum_offset ;
179
+ };
180
+ };
181
+ __u32 priority ;
182
+ int skb_iif ;
183
+ __u32 hash ;
184
+ union {
185
+ u32 vlan_all ;
186
+ struct {
187
+ __be16 vlan_proto ;
188
+ __u16 vlan_tci ;
189
+ };
190
+ };
191
+ union {
192
+ unsigned int napi_id ;
193
+ unsigned int sender_cpu ;
194
+ };
195
+ __u32 secmark ;
196
+ union {
197
+ __u32 mark ;
198
+ __u32 reserved_tailroom ;
199
+ };
200
+ union {
201
+ __be16 inner_protocol ;
202
+ __u8 inner_ipproto ;
203
+ };
204
+ __u16 inner_transport_header ;
205
+ __u16 inner_network_header ;
206
+ __u16 inner_mac_header ;
207
+ __be16 protocol ;
208
+ __u16 transport_header ;
209
+ __u16 network_header ;
210
+ __u16 mac_header ;
211
+ } headers ;
102
212
};
103
- __u32 priority ;
104
- int skb_iif ;
105
- __u32 hash ;
106
- __be16 vlan_proto ;
107
- __u16 vlan_tci ;
108
- union {
109
- unsigned int napi_id ;
110
- unsigned int sender_cpu ;
111
- };
112
- __u32 secmark ;
113
- union {
114
- __u32 mark ;
115
- __u32 reserved_tailroom ;
116
- };
117
- union {
118
- __be16 inner_protocol ;
119
- __u8 inner_ipproto ;
120
- };
121
- __u16 inner_transport_header ;
122
- __u16 inner_network_header ;
123
- __u16 inner_mac_header ;
124
- __be16 protocol ;
125
- __u16 transport_header ;
126
- __u16 network_header ;
127
- __u16 mac_header ;
128
- __u32 headers_end [0 ];
129
213
sk_buff_data_t tail ;
130
214
sk_buff_data_t end ;
131
215
unsigned char * head ;
@@ -135,4 +219,34 @@ struct sk_buff {
135
219
struct skb_ext * extensions ;
136
220
};
137
221
222
+
223
+
224
+ struct iphdr {
225
+ __u8 ihl : 4 ;
226
+ __u8 version : 4 ;
227
+ __u8 tos ;
228
+ __be16 tot_len ;
229
+ __be16 id ;
230
+ __be16 frag_off ;
231
+ __u8 ttl ;
232
+ __u8 protocol ;
233
+ __sum16 check ;
234
+ union {
235
+ struct {
236
+ __be32 saddr ;
237
+ __be32 daddr ;
238
+ };
239
+ struct {
240
+ __be32 saddr ;
241
+ __be32 daddr ;
242
+ } addrs ;
243
+ };
244
+ };
245
+
246
+ struct bpf_nf_ctx {
247
+ const struct nf_hook_state * state ;
248
+ struct sk_buff * skb ;
249
+ };
250
+
251
+
138
252
#endif /* __VMLINUX_NET_H__ */
0 commit comments