Skip to content

Commit abd5a3c

Browse files
committed
Auto merge of #1448 - equal-l2:bpf-consts, r=gnzlbg
Add ioctl() constants for BPF
2 parents c18f563 + cf1a3e1 commit abd5a3c

File tree

6 files changed

+38
-0
lines changed

6 files changed

+38
-0
lines changed

src/unix/bsd/apple/b32.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,11 @@ pub const __PTHREAD_RWLOCKATTR_SIZE__: usize = 12;
9494
pub const TIOCTIMESTAMP: ::c_ulong = 0x40087459;
9595
pub const TIOCDCDTIMESTAMP: ::c_ulong = 0x40087458;
9696

97+
pub const BIOCSETF: ::c_ulong = 0x80084267;
98+
pub const BIOCSRTIMEOUT: ::c_ulong = 0x8008426d;
99+
pub const BIOCGRTIMEOUT: ::c_ulong = 0x4008426e;
100+
pub const BIOCSETFNR: ::c_ulong = 0x8008427e;
101+
97102
extern {
98103
pub fn exchangedata(path1: *const ::c_char,
99104
path2: *const ::c_char,

src/unix/bsd/apple/b64.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,11 @@ pub const __PTHREAD_RWLOCKATTR_SIZE__: usize = 16;
9999
pub const TIOCTIMESTAMP: ::c_ulong = 0x40107459;
100100
pub const TIOCDCDTIMESTAMP: ::c_ulong = 0x40107458;
101101

102+
pub const BIOCSETF: ::c_ulong = 0x80104267;
103+
pub const BIOCSRTIMEOUT: ::c_ulong = 0x8010426d;
104+
pub const BIOCGRTIMEOUT: ::c_ulong = 0x4010426e;
105+
pub const BIOCSETFNR: ::c_ulong = 0x8010427e;
106+
102107
extern {
103108
pub fn exchangedata(path1: *const ::c_char,
104109
path2: *const ::c_char,

src/unix/bsd/apple/mod.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1761,6 +1761,8 @@ pub const TIOCPTYGRANT: ::c_uint = 0x20007454;
17611761
pub const TIOCPTYGNAME: ::c_uint = 0x40807453;
17621762
pub const TIOCPTYUNLK: ::c_uint = 0x20007452;
17631763

1764+
pub const BIOCGDLTLIST: ::c_ulong = 0xc00c4279;
1765+
17641766
pub const FIODTYPE: ::c_ulong = 0x4004667a;
17651767

17661768
pub const B0: speed_t = 0;

src/unix/bsd/freebsdlike/freebsd/mod.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -569,6 +569,8 @@ pub const TIOCSIG: ::c_uint = 0x2004745f;
569569
pub const TIOCM_DCD: ::c_int = 0x40;
570570
pub const H4DISC: ::c_int = 0x7;
571571

572+
pub const BIOCSETFNR: ::c_ulong = 0x80104282;
573+
572574
pub const FIONWRITE: ::c_ulong = 0x40046677;
573575
pub const FIONSPACE: ::c_ulong = 0x40046676;
574576
pub const FIOSEEKDATA: ::c_ulong = 0xc0086661;

src/unix/bsd/freebsdlike/mod.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1009,6 +1009,11 @@ pub const SLIPDISC: ::c_int = 0x4;
10091009
pub const PPPDISC: ::c_int = 0x5;
10101010
pub const NETGRAPHDISC: ::c_int = 0x6;
10111011

1012+
pub const BIOCSETF: ::c_ulong = 0x80104267;
1013+
pub const BIOCGDLTLIST: ::c_ulong = 0xc0104279;
1014+
pub const BIOCSRTIMEOUT: ::c_ulong = 0x8010426d;
1015+
pub const BIOCGRTIMEOUT: ::c_ulong = 0x4010426e;
1016+
10121017
pub const FIODTYPE: ::c_ulong = 0x4004667a;
10131018
pub const FIOGETLBA: ::c_ulong = 0x40046679;
10141019
pub const FIODGNAME: ::c_ulong = 0x80106678;

src/unix/bsd/mod.rs

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -436,6 +436,25 @@ pub const POLLWRNORM: ::c_short = 0x004;
436436
pub const POLLRDBAND: ::c_short = 0x080;
437437
pub const POLLWRBAND: ::c_short = 0x100;
438438

439+
pub const BIOCGBLEN: ::c_ulong = 0x40044266;
440+
pub const BIOCSBLEN: ::c_ulong = 0xc0044266;
441+
pub const BIOCFLUSH: ::c_uint = 0x20004268;
442+
pub const BIOCPROMISC: ::c_uint = 0x20004269;
443+
pub const BIOCGDLT: ::c_ulong = 0x4004426a;
444+
pub const BIOCGETIF: ::c_ulong = 0x4020426b;
445+
pub const BIOCSETIF: ::c_ulong = 0x8020426c;
446+
pub const BIOCGSTATS: ::c_ulong = 0x4008426f;
447+
pub const BIOCIMMEDIATE: ::c_ulong = 0x80044270;
448+
pub const BIOCVERSION: ::c_ulong = 0x40044271;
449+
pub const BIOCGRSIG: ::c_ulong = 0x40044272;
450+
pub const BIOCSRSIG: ::c_ulong = 0x80044273;
451+
pub const BIOCGHDRCMPLT: ::c_ulong = 0x40044274;
452+
pub const BIOCSHDRCMPLT: ::c_ulong = 0x80044275;
453+
pub const BIOCGSEESENT: ::c_ulong = 0x40044276;
454+
pub const BIOCSSEESENT: ::c_ulong = 0x80044277;
455+
pub const BIOCSDLT: ::c_ulong = 0x80044278;
456+
pub const SIOCGIFADDR: ::c_ulong = 0xc0206921;
457+
439458
f! {
440459
pub fn CMSG_FIRSTHDR(mhdr: *const ::msghdr) -> *mut ::cmsghdr {
441460
if (*mhdr).msg_controllen as usize >= ::mem::size_of::<::cmsghdr>() {

0 commit comments

Comments
 (0)