History log of /external/android-clat/translate.c
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
2b4cc7393268622ac3de071435a6e4ab857342df 09-Feb-2014 Lorenzo Colitti <lorenzo@google.com> DO NOT MERGE: Support translating fragmented packets.

Bug: 11542311
Change-Id: I5dd29805e12b919ae3105b6128aaedefd7e78b48
/external/android-clat/translate.c
f0029d7d06cc8401686ddf379a609b29f511f1a5 12-Feb-2014 Lorenzo Colitti <lorenzo@google.com> DO NOT MERGE: Move translation entry point into translate.c.

The entry point to the translation code is currently called
packet_handler and lives in clatd.c. Move it into translate.c
and rename it to translate_packet, since that's what it does.

Also get rid of some redundant includes.

Bug: 11542311
Change-Id: I821bb9590b9105ea1d425c3bbe0e634c4ce667b5
/external/android-clat/translate.c
c1be4799c39775fecb004d92687fe95298cac380 10-Feb-2014 Lorenzo Colitti <lorenzo@google.com> DO NOT MERGE: Fix up checksums instead of recalculating them.

Currently the checksums of translated packets are calculated
from scratch by checksumming the translated packet. This is slow
and does not work in the case of fragments, because the whole
packet is not available. Instead, calculate the checksum by
adjusting the checksum of the original packet.

Bug: 11542311
Bug: 12116252
Change-Id: I457347753d1bb5b23e3ae759bf2e4388102772d7
/external/android-clat/translate.c
57bcefd5920c330f03aa76329b9f97f3f1e841ac 17-Nov-2013 Lorenzo Colitti <lorenzo@google.com> DO NOT MERGE: Add generic IP packet code and use it for GRE.

Bug: 11542311
Change-Id: I91040f35814bd7b23288228a7fdf80f1be2f5a04
/external/android-clat/translate.c
c2549b4b4e2437aca29497c29ebe0b17b6214549 18-Nov-2013 Lorenzo Colitti <lorenzo@google.com> DO NOT MERGE: Fix compiler warnings and enable -Wall -Werror

Change-Id: I4eb9eb407500893a27745ed2df6da9a378ddb159
/external/android-clat/translate.c
72f3126f6499cd9017b367f5c7e61cab1d99d080 12-Dec-2013 Bernhard Rosenkränzer <Bernhard.Rosenkranzer@linaro.org> DO NOT MERGE: Remove unused variables

Remove unused variables -- they cause warnings (and errors with
-Werror) when building with clang 3.4.

Change-Id: I6ef10841bc1384bf256d73874ae1e709caa6b132
Signed-off-by: Bernhard Rosenkränzer <Bernhard.Rosenkranzer@linaro.org>
/external/android-clat/translate.c
88ee177670cc651784e1c58fac814202e63414ac 08-Mar-2014 Lorenzo Colitti <lorenzo@google.com> Revert "DO NOT MERGE: Remove unused variables"

This reverts commit cb72f3643f475b70089e79108e16621787262e2b.

Change-Id: I10196a15fe92e281d4922f384f373a964ff703ec
/external/android-clat/translate.c
cb72f3643f475b70089e79108e16621787262e2b 12-Dec-2013 Bernhard Rosenkränzer <Bernhard.Rosenkranzer@linaro.org> DO NOT MERGE: Remove unused variables

Remove unused variables -- they cause warnings (and errors with
-Werror) when building with clang 3.4.

Change-Id: I03fff9b1b9d620763f41c8b31a19c4724726739c
Signed-off-by: Bernhard Rosenkränzer <Bernhard.Rosenkranzer@linaro.org>
/external/android-clat/translate.c
cd70b354eb985678175904a937085bed6094af77 09-Apr-2013 Lorenzo Colitti <lorenzo@google.com> Support translating ICMP errors.

When receiving ICMPv6 messages from IPv6-only nodes, use
255.0.0.<ttl> as a fake IPv4 source address. It's better than
nothing.

Bug: 8276725
Change-Id: Iae93f75764cb9cd875af9bb5f1862a0dce2c2fa7
/external/android-clat/translate.c
ee80ca65907d214e2483e315a1ba7f610184de03 10-Apr-2013 Lorenzo Colitti <lorenzo@google.com> Improve checksum calculation and address checking

1. Add a function that calculates the checksum of all the packet
components starting from the specified position. This
simplifies the code a bit and makes it easier to translate
nested packets like ICMP error messages.

2. Don't hardcode IP source and destination addresses. This is
required to translate ICMP error messages.

Bug: 8276725
Change-Id: I2cae45683ae3943e508608fd0a140180dbc60823
/external/android-clat/translate.c
d90841824dc00f65a48a789396c7f428807432ca 21-Mar-2013 Lorenzo Colitti <lorenzo@google.com> Pass around packet data instead of fds

The current code calls all the translation functions one after
another, accumulating the translated packet into local variables
on the stack and calling writev() at the end. This does not allow
calling the translation functions re-entrantly, which is needed,
for example, to translate ICMP errors (which contain the
packet that caused them). Define a clat_packet type to wrap the
array of iovecs and an enum of packet positions.

Also clean up the code a bit: get rid of a fair bit of duplicated
code (though there is still some left), get rid of some redundant
memcpy statements, fix style issues, etc.

Bug: 8276725
Change-Id: Ib58d2348894e82275234fc67dbdb1f82753f204f
/external/android-clat/translate.c
5cc877d4fc20d66ca5a057a3dc445adb998409bd 08-Apr-2013 Lorenzo Colitti <lorenzo@google.com> Treat the options as part of the TCP header.

This simplifies the code and makes UDP and TCP look the same. It
will also make it easier to implement nested translation in the
future because there will only be one iovec array entry for the
transport layer header, regardless of whether we are translating
UDP or TCP and regardless of the presence of options.

Also get rid of a couple of memcpy statements by pointing to the
original data instead.

Bug: 8276725
Change-Id: I6a702aefdf3a070eedfc6f7d3ebec21880ecc22b
/external/android-clat/translate.c
0278627f576832860af2d84e04e383ecaa92d74f 08-Apr-2013 Lorenzo Colitti <lorenzo@google.com> Pass in the length to pseudo checksum functions

Currently, the pseudo-header checksum calculation functions get
the transport layer length from the IP header. This requires that
the length be known at IP header construction time, which
does not allow transport layer translation functions to change
the length of the packet later. Have the transport functions
pass in the size directly.

Bug: 8276725
Change-Id: I76a93f5e66181bec21d68f779c68c54090a77c33
/external/android-clat/translate.c
a45056e35c1af2a0f0a6eed258fd5fdf4846a79f 23-Mar-2012 Daniel Drown <dan-android@drown.org> android clat service

This software provides the nat 4->6 translation needed for the "clat" part of
the 464xlat standard. It is needed for better IPv4 application support while
on an IPv6-only mobile network connection using 464xlat's nat64 (such as
T-Mobile's IPv6 trial).

A general diagram of how 464xlat works:
http://dan.drown.org/android/clat/Clat-Plat.png

Depends-on: I2392f8127dcd90d16b0f20ff31bcc5aa096db464
Change-Id: If2bc6916fc66fd4bca7cc241c83cfae839b82e15
Signed-off-by: Daniel Drown <dan-android@drown.org>
/external/android-clat/translate.c