Skip to content

Commit b59eb6b

Browse files
committed
Expose IPV6_FLOW* on Linux
1 parent ff97bdb commit b59eb6b

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
@@ -695,7 +695,18 @@ fn do_ctest() {
695695
"AF_MAX" | "PF_MAX" => true,
696696

697697
// These are not in a glibc release yet, only in kernel headers.
698-
"AF_XDP" | "PF_XDP" | "SOL_XDP" if linux => true,
698+
"AF_XDP"
699+
| "PF_XDP"
700+
| "SOL_XDP"
701+
| "IPV6_FLOWINFO"
702+
| "IPV6_FLOWLABEL_MGR"
703+
| "IPV6_FLOWINFO_SEND"
704+
| "IPV6_FLOWINFO_FLOWLABEL"
705+
| "IPV6_FLOWINFO_PRIORITY"
706+
if linux =>
707+
{
708+
true
709+
}
699710

700711
// Present on historical versions of iOS, but now removed in more
701712
// recent SDKs

src/unix/notbsd/mod.rs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -774,18 +774,24 @@ pub const IP_RECVTOS: ::c_int = 13;
774774
pub const IP_ADD_MEMBERSHIP: ::c_int = 35;
775775
pub const IP_DROP_MEMBERSHIP: ::c_int = 36;
776776
pub const IP_TRANSPARENT: ::c_int = 19;
777+
pub const IPV6_FLOWINFO: ::c_int = 11;
777778
pub const IPV6_UNICAST_HOPS: ::c_int = 16;
778779
pub const IPV6_MULTICAST_IF: ::c_int = 17;
779780
pub const IPV6_MULTICAST_HOPS: ::c_int = 18;
780781
pub const IPV6_MULTICAST_LOOP: ::c_int = 19;
781782
pub const IPV6_ADD_MEMBERSHIP: ::c_int = 20;
782783
pub const IPV6_DROP_MEMBERSHIP: ::c_int = 21;
783784
pub const IPV6_V6ONLY: ::c_int = 26;
785+
pub const IPV6_FLOWLABEL_MGR: ::c_int = 32;
786+
pub const IPV6_FLOWINFO_SEND: ::c_int = 33;
784787
pub const IPV6_RECVPKTINFO: ::c_int = 49;
785788
pub const IPV6_PKTINFO: ::c_int = 50;
786789
pub const IPV6_RECVTCLASS: ::c_int = 66;
787790
pub const IPV6_TCLASS: ::c_int = 67;
788791

792+
pub const IPV6_FLOWINFO_FLOWLABEL: ::c_int = 0x000fffff;
793+
pub const IPV6_FLOWINFO_PRIORITY: ::c_int = 0x0ff00000;
794+
789795
pub const TCP_NODELAY: ::c_int = 1;
790796
pub const TCP_MAXSEG: ::c_int = 2;
791797
pub const TCP_CORK: ::c_int = 3;

0 commit comments

Comments
 (0)