chromium/chrome/browser/media/router/discovery/discovery_network_list_posix.cc

// Copyright 2017 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#ifdef UNSAFE_BUFFERS_BUILD
// TODO(crbug.com/40285824): Remove this and convert code to safer constructs.
#pragma allow_unsafe_buffers
#endif

#include "chrome/browser/media/router/discovery/discovery_network_list.h"

#include <ifaddrs.h>
#include <net/if.h>
#include <net/if_arp.h>
#include <netinet/in.h>
#include <sys/socket.h>
#include <sys/types.h>

#include <algorithm>

#include "base/strings/string_number_conversions.h"
#include "build/build_config.h"
#include "chrome/browser/media/router/discovery/discovery_network_list_wifi.h"
#include "net/base/net_errors.h"

#if !BUILDFLAG(IS_MAC)
#include <netpacket/packet.h>
#else
#include <net/if_dl.h>
#endif

namespace media_router {
namespace {

#if !BUILDFLAG(IS_MAC)
sll;
#define SOCKET_ARP_TYPE(s)
#define SOCKET_ADDRESS_LEN(s)
#define SOCKET_ADDRESS(s)
#else  // BUILDFLAG(IS_MAC)
#define AF_PACKET
using sll = struct sockaddr_dl;
#define SOCKET_ARP_TYPE
#define SOCKET_ADDRESS_LEN
#define SOCKET_ADDRESS
#endif

void GetDiscoveryNetworkInfoListImpl(
    const struct ifaddrs* if_list,
    std::vector<DiscoveryNetworkInfo>* network_info_list) {}

}  // namespace

std::vector<DiscoveryNetworkInfo> GetDiscoveryNetworkInfoList() {}

}  // namespace media_router