summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorPhil Vachon <phil@cowpig.ca>2014-10-08 11:28:24 -0400
committerPhil Vachon <phil@cowpig.ca>2014-10-20 14:16:28 -0400
commitb9fcfd570d82a472ec565dce8916077a932112c6 (patch)
treeed8cb8a519bdb5eecfc17c04ea3ebf489d11de78 /src
parenta69b720049455ddebee31893d588b15f0f32f6a3 (diff)
downloadnix-b9fcfd570d82a472ec565dce8916077a932112c6.zip
Add a MulticastTtl type
The multicast TTL type is a uint8_t typically.
Diffstat (limited to 'src')
-rw-r--r--src/sys/socket.rs5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/sys/socket.rs b/src/sys/socket.rs
index c885a6f5..4a5aea3c 100644
--- a/src/sys/socket.rs
+++ b/src/sys/socket.rs
@@ -38,7 +38,7 @@ pub enum SockAddr {
#[cfg(target_os = "linux")]
mod consts {
- use libc::{c_int};
+ use libc::{c_int, uint8_t};
pub type AddressFamily = c_int;
@@ -106,6 +106,9 @@ mod consts {
// Socket options for the IP layer of the socket
pub const IP_MULTICAST_IF: SockOpt = 32;
+
+ pub type IpMulticastTtl = uint8_t;
+
pub const IP_MULTICAST_TTL: SockOpt = 33;
pub const IP_MULTICAST_LOOP: SockOpt = 34;
pub const IP_ADD_MEMBERSHIP: SockOpt = 35;