net: ipv6: Add implementation of main IPv6 functions
authorViacheslav Mitrofanov <v.v.mitrofanov@yadro.com>
Fri, 2 Dec 2022 09:18:05 +0000 (12:18 +0300)
committerTom Rini <trini@konsulko.com>
Mon, 5 Dec 2022 17:47:16 +0000 (12:47 -0500)
commit1feb697830ce2fe31bf66fc9d472134c73cf8b56
tree19ae155f0f20ea5222f620f10cbfa78d242b1366
parent43ab8ecc7deecb54fe8838fb61fa559196e68b4e
net: ipv6: Add implementation of main IPv6 functions

Functions that were exposed in "net: ipv6: Add IPv6 basic primitives"
had only empty implementations and were exposed as API for futher
patches. This patch add implementation of these functions. Main
functions are: net_ip6_handler() - IPv6 packet handler for incoming
packets; net_send_udp_packet6() - make up and send an UDP packet;
csum_ipv6_magic() - compute checksum of IPv6 "psuedo-header" per RFC2460
section 8.1; ip6_addr_in_subnet() - check if an address is in our
subnet. Other functions are auxiliary.

Series-changes: 3
- Added comments
- Fixed style problems
- Fixed return codes instead of -1

Signed-off-by: Viacheslav Mitrofanov <v.v.mitrofanov@yadro.com>
Reviewed-by: Ramon Fried <rfried.dev@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
include/net6.h
net/net6.c