summaryrefslogtreecommitdiffstats
path: root/checksum.c
Commit message (Collapse)AuthorAgeFilesLines
* Move send_tun into tun.c as well.Lorenzo Colitti2014-12-081-1/+0
| | | | | | Also remove a redundant include in checksum.c. Change-Id: I0b8858343b1496f22904d3b316b6c435be0f648a
* Modify the pseudo-header checksum functions.Lorenzo Colitti2014-02-221-8/+8
| | | | | | | | | | | - 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
* Fix up checksums instead of recalculating them.Lorenzo Colitti2014-02-141-5/+33
| | | | | | | | | | | | 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
* Pass in the length to pseudo checksum functionsLorenzo Colitti2013-04-091-21/+23
| | | | | | | | | | | | 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
* android clat serviceDaniel Drown2012-11-121-0/+113
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>