View Javadoc
1   /*
2    * Copyright 2021-2022 The OSHI Project Contributors
3    * SPDX-License-Identifier: MIT
4    */
5   package oshi.jna.platform.mac;
6   
7   import com.sun.jna.Library;
8   import com.sun.jna.Native;
9   import com.sun.jna.Pointer;
10  import com.sun.jna.platform.mac.CoreFoundation.CFArrayRef;
11  import com.sun.jna.platform.mac.CoreFoundation.CFStringRef;
12  import com.sun.jna.platform.mac.CoreFoundation.CFTypeRef;
13  
14  /**
15   * Allow applications to access a device’s network configuration settings. Determine the reachability of the device,
16   * such as whether Wi-Fi or cell connectivity are active.
17   */
18  public interface SystemConfiguration extends Library {
19  
20      SystemConfiguration INSTANCE = Native.load("SystemConfiguration", SystemConfiguration.class);
21  
22      class SCNetworkInterfaceRef extends CFTypeRef {
23          public SCNetworkInterfaceRef() {
24              super();
25          }
26  
27          public SCNetworkInterfaceRef(Pointer p) {
28              super(p);
29          }
30      }
31  
32      CFArrayRef SCNetworkInterfaceCopyAll();
33  
34      CFStringRef SCNetworkInterfaceGetBSDName(SCNetworkInterfaceRef netint);
35  
36      CFStringRef SCNetworkInterfaceGetLocalizedDisplayName(SCNetworkInterfaceRef netint);
37  }