Skip to content

Commit

Permalink
Auto merge of #3275 - leftmostcat:add-sockios, r=JohnTitor
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
bors committed Jun 24, 2023
2 parents c16d97c + 4a5b962 commit 9fc552a
Show file tree
Hide file tree
Showing 10 changed files with 46 additions and 0 deletions.
7 changes: 7 additions & 0 deletions libc-test/semver/android.txt
Original file line number Diff line number Diff line change
Expand Up @@ -605,9 +605,11 @@ FF_MAX
FILE
FILENAME_MAX
FIOCLEX
FIOGETOWN
FIONBIO
FIONCLEX
FIONREAD
FIOSETOWN
FLUSHO
FOPEN_MAX
FUTEX_CLOCK_REALTIME
Expand Down Expand Up @@ -2135,6 +2137,7 @@ SIG_SETMASK
SIG_UNBLOCK
SIOCADDMULTI
SIOCADDRT
SIOCATMARK
SIOCDARP
SIOCDELMULTI
SIOCDELRT
Expand All @@ -2154,7 +2157,10 @@ SIOCGIFMTU
SIOCGIFNAME
SIOCGIFNETMASK
SIOCGIFSLAVE
SIOCGPGRP
SIOCGRARP
SIOCGSTAMP_OLD
SIOCGSTAMPNS_OLD
SIOCSARP
SIOCSIFADDR
SIOCSIFBRDADDR
Expand All @@ -2169,6 +2175,7 @@ SIOCSIFMETRIC
SIOCSIFMTU
SIOCSIFNETMASK
SIOCSIFSLAVE
SIOCSPGRP
SIOCSRARP
SI_LOAD_SHIFT
SMB_SUPER_MAGIC
Expand Down
3 changes: 3 additions & 0 deletions libc-test/semver/apple.txt
Original file line number Diff line number Diff line change
Expand Up @@ -1289,7 +1289,10 @@ SIGINFO
SIGIO
SIGNATURE
SIGSTKSZ
SIOCATMARK
SIOCGIFADDR
SIOCGPGRP
SIOCSPGRP
SOCK_MAXADDRLEN
SOCK_RAW
SOCK_RDM
Expand Down
3 changes: 3 additions & 0 deletions libc-test/semver/dragonfly.txt
Original file line number Diff line number Diff line change
Expand Up @@ -918,7 +918,10 @@ SIGINFO
SIGIO
SIGNATURE
SIGSTKSZ
SIOCATMARK
SIOCGIFADDR
SIOCGPGRP
SIOCSPGRP
SLIPDISC
SOCK_CLOEXEC
SOCK_MAXADDRLEN
Expand Down
3 changes: 3 additions & 0 deletions libc-test/semver/freebsd.txt
Original file line number Diff line number Diff line change
Expand Up @@ -1313,7 +1313,10 @@ SIGLIBRT
SIGLWP
SIGSTKSZ
SIGTHR
SIOCATMARK
SIOCGIFADDR
SIOCGPGRP
SIOCSPGRP
SLIPDISC
SOCKCREDSIZE
SOCK_CLOEXEC
Expand Down
7 changes: 7 additions & 0 deletions libc-test/semver/linux.txt
Original file line number Diff line number Diff line change
Expand Up @@ -751,8 +751,10 @@ FFDLY
FF_CNT
FF_MAX
FILENAME_MAX
FIOGETOWN
FIONCLEX
FIONREAD
FIOSETOWN
FLUSHO
FOPEN_MAX
FUTEX_BITSET_MATCH_ANY
Expand Down Expand Up @@ -2362,6 +2364,7 @@ SIGRTMIN
SIGSTKSZ
SIOCADDMULTI
SIOCADDRT
SIOCATMARK
SIOCDARP
SIOCDELMULTI
SIOCDELRT
Expand Down Expand Up @@ -2389,8 +2392,11 @@ SIOCGIFNETMASK
SIOCGIFPFLAGS
SIOCGIFSLAVE
SIOCGIFTXQLEN
SIOCGPGRP
SIOCGRARP
SIOCGSKNS
SIOCGSTAMP_OLD
SIOCGSTAMPNS_OLD
SIOGIFINDEX
SIOCGMIIPHY
SIOCGMIIREG
Expand All @@ -2414,6 +2420,7 @@ SIOCSIFPFLAGS
SIOCSIFSLAVE
SIOCSIFTXQLEN
SIOCSMIIREG
SIOCSPGRP
SIOCSRARP
SIOCOUTQNSD
SIOCWANDEV
Expand Down
3 changes: 3 additions & 0 deletions libc-test/semver/netbsd.txt
Original file line number Diff line number Diff line change
Expand Up @@ -941,7 +941,10 @@ SIGINFO
SIGIO
SIGNATURE
SIGSTKSZ
SIOCATMARK
SIOCGIFADDR
SIOCGPGRP
SIOCSPGRP
SOCKCREDSIZE
SOCK_CLOEXEC
SOCK_CONN_DGRAM
Expand Down
3 changes: 3 additions & 0 deletions libc-test/semver/openbsd.txt
Original file line number Diff line number Diff line change
Expand Up @@ -770,7 +770,10 @@ SIGEMT
SIGINFO
SIGIO
SIGSTKSZ
SIOCATMARK
SIOCGIFADDR
SIOCGPGRP
SIOCSPGRP
SOCK_CLOEXEC
SOCK_DNS
SOCK_NONBLOCK
Expand Down
3 changes: 3 additions & 0 deletions src/unix/bsd/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -494,6 +494,9 @@ pub const BIOCVERSION: ::c_ulong = 0x40044271;
pub const BIOCGHDRCMPLT: ::c_ulong = 0x40044274;
pub const BIOCSHDRCMPLT: ::c_ulong = 0x80044275;
pub const SIOCGIFADDR: ::c_ulong = 0xc0206921;
pub const SIOCATMARK: ::c_ulong = 0x40047307;
pub const SIOCSPGRP: ::c_ulong = 0x80047308;
pub const SIOCGPGRP: ::c_ulong = 0x40047309;

pub const REG_BASIC: ::c_int = 0o0000;
pub const REG_EXTENDED: ::c_int = 0o0001;
Expand Down
7 changes: 7 additions & 0 deletions src/unix/linux_like/android/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2580,6 +2580,13 @@ pub const ETH_P_XDSA: ::c_int = 0x00F8;
/* see rust-lang/libc#924 pub const ETH_P_MAP: ::c_int = 0x00F9;*/
// end android/platform/bionic/libc/kernel/uapi/linux/if_ether.h

pub const FIOSETOWN: ::c_ulong = 0x00008901;
pub const SIOCSPGRP: ::c_ulong = 0x00008902;
pub const FIOGETOWN: ::c_ulong = 0x00008903;
pub const SIOCGPGRP: ::c_ulong = 0x00008904;
pub const SIOCATMARK: ::c_ulong = 0x00008905;
pub const SIOCGSTAMP_OLD: ::c_ulong = 0x00008906;
pub const SIOCGSTAMPNS_OLD: ::c_ulong = 0x00008907;
pub const SIOCADDRT: ::c_ulong = 0x0000890B;
pub const SIOCDELRT: ::c_ulong = 0x0000890C;
pub const SIOCGIFNAME: ::c_ulong = 0x00008910;
Expand Down
7 changes: 7 additions & 0 deletions src/unix/linux_like/linux/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2745,6 +2745,13 @@ pub const NF_IP6_PRI_LAST: ::c_int = ::INT_MAX;
// linux/netfilter_ipv6/ip6_tables.h
pub const IP6T_SO_ORIGINAL_DST: ::c_int = 80;

pub const FIOSETOWN: ::c_ulong = 0x00008901;
pub const SIOCSPGRP: ::c_ulong = 0x00008902;
pub const FIOGETOWN: ::c_ulong = 0x00008903;
pub const SIOCGPGRP: ::c_ulong = 0x00008904;
pub const SIOCATMARK: ::c_ulong = 0x00008905;
pub const SIOCGSTAMP_OLD: ::c_ulong = 0x00008906;
pub const SIOCGSTAMPNS_OLD: ::c_ulong = 0x00008907;
pub const SIOCADDRT: ::c_ulong = 0x0000890B;
pub const SIOCDELRT: ::c_ulong = 0x0000890C;
pub const SIOCGIFNAME: ::c_ulong = 0x00008910;
Expand Down

0 comments on commit 9fc552a

Please sign in to comment.