mirror of
https://github.com/SerenityOS/serenity.git
synced 2026-11-07 12:38:38 -10:00
Previously, there were two slightly different implementations of this in the Kernel and in LibCrypto. This patch removes those, and replaces them with an implementation that seeks to combine the best aspects of both while not being a drop-in replacement for either. Two new tests are also included.
26 lines
595 B
C++
26 lines
595 B
C++
/*
|
|
* Copyright (c) 2024, kleines Filmröllchen <[email protected]>
|
|
* Copyright (c) 2024, sdomi <[email protected]>
|
|
* Copyright (c) 2024, Wanda <[email protected]>
|
|
*
|
|
* SPDX-License-Identifier: BSD-2-Clause
|
|
*/
|
|
|
|
#pragma once
|
|
|
|
#include <AK/Types.h>
|
|
|
|
namespace Kernel {
|
|
|
|
// IPv4 "Protocol" field or IPv6 "Next Header" field.
|
|
// Included in this enum are only transport layer protocols, not IPv6 extended headers.
|
|
// https://www.iana.org/assignments/protocol-numbers/protocol-numbers.xhtml
|
|
enum class TransportProtocol : u8 {
|
|
ICMP = 1,
|
|
TCP = 6,
|
|
UDP = 17,
|
|
ICMPv6 = 58,
|
|
};
|
|
|
|
}
|