def GetAllInterfaceNames():
  this_platform = _GetPlatform()

  # Note slight difference in regex.
  # BSD ifconfig writes "interface_name:\s+"
  # while Linux writes "interface_name\s+"
  if this_platform == LINUX:
    intf_header = re.compile(r'^([a-z]+(?:[0-9]+)?)\s+')
  elif this_platform == DARWIN:
    intf_header = re.compile(r'^([a-z]+(?:[0-9]+)?):\s+')

  return_code, stdout, stderr = flight_common.Exec('/sbin/ifconfig')
  if return_code != 0 or stderr:
    return []

  interfaces = []

  if stdout:
    for l in stdout.splitlines():  # pylint: disable=maybe-no-member
      m = intf_header.search(str(l))
      if m:
        interfaces.append(m.group(1))

  return interfaces
Returns a copy of the counter
dataset/ETHPy150Open google/simian/src/simian/mac/client/network_detect.py/GetAllInterfaceNames--crossover with--dataset/ETHPy150Open rlpy/rlpy/rlpy/Domains/PacmanPackage/util.py/Counter.copy