@@ -183,6 +183,35 @@ pub const BLKPBSZGET: ::Ioctl = 0x2000127B;
183
183
//pub const TIOCGRS485: ::Ioctl = 0x40205441;
184
184
//pub const TIOCSRS485: ::Ioctl = 0xc0205442;
185
185
186
+ // linux/if_tun.h
187
+ pub const TUNSETNOCSUM : :: Ioctl = 0x800454c8 ;
188
+ pub const TUNSETDEBUG : :: Ioctl = 0x800454c9 ;
189
+ pub const TUNSETIFF : :: Ioctl = 0x800454ca ;
190
+ pub const TUNSETPERSIST : :: Ioctl = 0x800454cb ;
191
+ pub const TUNSETOWNER : :: Ioctl = 0x800454cc ;
192
+ pub const TUNSETLINK : :: Ioctl = 0x800454cd ;
193
+ pub const TUNSETGROUP : :: Ioctl = 0x800454ce ;
194
+ pub const TUNGETFEATURES : :: Ioctl = 0x400454cf ;
195
+ pub const TUNSETOFFLOAD : :: Ioctl = 0x800454d0 ;
196
+ pub const TUNSETTXFILTER : :: Ioctl = 0x800454d1 ;
197
+ pub const TUNGETIFF : :: Ioctl = 0x400454d2 ;
198
+ pub const TUNGETSNDBUF : :: Ioctl = 0x400454d3 ;
199
+ pub const TUNSETSNDBUF : :: Ioctl = 0x800454d4 ;
200
+ pub const TUNGETVNETHDRSZ : :: Ioctl = 0x400454d7 ;
201
+ pub const TUNSETVNETHDRSZ : :: Ioctl = 0x800454d8 ;
202
+ pub const TUNSETQUEUE : :: Ioctl = 0x800454d9 ;
203
+ pub const TUNSETIFINDEX : :: Ioctl = 0x800454da ;
204
+ pub const TUNSETVNETLE : :: Ioctl = 0x800454dc ;
205
+ pub const TUNGETVNETLE : :: Ioctl = 0x400454dd ;
206
+ /* The TUNSETVNETBE and TUNGETVNETBE ioctls are for cross-endian support on
207
+ * little-endian hosts. Not all kernel configurations support them, but all
208
+ * configurations that support SET also support GET.
209
+ */
210
+ pub const TUNSETVNETBE : :: Ioctl = 0x800454de ;
211
+ pub const TUNGETVNETBE : :: Ioctl = 0x400454df ;
212
+ pub const TUNSETSTEERINGEBPF : :: Ioctl = 0x400454e0 ;
213
+ pub const TUNSETFILTEREBPF : :: Ioctl = 0x400454e1 ;
214
+
186
215
pub const TIOCM_LE : :: c_int = 0x001 ;
187
216
pub const TIOCM_DTR : :: c_int = 0x002 ;
188
217
pub const TIOCM_RTS : :: c_int = 0x004 ;
@@ -246,6 +275,9 @@ cfg_if! {
246
275
pub const FS_IOC32_SETFLAGS : :: Ioctl = 0x80046602 ;
247
276
pub const FS_IOC32_GETVERSION : :: Ioctl = 0x40047601 ;
248
277
pub const FS_IOC32_SETVERSION : :: Ioctl = 0x80047602 ;
278
+ pub const TUNATTACHFILTER : :: Ioctl = 0x800854d5 ;
279
+ pub const TUNDETACHFILTER : :: Ioctl = 0x800854d6 ;
280
+ pub const TUNGETFILTER : :: Ioctl = 0x400854db ;
249
281
} else if #[ cfg( target_arch = "sparc64" ) ] {
250
282
pub const FS_IOC_GETFLAGS : :: Ioctl = 0x40086601 ;
251
283
pub const FS_IOC_SETFLAGS : :: Ioctl = 0x80086602 ;
@@ -255,5 +287,8 @@ cfg_if! {
255
287
pub const FS_IOC32_SETFLAGS : :: Ioctl = 0x80046602 ;
256
288
pub const FS_IOC32_GETVERSION : :: Ioctl = 0x40047601 ;
257
289
pub const FS_IOC32_SETVERSION : :: Ioctl = 0x80047602 ;
290
+ pub const TUNATTACHFILTER : :: Ioctl = 0x801054d5 ;
291
+ pub const TUNDETACHFILTER : :: Ioctl = 0x801054d6 ;
292
+ pub const TUNGETFILTER : :: Ioctl = 0x401054db ;
258
293
}
259
294
}
0 commit comments