summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBenjamin Saunders <ben.e.saunders@gmail.com>2018-12-15 01:39:32 -0800
committerBenjamin Saunders <ben.e.saunders@gmail.com>2018-12-15 01:39:32 -0800
commit0de81a6bdfee0af34cb09f4cb2f39e0096af3255 (patch)
treebf11995866a307d890536d92d84f91d437ec4814
parent26c34b7e92f4889c3ffe76c2e119094696d4ebe8 (diff)
downloadrust-libc-0de81a6bdfee0af34cb09f4cb2f39e0096af3255.tar.gz
Narrow IPTOS_ECN_... definitions
-rw-r--r--src/unix/bsd/mod.rs4
-rw-r--r--src/unix/mod.rs5
-rw-r--r--src/unix/notbsd/mod.rs5
3 files changed, 9 insertions, 5 deletions
diff --git a/src/unix/bsd/mod.rs b/src/unix/bsd/mod.rs
index b0788124ae..03125c9473 100644
--- a/src/unix/bsd/mod.rs
+++ b/src/unix/bsd/mod.rs
@@ -191,6 +191,10 @@ pub const IPV6_MULTICAST_LOOP: ::c_int = 11;
pub const IPV6_V6ONLY: ::c_int = 27;
pub const IPTOS_ECN_NOTECT: u8 = 0x00;
+pub const IPTOS_ECN_MASK: u8 = 0x03;
+pub const IPTOS_ECN_ECT1: u8 = 0x01;
+pub const IPTOS_ECN_ECT0: u8 = 0x02;
+pub const IPTOS_ECN_CE: u8 = 0x03;
pub const ST_RDONLY: ::c_ulong = 1;
diff --git a/src/unix/mod.rs b/src/unix/mod.rs
index 2e3d7a48fe..370d7f48cb 100644
--- a/src/unix/mod.rs
+++ b/src/unix/mod.rs
@@ -296,11 +296,6 @@ pub const IPPROTO_UDP: ::c_int = 17;
pub const IPPROTO_IP: ::c_int = 0;
pub const IPPROTO_IPV6: ::c_int = 41;
-pub const IPTOS_ECN_MASK: u8 = 0x03;
-pub const IPTOS_ECN_ECT1: u8 = 0x01;
-pub const IPTOS_ECN_ECT0: u8 = 0x02;
-pub const IPTOS_ECN_CE: u8 = 0x03;
-
pub const INADDR_LOOPBACK: in_addr_t = 2130706433;
pub const INADDR_ANY: in_addr_t = 0;
pub const INADDR_BROADCAST: in_addr_t = 4294967295;
diff --git a/src/unix/notbsd/mod.rs b/src/unix/notbsd/mod.rs
index 52375fc92a..6ff0807da7 100644
--- a/src/unix/notbsd/mod.rs
+++ b/src/unix/notbsd/mod.rs
@@ -878,6 +878,11 @@ pub const IPTOS_PREC_IMMEDIATE: u8 = 0x40;
pub const IPTOS_PREC_PRIORITY: u8 = 0x20;
pub const IPTOS_PREC_ROUTINE: u8 = 0x00;
+pub const IPTOS_ECN_MASK: u8 = 0x03;
+pub const IPTOS_ECN_ECT1: u8 = 0x01;
+pub const IPTOS_ECN_ECT0: u8 = 0x02;
+pub const IPTOS_ECN_CE: u8 = 0x03;
+
pub const IPOPT_COPY: u8 = 0x80;
pub const IPOPT_CLASS_MASK: u8 = 0x60;
pub const IPOPT_NUMBER_MASK: u8 = 0x1f;