diff options
author | Phil Vachon <phil@cowpig.ca> | 2014-10-08 12:32:58 -0400 |
---|---|---|
committer | Phil Vachon <phil@cowpig.ca> | 2014-10-20 14:17:20 -0400 |
commit | 79c3d5c571c8b17455e80cfc717c467b2f72b65d (patch) | |
tree | 2074f4383dcf22127519fc4e04f37470327bc541 /src/sys/socket.rs | |
parent | b9fcfd570d82a472ec565dce8916077a932112c6 (diff) | |
download | nix-79c3d5c571c8b17455e80cfc717c467b2f72b65d.zip |
Add Special INADDR_* definitions
Add definitions for INADDR_* types that are handy when instructing the
kernel how to specify interfaces.
Diffstat (limited to 'src/sys/socket.rs')
-rw-r--r-- | src/sys/socket.rs | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/sys/socket.rs b/src/sys/socket.rs index 4a5aea3c..cadb21ac 100644 --- a/src/sys/socket.rs +++ b/src/sys/socket.rs @@ -113,6 +113,13 @@ mod consts { pub const IP_MULTICAST_LOOP: SockOpt = 34; pub const IP_ADD_MEMBERSHIP: SockOpt = 35; pub const IP_DROP_MEMBERSHIP: SockOpt = 36; + + pub type InAddrT = u32; + + // Declarations of special addresses + pub const INADDR_ANY: InAddrT = 0; + pub const INADDR_NONE: InAddrT = 0xffffffff; + pub const INADDR_BROADCAST: InAddrT = 0xffffffff; } #[cfg(any(target_os = "macos", target_os = "ios"))] |