diff options
| author | Maciej Żenczykowski <maze@google.com> | 2020-06-03 08:08:49 +0000 |
|---|---|---|
| committer | Maciej Zenczykowski <maze@google.com> | 2020-06-04 09:53:14 +0000 |
| commit | 2d35cdbd89f59011f4340617ec2b206dc3446b1a (patch) | |
| tree | ab35db00ba507142ac2f9307bb79478815e933ff | |
| parent | 551367e946fce14a5985ddeaa607f1f44c3dadb9 (diff) | |
| download | platform_external_android-clat-android11-dev.tar.gz platform_external_android-clat-android11-dev.tar.bz2 platform_external_android-clat-android11-dev.zip | |
cleanup - remove config.candroid11-dev
Test:
git grep 'config[.]c'
comes up empty
Bug: 144730808
Test: atest clatd_test netd_integration_test
Signed-off-by: Maciej Żenczykowski <maze@google.com>
Original-Change: https://android-review.googlesource.com/1323172
Merged-In: I8500881852f1255a69b49eba6354777883fe438f
Change-Id: I8500881852f1255a69b49eba6354777883fe438f
| -rw-r--r-- | Android.bp | 1 | ||||
| -rw-r--r-- | clatd.c | 2 | ||||
| -rw-r--r-- | config.c | 44 | ||||
| -rw-r--r-- | config.h | 10 |
4 files changed, 11 insertions, 46 deletions
@@ -20,7 +20,6 @@ cc_defaults { filegroup { name: "clatd_common", srcs: [ - "config.c", "clatd.c", "dump.c", "getaddr.c", @@ -51,6 +51,8 @@ #include "setif.h" #include "translate.h" +struct clat_config Global_Clatd_Config; + /* 40 bytes IPv6 header - 20 bytes IPv4 header + 8 bytes fragment header */ #define MTU_DELTA 28 diff --git a/config.c b/config.c deleted file mode 100644 index d83b958..0000000 --- a/config.c +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Copyright 2011 Daniel Drown - * - * 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. - * - * config.c - configuration settings - */ - -#include <arpa/inet.h> -#include <errno.h> -#include <limits.h> -#include <stdio.h> -#include <stdlib.h> -#include <string.h> -#include <unistd.h> - -#include <cutils/config_utils.h> -#include <netutils/checksum.h> -#include <netutils/ifc.h> - -#include "clatd.h" -#include "config.h" -#include "getaddr.h" -#include "logging.h" - -struct clat_config Global_Clatd_Config; - -/* function: ipv6_prefix_equal - * compares the prefixes two ipv6 addresses. assumes the prefix lengths are both /64. - * a1 - first address - * a2 - second address - * returns: 0 if the subnets are different, 1 if they are the same. - */ -int ipv6_prefix_equal(struct in6_addr *a1, struct in6_addr *a2) { return !memcmp(a1, a2, 8); } @@ -38,6 +38,14 @@ struct clat_config { extern struct clat_config Global_Clatd_Config; -int ipv6_prefix_equal(struct in6_addr *a1, struct in6_addr *a2); +/* function: ipv6_prefix_equal + * compares the /64 prefixes of two ipv6 addresses. + * a1 - first address + * a2 - second address + * returns: 0 if the subnets are different, 1 if they are the same. + */ +static inline int ipv6_prefix_equal(struct in6_addr *a1, struct in6_addr *a2) { + return !memcmp(a1, a2, 8); +} #endif /* __CONFIG_H__ */ |
