()
return interfaces
Retrieves attributes of all network interfaces.

  Returns:
    Array of dict or empty array
Retrieves attributes of all network interfaces.
Retrieves attributes of all network interfaces .
def GetNetworkInterfaces():
  """Retrieves attributes of all network interfaces.

  Returns:
    Array of dict or empty array
  """
  interfaces = []
  ni_data = gmacpyutil.GetPlist(NI_PLIST)
  for cur_int in ni_data['Interfaces']:
    interface = {}
    interface['type'] = unicode(cur_int['SCNetworkInterfaceType'])
    interface['mac'] = _GetMACFromData(cur_int['IOMACAddress'])
    interface['name'] = unicode(
        cur_int['SCNetworkInterfaceInfo']['UserDefinedName'])
    interface['dev'] = unicode(cur_int['BSD Name'])
    interface['bus'] = unicode(cur_int['IOPathMatch'])
    interface['builtin'] = cur_int['IOBuiltin']
    interfaces.append(interface)
  return interfaces
def GetNetworkInterfaces ( ) : interfaces = [ ] ni_data = gmacpyutil . GetPlist ( NI_PLIST ) for cur_int in ni_data [ 'Interfaces' ] : interface = { } interface [ 'type' ] = unicode ( cur_int [ 'SCNetworkInterfaceType' ] ) interface [ 'mac' ] = _GetMACFromData ( cur_int [ 'IOMACAddress' ] ) interface [ 'name' ] = unicode ( cur_int [ 'SCNetworkInterfaceInfo' ] [ 'UserDefinedName' ] ) interface [ 'dev' ] = unicode ( cur_int [ 'BSD Name' ] ) interface [ 'bus' ] = unicode ( cur_int [ 'IOPathMatch' ] ) interface [ 'builtin' ] = cur_int [ 'IOBuiltin' ] interfaces . append ( interface ) return interfaces