1 Reply
      Latest reply on Oct 17, 2019 7:40 AM by tartempion
      Dennis Chen Level 1 Level 1 (0 points)

        There's a command can output the defautl interface name like this:

        $route -n get default

        route to: default

        destination: default

               mask: default

            gateway: 169.38.24.11

          interface: en0

              flags: <UP,GATEWAY,DONE,STATIC,PRCLONING>

        recvpipe  sendpipe  ssthresh  rtt,msec    rttvar  hopcount      mtu     expire

               0         0         0         0         0         0      1500         0

         

        I want to know if there's API in macOS xcode/SDK to get the interface name: en0 in below output?