blob: bc58f5f0fb289dc2ae34e8332de083f809e07a53 [file] [log] [blame]
// Copyright 2018 The Chromium OS Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef VM_TOOLS_CONCIERGE_TAP_DEVICE_BUILDER_H_
#define VM_TOOLS_CONCIERGE_TAP_DEVICE_BUILDER_H_
#include <stdint.h>
#include <arc/network/mac_address_generator.h>
#include <base/files/scoped_file.h>
#include <base/macros.h>
namespace vm_tools {
namespace concierge {
// Builds and configures a tap device. If the returned ScopedFD is valid then
// the device has been properly configured.
base::ScopedFD BuildTapDevice(const arc_networkd::MacAddress& mac_addr,
uint32_t ipv4_addr,
uint32_t ipv4_netmask,
bool vnet_hdr);
} // namespace concierge
} // namespace vm_tools
#endif // VM_TOOLS_CONCIERGE_TAP_DEVICE_BUILDER_H_