From 01e923507b28e5d1d3fe7597d2db2b30b0a543e9 Mon Sep 17 00:00:00 2001 From: Dan Field Date: Thu, 3 Oct 2019 10:50:22 -0700 Subject: [PATCH] kill unneeded code (#316) --- build/fuchsia/pkg/lib/netstack/c/BUILD.gn | 17 ------ build/fuchsia/pkg/lib/netstack/c/netconfig.h | 59 -------------------- build/fuchsia/pkg/lib/sys/cpp/BUILD.gn | 15 ----- 3 files changed, 91 deletions(-) delete mode 100644 build/fuchsia/pkg/lib/netstack/c/BUILD.gn delete mode 100644 build/fuchsia/pkg/lib/netstack/c/netconfig.h delete mode 100644 build/fuchsia/pkg/lib/sys/cpp/BUILD.gn diff --git a/build/fuchsia/pkg/lib/netstack/c/BUILD.gn b/build/fuchsia/pkg/lib/netstack/c/BUILD.gn deleted file mode 100644 index 243141856ba..00000000000 --- a/build/fuchsia/pkg/lib/netstack/c/BUILD.gn +++ /dev/null @@ -1,17 +0,0 @@ -# Copyright 2017 The Fuchsia Authors. All rights reserved. -# Use of this source code is governed by a BSD-style license that can be -# found in the LICENSE file. - -# TODO(dnfield): Remove this, it's not in the SDK. - -config("c_config") { - include_dirs = [ "../../../" ] -} - -source_set("c") { - sources = [ - "netconfig.h", - ] - - public_configs = [ ":c_config" ] -} diff --git a/build/fuchsia/pkg/lib/netstack/c/netconfig.h b/build/fuchsia/pkg/lib/netstack/c/netconfig.h deleted file mode 100644 index f406a328fcf..00000000000 --- a/build/fuchsia/pkg/lib/netstack/c/netconfig.h +++ /dev/null @@ -1,59 +0,0 @@ -// Copyright 2017 The Fuchsia 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 LIB_NETSTACK_C_NETCONFIG_H_ -#define LIB_NETSTACK_C_NETCONFIG_H_ - -// This is a temporary API to access network configuration information. It will -// be replaced by a FIDL interface to the network stack. - -// clang-format off - -#include - -#include -#include -#include - -__BEGIN_CDECLS - -#define NETC_IFNAME_SIZE 16 -#define NETC_HWADDR_SIZE 8 -#define NETC_IF_INFO_MAX 16 - -typedef struct { - char name[NETC_IFNAME_SIZE]; // null-terminated - struct sockaddr_storage addr; - struct sockaddr_storage netmask; - struct sockaddr_storage broadaddr; - uint32_t flags; - uint16_t index; - uint16_t hwaddr_len; - uint8_t hwaddr[NETC_HWADDR_SIZE]; -} netc_if_info_t; - -#define NETC_IFF_UP 0x1 - -typedef struct { - uint32_t n_info; - netc_if_info_t info[NETC_IF_INFO_MAX]; -} netc_get_if_info_t; - -// Usage: call ioctl_get_num_ifs first to find the number of interfaces, then -// query each interface by index, starting from 0, using get_if_info_at. The -// interface list is snapshot from the last time get_num_ifs was called. -#define IOCTL_NETC_GET_NUM_IFS \ - IOCTL(IOCTL_KIND_DEFAULT, IOCTL_FAMILY_NETCONFIG, 1) -#define IOCTL_NETC_GET_IF_INFO_AT \ - IOCTL(IOCTL_KIND_DEFAULT, IOCTL_FAMILY_NETCONFIG, 2) - -// Get if info -// ssize_t ioctl_netc_get_num_ifs(int fd, uint32_t* num_ifs) -IOCTL_WRAPPER_OUT(ioctl_netc_get_num_ifs, IOCTL_NETC_GET_NUM_IFS, uint32_t); -// ssize_t ioctl_netc_get_if_info_at(int fd, uint32_t* index, netc_if_info_t* if_info) -IOCTL_WRAPPER_INOUT(ioctl_netc_get_if_info_at, IOCTL_NETC_GET_IF_INFO_AT, uint32_t, netc_if_info_t); - -__END_CDECLS - -#endif // LIB_NETSTACK_C_NETCONFIG_H_ diff --git a/build/fuchsia/pkg/lib/sys/cpp/BUILD.gn b/build/fuchsia/pkg/lib/sys/cpp/BUILD.gn deleted file mode 100644 index da1c1f5690c..00000000000 --- a/build/fuchsia/pkg/lib/sys/cpp/BUILD.gn +++ /dev/null @@ -1,15 +0,0 @@ -# Copyright 2019 The Fuchsia Authors. All rights reserved. -# Use of this source code is governed by a BSD-style license that can be -# found in the LICENSE file. - -assert(is_fuchsia) -import("//build/fuchsia/sdk.gni") - -# TODO(dnfield): Remove this once Dart rules have been fixed: -# https://dart-review.googlesource.com/c/sdk/+/117770 - -group("cpp") { - visibility = [ "//third_party/dart/runtime/vm:*" ] - - public_deps = [ "$fuchsia_sdk_root/pkg:sys_cpp" ] -}