File tree Expand file tree Collapse file tree 3 files changed +14
-0
lines changed Expand file tree Collapse file tree 3 files changed +14
-0
lines changed Original file line number Diff line number Diff line change @@ -183,6 +183,8 @@ pub const IP_MULTICAST_IF: ::c_int = 9;
183
183
pub const IP_MULTICAST_TTL : :: c_int = 10 ;
184
184
pub const IP_MULTICAST_LOOP : :: c_int = 11 ;
185
185
186
+ pub const IP_TOS : :: c_int = 1 ;
187
+
186
188
pub const IPV6_UNICAST_HOPS : :: c_int = 4 ;
187
189
pub const IPV6_MULTICAST_IF : :: c_int = 9 ;
188
190
pub const IPV6_MULTICAST_HOPS : :: c_int = 10 ;
Original file line number Diff line number Diff line change @@ -296,6 +296,12 @@ pub const IPPROTO_UDP: ::c_int = 17;
296
296
pub const IPPROTO_IP : :: c_int = 0 ;
297
297
pub const IPPROTO_IPV6 : :: c_int = 41 ;
298
298
299
+ pub const IPTOS_ECN_MASK : u8 = 0x03 ;
300
+ pub const IPTOS_ECN_NOT_ECT : u8 = 0x00 ;
301
+ pub const IPTOS_ECN_ECT1 : u8 = 0x01 ;
302
+ pub const IPTOS_ECN_ECT0 : u8 = 0x02 ;
303
+ pub const IPTOS_ECN_CE : u8 = 0x03 ;
304
+
299
305
pub const INADDR_LOOPBACK : in_addr_t = 2130706433 ;
300
306
pub const INADDR_ANY : in_addr_t = 0 ;
301
307
pub const INADDR_BROADCAST : in_addr_t = 4294967295 ;
Original file line number Diff line number Diff line change @@ -623,9 +623,11 @@ pub const SOCK_RDM: ::c_int = 4;
623
623
pub const IP_MULTICAST_IF : :: c_int = 32 ;
624
624
pub const IP_MULTICAST_TTL : :: c_int = 33 ;
625
625
pub const IP_MULTICAST_LOOP : :: c_int = 34 ;
626
+ pub const IP_TOS : :: c_int = 1 ;
626
627
pub const IP_TTL : :: c_int = 2 ;
627
628
pub const IP_HDRINCL : :: c_int = 3 ;
628
629
pub const IP_PKTINFO : :: c_int = 8 ;
630
+ pub const IP_RECVTOS : :: c_int = 13 ;
629
631
pub const IP_ADD_MEMBERSHIP : :: c_int = 35 ;
630
632
pub const IP_DROP_MEMBERSHIP : :: c_int = 36 ;
631
633
pub const IP_TRANSPARENT : :: c_int = 19 ;
@@ -1087,6 +1089,10 @@ f! {
1087
1089
pub fn IPOPT_NUMBER ( o: u8 ) -> u8 {
1088
1090
o & IPOPT_NUMBER_MASK
1089
1091
}
1092
+
1093
+ pub fn IPTOS_ECN ( x: u8 ) -> u8 {
1094
+ x & super :: IPTOS_ECN_MASK
1095
+ }
1090
1096
}
1091
1097
1092
1098
extern {
You can’t perform that action at this time.
0 commit comments