summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLorenzo Colitti <lorenzo@google.com>2013-11-18 13:33:30 +0900
committerLorenzo Colitti <lorenzo@google.com>2014-03-09 02:20:45 +0900
commit86cb1ac3d69805bebcac7a18b408d656603028f4 (patch)
treeb7ad2ab2fed6c776ab5470c656157f66a0eb7988
parentade83087bae9575d3c61f39fba1ffad6442f2d56 (diff)
downloadandroid_external_android-clat-86cb1ac3d69805bebcac7a18b408d656603028f4.tar.gz
android_external_android-clat-86cb1ac3d69805bebcac7a18b408d656603028f4.tar.bz2
android_external_android-clat-86cb1ac3d69805bebcac7a18b408d656603028f4.zip
DO NOT MERGE: Remove two almost-unused include files.
This fixes a compiler warning. Change-Id: I14b5d3c871e9b2fdc8400d999e76e494ad510328
-rw-r--r--clatd.c2
-rw-r--r--ipv4.c1
-rw-r--r--ipv4.h25
-rw-r--r--ipv6.c1
-rw-r--r--ipv6.h25
-rw-r--r--translate.h4
6 files changed, 4 insertions, 54 deletions
diff --git a/clatd.c b/clatd.c
index 26ecb57..1ca46a3 100644
--- a/clatd.c
+++ b/clatd.c
@@ -47,8 +47,6 @@
#include <private/android_filesystem_config.h>
-#include "ipv4.h"
-#include "ipv6.h"
#include "translate.h"
#include "clatd.h"
#include "config.h"
diff --git a/ipv4.c b/ipv4.c
index 89e47e4..47f2422 100644
--- a/ipv4.c
+++ b/ipv4.c
@@ -28,7 +28,6 @@
#include "translate.h"
#include "checksum.h"
-#include "ipv4.h"
#include "logging.h"
#include "debug.h"
#include "dump.h"
diff --git a/ipv4.h b/ipv4.h
deleted file mode 100644
index 00befd2..0000000
--- a/ipv4.h
+++ /dev/null
@@ -1,25 +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.
- *
- * ipv4.h - takes an ipv4 packet and hands it off to the proper translate function
- */
-#ifndef __IPV4_H__
-#define __IPV4_H__
-
-#include "translate.h"
-
-int ipv4_packet(clat_packet out, int pos, const char *packet, size_t len);
-
-#endif /* __IPV4_H__ */
diff --git a/ipv6.c b/ipv6.c
index ef1e62f..faf27ad 100644
--- a/ipv6.c
+++ b/ipv6.c
@@ -29,7 +29,6 @@
#include "translate.h"
#include "checksum.h"
-#include "ipv6.h"
#include "logging.h"
#include "dump.h"
#include "config.h"
diff --git a/ipv6.h b/ipv6.h
deleted file mode 100644
index 019de17..0000000
--- a/ipv6.h
+++ /dev/null
@@ -1,25 +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.
- *
- * ipv6.h - takes an ipv6 packet and hands it off to the proper translate function
- */
-#ifndef __IPV6_H__
-#define __IPV6_H__
-
-#include "translate.h"
-
-int ipv6_packet(clat_packet out, int pos, const char *packet, size_t len);
-
-#endif /* __IPV6_H__ */
diff --git a/translate.h b/translate.h
index fded251..356050f 100644
--- a/translate.h
+++ b/translate.h
@@ -47,6 +47,10 @@ void fill_ip_header(struct iphdr *ip_targ, uint16_t payload_len, uint8_t protoco
void fill_ip6_header(struct ip6_hdr *ip6, uint16_t payload_len, uint8_t protocol,
const struct iphdr *old_header);
+// Translate IPv4 and IPv6 packets.
+int ipv4_packet(clat_packet out, int pos, const char *packet, size_t len);
+int ipv6_packet(clat_packet out, int pos, const char *packet, size_t len);
+
// Translate ICMP packets.
int icmp_to_icmp6(clat_packet out, int pos, const struct icmphdr *icmp, uint32_t checksum,
const char *payload, size_t payload_size);