 import Foundation
 import ifaddrs
 
+/**
+ * This class represents a network interface in your system. For example, `en0` with a certain IP address.
+ * It is a wrapper around the `getifaddrs` system call.
+ *
+ * Typical use of this class is to first call `Interface.allInterfaces()` and then use the properties of the interface(s) that you need.
+ *
+ * - See: `/usr/include/ifaddrs.h`
+ */
 public class Interface : CustomStringConvertible, CustomDebugStringConvertible {
 
+    /// The network interface family (IPv4 or IPv6).
     public enum Family : Int {
-        case ipv4, ipv6, other
+        /// IPv4.
+        case ipv4
+        
+        /// IPv6.
+        case ipv6
+        
+        /// Used in case of errors.
+        case other
+        
+        /// String representation of the address family.
         public func toString() -> String {
             switch (self) {
                 case .ipv4: return "IPv4"

        }
    }
    
    public static func allInterfaces() -> [Interface] {
        var interfaces : [Interface] = []
        

        return s
    }
    
    /**
     * Creates the network format representation of the interface's IP address. Wraps `inet_pton`.
     */
    public var addressBytes: [UInt8]? {
        guard let addr = address else { return nil }
        
