Skip to content

Commit 87c577e

Browse files
committed
Adding to missing macros
1 parent 92a5d3e commit 87c577e

File tree

1 file changed

+14
-0
lines changed
  • src/unix/linux_like/linux

1 file changed

+14
-0
lines changed

src/unix/linux_like/linux/mod.rs

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1829,6 +1829,8 @@ pub const IFLA_INFO_SLAVE_DATA: ::c_ushort = 5;
18291829
// linux/if_tun.h
18301830
pub const IFF_TUN: ::c_int = 0x0001;
18311831
pub const IFF_TAP: ::c_int = 0x0002;
1832+
pub const IFF_NAPI: ::c_int = 0x0010;
1833+
pub const IFF_NAPI_FRAGS: ::c_int = 0x0020;
18321834
pub const IFF_NO_PI: ::c_int = 0x1000;
18331835
// Read queue size
18341836
pub const TUN_READQ_SIZE: ::c_short = 500;
@@ -1846,6 +1848,18 @@ pub const IFF_DETACH_QUEUE: ::c_int = 0x0400;
18461848
// read-only flag
18471849
pub const IFF_PERSIST: ::c_int = 0x0800;
18481850
pub const IFF_NOFILTER: ::c_int = 0x1000;
1851+
// Socket options
1852+
pub const TUN_TX_TIMESTAMP: ::c_int = 1;
1853+
// Features for GSO (TUNSETOFFLOAD)
1854+
pub const TUN_F_CSUM: ::c_ushort = 0x01; /* You can hand me unchecksummed packets. */
1855+
pub const TUN_F_TSO4: ::c_ushort = 0x02; /* I can handle TSO for IPv4 packets */
1856+
pub const TUN_F_TSO6: ::c_ushort = 0x04; /* I can handle TSO for IPv6 packets */
1857+
pub const TUN_F_TSO_ECN: ::c_ushort = 0x08; /* I can handle TSO with ECN bits. */
1858+
pub const TUN_F_UFO: ::c_ushort = 0x10; /* I can handle UFO packets */
1859+
// Protocol info prepended to the packets (when IFF_NO_PI is not set)
1860+
pub const TUN_PKT_STRIP: ::c_int = 0x0001;
1861+
// Accept all multicast packets
1862+
pub const TUN_FLT_ALLMULTI: ::c_int = 0x0001;
18491863

18501864
// Since Linux 3.1
18511865
pub const SEEK_DATA: ::c_int = 3;

0 commit comments

Comments
 (0)