File tree Expand file tree Collapse file tree 4 files changed +13
-8
lines changed Expand file tree Collapse file tree 4 files changed +13
-8
lines changed Original file line number Diff line number Diff line change @@ -265,7 +265,7 @@ fn main() {
265
265
cfg. header ( "sys/fsuid.h" ) ;
266
266
cfg. header ( "linux/seccomp.h" ) ;
267
267
cfg. header ( "linux/if_ether.h" ) ;
268
-
268
+ cfg . header ( "linux/if_tun.h" ) ;
269
269
// DCCP support
270
270
if !uclibc && !musl && !emscripten {
271
271
cfg. header ( "linux/dccp.h" ) ;
@@ -280,7 +280,6 @@ fn main() {
280
280
cfg. header ( "linux/random.h" ) ;
281
281
cfg. header ( "elf.h" ) ;
282
282
cfg. header ( "link.h" ) ;
283
- cfg. header ( "linux/if_tun.h" ) ;
284
283
cfg. header ( "spawn.h" ) ;
285
284
}
286
285
Original file line number Diff line number Diff line change @@ -1351,6 +1351,9 @@ pub const IFF_MULTICAST: ::c_int = 0x1000;
1351
1351
pub const IFF_PORTSEL : :: c_int = 0x2000 ;
1352
1352
pub const IFF_AUTOMEDIA : :: c_int = 0x4000 ;
1353
1353
pub const IFF_DYNAMIC : :: c_int = 0x8000 ;
1354
+ pub const IFF_TUN : :: c_int = 0x0001 ;
1355
+ pub const IFF_TAP : :: c_int = 0x0002 ;
1356
+ pub const IFF_NO_PI : :: c_int = 0x1000 ;
1354
1357
1355
1358
pub const SOL_IP : :: c_int = 0 ;
1356
1359
pub const SOL_TCP : :: c_int = 6 ;
Original file line number Diff line number Diff line change @@ -978,6 +978,10 @@ pub const NFT_MSG_DELOBJ: ::c_int = 20;
978
978
pub const NFT_MSG_GETOBJ_RESET : :: c_int = 21 ;
979
979
pub const NFT_MSG_MAX : :: c_int = 22 ;
980
980
981
+ pub const IFF_TUN : :: c_int = 0x0001 ;
982
+ pub const IFF_TAP : :: c_int = 0x0002 ;
983
+ pub const IFF_NO_PI : :: c_int = 0x1000 ;
984
+
981
985
f ! {
982
986
pub fn CPU_ZERO ( cpuset: & mut cpu_set_t) -> ( ) {
983
987
for slot in cpuset. __bits. iter_mut( ) {
Original file line number Diff line number Diff line change @@ -756,16 +756,15 @@ pub const IFF_DORMANT: ::c_int = 0x20000;
756
756
pub const IFF_ECHO : :: c_int = 0x40000 ;
757
757
758
758
// linux/if_tun.h
759
+ pub const IFF_TUN : :: c_short = 0x0001 ;
760
+ pub const IFF_TAP : :: c_short = 0x0002 ;
761
+ pub const IFF_NO_PI : :: c_short = 0x1000 ;
759
762
// Read queue size
760
763
pub const TUN_READQ_SIZE : :: c_short = 500 ;
761
764
// TUN device type flags: deprecated. Use IFF_TUN/IFF_TAP instead.
762
- pub const TUN_TUN_DEV : :: c_short = IFF_TUN ;
763
- pub const TUN_TAP_DEV : :: c_short = IFF_TAP ;
765
+ pub const TUN_TUN_DEV : :: c_short = :: IFF_TUN ;
766
+ pub const TUN_TAP_DEV : :: c_short = :: IFF_TAP ;
764
767
pub const TUN_TYPE_MASK : :: c_short = 0x000f ;
765
- // TUNSETIFF ifr flags
766
- pub const IFF_TUN : :: c_short = 0x0001 ;
767
- pub const IFF_TAP : :: c_short = 0x0002 ;
768
- pub const IFF_NO_PI : :: c_short = 0x1000 ;
769
768
// This flag has no real effect
770
769
pub const IFF_ONE_QUEUE : :: c_short = 0x2000 ;
771
770
pub const IFF_VNET_HDR : :: c_short = 0x4000 ;
You can’t perform that action at this time.
0 commit comments