summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2018-02-26 03:07:07 +0000
committerbors <bors@rust-lang.org>2018-02-26 03:07:07 +0000
commit42377bb76d19addd7bdc9e4d4daea906c1e5a126 (patch)
tree57f39c01378b0a39a8b4afc0dafe6ce017868fb9
parentc4736915ea1e1e65583b290d86bb16ae7cb98518 (diff)
parent0e421c96117185d50b51f8e95374489eca233fbc (diff)
downloadrust-libc-42377bb76d19addd7bdc9e4d4daea906c1e5a126.tar.gz
Auto merge of #925 - bluejekyll:master, r=alexcrichton
add IPV6_MULTICAST_IF and IPV6_MULTICAST_HOPS These were missing from the net2 crate. Adding them here so that the higher functions can be added to net2 later. They are necessary for declaring the interface for ipv6 multicast packets (route), and limits on the number of hops an ipv6 packet can travel Linux reference: https://github.com/torvalds/linux/blob/master/include/uapi/linux/in6.h#L168-L170 macOS reference: https://github.com/apple/darwin-xnu/blob/master/bsd/netinet6/in6.h#L538-L540
-rw-r--r--src/fuchsia/mod.rs7
-rw-r--r--src/unix/bsd/mod.rs3
-rw-r--r--src/unix/notbsd/mod.rs8
3 files changed, 12 insertions, 6 deletions
diff --git a/src/fuchsia/mod.rs b/src/fuchsia/mod.rs
index bb641b3b90..f5b4f7fce3 100644
--- a/src/fuchsia/mod.rs
+++ b/src/fuchsia/mod.rs
@@ -1486,8 +1486,12 @@ pub const IP_HDRINCL: ::c_int = 3;
pub const IP_ADD_MEMBERSHIP: ::c_int = 35;
pub const IP_DROP_MEMBERSHIP: ::c_int = 36;
pub const IP_TRANSPARENT: ::c_int = 19;
+pub const IPV6_MULTICAST_IF: ::c_int = 17;
+pub const IPV6_MULTICAST_HOPS: ::c_int = 18;
+pub const IPV6_MULTICAST_LOOP: ::c_int = 19;
pub const IPV6_ADD_MEMBERSHIP: ::c_int = 20;
pub const IPV6_DROP_MEMBERSHIP: ::c_int = 21;
+pub const IPV6_V6ONLY: ::c_int = 26;
pub const TCP_NODELAY: ::c_int = 1;
pub const TCP_MAXSEG: ::c_int = 2;
@@ -1503,9 +1507,6 @@ pub const TCP_INFO: ::c_int = 11;
pub const TCP_QUICKACK: ::c_int = 12;
pub const TCP_CONGESTION: ::c_int = 13;
-pub const IPV6_MULTICAST_LOOP: ::c_int = 19;
-pub const IPV6_V6ONLY: ::c_int = 26;
-
pub const SO_DEBUG: ::c_int = 1;
pub const SHUT_RD: ::c_int = 0;
diff --git a/src/unix/bsd/mod.rs b/src/unix/bsd/mod.rs
index b9a88f09d2..bacfb41189 100644
--- a/src/unix/bsd/mod.rs
+++ b/src/unix/bsd/mod.rs
@@ -183,6 +183,9 @@ pub const IP_MULTICAST_IF: ::c_int = 9;
pub const IP_MULTICAST_TTL: ::c_int = 10;
pub const IP_MULTICAST_LOOP: ::c_int = 11;
+pub const IPV6_UNICAST_HOPS: ::c_int = 4;
+pub const IPV6_MULTICAST_IF: ::c_int = 9;
+pub const IPV6_MULTICAST_HOPS: ::c_int = 10;
pub const IPV6_MULTICAST_LOOP: ::c_int = 11;
pub const IPV6_V6ONLY: ::c_int = 27;
diff --git a/src/unix/notbsd/mod.rs b/src/unix/notbsd/mod.rs
index 07a6043032..92dfad6b9f 100644
--- a/src/unix/notbsd/mod.rs
+++ b/src/unix/notbsd/mod.rs
@@ -576,8 +576,13 @@ pub const IP_HDRINCL: ::c_int = 3;
pub const IP_ADD_MEMBERSHIP: ::c_int = 35;
pub const IP_DROP_MEMBERSHIP: ::c_int = 36;
pub const IP_TRANSPARENT: ::c_int = 19;
+pub const IPV6_UNICAST_HOPS: ::c_int = 16;
+pub const IPV6_MULTICAST_IF: ::c_int = 17;
+pub const IPV6_MULTICAST_HOPS: ::c_int = 18;
+pub const IPV6_MULTICAST_LOOP: ::c_int = 19;
pub const IPV6_ADD_MEMBERSHIP: ::c_int = 20;
pub const IPV6_DROP_MEMBERSHIP: ::c_int = 21;
+pub const IPV6_V6ONLY: ::c_int = 26;
pub const TCP_NODELAY: ::c_int = 1;
pub const TCP_MAXSEG: ::c_int = 2;
@@ -593,9 +598,6 @@ pub const TCP_INFO: ::c_int = 11;
pub const TCP_QUICKACK: ::c_int = 12;
pub const TCP_CONGESTION: ::c_int = 13;
-pub const IPV6_MULTICAST_LOOP: ::c_int = 19;
-pub const IPV6_V6ONLY: ::c_int = 26;
-
pub const SO_DEBUG: ::c_int = 1;
pub const SHUT_RD: ::c_int = 0;