#ifdef UNSAFE_BUFFERS_BUILD
#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
#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) { … }
}
std::vector<DiscoveryNetworkInfo> GetDiscoveryNetworkInfoList() { … }
}