@@ -12,28 +12,41 @@ use std::os::unix::io::RawFd;
12
12
#[ cfg( any( target_os = "ios" , target_os = "macos" ) ) ]
13
13
use :: sys:: socket:: addr:: sys_control:: SysControlAddr ;
14
14
15
+ /// These constants specify the protocol family to be used
16
+ /// in [`socket`](fn.socket.html) and [`socketpair`](fn.socketpair.html)
15
17
#[ repr( i32 ) ]
16
18
#[ derive( Copy , Clone , PartialEq , Eq , Debug , Hash ) ]
17
19
pub enum AddressFamily {
20
+ /// Local communication (see [`unix(7)`](http://man7.org/linux/man-pages/man7/unix.7.html))
18
21
Unix = libc:: AF_UNIX ,
22
+ /// IPv4 Internet protocols (see [`ip(7)`](http://man7.org/linux/man-pages/man7/ip.7.html))
19
23
Inet = libc:: AF_INET ,
24
+ /// IPv6 Internet protocols (see [`ipv6(7)`](http://man7.org/linux/man-pages/man7/ipv6.7.html))
20
25
Inet6 = libc:: AF_INET6 ,
26
+ /// Kernel user interface device (see [`netlink(7)`](http://man7.org/linux/man-pages/man7/netlink.7.html))
21
27
#[ cfg( any( target_os = "android" , target_os = "linux" ) ) ]
22
28
Netlink = libc:: AF_NETLINK ,
29
+ /// Low level packet interface (see [`packet(7)`](http://man7.org/linux/man-pages/man7/packet.7.html))
23
30
#[ cfg( any( target_os = "android" , target_os = "linux" ) ) ]
24
31
Packet = libc:: AF_PACKET ,
32
+ /// KEXT Controls and Notifications
25
33
#[ cfg( any( target_os = "ios" , target_os = "macos" ) ) ]
26
34
System = libc:: AF_SYSTEM ,
35
+ /// Amateur radio AX.25 protocol
27
36
#[ cfg( any( target_os = "android" , target_os = "linux" ) ) ]
28
37
Ax25 = libc:: AF_AX25 ,
38
+ /// IPX - Novell protocols
29
39
Ipx = libc:: AF_IPX ,
40
+ /// AppleTalk
30
41
AppleTalk = libc:: AF_APPLETALK ,
31
42
#[ cfg( any( target_os = "android" , target_os = "linux" ) ) ]
32
43
NetRom = libc:: AF_NETROM ,
33
44
#[ cfg( any( target_os = "android" , target_os = "linux" ) ) ]
34
45
Bridge = libc:: AF_BRIDGE ,
46
+ /// Access to raw ATM PVCs
35
47
#[ cfg( any( target_os = "android" , target_os = "linux" ) ) ]
36
48
AtmPvc = libc:: AF_ATMPVC ,
49
+ /// ITU-T X.25 / ISO-8208 protocol (see [`x25(7)`](http://man7.org/linux/man-pages/man7/x25.7.html))
37
50
#[ cfg( any( target_os = "android" , target_os = "linux" ) ) ]
38
51
X25 = libc:: AF_X25 ,
39
52
#[ cfg( any( target_os = "android" , target_os = "linux" ) ) ]
@@ -83,6 +96,7 @@ pub enum AddressFamily {
83
96
Ieee802154 = libc:: AF_IEEE802154 ,
84
97
#[ cfg( any( target_os = "android" , target_os = "linux" ) ) ]
85
98
Caif = libc:: AF_CAIF ,
99
+ /// Interface to kernel crypto API
86
100
#[ cfg( any( target_os = "android" , target_os = "linux" ) ) ]
87
101
Alg = libc:: AF_ALG ,
88
102
#[ cfg( target_os = "linux" ) ]
0 commit comments