History log of /external/android-clat/ipv4.c
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
a4454bfda99803c287b78f8d1cd7bdc1b56065db 25-Feb-2014 Lorenzo Colitti <lorenzo@google.com> Declare pos as clat_packet_index instead of int

Bug: 11542311
Change-Id: Id5771c9685286b70a8ad283c259c7f83662e8b76
/external/android-clat/ipv4.c
fcac410fa15613873a07143ccd46470b869346a3 25-Feb-2014 Brian Carlstrom <bdc@google.com> Use uint8_t not char for binary data to avoid -Wall -Werror issues on x86 builds

Change-Id: Ib61e67f15360c27c3ebf61f870a9482217c52357
/external/android-clat/ipv4.c
57d480d2b425ef20d8b6f84abd4e9e3209fa9422 09-Feb-2014 Lorenzo Colitti <lorenzo@google.com> Support translating fragmented packets.

Bug: 11542311
Change-Id: I14a20b9ac669cdb5927f6ac26147bb0109099497
/external/android-clat/ipv4.c
07f0265830fcae2632159e9993b93a161d7ea23b 20-Feb-2014 Lorenzo Colitti <lorenzo@google.com> Modify the pseudo-header checksum functions.

- Remove the initial checksum, which we don't use anywhere.
- Add the upper-layer protocol to the IPv6 function. Currently
this is always the same as the next header field in the IPv6
header, but technically it's the upper-layer header after all
the extension headers. This is required to support fragments.

Bug: 11542311
Change-Id: Ie1a20fa74ee5bc933c1014bab74ae2957979b2b8
/external/android-clat/ipv4.c
f9390605bacda7bbe8ea33aa0a39c1581ff6aea2 12-Feb-2014 Lorenzo Colitti <lorenzo@google.com> 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: I8529fb87f3a86ee6724fad54787c33a5e86c56ab
/external/android-clat/ipv4.c
5a50c0283346a197cda7af19e68f611f14b8fe57 10-Feb-2014 Lorenzo Colitti <lorenzo@google.com> 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: I6b78a94ca5bd96b13ee2653b6200551193b3dcc1
/external/android-clat/ipv4.c
c9f4c89da6c76ebc59a0ec1047853a13ce5f5d96 17-Nov-2013 Lorenzo Colitti <lorenzo@google.com> Add generic IP packet code and use it for GRE.

Bug: 11542311
Change-Id: I174e0b268869bc77927feeee57003580c47c30f2
/external/android-clat/ipv4.c
07fc7614a14f024857fcb4880b308df6e8c297d0 18-Nov-2013 Lorenzo Colitti <lorenzo@google.com> Remove two almost-unused include files.

This fixes a compiler warning.

Change-Id: I14b5d3c871e9b2fdc8400d999e76e494ad510328
/external/android-clat/ipv4.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/ipv4.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/ipv4.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/ipv4.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/ipv4.c