diff options
author | Phil Vachon <phil@cowpig.ca> | 2014-10-08 11:28:24 -0400 |
---|---|---|
committer | Phil Vachon <phil@cowpig.ca> | 2014-10-20 14:16:28 -0400 |
commit | b9fcfd570d82a472ec565dce8916077a932112c6 (patch) | |
tree | ed8cb8a519bdb5eecfc17c04ea3ebf489d11de78 | |
parent | a69b720049455ddebee31893d588b15f0f32f6a3 (diff) | |
download | nix-b9fcfd570d82a472ec565dce8916077a932112c6.zip |
Add a MulticastTtl type
The multicast TTL type is a uint8_t typically.
-rw-r--r-- | src/sys/socket.rs | 5 |
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; |