chromium/services/network/public/cpp/network_interface_change_listener_mojom_traits.h

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

#ifndef SERVICES_NETWORK_PUBLIC_CPP_NETWORK_INTERFACE_CHANGE_LISTENER_MOJOM_TRAITS_H_
#define SERVICES_NETWORK_PUBLIC_CPP_NETWORK_INTERFACE_CHANGE_LISTENER_MOJOM_TRAITS_H_

#include <linux/rtnetlink.h>

#include "mojo/public/cpp/bindings/struct_traits.h"
#include "net/base/address_map_linux.h"
#include "services/network/public/mojom/network_interface_change_listener.mojom-shared.h"

namespace mojo {

template <>
struct COMPONENT_EXPORT(NETWORK_CPP_BASE)
    StructTraits<network::mojom::AddressMapDataView,
                 net::AddressMapOwnerLinux::AddressMap> {};

template <>
struct COMPONENT_EXPORT(NETWORK_CPP_BASE)
    StructTraits<network::mojom::OnlineLinksDataView, std::unordered_set<int>> {};

template <>
struct COMPONENT_EXPORT(NETWORK_CPP_BASE)
    StructTraits<network::mojom::IfAddrMsgDataView, struct ifaddrmsg> {};

}  // namespace mojo

#endif  // SERVICES_NETWORK_PUBLIC_CPP_NETWORK_INTERFACE_CHANGE_LISTENER_MOJOM_TRAITS_H_