Home
last modified time | relevance | path

Searched refs:ip_checksum_add (Results 1 – 7 of 7) sorted by relevance

/external/android-clat/
Dchecksum.c34 uint32_t ip_checksum_add(uint32_t current, const void *data, int len) { in ip_checksum_add() function
80 temp_sum = ip_checksum_add(0,data,len); in ip_checksum()
96 current = ip_checksum_add(current, &(ip6->ip6_src), sizeof(struct in6_addr)); in ipv6_pseudo_header_checksum()
97 current = ip_checksum_add(current, &(ip6->ip6_dst), sizeof(struct in6_addr)); in ipv6_pseudo_header_checksum()
98 current = ip_checksum_add(current, &checksum_len, sizeof(checksum_len)); in ipv6_pseudo_header_checksum()
99 current = ip_checksum_add(current, &checksum_next, sizeof(checksum_next)); in ipv6_pseudo_header_checksum()
116 current = ip_checksum_add(current, &(ip->saddr), sizeof(uint32_t)); in ipv4_pseudo_header_checksum()
117 current = ip_checksum_add(current, &(ip->daddr), sizeof(uint32_t)); in ipv4_pseudo_header_checksum()
118 current = ip_checksum_add(current, &temp_protocol, sizeof(uint16_t)); in ipv4_pseudo_header_checksum()
119 current = ip_checksum_add(current, &temp_length, sizeof(uint16_t)); in ipv4_pseudo_header_checksum()
Ddump.c137 temp_checksum = ip_checksum_add(temp_checksum, udp, sizeof(struct udphdr)); in dump_udp_generic()
138 temp_checksum = ip_checksum_add(temp_checksum, payload, payload_size); in dump_udp_generic()
168 temp_checksum = ip_checksum_add(temp_checksum, tcp, sizeof(struct tcphdr)); in dump_tcp_generic()
170 temp_checksum = ip_checksum_add(temp_checksum, options, options_size); in dump_tcp_generic()
172 temp_checksum = ip_checksum_add(temp_checksum, payload, payload_size); in dump_tcp_generic()
Dconfig.c211 uint32_t c1 = ip_checksum_add(0, ipv4_local_subnet, sizeof(*ipv4_local_subnet)); in gen_random_iid()
212 uint32_t c2 = ip_checksum_add(0, plat_subnet, sizeof(*plat_subnet)) + in gen_random_iid()
213 ip_checksum_add(0, myaddr, sizeof(*myaddr)); in gen_random_iid()
Dclatd_test.cpp264 checksum = ip_checksum_finish(ip_checksum_add(pseudo_checksum, payload, payload_length)); in check_packet()
419 udp->check = ip_checksum_finish(ip_checksum_add(pseudo_checksum, udp, ntohs(udp->len))); in fix_udp_checksum()
663 uint16_t c1 = ip_checksum_finish(ip_checksum_add(0, ipv4addr, sizeof(*ipv4addr))); in TEST_F()
664 uint16_t c2 = ip_checksum_finish(ip_checksum_add(0, plat_subnet, sizeof(*plat_subnet)) + in TEST_F()
665 ip_checksum_add(0, &myaddr, sizeof(myaddr))); in TEST_F()
813 EXPECT_EQ(kUdpPartialChecksum, ip_checksum_add(0, udphdr, sizeof(udphdr))) in TEST_F()
815 EXPECT_EQ(kPayloadPartialChecksum, ip_checksum_add(0, payload, sizeof(payload))) in TEST_F()
Dchecksum.h25 uint32_t ip_checksum_add(uint32_t current, const void *data, int len);
Dclatd_microbenchmark.c120 sum = ip_checksum_add(sum, &udp, sizeof(udp)); in send_packet()
193 uint32_t payload_sum = ip_checksum_add(0, payload, sizeof(payload)); in main()
Dtranslate.c40 checksum = ip_checksum_add(checksum, packet[i].iov_base, packet[i].iov_len); in packet_checksum()