Skip to content

Commit 9fc552a

Browse files
committed
Auto merge of #3275 - leftmostcat:add-sockios, r=JohnTitor
Define additional socket ioctls Define several socket-related `ioctl`s which aren't currently captured. Updated to include `ioctl`s from BSD systems. `libc-test` suite has not been run due to #3160.
2 parents c16d97c + 4a5b962 commit 9fc552a

File tree

10 files changed

+46
-0
lines changed

10 files changed

+46
-0
lines changed

libc-test/semver/android.txt

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -605,9 +605,11 @@ FF_MAX
605605
FILE
606606
FILENAME_MAX
607607
FIOCLEX
608+
FIOGETOWN
608609
FIONBIO
609610
FIONCLEX
610611
FIONREAD
612+
FIOSETOWN
611613
FLUSHO
612614
FOPEN_MAX
613615
FUTEX_CLOCK_REALTIME
@@ -2135,6 +2137,7 @@ SIG_SETMASK
21352137
SIG_UNBLOCK
21362138
SIOCADDMULTI
21372139
SIOCADDRT
2140+
SIOCATMARK
21382141
SIOCDARP
21392142
SIOCDELMULTI
21402143
SIOCDELRT
@@ -2154,7 +2157,10 @@ SIOCGIFMTU
21542157
SIOCGIFNAME
21552158
SIOCGIFNETMASK
21562159
SIOCGIFSLAVE
2160+
SIOCGPGRP
21572161
SIOCGRARP
2162+
SIOCGSTAMP_OLD
2163+
SIOCGSTAMPNS_OLD
21582164
SIOCSARP
21592165
SIOCSIFADDR
21602166
SIOCSIFBRDADDR
@@ -2169,6 +2175,7 @@ SIOCSIFMETRIC
21692175
SIOCSIFMTU
21702176
SIOCSIFNETMASK
21712177
SIOCSIFSLAVE
2178+
SIOCSPGRP
21722179
SIOCSRARP
21732180
SI_LOAD_SHIFT
21742181
SMB_SUPER_MAGIC

libc-test/semver/apple.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1289,7 +1289,10 @@ SIGINFO
12891289
SIGIO
12901290
SIGNATURE
12911291
SIGSTKSZ
1292+
SIOCATMARK
12921293
SIOCGIFADDR
1294+
SIOCGPGRP
1295+
SIOCSPGRP
12931296
SOCK_MAXADDRLEN
12941297
SOCK_RAW
12951298
SOCK_RDM

libc-test/semver/dragonfly.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -918,7 +918,10 @@ SIGINFO
918918
SIGIO
919919
SIGNATURE
920920
SIGSTKSZ
921+
SIOCATMARK
921922
SIOCGIFADDR
923+
SIOCGPGRP
924+
SIOCSPGRP
922925
SLIPDISC
923926
SOCK_CLOEXEC
924927
SOCK_MAXADDRLEN

libc-test/semver/freebsd.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1313,7 +1313,10 @@ SIGLIBRT
13131313
SIGLWP
13141314
SIGSTKSZ
13151315
SIGTHR
1316+
SIOCATMARK
13161317
SIOCGIFADDR
1318+
SIOCGPGRP
1319+
SIOCSPGRP
13171320
SLIPDISC
13181321
SOCKCREDSIZE
13191322
SOCK_CLOEXEC

libc-test/semver/linux.txt

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -751,8 +751,10 @@ FFDLY
751751
FF_CNT
752752
FF_MAX
753753
FILENAME_MAX
754+
FIOGETOWN
754755
FIONCLEX
755756
FIONREAD
757+
FIOSETOWN
756758
FLUSHO
757759
FOPEN_MAX
758760
FUTEX_BITSET_MATCH_ANY
@@ -2362,6 +2364,7 @@ SIGRTMIN
23622364
SIGSTKSZ
23632365
SIOCADDMULTI
23642366
SIOCADDRT
2367+
SIOCATMARK
23652368
SIOCDARP
23662369
SIOCDELMULTI
23672370
SIOCDELRT
@@ -2389,8 +2392,11 @@ SIOCGIFNETMASK
23892392
SIOCGIFPFLAGS
23902393
SIOCGIFSLAVE
23912394
SIOCGIFTXQLEN
2395+
SIOCGPGRP
23922396
SIOCGRARP
23932397
SIOCGSKNS
2398+
SIOCGSTAMP_OLD
2399+
SIOCGSTAMPNS_OLD
23942400
SIOGIFINDEX
23952401
SIOCGMIIPHY
23962402
SIOCGMIIREG
@@ -2414,6 +2420,7 @@ SIOCSIFPFLAGS
24142420
SIOCSIFSLAVE
24152421
SIOCSIFTXQLEN
24162422
SIOCSMIIREG
2423+
SIOCSPGRP
24172424
SIOCSRARP
24182425
SIOCOUTQNSD
24192426
SIOCWANDEV

libc-test/semver/netbsd.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -941,7 +941,10 @@ SIGINFO
941941
SIGIO
942942
SIGNATURE
943943
SIGSTKSZ
944+
SIOCATMARK
944945
SIOCGIFADDR
946+
SIOCGPGRP
947+
SIOCSPGRP
945948
SOCKCREDSIZE
946949
SOCK_CLOEXEC
947950
SOCK_CONN_DGRAM

libc-test/semver/openbsd.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -770,7 +770,10 @@ SIGEMT
770770
SIGINFO
771771
SIGIO
772772
SIGSTKSZ
773+
SIOCATMARK
773774
SIOCGIFADDR
775+
SIOCGPGRP
776+
SIOCSPGRP
774777
SOCK_CLOEXEC
775778
SOCK_DNS
776779
SOCK_NONBLOCK

src/unix/bsd/mod.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -494,6 +494,9 @@ pub const BIOCVERSION: ::c_ulong = 0x40044271;
494494
pub const BIOCGHDRCMPLT: ::c_ulong = 0x40044274;
495495
pub const BIOCSHDRCMPLT: ::c_ulong = 0x80044275;
496496
pub const SIOCGIFADDR: ::c_ulong = 0xc0206921;
497+
pub const SIOCATMARK: ::c_ulong = 0x40047307;
498+
pub const SIOCSPGRP: ::c_ulong = 0x80047308;
499+
pub const SIOCGPGRP: ::c_ulong = 0x40047309;
497500

498501
pub const REG_BASIC: ::c_int = 0o0000;
499502
pub const REG_EXTENDED: ::c_int = 0o0001;

src/unix/linux_like/android/mod.rs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2580,6 +2580,13 @@ pub const ETH_P_XDSA: ::c_int = 0x00F8;
25802580
/* see rust-lang/libc#924 pub const ETH_P_MAP: ::c_int = 0x00F9;*/
25812581
// end android/platform/bionic/libc/kernel/uapi/linux/if_ether.h
25822582

2583+
pub const FIOSETOWN: ::c_ulong = 0x00008901;
2584+
pub const SIOCSPGRP: ::c_ulong = 0x00008902;
2585+
pub const FIOGETOWN: ::c_ulong = 0x00008903;
2586+
pub const SIOCGPGRP: ::c_ulong = 0x00008904;
2587+
pub const SIOCATMARK: ::c_ulong = 0x00008905;
2588+
pub const SIOCGSTAMP_OLD: ::c_ulong = 0x00008906;
2589+
pub const SIOCGSTAMPNS_OLD: ::c_ulong = 0x00008907;
25832590
pub const SIOCADDRT: ::c_ulong = 0x0000890B;
25842591
pub const SIOCDELRT: ::c_ulong = 0x0000890C;
25852592
pub const SIOCGIFNAME: ::c_ulong = 0x00008910;

src/unix/linux_like/linux/mod.rs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2745,6 +2745,13 @@ pub const NF_IP6_PRI_LAST: ::c_int = ::INT_MAX;
27452745
// linux/netfilter_ipv6/ip6_tables.h
27462746
pub const IP6T_SO_ORIGINAL_DST: ::c_int = 80;
27472747

2748+
pub const FIOSETOWN: ::c_ulong = 0x00008901;
2749+
pub const SIOCSPGRP: ::c_ulong = 0x00008902;
2750+
pub const FIOGETOWN: ::c_ulong = 0x00008903;
2751+
pub const SIOCGPGRP: ::c_ulong = 0x00008904;
2752+
pub const SIOCATMARK: ::c_ulong = 0x00008905;
2753+
pub const SIOCGSTAMP_OLD: ::c_ulong = 0x00008906;
2754+
pub const SIOCGSTAMPNS_OLD: ::c_ulong = 0x00008907;
27482755
pub const SIOCADDRT: ::c_ulong = 0x0000890B;
27492756
pub const SIOCDELRT: ::c_ulong = 0x0000890C;
27502757
pub const SIOCGIFNAME: ::c_ulong = 0x00008910;

0 commit comments

Comments
 (0)