@@ -21,28 +21,64 @@ pub fn if_nametoindex<P: ?Sized + NixPath>(name: &P) -> Result<c_uint> {
21
21
libc_bitflags ! (
22
22
/// Standard interface flags, used by `getifaddrs`
23
23
pub struct InterfaceFlags : libc:: c_int {
24
+ /// Interface is running. (see
25
+ /// [`netdevice(7)`](http://man7.org/linux/man-pages/man7/netdevice.7.html))
24
26
IFF_UP ;
27
+ /// Valid broadcast address set. (see
28
+ /// [`netdevice(7)`](http://man7.org/linux/man-pages/man7/netdevice.7.html))
25
29
IFF_BROADCAST ;
30
+ /// Internal debugging flag. (see
31
+ /// [`netdevice(7)`](http://man7.org/linux/man-pages/man7/netdevice.7.html))
26
32
IFF_DEBUG ;
33
+ /// Interface is a loopback interface. (see
34
+ /// [`netdevice(7)`](http://man7.org/linux/man-pages/man7/netdevice.7.html))
27
35
IFF_LOOPBACK ;
36
+ /// Interface is a point-to-point link. (see
37
+ /// [`netdevice(7)`](http://man7.org/linux/man-pages/man7/netdevice.7.html))
28
38
IFF_POINTOPOINT ;
29
- #[ cfg( not( any( target_os = "freebsd" , target_os = "dragonfly" , target_os = "haiku" ) ) ) ]
39
+ #[ cfg( any( target_os = "android" , target_os = "fuchsia" , target_os = "ios" ,
40
+ target_os = "linux" , target_os = "macos" , target_os = "netbsd" ,
41
+ target_os = "openbsd" ) ) ]
42
+ /// Avoid use of trailers. (see
43
+ /// [`netdevice(7)`](http://man7.org/linux/man-pages/man7/netdevice.7.html))
30
44
IFF_NOTRAILERS ;
31
- #[ cfg( not( any( target_os = "freebsd" , target_os = "haiku" ) ) ) ]
45
+ #[ cfg( any( target_os = "android" , target_os = "dragonfly" , target_os = "fuchsia" ,
46
+ target_os = "ios" , target_os = "linux" , target_os = "macos" ,
47
+ target_os = "netbsd" , target_os = "openbsd" ) ) ]
48
+ /// Resources allocated. (see
49
+ /// [`netdevice(7)`](http://man7.org/linux/man-pages/man7/netdevice.7.html))
32
50
IFF_RUNNING ;
51
+ /// No arp protocol, L2 destination address not set. (see
52
+ /// [`netdevice(7)`](http://man7.org/linux/man-pages/man7/netdevice.7.html))
33
53
IFF_NOARP ;
54
+ /// Interface is in promiscuous mode. (see
55
+ /// [`netdevice(7)`](http://man7.org/linux/man-pages/man7/netdevice.7.html))
34
56
IFF_PROMISC ;
57
+ /// Receive all multicast packets. (see
58
+ /// [`netdevice(7)`](http://man7.org/linux/man-pages/man7/netdevice.7.html))
35
59
IFF_ALLMULTI ;
36
- #[ cfg( any( target_os = "linux" , target_os = "android" , target_os = "fuchsia" ) ) ]
60
+ #[ cfg( any( target_os = "android" , target_os = "fuchsia" , target_os = "linux" ) ) ]
61
+ /// Master of a load balancing bundle. (see
62
+ /// [`netdevice(7)`](http://man7.org/linux/man-pages/man7/netdevice.7.html))
37
63
IFF_MASTER ;
38
- #[ cfg( any( target_os = "linux" , target_os = "android" , target_os = "fuchsia" ) ) ]
64
+ #[ cfg( any( target_os = "android" , target_os = "fuchsia" , target_os = "linux" ) ) ]
65
+ /// Slave of a load balancing bundle. (see
66
+ /// [`netdevice(7)`](http://man7.org/linux/man-pages/man7/netdevice.7.html))
39
67
IFF_SLAVE ;
68
+ /// Supports multicast. (see
69
+ /// [`netdevice(7)`](http://man7.org/linux/man-pages/man7/netdevice.7.html))
40
70
IFF_MULTICAST ;
41
- #[ cfg( any( target_os = "linux" , target_os = "android" , target_os = "fuchsia" ) ) ]
71
+ #[ cfg( any( target_os = "android" , target_os = "fuchsia" , target_os = "linux" ) ) ]
72
+ /// Is able to select media type via ifmap. (see
73
+ /// [`netdevice(7)`](http://man7.org/linux/man-pages/man7/netdevice.7.html))
42
74
IFF_PORTSEL ;
43
- #[ cfg( any( target_os = "linux" , target_os = "android" , target_os = "fuchsia" ) ) ]
75
+ #[ cfg( any( target_os = "android" , target_os = "fuchsia" , target_os = "linux" ) ) ]
76
+ /// Auto media selection active. (see
77
+ /// [`netdevice(7)`](http://man7.org/linux/man-pages/man7/netdevice.7.html))
44
78
IFF_AUTOMEDIA ;
45
- #[ cfg( any( target_os = "linux" , target_os = "android" , target_os = "fuchsia" ) ) ]
79
+ #[ cfg( any( target_os = "android" , target_os = "fuchsia" , target_os = "linux" ) ) ]
80
+ /// The addresses are lost when the interface goes down. (see
81
+ /// [`netdevice(7)`](http://man7.org/linux/man-pages/man7/netdevice.7.html))
46
82
IFF_DYNAMIC ;
47
83
}
48
84
) ;
0 commit comments