Expose unix ECN-related constants
This commit is contained in:
parent
ed8309bc03
commit
94e30dfacd
@ -183,6 +183,8 @@ pub const IP_MULTICAST_IF: ::c_int = 9;
|
||||
pub const IP_MULTICAST_TTL: ::c_int = 10;
|
||||
pub const IP_MULTICAST_LOOP: ::c_int = 11;
|
||||
|
||||
pub const IP_TOS: ::c_int = 1;
|
||||
|
||||
pub const IPV6_UNICAST_HOPS: ::c_int = 4;
|
||||
pub const IPV6_MULTICAST_IF: ::c_int = 9;
|
||||
pub const IPV6_MULTICAST_HOPS: ::c_int = 10;
|
||||
|
@ -296,6 +296,12 @@ 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_NOT_ECT: u8 = 0x00;
|
||||
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;
|
||||
|
@ -623,9 +623,11 @@ pub const SOCK_RDM: ::c_int = 4;
|
||||
pub const IP_MULTICAST_IF: ::c_int = 32;
|
||||
pub const IP_MULTICAST_TTL: ::c_int = 33;
|
||||
pub const IP_MULTICAST_LOOP: ::c_int = 34;
|
||||
pub const IP_TOS: ::c_int = 1;
|
||||
pub const IP_TTL: ::c_int = 2;
|
||||
pub const IP_HDRINCL: ::c_int = 3;
|
||||
pub const IP_PKTINFO: ::c_int = 8;
|
||||
pub const IP_RECVTOS: ::c_int = 13;
|
||||
pub const IP_ADD_MEMBERSHIP: ::c_int = 35;
|
||||
pub const IP_DROP_MEMBERSHIP: ::c_int = 36;
|
||||
pub const IP_TRANSPARENT: ::c_int = 19;
|
||||
@ -1087,6 +1089,10 @@ f! {
|
||||
pub fn IPOPT_NUMBER(o: u8) -> u8 {
|
||||
o & IPOPT_NUMBER_MASK
|
||||
}
|
||||
|
||||
pub fn IPTOS_ECN(x: u8) -> u8 {
|
||||
x & super::IPTOS_ECN_MASK
|
||||
}
|
||||
}
|
||||
|
||||
extern {
|
||||
|
Loading…
Reference in New Issue
Block a user