-
-
Notifications
You must be signed in to change notification settings - Fork 3.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Kernel/Net: Minimal amount of IPv6 for ping replies #25009
Commits on Oct 3, 2024
-
Kernel/Net: Rename "IPv4Protocol" to "TransportProtocol"
This enum is neither IPv4-specific, nor does it have to do anything with the network layer, as the name may imply. The enum is moved to a new header containing common IPv4/IPv6 definitions.
Configuration menu - View commit details
-
Copy full SHA for 073ef37 - Browse repository at this point
Copy the full SHA 073ef37View commit details
Commits on Oct 4, 2024
-
Kernel/Net: Rename IPv4 directory to IP
Commit ad73ade needlessly introduced an IPv4 directory. If we were to keep it, sharing common headers between IPv4 and IPv6 would be much messier, and may potentially increase code duplication. This change renames the IPv4 directory to IP to aid with later IPv6 porting efforts.
Configuration menu - View commit details
-
Copy full SHA for e838e3c - Browse repository at this point
Copy the full SHA e838e3cView commit details -
Kernel/Net: Move internet_checksum to a more general file
Up until now, the internet_checksum function lived in IPv4.h. Due to its use in IPv6, a better place for it nowadays would be in IP.h. Due to how it gets used in IPv6 scenarios, it makes sense to extend it to run over multiple smaller structs instead of one big continous chunk of memory. This change converts internet_checksum into a class with methods "add" and "finish", which process data and return the final result, respectively. This commit also fixes proper hash computation for payloads that have an odd length. Furthermore, the function was refactored to use a ReadonlyBytes object instead of separate data and size. Co-Authored-By: Wanda <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 773e728 - Browse repository at this point
Copy the full SHA 773e728View commit details -
Kernel/Net: Directly pass adapter to protocol handler calls
Up until now, protocol handlers for IPv4 and ARP had to rediscover the adapter based on trying to match the address to all interfaces. This approach is relatively slow, introduces more code duplication, and doesn't work with multiple IPs per interface (as is the case with IPv6). This change introduces directly passing the adapter to all handlers that need it, cutting out the retrieval process. Furthermore, we discard the packet much faster if the IP doesn't match.
Configuration menu - View commit details
-
Copy full SHA for dfc074d - Browse repository at this point
Copy the full SHA dfc074dView commit details -
Kernel/Net: Start work on IPv6
This commit introduces the first bit of IPv6 support into SerenityOS. An IPv6 packet header structure allows NetworkTask to recognize and log correctly shaped IPv6 packets, but nothing is done with those yet. A new logging flag, IPV6_DEBUG, allows debugging of IPv6 internals. Co-Authored-By: sdomi <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for f2414e5 - Browse repository at this point
Copy the full SHA f2414e5View commit details -
Kernel/Net: Add support functions for filling out IPv6 packets
This change also migrates the existing fill_in_ipv4_header from C-style casts to proper C++ casts.
Configuration menu - View commit details
-
Copy full SHA for 6788578 - Browse repository at this point
Copy the full SHA 6788578View commit details -
Net/Kernel: Add basic ICMPv6 support
This commit adds the minimum amount of code to make Serenity reply to ICMPv6 ping packets. This includes basic Network Discovery Protocol support, as well as a basic ICMPv6 Echo Request/Response handler. This change also introduces a new debug flag, ICMPV6_DEBUG. Co-Authored-By: kleines Filmröllchen <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 9028fee - Browse repository at this point
Copy the full SHA 9028feeView commit details -
Kernel/Net: Remove useless checks from handle_arp
According to ARP.h, address lengths default to size of their underlying types (IPv4Address and MACAddress respectively). We never modify those values, and in reality, ARP never carries anything else. Hence, those checks resolved to comparing sizeof to itself, which probably gets optimized out of the compiler anyways. This change removes the checks that will never fail, plus changes the function definition to pass adapter directly, matching other handlers.
Configuration menu - View commit details
-
Copy full SHA for 81931d1 - Browse repository at this point
Copy the full SHA 81931d1View commit details -
Kernel/Net: Introduce proper pointers for payload calls
Unifying with other structures, this introduces m_payload for all relevant structures, except the TCP header (which has a different concept of payload than the rest). This allows us to return a pointer directly instead of doing pointer arithmetic to point to the end of the structure.
Configuration menu - View commit details
-
Copy full SHA for 314d768 - Browse repository at this point
Copy the full SHA 314d768View commit details