diff options
| author | Maciej Żenczykowski <maze@google.com> | 2020-06-03 08:08:21 +0000 |
|---|---|---|
| committer | Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com> | 2020-06-03 08:08:21 +0000 |
| commit | 609d39735050f9d42ccd1dae98152654bed828ac (patch) | |
| tree | 3809074d87d4df18d7d6b96f9d6bf65b3c819b6b | |
| parent | 711a213ddefa55b9a1f7fb2ec4156b555f195e2f (diff) | |
| parent | 4fe50323d95e95c2a60a950ba4a2eb03d3c8dff7 (diff) | |
| download | platform_external_android-clat-609d39735050f9d42ccd1dae98152654bed828ac.tar.gz platform_external_android-clat-609d39735050f9d42ccd1dae98152654bed828ac.tar.bz2 platform_external_android-clat-609d39735050f9d42ccd1dae98152654bed828ac.zip | |
cleanup - remove tun.h am: 6fafed183b am: 4fe50323d9
Original change: https://android-review.googlesource.com/c/platform/external/android-clat/+/1323171
Change-Id: I87ea014f14b35b91e71ec62ebd8185e492de3694
| -rw-r--r-- | clatd.c | 1 | ||||
| -rw-r--r-- | clatd_test.cpp | 1 | ||||
| -rw-r--r-- | config.h | 8 | ||||
| -rw-r--r-- | main.c | 1 | ||||
| -rw-r--r-- | ring.c | 2 | ||||
| -rw-r--r-- | translate.c | 1 | ||||
| -rw-r--r-- | tun.h | 35 |
7 files changed, 9 insertions, 40 deletions
@@ -50,7 +50,6 @@ #include "ring.h" #include "setif.h" #include "translate.h" -#include "tun.h" /* 40 bytes IPv6 header - 20 bytes IPv4 header + 8 bytes fragment header */ #define MTU_DELTA 28 diff --git a/clatd_test.cpp b/clatd_test.cpp index 514aaa8..c16a4dd 100644 --- a/clatd_test.cpp +++ b/clatd_test.cpp @@ -34,7 +34,6 @@ extern "C" { #include "getaddr.h" #include "netutils/checksum.h" #include "translate.h" -#include "tun.h" } // For convenience. @@ -21,6 +21,14 @@ #include <linux/if.h> #include <netinet/in.h> +#include "ring.h" + +struct tun_data { + char device4[IFNAMSIZ]; + int read_fd6, write_fd6, fd4; + struct packet_ring ring; +}; + struct clat_config { struct in6_addr ipv6_local_subnet; struct in_addr ipv4_local_subnet; @@ -32,7 +32,6 @@ #include "config.h" #include "logging.h" #include "setif.h" -#include "tun.h" #define DEVICEPREFIX "v4-" @@ -24,10 +24,10 @@ #include <sys/mman.h> #include <sys/socket.h> +#include "config.h" #include "logging.h" #include "ring.h" #include "translate.h" -#include "tun.h" int ring_create(struct tun_data *tunnel) { // Will eventually be bound to htons(ETH_P_IPV6) protocol, diff --git a/translate.c b/translate.c index f759726..728acc3 100644 --- a/translate.c +++ b/translate.c @@ -26,7 +26,6 @@ #include "icmp.h" #include "logging.h" #include "translate.h" -#include "tun.h" /* function: packet_checksum * calculates the checksum over all the packet components starting from pos @@ -1,35 +0,0 @@ -/* - * Copyright 2014 The Android Open Source Project - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - * tun.h - tun device functions - */ -#ifndef __TUN_H__ -#define __TUN_H__ - -#include <fcntl.h> -#include <linux/if.h> -#include <sys/uio.h> -#include <unistd.h> - -#include "common.h" -#include "ring.h" - -struct tun_data { - char device4[IFNAMSIZ]; - int read_fd6, write_fd6, fd4; - struct packet_ring ring; -}; - -#endif |
