Skip to content

Commit 2ccffa9

Browse files
pvachonwycats
authored andcommitted
Add a MulticastTtl type
The multicast TTL type is a uint8_t typically.
1 parent 599645f commit 2ccffa9

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/sys/socket.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ pub enum SockAddr {
3838

3939
#[cfg(target_os = "linux")]
4040
mod consts {
41-
use libc::{c_int};
41+
use libc::{c_int, uint8_t};
4242

4343
pub type AddressFamily = c_int;
4444

@@ -106,6 +106,9 @@ mod consts {
106106

107107
// Socket options for the IP layer of the socket
108108
pub const IP_MULTICAST_IF: SockOpt = 32;
109+
110+
pub type IpMulticastTtl = uint8_t;
111+
109112
pub const IP_MULTICAST_TTL: SockOpt = 33;
110113
pub const IP_MULTICAST_LOOP: SockOpt = 34;
111114
pub const IP_ADD_MEMBERSHIP: SockOpt = 35;

0 commit comments

Comments
 (0)