arc: Move platform2/arc/network/ to platform2/patchpanel
Next step in the arc-networkd -> patchpanel rename, this patch moves the
location of the code.
BUG=b:151879931
TEST=units,flashed image to atlas
TEST=tasts arc.PlayStore, crostini.LaunchTerminal.download
Change-Id: I1b5cf8d670e1631d46f6449b725395157bf88dde
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform2/+/2115863
Tested-by: Garrick Evans <garrick@chromium.org>
Commit-Queue: Garrick Evans <garrick@chromium.org>
Reviewed-by: Hidehiko Abe <hidehiko@chromium.org>
Reviewed-by: Eric Caruso <ejcaruso@chromium.org>
Reviewed-by: Chirantan Ekbote <chirantan@chromium.org>
Reviewed-by: Hugo Benichi <hugobenichi@google.com>
diff --git a/patchpanel/ndproxy_fuzzer.cc b/patchpanel/ndproxy_fuzzer.cc
new file mode 100644
index 0000000..bef644b
--- /dev/null
+++ b/patchpanel/ndproxy_fuzzer.cc
@@ -0,0 +1,28 @@
+// Copyright 2019 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.
+
+#include "patchpanel/ndproxy.h"
+
+namespace patchpanel {
+
+namespace {
+
+constexpr MacAddress guest_if_mac({0xd2, 0x47, 0xf7, 0xc5, 0x9e, 0x53});
+
+extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) {
+ // Turn off logging.
+ logging::SetMinLogLevel(logging::LOG_FATAL);
+
+ uint8_t* out_buffer_extended = new uint8_t[size + 4];
+ uint8_t* out_buffer = NDProxy::AlignFrameBuffer(out_buffer_extended);
+ NDProxy ndproxy;
+ ndproxy.Init();
+ ndproxy.TranslateNDFrame(data, size, guest_if_mac, out_buffer);
+ delete[] out_buffer_extended;
+
+ return 0;
+}
+
+} // namespace
+} // namespace patchpanel