Skip to content

Commit 577fdc8

Browse files
committed
Auto merge of #1248 - Ralith:flowinfo, r=gnzlbg
Expose IPV6_FLOWINFO* on Linux
2 parents dda8505 + b59eb6b commit 577fdc8

File tree

2 files changed

+18
-1
lines changed

2 files changed

+18
-1
lines changed

libc-test/build.rs

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -701,7 +701,18 @@ fn do_ctest() {
701701
"AF_MAX" | "PF_MAX" => true,
702702

703703
// These are not in a glibc release yet, only in kernel headers.
704-
"AF_XDP" | "PF_XDP" | "SOL_XDP" if linux => true,
704+
"AF_XDP"
705+
| "PF_XDP"
706+
| "SOL_XDP"
707+
| "IPV6_FLOWINFO"
708+
| "IPV6_FLOWLABEL_MGR"
709+
| "IPV6_FLOWINFO_SEND"
710+
| "IPV6_FLOWINFO_FLOWLABEL"
711+
| "IPV6_FLOWINFO_PRIORITY"
712+
if linux =>
713+
{
714+
true
715+
}
705716

706717
// Present on historical versions of iOS, but now removed in more
707718
// recent SDKs

src/unix/notbsd/mod.rs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -785,18 +785,24 @@ pub const IP_RECVTOS: ::c_int = 13;
785785
pub const IP_ADD_MEMBERSHIP: ::c_int = 35;
786786
pub const IP_DROP_MEMBERSHIP: ::c_int = 36;
787787
pub const IP_TRANSPARENT: ::c_int = 19;
788+
pub const IPV6_FLOWINFO: ::c_int = 11;
788789
pub const IPV6_UNICAST_HOPS: ::c_int = 16;
789790
pub const IPV6_MULTICAST_IF: ::c_int = 17;
790791
pub const IPV6_MULTICAST_HOPS: ::c_int = 18;
791792
pub const IPV6_MULTICAST_LOOP: ::c_int = 19;
792793
pub const IPV6_ADD_MEMBERSHIP: ::c_int = 20;
793794
pub const IPV6_DROP_MEMBERSHIP: ::c_int = 21;
794795
pub const IPV6_V6ONLY: ::c_int = 26;
796+
pub const IPV6_FLOWLABEL_MGR: ::c_int = 32;
797+
pub const IPV6_FLOWINFO_SEND: ::c_int = 33;
795798
pub const IPV6_RECVPKTINFO: ::c_int = 49;
796799
pub const IPV6_PKTINFO: ::c_int = 50;
797800
pub const IPV6_RECVTCLASS: ::c_int = 66;
798801
pub const IPV6_TCLASS: ::c_int = 67;
799802

803+
pub const IPV6_FLOWINFO_FLOWLABEL: ::c_int = 0x000fffff;
804+
pub const IPV6_FLOWINFO_PRIORITY: ::c_int = 0x0ff00000;
805+
800806
pub const TCP_NODELAY: ::c_int = 1;
801807
pub const TCP_MAXSEG: ::c_int = 2;
802808
pub const TCP_CORK: ::c_int = 3;

0 commit comments

Comments
 (0)