File tree Expand file tree Collapse file tree 2 files changed +33
-1
lines changed Expand file tree Collapse file tree 2 files changed +33
-1
lines changed Original file line number Diff line number Diff line change @@ -318,9 +318,21 @@ impl Protocol {
318
318
#[ cfg_attr( docsrs, doc( cfg( all( feature = "all" , target_os = "linux" ) ) ) ) ]
319
319
pub const DCCP : Protocol = Protocol ( sys:: IPPROTO_DCCP ) ;
320
320
321
- #[ cfg( all( feature = "all" , any( target_os = "freebsd" , target_os = "linux" ) ) ) ]
322
321
/// Protocol corresponding to `SCTP`.
322
+ #[ cfg( all( feature = "all" , any( target_os = "freebsd" , target_os = "linux" ) ) ) ]
323
323
pub const SCTP : Protocol = Protocol ( sys:: IPPROTO_SCTP ) ;
324
+
325
+ /// Protocol corresponding to `UDPLITE`.
326
+ #[ cfg( all(
327
+ feature = "all" ,
328
+ any(
329
+ target_os = "android" ,
330
+ target_os = "freebsd" ,
331
+ target_os = "fuchsia" ,
332
+ target_os = "linux" ,
333
+ )
334
+ ) ) ]
335
+ pub const UDPLITE : Protocol = Protocol ( sys:: IPPROTO_UDPLITE ) ;
324
336
}
325
337
326
338
impl From < c_int > for Protocol {
Original file line number Diff line number Diff line change @@ -93,6 +93,16 @@ pub(crate) use libc::IPPROTO_DCCP;
93
93
pub ( crate ) use libc:: IPPROTO_MPTCP ;
94
94
#[ cfg( all( feature = "all" , any( target_os = "freebsd" , target_os = "linux" ) ) ) ]
95
95
pub ( crate ) use libc:: IPPROTO_SCTP ;
96
+ #[ cfg( all(
97
+ feature = "all" ,
98
+ any(
99
+ target_os = "android" ,
100
+ target_os = "freebsd" ,
101
+ target_os = "fuchsia" ,
102
+ target_os = "linux" ,
103
+ )
104
+ ) ) ]
105
+ pub ( crate ) use libc:: IPPROTO_UDPLITE ;
96
106
pub ( crate ) use libc:: { IPPROTO_ICMP , IPPROTO_ICMPV6 , IPPROTO_TCP , IPPROTO_UDP } ;
97
107
// Used in `SockAddr`.
98
108
pub ( crate ) use libc:: {
@@ -500,6 +510,16 @@ impl_debug!(
500
510
libc:: IPPROTO_DCCP ,
501
511
#[ cfg( all( feature = "all" , any( target_os = "freebsd" , target_os = "linux" ) ) ) ]
502
512
libc:: IPPROTO_SCTP ,
513
+ #[ cfg( all(
514
+ feature = "all" ,
515
+ any(
516
+ target_os = "android" ,
517
+ target_os = "freebsd" ,
518
+ target_os = "fuchsia" ,
519
+ target_os = "linux" ,
520
+ )
521
+ ) ) ]
522
+ libc:: IPPROTO_UDPLITE ,
503
523
) ;
504
524
505
525
/// Unix-only API.
You can’t perform that action at this time.
0 commit comments